From 421e86280cdc6e9412940dd64986070572be0579 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Wed, 25 Mar 2026 20:19:12 +0800 Subject: [PATCH 1/3] generated from swagger:cae4dfe61e44bc4a40dc577d0948c1474c7b39c8 --- .../azure-mgmt-apimanagement/CHANGELOG.md | 4 + .../azure-mgmt-apimanagement/MANIFEST.in | 9 +- .../azure-mgmt-apimanagement/README.md | 4 +- .../azure-mgmt-apimanagement/_meta.json | 11 - .../azure-mgmt-apimanagement/_metadata.json | 11 + .../apiview-properties.json | 1788 + .../azure/__init__.py | 2 +- .../azure/mgmt/__init__.py | 2 +- .../apimanagement/_api_management_client.py | 62 +- .../mgmt/apimanagement/_configuration.py | 21 +- .../azure/mgmt/apimanagement/_patch.py | 2 + .../mgmt/apimanagement/_utils/__init__.py | 6 + .../serialization.py} | 219 +- .../{_vendor.py => _utils/utils.py} | 16 +- .../azure/mgmt/apimanagement/_version.py | 3 +- .../aio/_api_management_client.py | 65 +- .../mgmt/apimanagement/aio/_configuration.py | 21 +- .../azure/mgmt/apimanagement/aio/_patch.py | 2 + .../azure/mgmt/apimanagement/aio/_vendor.py | 25 - .../apimanagement/aio/operations/__init__.py | 12 +- .../operations/_all_policies_operations.py | 29 +- .../operations/_api_diagnostic_operations.py | 54 +- .../aio/operations/_api_export_operations.py | 27 +- ...pi_gateway_config_connection_operations.py | 49 +- ...api_gateway_hostname_binding_operations.py | 724 + .../aio/operations/_api_gateway_operations.py | 56 +- .../_api_issue_attachment_operations.py | 49 +- .../_api_issue_comment_operations.py | 49 +- .../aio/operations/_api_issue_operations.py | 54 +- .../_api_management_client_operations.py | 25 +- ..._api_management_gateway_skus_operations.py | 29 +- .../_api_management_operations_operations.py | 29 +- .../_api_management_service_operations.py | 224 +- ..._api_management_service_skus_operations.py | 29 +- .../_api_management_skus_operations.py | 29 +- ...pi_management_workspace_link_operations.py | 27 +- ...i_management_workspace_links_operations.py | 29 +- .../operations/_api_operation_operations.py | 54 +- .../_api_operation_policy_operations.py | 47 +- .../aio/operations/_api_operations.py | 61 +- .../aio/operations/_api_policy_operations.py | 47 +- .../aio/operations/_api_product_operations.py | 29 +- .../aio/operations/_api_release_operations.py | 54 +- .../operations/_api_revision_operations.py | 29 +- .../aio/operations/_api_schema_operations.py | 49 +- .../_api_tag_description_operations.py | 49 +- .../aio/operations/_api_tool_operations.py | 707 + .../operations/_api_version_set_operations.py | 54 +- .../aio/operations/_api_wiki_operations.py | 47 +- .../aio/operations/_api_wikis_operations.py | 29 +- ..._authorization_access_policy_operations.py | 44 +- .../_authorization_login_links_operations.py | 27 +- .../operations/_authorization_operations.py | 49 +- .../_authorization_provider_operations.py | 112 +- .../_authorization_server_operations.py | 59 +- .../aio/operations/_backend_operations.py | 62 +- .../aio/operations/_cache_operations.py | 54 +- .../aio/operations/_certificate_operations.py | 54 +- .../_client_application_operations.py | 582 + ...ent_application_product_link_operations.py | 475 + .../operations/_content_item_operations.py | 49 +- .../operations/_content_type_operations.py | 44 +- .../_delegation_settings_operations.py | 47 +- .../_deleted_services_operations.py | 39 +- .../aio/operations/_diagnostic_operations.py | 54 +- .../operations/_documentation_operations.py | 54 +- .../operations/_email_template_operations.py | 54 +- .../aio/operations/_gateway_api_operations.py | 47 +- ...ateway_certificate_authority_operations.py | 49 +- ...teway_hostname_configuration_operations.py | 49 +- .../aio/operations/_gateway_operations.py | 92 +- .../operations/_global_schema_operations.py | 49 +- .../_graph_ql_api_resolver_operations.py | 54 +- ...graph_ql_api_resolver_policy_operations.py | 49 +- .../aio/operations/_group_operations.py | 54 +- .../aio/operations/_group_user_operations.py | 44 +- .../_identity_provider_operations.py | 60 +- .../aio/operations/_issue_operations.py | 34 +- .../aio/operations/_logger_operations.py | 54 +- .../aio/operations/_named_value_operations.py | 64 +- .../operations/_network_status_operations.py | 32 +- .../operations/_notification_operations.py | 39 +- ...notification_recipient_email_operations.py | 42 +- ..._notification_recipient_user_operations.py | 42 +- .../_open_id_connect_provider_operations.py | 59 +- .../aio/operations/_operation_operations.py | 29 +- .../_operation_status_operations.py | 27 +- .../_operations_results_operations.py | 27 +- ...twork_dependencies_endpoints_operations.py | 27 +- .../apimanagement/aio/operations/_patch.py | 1 + .../_policy_description_operations.py | 27 +- .../operations/_policy_fragment_operations.py | 54 +- .../aio/operations/_policy_operations.py | 49 +- .../_policy_restriction_operations.py | 54 +- ...licy_restriction_validations_operations.py | 27 +- .../operations/_portal_config_operations.py | 49 +- .../operations/_portal_revision_operations.py | 49 +- .../operations/_portal_settings_operations.py | 27 +- ..._private_endpoint_connection_operations.py | 54 +- .../_product_api_link_operations.py | 44 +- .../aio/operations/_product_api_operations.py | 44 +- .../_product_group_link_operations.py | 44 +- .../operations/_product_group_operations.py | 44 +- .../aio/operations/_product_operations.py | 61 +- .../operations/_product_policy_operations.py | 49 +- .../_product_subscriptions_operations.py | 29 +- .../operations/_product_wiki_operations.py | 47 +- .../operations/_product_wikis_operations.py | 29 +- .../_quota_by_counter_keys_operations.py | 33 +- .../_quota_by_period_keys_operations.py | 33 +- .../aio/operations/_region_operations.py | 29 +- .../aio/operations/_reports_operations.py | 79 +- .../_sign_in_settings_operations.py | 42 +- .../_sign_up_settings_operations.py | 42 +- .../operations/_subscription_operations.py | 69 +- .../operations/_tag_api_link_operations.py | 44 +- .../_tag_operation_link_operations.py | 44 +- .../aio/operations/_tag_operations.py | 135 +- .../_tag_product_link_operations.py | 44 +- .../operations/_tag_resource_operations.py | 29 +- .../_tenant_access_git_operations.py | 32 +- .../operations/_tenant_access_operations.py | 64 +- .../_tenant_configuration_operations.py | 43 +- .../operations/_tenant_settings_operations.py | 34 +- .../_user_confirmation_password_operations.py | 27 +- .../aio/operations/_user_group_operations.py | 29 +- .../operations/_user_identities_operations.py | 29 +- .../aio/operations/_user_operations.py | 65 +- .../_user_subscription_operations.py | 34 +- .../_workspace_api_diagnostic_operations.py | 54 +- .../_workspace_api_export_operations.py | 27 +- .../_workspace_api_operation_operations.py | 54 +- ...rkspace_api_operation_policy_operations.py | 49 +- .../operations/_workspace_api_operations.py | 54 +- .../_workspace_api_policy_operations.py | 49 +- .../_workspace_api_release_operations.py | 54 +- .../_workspace_api_revision_operations.py | 29 +- .../_workspace_api_schema_operations.py | 49 +- .../_workspace_api_version_set_operations.py | 54 +- .../_workspace_backend_operations.py | 54 +- .../_workspace_certificate_operations.py | 54 +- .../_workspace_diagnostic_operations.py | 54 +- .../_workspace_global_schema_operations.py | 49 +- .../operations/_workspace_group_operations.py | 54 +- .../_workspace_group_user_operations.py | 44 +- .../_workspace_logger_operations.py | 54 +- .../_workspace_named_value_operations.py | 64 +- .../_workspace_notification_operations.py | 39 +- ...notification_recipient_email_operations.py | 42 +- ..._notification_recipient_user_operations.py | 42 +- .../aio/operations/_workspace_operations.py | 54 +- .../_workspace_policy_fragment_operations.py | 54 +- .../_workspace_policy_operations.py | 49 +- .../_workspace_product_api_link_operations.py | 44 +- ...workspace_product_group_link_operations.py | 44 +- .../_workspace_product_operations.py | 54 +- .../_workspace_product_policy_operations.py | 47 +- .../_workspace_subscription_operations.py | 69 +- .../_workspace_tag_api_link_operations.py | 44 +- ...workspace_tag_operation_link_operations.py | 44 +- .../operations/_workspace_tag_operations.py | 54 +- .../_workspace_tag_product_link_operations.py | 44 +- .../mgmt/apimanagement/models/__init__.py | 69 + .../models/_api_management_client_enums.py | 111 +- .../mgmt/apimanagement/models/_models_py3.py | 2537 +- .../azure/mgmt/apimanagement/models/_patch.py | 1 + .../mgmt/apimanagement/operations/__init__.py | 12 +- .../operations/_all_policies_operations.py | 37 +- .../operations/_api_diagnostic_operations.py | 83 +- .../operations/_api_export_operations.py | 35 +- ...pi_gateway_config_connection_operations.py | 64 +- ...api_gateway_hostname_binding_operations.py | 967 + .../operations/_api_gateway_operations.py | 83 +- .../_api_issue_attachment_operations.py | 73 +- .../_api_issue_comment_operations.py | 73 +- .../operations/_api_issue_operations.py | 83 +- .../_api_management_client_operations.py | 31 +- ..._api_management_gateway_skus_operations.py | 37 +- .../_api_management_operations_operations.py | 34 +- .../_api_management_service_operations.py | 316 +- ..._api_management_service_skus_operations.py | 37 +- .../_api_management_skus_operations.py | 34 +- ...pi_management_workspace_link_operations.py | 35 +- ...i_management_workspace_links_operations.py | 37 +- .../operations/_api_operation_operations.py | 83 +- .../_api_operation_policy_operations.py | 71 +- .../operations/_api_operations.py | 94 +- .../operations/_api_policy_operations.py | 71 +- .../operations/_api_product_operations.py | 37 +- .../operations/_api_release_operations.py | 83 +- .../operations/_api_revision_operations.py | 37 +- .../operations/_api_schema_operations.py | 73 +- .../_api_tag_description_operations.py | 73 +- .../operations/_api_tool_operations.py | 983 + .../operations/_api_version_set_operations.py | 82 +- .../operations/_api_wiki_operations.py | 71 +- .../operations/_api_wikis_operations.py | 37 +- ..._authorization_access_policy_operations.py | 64 +- .../_authorization_login_links_operations.py | 35 +- .../operations/_authorization_operations.py | 73 +- .../_authorization_provider_operations.py | 179 +- .../_authorization_server_operations.py | 92 +- .../operations/_backend_operations.py | 95 +- .../operations/_cache_operations.py | 82 +- .../operations/_certificate_operations.py | 82 +- .../_client_application_operations.py | 848 + ...ent_application_product_link_operations.py | 694 + .../operations/_content_item_operations.py | 73 +- .../operations/_content_type_operations.py | 64 +- .../_delegation_settings_operations.py | 71 +- .../_deleted_services_operations.py | 53 +- .../operations/_diagnostic_operations.py | 82 +- .../operations/_documentation_operations.py | 82 +- .../operations/_email_template_operations.py | 83 +- .../operations/_gateway_api_operations.py | 67 +- ...ateway_certificate_authority_operations.py | 73 +- ...teway_hostname_configuration_operations.py | 73 +- .../operations/_gateway_operations.py | 145 +- .../operations/_global_schema_operations.py | 73 +- .../_graph_ql_api_resolver_operations.py | 83 +- ...graph_ql_api_resolver_policy_operations.py | 73 +- .../operations/_group_operations.py | 82 +- .../operations/_group_user_operations.py | 64 +- .../_identity_provider_operations.py | 92 +- .../operations/_issue_operations.py | 46 +- .../operations/_logger_operations.py | 82 +- .../operations/_named_value_operations.py | 101 +- .../operations/_network_status_operations.py | 44 +- .../operations/_notification_operations.py | 55 +- ...notification_recipient_email_operations.py | 62 +- ..._notification_recipient_user_operations.py | 62 +- .../_open_id_connect_provider_operations.py | 92 +- .../operations/_operation_operations.py | 37 +- .../_operation_status_operations.py | 35 +- .../_operations_results_operations.py | 35 +- ...twork_dependencies_endpoints_operations.py | 35 +- .../mgmt/apimanagement/operations/_patch.py | 1 + .../_policy_description_operations.py | 35 +- .../operations/_policy_fragment_operations.py | 82 +- .../operations/_policy_operations.py | 73 +- .../_policy_restriction_operations.py | 82 +- ...licy_restriction_validations_operations.py | 35 +- .../operations/_portal_config_operations.py | 73 +- .../operations/_portal_revision_operations.py | 74 +- .../operations/_portal_settings_operations.py | 35 +- ..._private_endpoint_connection_operations.py | 82 +- .../_product_api_link_operations.py | 64 +- .../operations/_product_api_operations.py | 64 +- .../_product_group_link_operations.py | 64 +- .../operations/_product_group_operations.py | 64 +- .../operations/_product_operations.py | 94 +- .../operations/_product_policy_operations.py | 73 +- .../_product_subscriptions_operations.py | 37 +- .../operations/_product_wiki_operations.py | 71 +- .../operations/_product_wikis_operations.py | 37 +- .../_quota_by_counter_keys_operations.py | 44 +- .../_quota_by_period_keys_operations.py | 44 +- .../operations/_region_operations.py | 37 +- .../operations/_reports_operations.py | 115 +- .../_sign_in_settings_operations.py | 62 +- .../_sign_up_settings_operations.py | 62 +- .../operations/_subscription_operations.py | 110 +- .../operations/_tag_api_link_operations.py | 64 +- .../_tag_operation_link_operations.py | 64 +- .../operations/_tag_operations.py | 224 +- .../_tag_product_link_operations.py | 64 +- .../operations/_tag_resource_operations.py | 37 +- .../_tenant_access_git_operations.py | 44 +- .../operations/_tenant_access_operations.py | 101 +- .../_tenant_configuration_operations.py | 62 +- .../operations/_tenant_settings_operations.py | 46 +- .../_user_confirmation_password_operations.py | 35 +- .../operations/_user_group_operations.py | 37 +- .../operations/_user_identities_operations.py | 37 +- .../operations/_user_operations.py | 101 +- .../_user_subscription_operations.py | 46 +- .../_workspace_api_diagnostic_operations.py | 83 +- .../_workspace_api_export_operations.py | 35 +- .../_workspace_api_operation_operations.py | 83 +- ...rkspace_api_operation_policy_operations.py | 73 +- .../operations/_workspace_api_operations.py | 83 +- .../_workspace_api_policy_operations.py | 73 +- .../_workspace_api_release_operations.py | 83 +- .../_workspace_api_revision_operations.py | 37 +- .../_workspace_api_schema_operations.py | 73 +- .../_workspace_api_version_set_operations.py | 83 +- .../_workspace_backend_operations.py | 83 +- .../_workspace_certificate_operations.py | 82 +- .../_workspace_diagnostic_operations.py | 83 +- .../_workspace_global_schema_operations.py | 73 +- .../operations/_workspace_group_operations.py | 83 +- .../_workspace_group_user_operations.py | 64 +- .../_workspace_logger_operations.py | 83 +- .../_workspace_named_value_operations.py | 101 +- .../_workspace_notification_operations.py | 55 +- ...notification_recipient_email_operations.py | 62 +- ..._notification_recipient_user_operations.py | 62 +- .../operations/_workspace_operations.py | 82 +- .../_workspace_policy_fragment_operations.py | 83 +- .../_workspace_policy_operations.py | 73 +- .../_workspace_product_api_link_operations.py | 64 +- ...workspace_product_group_link_operations.py | 64 +- .../_workspace_product_operations.py | 83 +- .../_workspace_product_policy_operations.py | 71 +- .../_workspace_subscription_operations.py | 110 +- .../_workspace_tag_api_link_operations.py | 64 +- ...workspace_tag_operation_link_operations.py | 64 +- .../operations/_workspace_tag_operations.py | 83 +- .../_workspace_tag_product_link_operations.py | 64 +- .../code_report_swagger.json | 138283 +++++++++++++++ ...custom_assigned_certificate_thumbprints.py | 56 + .../api_management_all_policies.py | 3 +- ...ent_apply_network_configuration_updates.py | 3 +- ...e_or_reject_private_endpoint_connection.py | 3 +- ...ement_authorization_server_list_secrets.py | 3 +- .../api_management_backend_reconnect.py | 3 +- .../api_management_backup_with_access_key.py | 3 +- ...ent_backup_with_system_managed_identity.py | 3 +- ...kup_with_user_assigned_managed_identity.py | 3 +- .../api_management_create_ai_logger.py | 3 +- .../api_management_create_api.py | 3 +- .../api_management_create_api_clone.py | 3 +- .../api_management_create_api_diagnostic.py | 3 +- .../api_management_create_api_issue.py | 3 +- ..._management_create_api_issue_attachment.py | 3 +- ...api_management_create_api_issue_comment.py | 3 +- ...eate_api_new_version_using_existing_api.py | 3 +- .../api_management_create_api_operation.py | 3 +- ..._management_create_api_operation_policy.py | 3 +- ...api_management_create_api_operation_tag.py | 3 +- .../api_management_create_api_policy.py | 3 +- ...ement_create_api_policy_non_xml_encoded.py | 3 +- .../api_management_create_api_release.py | 3 +- ...t_create_api_revision_from_existing_api.py | 3 +- .../api_management_create_api_schema.py | 3 +- .../api_management_create_api_tag.py | 3 +- ...i_management_create_api_tag_description.py | 3 +- .../api_management_create_api_tool.py | 52 + ...e_api_using_import_override_service_url.py | 3 +- ...management_create_api_using_oai3_import.py | 3 +- ...slate_required_query_parameters_conduct.py | 3 +- ...agement_create_api_using_swagger_import.py | 3 +- ...management_create_api_using_wadl_import.py | 3 +- .../api_management_create_api_version_set.py | 3 +- .../api_management_create_api_wiki.py | 3 +- ...t_create_api_with_multiple_auth_servers.py | 3 +- ...with_multiple_open_id_connect_providers.py | 3 +- ...agement_create_api_with_open_id_connect.py | 3 +- ...ment_create_authorization_aad_auth_code.py | 3 +- ...nt_create_authorization_aad_client_cred.py | 3 +- ...ment_create_authorization_access_policy.py | 3 +- ...te_authorization_provider_aad_auth_code.py | 3 +- ...n_provider_aad_auth_code_with_key_vault.py | 61 + ..._authorization_provider_aad_client_cred.py | 3 +- ...e_authorization_provider_generic_oauth2.py | 3 +- ...reate_authorization_provider_oob_google.py | 3 +- ..._management_create_authorization_server.py | 3 +- ...management_create_backend_proxy_backend.py | 3 +- ...anagement_create_backend_service_fabric.py | 3 +- ...gement_create_backend_with_azure_region.py | 47 + ...backend_with_carbon_aware_load_balancer.py | 64 + ..._custom_assigned_certificate_x509_names.py | 56 + ...ckend_with_priority_based_load_balancer.py | 69 + ...reate_backend_with_simple_load_balancer.py | 59 + ...ate_backend_with_weighted_load_balancer.py | 61 + .../api_management_create_cache.py | 3 +- .../api_management_create_certificate.py | 3 +- ...ement_create_certificate_with_key_vault.py | 3 +- ...pi_management_create_client_application.py | 51 + ..._create_client_application_product_link.py | 50 + .../api_management_create_content_type.py | 3 +- ...gement_create_content_type_content_item.py | 3 +- .../api_management_create_diagnostic.py | 3 +- .../api_management_create_documentation.py | 3 +- .../api_management_create_eh_logger.py | 3 +- .../api_management_create_gateway.py | 3 +- .../api_management_create_gateway_api.py | 3 +- ...nt_create_gateway_certificate_authority.py | 3 +- ...gement_create_gateway_config_connection.py | 3 +- ...agement_create_gateway_hostname_binding.py | 53 + ...t_create_gateway_hostname_configuration.py | 3 +- .../api_management_create_global_schema1.py | 3 +- .../api_management_create_global_schema2.py | 3 +- .../api_management_create_graph_ql_api.py | 3 +- ...management_create_graph_ql_api_resolver.py | 3 +- ...ent_create_graph_ql_api_resolver_policy.py | 3 +- .../api_management_create_group.py | 3 +- .../api_management_create_group_external.py | 3 +- .../api_management_create_group_user.py | 3 +- .../api_management_create_grpc_api.py | 3 +- ...api_management_create_identity_provider.py | 3 +- ...lti_region_service_with_custom_hostname.py | 3 +- .../api_management_create_named_value.py | 3 +- ...ement_create_named_value_with_key_vault.py | 3 +- .../api_management_create_notification.py | 3 +- ...ent_create_notification_recipient_email.py | 3 +- ...ment_create_notification_recipient_user.py | 3 +- .../api_management_create_odata_api.py | 3 +- ...agement_create_open_id_connect_provider.py | 3 +- .../api_management_create_policy.py | 3 +- .../api_management_create_policy_fragment.py | 3 +- ...pi_management_create_policy_restriction.py | 3 +- .../api_management_create_portal_config.py | 3 +- .../api_management_create_portal_revision.py | 3 +- .../api_management_create_product.py | 3 +- .../api_management_create_product_api.py | 3 +- .../api_management_create_product_api_link.py | 3 +- .../api_management_create_product_group.py | 3 +- ...pi_management_create_product_group_link.py | 3 +- .../api_management_create_product_policy.py | 3 +- .../api_management_create_product_tag.py | 3 +- .../api_management_create_product_wiki.py | 3 +- .../api_management_create_service.py | 3 +- ...pi_management_create_service_having_msi.py | 3 +- ...t_create_service_in_vnet_with_public_ip.py | 3 +- .../api_management_create_service_in_zones.py | 3 +- ...management_create_service_skuv2_service.py | 3 +- ..._service_with_custom_hostname_key_vault.py | 3 +- ...nt_create_service_with_developer_portal.py | 3 +- ...create_service_with_nat_gateway_enabled.py | 3 +- ...create_service_with_system_certificates.py | 3 +- ...ate_service_with_user_assigned_identity.py | 3 +- ...ervice_without_legacy_configuration_api.py | 3 +- ...soap_pass_through_api_using_wsdl_import.py | 3 +- ...eate_soap_to_rest_api_using_wsdl_import.py | 3 +- .../api_management_create_standard_gateway.py | 3 +- .../api_management_create_subscription.py | 3 +- .../api_management_create_tag.py | 3 +- .../api_management_create_tag_api_link.py | 3 +- ...pi_management_create_tag_operation_link.py | 3 +- .../api_management_create_tag_product_link.py | 3 +- .../api_management_create_template.py | 3 +- .../api_management_create_tenant_access.py | 3 +- .../api_management_create_user.py | 3 +- .../api_management_create_websocket_api.py | 3 +- .../api_management_create_workspace.py | 3 +- ...i_management_create_workspace_ai_logger.py | 3 +- .../api_management_create_workspace_api.py | 3 +- ...agement_create_workspace_api_diagnostic.py | 3 +- ...nagement_create_workspace_api_operation.py | 3 +- ...t_create_workspace_api_operation_policy.py | 3 +- ..._management_create_workspace_api_policy.py | 3 +- ...management_create_workspace_api_release.py | 3 +- ..._management_create_workspace_api_schema.py | 3 +- ...gement_create_workspace_api_version_set.py | 3 +- ..._create_workspace_backend_proxy_backend.py | 3 +- ...create_workspace_backend_service_fabric.py | 3 +- ...management_create_workspace_certificate.py | 3 +- ...te_workspace_certificate_with_key_vault.py | 3 +- ..._management_create_workspace_diagnostic.py | 3 +- ...i_management_create_workspace_eh_logger.py | 3 +- .../api_management_create_workspace_group.py | 3 +- ...agement_create_workspace_group_external.py | 3 +- ..._management_create_workspace_group_user.py | 3 +- ...management_create_workspace_named_value.py | 3 +- ...te_workspace_named_value_with_key_vault.py | 3 +- ...anagement_create_workspace_notification.py | 3 +- ..._workspace_notification_recipient_email.py | 3 +- ...e_workspace_notification_recipient_user.py | 3 +- .../api_management_create_workspace_policy.py | 3 +- ...gement_create_workspace_policy_fragment.py | 3 +- ...create_workspace_policy_non_xml_encoded.py | 3 +- ...gement_create_workspace_premium_gateway.py | 3 +- ...api_management_create_workspace_product.py | 3 +- ...ement_create_workspace_product_api_link.py | 3 +- ...ent_create_workspace_product_group_link.py | 3 +- ...agement_create_workspace_product_policy.py | 3 +- .../api_management_create_workspace_schema.py | 3 +- ...anagement_create_workspace_subscription.py | 3 +- .../api_management_create_workspace_tag.py | 3 +- ...anagement_create_workspace_tag_api_link.py | 3 +- ...ent_create_workspace_tag_operation_link.py | 3 +- ...ement_create_workspace_tag_product_link.py | 3 +- .../api_management_delete_api.py | 3 +- .../api_management_delete_api_diagnostic.py | 3 +- .../api_management_delete_api_issue.py | 3 +- ..._management_delete_api_issue_attachment.py | 3 +- ...api_management_delete_api_issue_comment.py | 3 +- .../api_management_delete_api_operation.py | 3 +- ..._management_delete_api_operation_policy.py | 3 +- ...api_management_delete_api_operation_tag.py | 3 +- .../api_management_delete_api_policy.py | 3 +- .../api_management_delete_api_release.py | 3 +- .../api_management_delete_api_schema.py | 3 +- .../api_management_delete_api_tag.py | 3 +- ...i_management_delete_api_tag_description.py | 3 +- .../api_management_delete_api_tool.py | 44 + .../api_management_delete_api_version_set.py | 3 +- .../api_management_delete_api_wiki.py | 3 +- .../api_management_delete_authorization.py | 3 +- ...ment_delete_authorization_access_policy.py | 3 +- ...anagement_delete_authorization_provider.py | 3 +- ..._management_delete_authorization_server.py | 3 +- .../api_management_delete_backend.py | 3 +- .../api_management_delete_cache.py | 3 +- .../api_management_delete_certificate.py | 3 +- ...pi_management_delete_client_application.py | 43 + ..._delete_client_application_product_link.py | 44 + .../api_management_delete_content_type.py | 3 +- ...gement_delete_content_type_content_item.py | 3 +- .../api_management_delete_diagnostic.py | 3 +- .../api_management_delete_documentation.py | 44 + .../api_management_delete_gateway.py | 3 +- .../api_management_delete_gateway_api.py | 3 +- ...nt_delete_gateway_certificate_authority.py | 3 +- ...gement_delete_gateway_config_connection.py | 3 +- ...agement_delete_gateway_hostname_binding.py | 44 + ...t_delete_gateway_hostname_configuration.py | 3 +- .../api_management_delete_global_schema.py | 3 +- ...management_delete_graph_ql_api_resolver.py | 3 +- ...ent_delete_graph_ql_api_resolver_policy.py | 3 +- .../api_management_delete_group.py | 3 +- .../api_management_delete_group_user.py | 3 +- ...api_management_delete_identity_provider.py | 3 +- .../api_management_delete_logger.py | 3 +- .../api_management_delete_named_value.py | 3 +- ...ent_delete_notification_recipient_email.py | 3 +- ...ment_delete_notification_recipient_user.py | 3 +- ...agement_delete_open_id_connect_provider.py | 3 +- .../api_management_delete_policy.py | 3 +- .../api_management_delete_policy_fragment.py | 3 +- ...pi_management_delete_policy_restriction.py | 3 +- ...ment_delete_private_endpoint_connection.py | 3 +- .../api_management_delete_product.py | 3 +- .../api_management_delete_product_api.py | 3 +- .../api_management_delete_product_api_link.py | 3 +- .../api_management_delete_product_group.py | 3 +- ...pi_management_delete_product_group_link.py | 3 +- .../api_management_delete_product_policy.py | 3 +- .../api_management_delete_product_tag.py | 3 +- .../api_management_delete_product_wiki.py | 3 +- .../api_management_delete_subscription.py | 3 +- .../api_management_delete_tag.py | 3 +- .../api_management_delete_tag_api_link.py | 3 +- ...pi_management_delete_tag_operation_link.py | 3 +- .../api_management_delete_tag_product_link.py | 3 +- .../api_management_delete_template.py | 3 +- .../api_management_delete_user.py | 3 +- .../api_management_delete_workspace.py | 3 +- .../api_management_delete_workspace_api.py | 3 +- ...agement_delete_workspace_api_diagnostic.py | 3 +- ...nagement_delete_workspace_api_operation.py | 3 +- ...t_delete_workspace_api_operation_policy.py | 3 +- ..._management_delete_workspace_api_policy.py | 3 +- ...management_delete_workspace_api_release.py | 3 +- ..._management_delete_workspace_api_schema.py | 3 +- ...gement_delete_workspace_api_version_set.py | 3 +- ...api_management_delete_workspace_backend.py | 3 +- ...management_delete_workspace_certificate.py | 3 +- ..._management_delete_workspace_diagnostic.py | 3 +- .../api_management_delete_workspace_group.py | 3 +- ..._management_delete_workspace_group_user.py | 3 +- .../api_management_delete_workspace_logger.py | 3 +- ...management_delete_workspace_named_value.py | 3 +- ..._workspace_notification_recipient_email.py | 3 +- ...e_workspace_notification_recipient_user.py | 3 +- .../api_management_delete_workspace_policy.py | 3 +- ...gement_delete_workspace_policy_fragment.py | 3 +- ...api_management_delete_workspace_product.py | 3 +- ...ement_delete_workspace_product_api_link.py | 3 +- ...ent_delete_workspace_product_group_link.py | 3 +- ...agement_delete_workspace_product_policy.py | 3 +- .../api_management_delete_workspace_schema.py | 3 +- ...anagement_delete_workspace_subscription.py | 3 +- .../api_management_delete_workspace_tag.py | 3 +- ...anagement_delete_workspace_tag_api_link.py | 3 +- ...ent_delete_workspace_tag_operation_link.py | 3 +- ...ement_delete_workspace_tag_product_link.py | 3 +- ...t_deleted_services_list_by_subscription.py | 3 +- .../api_management_deleted_services_purge.py | 3 +- .../api_management_gateway_delete_gateway.py | 3 +- .../api_management_gateway_generate_token.py | 3 +- .../api_management_gateway_get_gateway.py | 3 +- ...nt_gateway_invalidate_debug_credentials.py | 3 +- ...nagement_gateway_list_debug_credentials.py | 3 +- .../api_management_gateway_list_keys.py | 3 +- .../api_management_gateway_list_trace.py | 3 +- .../api_management_gateway_regenerate_key.py | 3 +- .../api_management_get_api_contract.py | 3 +- .../api_management_get_api_diagnostic.py | 3 +- ...agement_get_api_export_in_open_api2dot0.py | 3 +- ...agement_get_api_export_in_open_api3dot0.py | 3 +- .../api_management_get_api_issue.py | 3 +- ...api_management_get_api_issue_attachment.py | 3 +- .../api_management_get_api_issue_comment.py | 3 +- .../api_management_get_api_operation.py | 3 +- ..._management_get_api_operation_pet_store.py | 3 +- ...api_management_get_api_operation_policy.py | 3 +- .../api_management_get_api_operation_tag.py | 3 +- .../api_management_get_api_policy.py | 3 +- .../api_management_get_api_release.py | 3 +- .../api_management_get_api_revision.py | 3 +- .../api_management_get_api_schema.py | 3 +- .../api_management_get_api_tag.py | 3 +- .../api_management_get_api_tag_description.py | 3 +- .../api_management_get_api_tool.py | 45 + .../api_management_get_api_version_set.py | 3 +- .../api_management_get_api_wiki.py | 3 +- .../api_management_get_authorization.py | 3 +- ...agement_get_authorization_access_policy.py | 3 +- ...agement_get_authorization_login_request.py | 3 +- ...i_management_get_authorization_provider.py | 3 +- ...api_management_get_authorization_server.py | 3 +- .../api_management_get_backend.py | 3 +- .../api_management_get_cache.py | 3 +- .../api_management_get_certificate.py | 3 +- ...nagement_get_certificate_with_key_vault.py | 3 +- .../api_management_get_client_application.py | 44 + ...ent_get_client_application_product_link.py | 45 + .../api_management_get_content_type.py | 3 +- ...anagement_get_content_type_content_item.py | 3 +- ..._management_get_deleted_service_by_name.py | 3 +- .../api_management_get_diagnostic.py | 3 +- .../api_management_get_documentation.py | 3 +- .../api_management_get_gateway.py | 3 +- ...ement_get_gateway_certificate_authority.py | 3 +- ...anagement_get_gateway_config_connection.py | 3 +- ...management_get_gateway_hostname_binding.py | 44 + ...ment_get_gateway_hostname_configuration.py | 3 +- .../api_management_get_global_schema1.py | 3 +- .../api_management_get_global_schema2.py | 3 +- ...pi_management_get_graph_ql_api_resolver.py | 3 +- ...gement_get_graph_ql_api_resolver_policy.py | 3 +- .../api_management_get_group.py | 3 +- .../api_management_get_identity_provider.py | 3 +- .../api_management_get_issue.py | 3 +- .../api_management_get_logger.py | 3 +- .../api_management_get_named_value.py | 3 +- ...nagement_get_named_value_with_key_vault.py | 3 +- .../api_management_get_notification.py | 3 +- ...management_get_open_id_connect_provider.py | 3 +- .../api_management_get_operation_result.py | 3 +- .../api_management_get_operation_status.py | 3 +- .../api_management_get_policy.py | 3 +- .../api_management_get_policy_format.py | 3 +- .../api_management_get_policy_fragment.py | 3 +- ...i_management_get_policy_fragment_format.py | 3 +- .../api_management_get_policy_restriction.py | 3 +- .../api_management_get_portal_revision.py | 3 +- ...agement_get_private_endpoint_connection.py | 3 +- ...agement_get_private_link_group_resource.py | 3 +- .../api_management_get_product.py | 3 +- .../api_management_get_product_api_link.py | 3 +- .../api_management_get_product_group_link.py | 3 +- .../api_management_get_product_policy.py | 3 +- .../api_management_get_product_tag.py | 3 +- .../api_management_get_product_wiki.py | 3 +- .../api_management_get_quota_counter_keys.py | 3 +- ..._get_quota_counter_keys_by_quota_period.py | 3 +- .../api_management_get_reports_by_api.py | 3 +- .../api_management_get_reports_by_geo.py | 3 +- ...api_management_get_reports_by_operation.py | 3 +- .../api_management_get_reports_by_product.py | 3 +- .../api_management_get_reports_by_request.py | 3 +- ..._management_get_reports_by_subscription.py | 3 +- .../api_management_get_reports_by_time.py | 3 +- .../api_management_get_reports_by_user.py | 3 +- .../api_management_get_subscription.py | 3 +- .../api_management_get_tag.py | 3 +- .../api_management_get_tag_api_link.py | 3 +- .../api_management_get_tag_operation_link.py | 3 +- .../api_management_get_tag_product_link.py | 3 +- .../api_management_get_template.py | 3 +- .../api_management_get_tenant_access.py | 3 +- .../api_management_get_tenant_git_access.py | 3 +- .../api_management_get_tenant_settings.py | 3 +- .../api_management_get_user.py | 3 +- .../api_management_get_user_subscription.py | 3 +- .../api_management_get_workspace.py | 3 +- ...i_management_get_workspace_api_contract.py | 3 +- ...management_get_workspace_api_diagnostic.py | 3 +- ...t_workspace_api_export_in_open_api2dot0.py | 3 +- ...t_workspace_api_export_in_open_api3dot0.py | 3 +- ..._management_get_workspace_api_operation.py | 3 +- ...ment_get_workspace_api_operation_policy.py | 3 +- ...api_management_get_workspace_api_policy.py | 3 +- ...pi_management_get_workspace_api_release.py | 3 +- ...i_management_get_workspace_api_revision.py | 3 +- ...api_management_get_workspace_api_schema.py | 3 +- ...anagement_get_workspace_api_version_set.py | 3 +- .../api_management_get_workspace_backend.py | 3 +- ...pi_management_get_workspace_certificate.py | 3 +- ...et_workspace_certificate_with_key_vault.py | 3 +- ...api_management_get_workspace_diagnostic.py | 3 +- .../api_management_get_workspace_group.py | 3 +- .../api_management_get_workspace_link.py | 3 +- .../api_management_get_workspace_logger.py | 3 +- ...pi_management_get_workspace_named_value.py | 3 +- ...et_workspace_named_value_with_key_vault.py | 3 +- ...i_management_get_workspace_notification.py | 3 +- .../api_management_get_workspace_policy.py | 3 +- ...anagement_get_workspace_policy_fragment.py | 3 +- ...nt_get_workspace_policy_fragment_format.py | 3 +- .../api_management_get_workspace_product.py | 3 +- ...nagement_get_workspace_product_api_link.py | 3 +- ...gement_get_workspace_product_group_link.py | 3 +- ...management_get_workspace_product_policy.py | 3 +- .../api_management_get_workspace_schema.py | 3 +- ...i_management_get_workspace_subscription.py | 3 +- .../api_management_get_workspace_tag.py | 3 +- ...i_management_get_workspace_tag_api_link.py | 3 +- ...gement_get_workspace_tag_operation_link.py | 3 +- ...nagement_get_workspace_tag_product_link.py | 3 +- .../api_management_head_api.py | 3 +- .../api_management_head_api_diagnostic.py | 3 +- .../api_management_head_api_issue.py | 3 +- ...pi_management_head_api_issue_attachment.py | 3 +- .../api_management_head_api_issue_comment.py | 3 +- .../api_management_head_api_operation.py | 3 +- ...pi_management_head_api_operation_policy.py | 3 +- .../api_management_head_api_operation_tag.py | 3 +- .../api_management_head_api_policy.py | 3 +- .../api_management_head_api_release.py | 3 +- .../api_management_head_api_schema.py | 3 +- .../api_management_head_api_tag.py | 3 +- ...api_management_head_api_tag_description.py | 3 +- .../api_management_head_api_tool.py | 45 + .../api_management_head_api_version_set.py | 3 +- .../api_management_head_api_wiki.py | 3 +- ...pi_management_head_authorization_server.py | 3 +- .../api_management_head_backend.py | 3 +- .../api_management_head_cache.py | 3 +- .../api_management_head_certificate.py | 3 +- .../api_management_head_client_application.py | 44 + ...nagement_head_content_type_content_item.py | 3 +- ...api_management_head_delegation_settings.py | 3 +- .../api_management_head_diagnostic.py | 3 +- .../api_management_head_documentation.py | 3 +- .../api_management_head_email_template.py | 3 +- .../api_management_head_gateway.py | 3 +- .../api_management_head_gateway_api.py | 3 +- ...ment_head_gateway_certificate_authority.py | 3 +- ...ent_head_gateway_hostname_configuration.py | 3 +- .../api_management_head_global_schema.py | 3 +- ...i_management_head_graph_ql_api_resolver.py | 3 +- ...ement_head_graph_ql_api_resolver_policy.py | 3 +- .../api_management_head_group.py | 3 +- .../api_management_head_group_user.py | 3 +- .../api_management_head_identity_provider.py | 3 +- .../api_management_head_logger.py | 3 +- .../api_management_head_named_value.py | 3 +- ...ement_head_notification_recipient_email.py | 3 +- ...gement_head_notification_recipient_user.py | 3 +- ...anagement_head_open_id_connect_provider.py | 3 +- .../api_management_head_policy.py | 3 +- .../api_management_head_policy_fragment.py | 3 +- .../api_management_head_policy_restriction.py | 3 +- .../api_management_head_portal_config.py | 3 +- .../api_management_head_portal_revision.py | 3 +- .../api_management_head_product.py | 3 +- .../api_management_head_product_api.py | 3 +- .../api_management_head_product_group.py | 3 +- .../api_management_head_product_policy.py | 3 +- .../api_management_head_product_tag.py | 3 +- .../api_management_head_product_wiki.py | 3 +- .../api_management_head_sign_in_settings.py | 3 +- .../api_management_head_sign_up_settings.py | 3 +- .../api_management_head_subscription.py | 3 +- .../api_management_head_tag.py | 3 +- .../api_management_head_tenant_access.py | 3 +- .../api_management_head_user.py | 3 +- .../api_management_head_workspace.py | 3 +- .../api_management_head_workspace_api.py | 3 +- ...anagement_head_workspace_api_diagnostic.py | 3 +- ...management_head_workspace_api_operation.py | 3 +- ...ent_head_workspace_api_operation_policy.py | 3 +- ...pi_management_head_workspace_api_policy.py | 3 +- ...i_management_head_workspace_api_release.py | 3 +- ...pi_management_head_workspace_api_schema.py | 3 +- ...nagement_head_workspace_api_version_set.py | 3 +- .../api_management_head_workspace_backend.py | 3 +- ...i_management_head_workspace_certificate.py | 3 +- ...pi_management_head_workspace_diagnostic.py | 3 +- .../api_management_head_workspace_group.py | 3 +- ...pi_management_head_workspace_group_user.py | 3 +- .../api_management_head_workspace_logger.py | 3 +- ...i_management_head_workspace_named_value.py | 3 +- ..._workspace_notification_recipient_email.py | 3 +- ...d_workspace_notification_recipient_user.py | 3 +- .../api_management_head_workspace_policy.py | 3 +- ...nagement_head_workspace_policy_fragment.py | 3 +- .../api_management_head_workspace_product.py | 3 +- ...anagement_head_workspace_product_policy.py | 3 +- .../api_management_head_workspace_schema.py | 3 +- ..._management_head_workspace_subscription.py | 3 +- .../api_management_head_workspace_tag.py | 3 +- ...nagement_identity_provider_list_secrets.py | 3 +- .../api_management_list_api_diagnostics.py | 3 +- ...i_management_list_api_issue_attachments.py | 3 +- .../api_management_list_api_issue_comments.py | 3 +- .../api_management_list_api_issues.py | 3 +- ..._management_list_api_operation_policies.py | 3 +- .../api_management_list_api_operation_tags.py | 3 +- .../api_management_list_api_operations.py | 3 +- ..._management_list_api_operations_by_tags.py | 3 +- .../api_management_list_api_policies.py | 3 +- .../api_management_list_api_products.py | 3 +- .../api_management_list_api_releases.py | 3 +- .../api_management_list_api_revisions.py | 3 +- .../api_management_list_api_schemas.py | 3 +- ...pi_management_list_api_tag_descriptions.py | 3 +- .../api_management_list_api_tags.py | 3 +- .../api_management_list_api_tools.py | 45 + .../api_management_list_api_version_sets.py | 3 +- .../api_management_list_api_wikis.py | 3 +- .../api_management_list_apis.py | 3 +- .../api_management_list_apis_by_tags.py | 3 +- ...ment_list_authorization_access_policies.py | 3 +- ...management_list_authorization_providers.py | 3 +- ...i_management_list_authorization_servers.py | 3 +- ...anagement_list_authorizations_auth_code.py | 3 +- ...agement_list_authorizations_client_cred.py | 3 +- .../api_management_list_backends.py | 3 +- .../api_management_list_caches.py | 3 +- .../api_management_list_certificates.py | 3 +- ...t_list_client_application_product_links.py | 45 + ...agement_list_client_application_secrets.py | 44 + ...api_management_list_client_applications.py | 44 + ...agement_list_content_type_content_items.py | 3 +- .../api_management_list_content_types.py | 3 +- .../api_management_list_diagnostics.py | 3 +- .../api_management_list_documentations.py | 3 +- .../api_management_list_gateway_apis.py | 3 +- ...nt_list_gateway_certificate_authorities.py | 3 +- ...nagement_list_gateway_config_connection.py | 3 +- ...nagement_list_gateway_hostname_bindings.py | 44 + ...nt_list_gateway_hostname_configurations.py | 3 +- .../api_management_list_gateways.py | 3 +- ...anagement_list_gateways_by_subscription.py | 3 +- ...ways_by_subscription_and_resource_group.py | 3 +- .../api_management_list_global_schemas.py | 3 +- ...ent_list_graph_ql_api_resolver_policies.py | 3 +- ..._management_list_graph_ql_api_resolvers.py | 3 +- .../api_management_list_group_users.py | 3 +- .../api_management_list_groups.py | 3 +- .../api_management_list_identity_providers.py | 3 +- .../api_management_list_issues.py | 3 +- .../api_management_list_loggers.py | 3 +- .../api_management_list_named_values.py | 3 +- ...ment_list_notification_recipient_emails.py | 3 +- ...ement_list_notification_recipient_users.py | 3 +- .../api_management_list_notifications.py | 3 +- ...nagement_list_open_id_connect_providers.py | 3 +- .../api_management_list_operations.py | 3 +- .../api_management_list_policies.py | 3 +- ...api_management_list_policy_descriptions.py | 3 +- ...agement_list_policy_fragment_references.py | 3 +- .../api_management_list_policy_fragments.py | 3 +- ...api_management_list_policy_restrictions.py | 3 +- .../api_management_list_portal_config.py | 3 +- .../api_management_list_portal_revisions.py | 3 +- .../api_management_list_portal_settings.py | 3 +- ...ement_list_private_endpoint_connections.py | 3 +- ...ement_list_private_link_group_resources.py | 3 +- .../api_management_list_product_api_links.py | 3 +- .../api_management_list_product_apis.py | 3 +- ...api_management_list_product_group_links.py | 3 +- .../api_management_list_product_groups.py | 3 +- .../api_management_list_product_policies.py | 3 +- ...i_management_list_product_subscriptions.py | 3 +- .../api_management_list_product_tags.py | 3 +- .../api_management_list_product_wikis.py | 3 +- .../api_management_list_products.py | 3 +- .../api_management_list_products_by_tags.py | 3 +- .../api_management_list_regions.py | 3 +- ..._secrets_portal_settings_validation_key.py | 3 +- ...i_management_list_secrets_tenant_access.py | 3 +- ...management_list_service_by_subscription.py | 3 +- ...vice_by_subscription_and_resource_group.py | 3 +- .../api_management_list_sk_us_consumption.py | 3 +- .../api_management_list_sk_us_dedicated.py | 3 +- .../api_management_list_sk_us_gateways.py | 3 +- .../api_management_list_sku.py | 3 +- .../api_management_list_subscriptions.py | 3 +- .../api_management_list_tag_api_links.py | 3 +- ...api_management_list_tag_operation_links.py | 3 +- .../api_management_list_tag_product_links.py | 3 +- .../api_management_list_tag_resources.py | 3 +- .../api_management_list_tags.py | 3 +- .../api_management_list_templates.py | 3 +- .../api_management_list_tenant_access.py | 3 +- .../api_management_list_tenant_settings.py | 3 +- .../api_management_list_user_groups.py | 3 +- .../api_management_list_user_identities.py | 3 +- .../api_management_list_user_subscriptions.py | 3 +- .../api_management_list_users.py | 3 +- ...nagement_list_workspace_api_diagnostics.py | 3 +- ...t_list_workspace_api_operation_policies.py | 3 +- ...anagement_list_workspace_api_operations.py | 3 +- ..._management_list_workspace_api_policies.py | 3 +- ..._management_list_workspace_api_releases.py | 3 +- ...management_list_workspace_api_revisions.py | 3 +- ...i_management_list_workspace_api_schemas.py | 3 +- ...agement_list_workspace_api_version_sets.py | 3 +- .../api_management_list_workspace_apis.py | 3 +- .../api_management_list_workspace_backends.py | 3 +- ..._management_list_workspace_certificates.py | 3 +- ...i_management_list_workspace_diagnostics.py | 3 +- ...i_management_list_workspace_group_users.py | 3 +- .../api_management_list_workspace_groups.py | 3 +- .../api_management_list_workspace_links.py | 3 +- .../api_management_list_workspace_loggers.py | 3 +- ..._management_list_workspace_named_values.py | 3 +- ...workspace_notification_recipient_emails.py | 3 +- ..._workspace_notification_recipient_users.py | 3 +- ...management_list_workspace_notifications.py | 3 +- .../api_management_list_workspace_policies.py | 3 +- ...st_workspace_policy_fragment_references.py | 3 +- ...agement_list_workspace_policy_fragments.py | 3 +- ...gement_list_workspace_product_api_links.py | 3 +- ...ment_list_workspace_product_group_links.py | 3 +- ...agement_list_workspace_product_policies.py | 3 +- .../api_management_list_workspace_products.py | 3 +- .../api_management_list_workspace_schemas.py | 3 +- ...management_list_workspace_subscriptions.py | 3 +- ...management_list_workspace_tag_api_links.py | 3 +- ...ment_list_workspace_tag_operation_links.py | 3 +- ...gement_list_workspace_tag_product_links.py | 3 +- .../api_management_list_workspace_tags.py | 3 +- .../api_management_list_workspaces.py | 3 +- .../api_management_named_value_list_value.py | 3 +- ...nt_openid_connect_provider_list_secrets.py | 3 +- ...i_management_perform_connectivity_check.py | 3 +- ...perform_connectivity_check_http_connect.py | 3 +- .../api_management_portal_config.py | 3 +- ...nagement_portal_settings_get_delegation.py | 3 +- ..._management_portal_settings_get_sign_in.py | 3 +- ..._management_portal_settings_get_sign_up.py | 3 +- ...nagement_portal_settings_put_delegation.py | 3 +- ..._management_portal_settings_put_sign_in.py | 3 +- ..._management_portal_settings_put_sign_up.py | 3 +- ...ement_portal_settings_update_delegation.py | 3 +- ...nagement_portal_settings_update_sign_in.py | 3 +- ...nagement_portal_settings_update_sign_up.py | 3 +- ...horization_confirm_consent_code_request.py | 3 +- ...t_refresh_authorization_provider_secret.py | 44 + .../api_management_refresh_certificate.py | 3 +- ...refresh_gateway_hostname_binding_secret.py | 43 + .../api_management_refresh_named_value.py | 3 +- ...anagement_refresh_workspace_certificate.py | 3 +- ...anagement_refresh_workspace_named_value.py | 3 +- .../api_management_restore_with_access_key.py | 3 +- ...agement_service_check_name_availability.py | 3 +- .../api_management_service_delete_service.py | 3 +- ...service_get_domain_ownership_identifier.py | 3 +- ..._service_get_multi_region_internal_vnet.py | 3 +- ...i_management_service_get_network_status.py | 3 +- ..._service_get_network_status_by_location.py | 3 +- ...outbound_network_dependencies_endpoints.py | 3 +- .../api_management_service_get_service.py | 3 +- ...nagement_service_get_service_having_msi.py | 3 +- .../api_management_service_get_sso_token.py | 3 +- .../api_management_service_migrate_to_stv2.py | 3 +- ...ent_service_refresh_key_vault_hostnames.py | 43 + ...pi_management_subscription_list_secrets.py | 3 +- ...ent_subscription_regenerate_primary_key.py | 3 +- ...t_subscription_regenerate_secondary_key.py | 3 +- ...management_tenant_access_regenerate_key.py | 5 +- ...api_management_tenant_access_sync_state.py | 3 +- ..._management_tenant_configuration_deploy.py | 3 +- ...pi_management_tenant_configuration_save.py | 3 +- ...anagement_tenant_configuration_validate.py | 3 +- .../api_management_undelete.py | 3 +- .../api_management_update_api.py | 3 +- .../api_management_update_api_diagnostic.py | 3 +- .../api_management_update_api_issue.py | 3 +- .../api_management_update_api_operation.py | 3 +- .../api_management_update_api_release.py | 3 +- .../api_management_update_api_tool.py | 46 + .../api_management_update_api_version_set.py | 3 +- .../api_management_update_api_wiki.py | 3 +- ..._management_update_authorization_server.py | 3 +- .../api_management_update_backend.py | 3 +- .../api_management_update_cache.py | 3 +- .../api_management_update_diagnostic.py | 3 +- .../api_management_update_documentation.py | 46 + .../api_management_update_gateway.py | 3 +- ...management_update_graph_ql_api_resolver.py | 3 +- .../api_management_update_group.py | 3 +- ...api_management_update_identity_provider.py | 3 +- .../api_management_update_logger.py | 3 +- .../api_management_update_named_value.py | 3 +- ...agement_update_open_id_connect_provider.py | 3 +- ...pi_management_update_policy_restriction.py | 3 +- .../api_management_update_portal_config.py | 3 +- .../api_management_update_portal_revision.py | 3 +- .../api_management_update_product.py | 3 +- .../api_management_update_product_wiki.py | 3 +- ...api_management_update_quota_counter_key.py | 3 +- ...pdate_quota_counter_key_by_quota_period.py | 3 +- ...management_update_service_disable_tls10.py | 3 +- ...gement_update_service_publisher_details.py | 3 +- ...ment_update_service_to_new_vnet_and_azs.py | 3 +- .../api_management_update_standard_gateway.py | 3 +- .../api_management_update_subscription.py | 3 +- .../api_management_update_tag.py | 3 +- .../api_management_update_template.py | 3 +- .../api_management_update_tenant_access.py | 3 +- .../api_management_update_user.py | 3 +- .../api_management_update_workspace.py | 3 +- .../api_management_update_workspace_api.py | 3 +- ...agement_update_workspace_api_diagnostic.py | 3 +- ...nagement_update_workspace_api_operation.py | 3 +- ...management_update_workspace_api_release.py | 3 +- ...gement_update_workspace_api_version_set.py | 3 +- ...api_management_update_workspace_backend.py | 3 +- ..._management_update_workspace_diagnostic.py | 3 +- .../api_management_update_workspace_group.py | 3 +- .../api_management_update_workspace_logger.py | 3 +- ...management_update_workspace_named_value.py | 3 +- ...api_management_update_workspace_product.py | 3 +- ...anagement_update_workspace_subscription.py | 3 +- .../api_management_update_workspace_tag.py | 3 +- ...agement_user_confirmation_password_send.py | 3 +- .../api_management_user_generate_sso_url.py | 3 +- .../api_management_user_token.py | 3 +- .../api_management_validate_policies.py | 3 +- ...gement_workspace_named_value_list_value.py | 3 +- ...ent_workspace_subscription_list_secrets.py | 3 +- ...ace_subscription_regenerate_primary_key.py | 3 +- ...e_subscription_regenerate_secondary_key.py | 3 +- .../generated_tests/test_api_management.py | 2 +- ..._api_management_all_policies_operations.py | 2 +- ...anagement_all_policies_operations_async.py | 2 +- ...pi_management_api_diagnostic_operations.py | 22 +- ...agement_api_diagnostic_operations_async.py | 22 +- ...st_api_management_api_export_operations.py | 2 +- ..._management_api_export_operations_async.py | 2 +- ...pi_gateway_config_connection_operations.py | 8 +- ...eway_config_connection_operations_async.py | 8 +- ...api_gateway_hostname_binding_operations.py | 102 + ...teway_hostname_binding_operations_async.py | 109 + ...t_api_management_api_gateway_operations.py | 12 +- ...management_api_gateway_operations_async.py | 12 +- ...agement_api_issue_attachment_operations.py | 10 +- ...t_api_issue_attachment_operations_async.py | 10 +- ...management_api_issue_comment_operations.py | 10 +- ...ment_api_issue_comment_operations_async.py | 10 +- ...est_api_management_api_issue_operations.py | 12 +- ...i_management_api_issue_operations_async.py | 12 +- ..._api_management_gateway_skus_operations.py | 2 +- ...anagement_gateway_skus_operations_async.py | 2 +- ...nt_api_management_operations_operations.py | 2 +- ..._management_operations_operations_async.py | 2 +- ...ement_api_management_service_operations.py | 42 +- ...api_management_service_operations_async.py | 44 +- ..._api_management_service_skus_operations.py | 2 +- ...anagement_service_skus_operations_async.py | 2 +- ...nagement_api_management_skus_operations.py | 2 +- ...nt_api_management_skus_operations_async.py | 2 +- ...pi_management_workspace_link_operations.py | 2 +- ...agement_workspace_link_operations_async.py | 2 +- ...i_management_workspace_links_operations.py | 2 +- ...gement_workspace_links_operations_async.py | 2 +- ...api_management_api_operation_operations.py | 12 +- ...nagement_api_operation_operations_async.py | 12 +- ...agement_api_operation_policy_operations.py | 10 +- ...t_api_operation_policy_operations_async.py | 10 +- .../test_api_management_api_operations.py | 14 +- ...est_api_management_api_operations_async.py | 14 +- ...st_api_management_api_policy_operations.py | 10 +- ..._management_api_policy_operations_async.py | 10 +- ...t_api_management_api_product_operations.py | 2 +- ...management_api_product_operations_async.py | 2 +- ...t_api_management_api_release_operations.py | 12 +- ...management_api_release_operations_async.py | 12 +- ..._api_management_api_revision_operations.py | 2 +- ...anagement_api_revision_operations_async.py | 2 +- ...st_api_management_api_schema_operations.py | 10 +- ..._management_api_schema_operations_async.py | 10 +- ...nagement_api_tag_description_operations.py | 10 +- ...nt_api_tag_description_operations_async.py | 10 +- ...test_api_management_api_tool_operations.py | 118 + ...pi_management_api_tool_operations_async.py | 119 + ...i_management_api_version_set_operations.py | 12 +- ...gement_api_version_set_operations_async.py | 12 +- ...test_api_management_api_wiki_operations.py | 10 +- ...pi_management_api_wiki_operations_async.py | 10 +- ...est_api_management_api_wikis_operations.py | 2 +- ...i_management_api_wikis_operations_async.py | 2 +- .../test_api_management_async.py | 2 +- ..._authorization_access_policy_operations.py | 8 +- ...rization_access_policy_operations_async.py | 8 +- ...nt_authorization_login_links_operations.py | 2 +- ...horization_login_links_operations_async.py | 2 +- ...api_management_authorization_operations.py | 10 +- ...nagement_authorization_operations_async.py | 10 +- ...ement_authorization_provider_operations.py | 26 +- ...authorization_provider_operations_async.py | 26 +- ...agement_authorization_server_operations.py | 14 +- ...t_authorization_server_operations_async.py | 14 +- .../test_api_management_backend_operations.py | 44 +- ...api_management_backend_operations_async.py | 44 +- .../test_api_management_cache_operations.py | 12 +- ...t_api_management_cache_operations_async.py | 12 +- ...t_api_management_certificate_operations.py | 12 +- ...management_certificate_operations_async.py | 12 +- ...anagement_client_application_operations.py | 107 + ...ent_client_application_operations_async.py | 108 + ...ent_application_product_link_operations.py | 75 + ...plication_product_link_operations_async.py | 76 + ..._api_management_content_item_operations.py | 10 +- ...anagement_content_item_operations_async.py | 10 +- ..._api_management_content_type_operations.py | 8 +- ...anagement_content_type_operations_async.py | 8 +- ...nagement_delegation_settings_operations.py | 10 +- ...nt_delegation_settings_operations_async.py | 10 +- ..._management_deleted_services_operations.py | 6 +- ...ement_deleted_services_operations_async.py | 6 +- ...st_api_management_diagnostic_operations.py | 22 +- ..._management_diagnostic_operations_async.py | 22 +- ...api_management_documentation_operations.py | 12 +- ...nagement_documentation_operations_async.py | 12 +- ...pi_management_email_template_operations.py | 12 +- ...agement_email_template_operations_async.py | 12 +- ...t_api_management_gateway_api_operations.py | 8 +- ...management_gateway_api_operations_async.py | 8 +- ...ateway_certificate_authority_operations.py | 10 +- ..._certificate_authority_operations_async.py | 10 +- ...teway_hostname_configuration_operations.py | 10 +- ...hostname_configuration_operations_async.py | 10 +- .../test_api_management_gateway_operations.py | 36 +- ...api_management_gateway_operations_async.py | 36 +- ...api_management_global_schema_operations.py | 10 +- ...nagement_global_schema_operations_async.py | 10 +- ...gement_graph_ql_api_resolver_operations.py | 12 +- ..._graph_ql_api_resolver_operations_async.py | 12 +- ...graph_ql_api_resolver_policy_operations.py | 10 +- ...ql_api_resolver_policy_operations_async.py | 10 +- .../test_api_management_group_operations.py | 12 +- ...t_api_management_group_operations_async.py | 12 +- ...st_api_management_group_user_operations.py | 8 +- ..._management_group_user_operations_async.py | 8 +- ...management_identity_provider_operations.py | 16 +- ...ment_identity_provider_operations_async.py | 16 +- .../test_api_management_issue_operations.py | 4 +- ...t_api_management_issue_operations_async.py | 4 +- .../test_api_management_logger_operations.py | 12 +- ..._api_management_logger_operations_async.py | 12 +- ...t_api_management_named_value_operations.py | 16 +- ...management_named_value_operations_async.py | 16 +- ...pi_management_network_status_operations.py | 4 +- ...agement_network_status_operations_async.py | 4 +- ..._api_management_notification_operations.py | 6 +- ...anagement_notification_operations_async.py | 6 +- ...notification_recipient_email_operations.py | 8 +- ...cation_recipient_email_operations_async.py | 8 +- ..._notification_recipient_user_operations.py | 8 +- ...ication_recipient_user_operations_async.py | 8 +- ...ent_open_id_connect_provider_operations.py | 14 +- ...en_id_connect_provider_operations_async.py | 14 +- ...est_api_management_operation_operations.py | 2 +- ...i_management_operation_operations_async.py | 2 +- ..._management_operation_status_operations.py | 2 +- ...ement_operation_status_operations_async.py | 2 +- ...anagement_operations_results_operations.py | 2 +- ...ent_operations_results_operations_async.py | 2 +- ...twork_dependencies_endpoints_operations.py | 2 +- ...dependencies_endpoints_operations_async.py | 2 +- ...anagement_policy_description_operations.py | 2 +- ...ent_policy_description_operations_async.py | 2 +- ...i_management_policy_fragment_operations.py | 12 +- ...gement_policy_fragment_operations_async.py | 12 +- .../test_api_management_policy_operations.py | 10 +- ..._api_management_policy_operations_async.py | 10 +- ...anagement_policy_restriction_operations.py | 12 +- ...ent_policy_restriction_operations_async.py | 12 +- ...licy_restriction_validations_operations.py | 2 +- ...estriction_validations_operations_async.py | 2 +- ...api_management_portal_config_operations.py | 10 +- ...nagement_portal_config_operations_async.py | 10 +- ...i_management_portal_revision_operations.py | 10 +- ...gement_portal_revision_operations_async.py | 10 +- ...i_management_portal_settings_operations.py | 2 +- ...gement_portal_settings_operations_async.py | 2 +- ..._private_endpoint_connection_operations.py | 12 +- ...te_endpoint_connection_operations_async.py | 12 +- ..._management_product_api_link_operations.py | 8 +- ...ement_product_api_link_operations_async.py | 8 +- ...t_api_management_product_api_operations.py | 8 +- ...management_product_api_operations_async.py | 8 +- ...anagement_product_group_link_operations.py | 8 +- ...ent_product_group_link_operations_async.py | 8 +- ...api_management_product_group_operations.py | 8 +- ...nagement_product_group_operations_async.py | 8 +- .../test_api_management_product_operations.py | 18 +- ...api_management_product_operations_async.py | 18 +- ...pi_management_product_policy_operations.py | 10 +- ...agement_product_policy_operations_async.py | 10 +- ...gement_product_subscriptions_operations.py | 2 +- ..._product_subscriptions_operations_async.py | 2 +- ..._api_management_product_wiki_operations.py | 10 +- ...anagement_product_wiki_operations_async.py | 10 +- ...api_management_product_wikis_operations.py | 2 +- ...nagement_product_wikis_operations_async.py | 2 +- ...gement_quota_by_counter_keys_operations.py | 4 +- ..._quota_by_counter_keys_operations_async.py | 4 +- ...agement_quota_by_period_keys_operations.py | 4 +- ...t_quota_by_period_keys_operations_async.py | 4 +- .../test_api_management_region_operations.py | 2 +- ..._api_management_region_operations_async.py | 2 +- .../test_api_management_reports_operations.py | 16 +- ...api_management_reports_operations_async.py | 16 +- ..._management_sign_in_settings_operations.py | 8 +- ...ement_sign_in_settings_operations_async.py | 8 +- ..._management_sign_up_settings_operations.py | 8 +- ...ement_sign_up_settings_operations_async.py | 8 +- ..._api_management_subscription_operations.py | 18 +- ...anagement_subscription_operations_async.py | 18 +- ..._api_management_tag_api_link_operations.py | 8 +- ...anagement_tag_api_link_operations_async.py | 8 +- ...anagement_tag_operation_link_operations.py | 8 +- ...ent_tag_operation_link_operations_async.py | 8 +- .../test_api_management_tag_operations.py | 42 +- ...est_api_management_tag_operations_async.py | 42 +- ..._management_tag_product_link_operations.py | 8 +- ...ement_tag_product_link_operations_async.py | 8 +- ..._api_management_tag_resource_operations.py | 2 +- ...anagement_tag_resource_operations_async.py | 2 +- ...management_tenant_access_git_operations.py | 4 +- ...ment_tenant_access_git_operations_async.py | 4 +- ...api_management_tenant_access_operations.py | 16 +- ...nagement_tenant_access_operations_async.py | 16 +- ...agement_tenant_configuration_operations.py | 8 +- ...t_tenant_configuration_operations_async.py | 8 +- ...i_management_tenant_settings_operations.py | 4 +- ...gement_tenant_settings_operations_async.py | 4 +- ...t_user_confirmation_password_operations.py | 2 +- ..._confirmation_password_operations_async.py | 2 +- ...st_api_management_user_group_operations.py | 2 +- ..._management_user_group_operations_async.py | 2 +- ...i_management_user_identities_operations.py | 2 +- ...gement_user_identities_operations_async.py | 2 +- .../test_api_management_user_operations.py | 16 +- ...st_api_management_user_operations_async.py | 16 +- ...management_user_subscription_operations.py | 4 +- ...ment_user_subscription_operations_async.py | 4 +- ...ent_workspace_api_diagnostic_operations.py | 17 +- ...rkspace_api_diagnostic_operations_async.py | 17 +- ...agement_workspace_api_export_operations.py | 2 +- ...t_workspace_api_export_operations_async.py | 2 +- ...ment_workspace_api_operation_operations.py | 12 +- ...orkspace_api_operation_operations_async.py | 12 +- ...rkspace_api_operation_policy_operations.py | 10 +- ...e_api_operation_policy_operations_async.py | 10 +- ...api_management_workspace_api_operations.py | 12 +- ...nagement_workspace_api_operations_async.py | 12 +- ...agement_workspace_api_policy_operations.py | 10 +- ...t_workspace_api_policy_operations_async.py | 10 +- ...gement_workspace_api_release_operations.py | 12 +- ..._workspace_api_release_operations_async.py | 12 +- ...ement_workspace_api_revision_operations.py | 2 +- ...workspace_api_revision_operations_async.py | 2 +- ...agement_workspace_api_schema_operations.py | 10 +- ...t_workspace_api_schema_operations_async.py | 10 +- ...nt_workspace_api_version_set_operations.py | 12 +- ...kspace_api_version_set_operations_async.py | 12 +- ...management_workspace_backend_operations.py | 42 +- ...ment_workspace_backend_operations_async.py | 42 +- ...gement_workspace_certificate_operations.py | 12 +- ..._workspace_certificate_operations_async.py | 12 +- ...agement_workspace_diagnostic_operations.py | 17 +- ...t_workspace_diagnostic_operations_async.py | 17 +- ...ment_workspace_global_schema_operations.py | 10 +- ...orkspace_global_schema_operations_async.py | 10 +- ...i_management_workspace_group_operations.py | 12 +- ...gement_workspace_group_operations_async.py | 12 +- ...agement_workspace_group_user_operations.py | 8 +- ...t_workspace_group_user_operations_async.py | 8 +- ..._management_workspace_logger_operations.py | 12 +- ...ement_workspace_logger_operations_async.py | 12 +- ...gement_workspace_named_value_operations.py | 16 +- ..._workspace_named_value_operations_async.py | 16 +- ...ement_workspace_notification_operations.py | 6 +- ...workspace_notification_operations_async.py | 6 +- ...notification_recipient_email_operations.py | 8 +- ...cation_recipient_email_operations_async.py | 8 +- ..._notification_recipient_user_operations.py | 8 +- ...ication_recipient_user_operations_async.py | 8 +- ...est_api_management_workspace_operations.py | 12 +- ...i_management_workspace_operations_async.py | 12 +- ...nt_workspace_policy_fragment_operations.py | 12 +- ...kspace_policy_fragment_operations_async.py | 12 +- ..._management_workspace_policy_operations.py | 10 +- ...ement_workspace_policy_operations_async.py | 10 +- ...t_workspace_product_api_link_operations.py | 8 +- ...space_product_api_link_operations_async.py | 8 +- ...workspace_product_group_link_operations.py | 8 +- ...ace_product_group_link_operations_async.py | 8 +- ...management_workspace_product_operations.py | 16 +- ...ment_workspace_product_operations_async.py | 16 +- ...ent_workspace_product_policy_operations.py | 10 +- ...rkspace_product_policy_operations_async.py | 10 +- ...ement_workspace_subscription_operations.py | 18 +- ...workspace_subscription_operations_async.py | 18 +- ...ement_workspace_tag_api_link_operations.py | 8 +- ...workspace_tag_api_link_operations_async.py | 8 +- ...workspace_tag_operation_link_operations.py | 8 +- ...ace_tag_operation_link_operations_async.py | 8 +- ...api_management_workspace_tag_operations.py | 12 +- ...nagement_workspace_tag_operations_async.py | 12 +- ...t_workspace_tag_product_link_operations.py | 8 +- ...space_tag_product_link_operations_async.py | 8 +- .../azure-mgmt-apimanagement/pyproject.toml | 82 + .../sdk_packaging.toml | 9 - .../azure-mgmt-apimanagement/setup.py | 83 - 1306 files changed, 163953 insertions(+), 8895 deletions(-) delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/_meta.json create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/_metadata.json create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/apiview-properties.json create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/__init__.py rename sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/{_serialization.py => _utils/serialization.py} (92%) rename sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/{_vendor.py => _utils/utils.py} (67%) delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_vendor.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_hostname_binding_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tool_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_product_link_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_hostname_binding_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tool_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_product_link_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/code_report_swagger.json create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_managament_create_backend_with_custom_assigned_certificate_thumbprints.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tool.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code_with_key_vault.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_azure_region.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_carbon_aware_load_balancer.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_custom_assigned_certificate_x509_names.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_priority_based_load_balancer.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_simple_load_balancer.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_weighted_load_balancer.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application_product_link.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_binding.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tool.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application_product_link.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_documentation.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_binding.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tool.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application_product_link.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_binding.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tool.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_client_application.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tools.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_product_links.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_secrets.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_applications.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_bindings.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_authorization_provider_secret.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_gateway_hostname_binding_secret.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_refresh_key_vault_hostnames.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_tool.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_documentation.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations_async.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations_async.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations_async.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations_async.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/sdk_packaging.toml delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/setup.py diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/CHANGELOG.md b/sdk/apimanagement/azure-mgmt-apimanagement/CHANGELOG.md index 739f6db3a1ae..f1ac343f059b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/CHANGELOG.md +++ b/sdk/apimanagement/azure-mgmt-apimanagement/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 5.1.0b1 (2026-03-25) + +skip changelog generation + ## 5.0.0 (2025-04-21) ### Features Added diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in b/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in index affab11e25d5..286c837ed7bc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in +++ b/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in @@ -1,8 +1,7 @@ -include _meta.json -recursive-include tests *.py *.json -recursive-include samples *.py *.md include *.md -include azure/__init__.py -include azure/mgmt/__init__.py include LICENSE include azure/mgmt/apimanagement/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/__init__.py +include azure/mgmt/__init__.py diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/README.md b/sdk/apimanagement/azure-mgmt-apimanagement/README.md index 636f35053de7..0fd2ec3ff983 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/README.md +++ b/sdk/apimanagement/azure-mgmt-apimanagement/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure API Management Client Library. -This package has been tested with Python 3.8+. +This package has been tested with Python 3.9+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.8+ is required to use this package. +- Python 3.9+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/_meta.json b/sdk/apimanagement/azure-mgmt-apimanagement/_meta.json deleted file mode 100644 index d5a550d086a4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "7c1e8a2c1e18ac0dd65b88f00447992ed86fcc0f", - "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.10.2", - "use": [ - "@autorest/python@6.27.4", - "@autorest/modelerfour@4.27.0" - ], - "autorest_command": "autorest specification/apimanagement/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-2024-05 --use=@autorest/python@6.27.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", - "readme": "specification/apimanagement/resource-manager/readme.md" -} \ No newline at end of file diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/_metadata.json b/sdk/apimanagement/azure-mgmt-apimanagement/_metadata.json new file mode 100644 index 000000000000..844e4d4f1150 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/_metadata.json @@ -0,0 +1,11 @@ +{ + "commit": "cae4dfe61e44bc4a40dc577d0948c1474c7b39c8", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest": "3.10.2", + "use": [ + "@autorest/python@6.50.0", + "@autorest/modelerfour@4.27.0" + ], + "autorest_command": "autorest specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=C:\\dev\\worktrees\\sdk-azure-mgmt-apimanagement\\sdk --use=@autorest/python@6.50.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "readme": "specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/readme.md" +} \ No newline at end of file diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/apiview-properties.json b/sdk/apimanagement/azure-mgmt-apimanagement/apiview-properties.json new file mode 100644 index 000000000000..67ea133dbc4d --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/apiview-properties.json @@ -0,0 +1,1788 @@ +{ + "CrossLanguagePackageId": null, + "CrossLanguageDefinitionId": { + "azure.mgmt.apimanagement.models.AccessInformationCollection": null, + "azure.mgmt.apimanagement.models.Resource": null, + "azure.mgmt.apimanagement.models.ProxyResource": null, + "azure.mgmt.apimanagement.models.AccessInformationContract": null, + "azure.mgmt.apimanagement.models.AccessInformationCreateParameters": null, + "azure.mgmt.apimanagement.models.AccessInformationSecretsContract": null, + "azure.mgmt.apimanagement.models.AccessInformationUpdateParameters": null, + "azure.mgmt.apimanagement.models.AdditionalLocation": null, + "azure.mgmt.apimanagement.models.AllPoliciesCollection": null, + "azure.mgmt.apimanagement.models.AllPoliciesContract": null, + "azure.mgmt.apimanagement.models.ApiCollection": null, + "azure.mgmt.apimanagement.models.ApiContactInformation": null, + "azure.mgmt.apimanagement.models.ApiContract": null, + "azure.mgmt.apimanagement.models.ApiEntityBaseContract": null, + "azure.mgmt.apimanagement.models.ApiContractProperties": null, + "azure.mgmt.apimanagement.models.ApiContractUpdateProperties": null, + "azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter": null, + "azure.mgmt.apimanagement.models.ApiCreateOrUpdateProperties": null, + "azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector": null, + "azure.mgmt.apimanagement.models.ApiExportResult": null, + "azure.mgmt.apimanagement.models.ApiExportResultValue": null, + "azure.mgmt.apimanagement.models.ApiLicenseInformation": null, + "azure.mgmt.apimanagement.models.ApiManagementGatewayBaseProperties": null, + "azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionListResult": null, + "azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource": null, + "azure.mgmt.apimanagement.models.ApiManagementGatewayListResult": null, + "azure.mgmt.apimanagement.models.ApiManagementGatewayProperties": null, + "azure.mgmt.apimanagement.models.ApimResource": null, + "azure.mgmt.apimanagement.models.ApiManagementGatewayResource": null, + "azure.mgmt.apimanagement.models.ApiManagementGatewaySkuProperties": null, + "azure.mgmt.apimanagement.models.ApiManagementGatewaySkuPropertiesForPatch": null, + "azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateParameters": null, + "azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateProperties": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceBaseProperties": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceCheckNameAvailabilityParameters": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceGetDomainOwnershipIdentifierResult": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceGetSsoTokenResult": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceIdentity": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceListResult": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceProperties": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceResource": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters": null, + "azure.mgmt.apimanagement.models.ApiManagementServiceUpdateProperties": null, + "azure.mgmt.apimanagement.models.ApiManagementSku": null, + "azure.mgmt.apimanagement.models.ApiManagementSkuCapabilities": null, + "azure.mgmt.apimanagement.models.ApiManagementSkuCapacity": null, + "azure.mgmt.apimanagement.models.ApiManagementSkuCosts": null, + "azure.mgmt.apimanagement.models.ApiManagementSkuLocationInfo": null, + "azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionInfo": null, + "azure.mgmt.apimanagement.models.ApiManagementSkuRestrictions": null, + "azure.mgmt.apimanagement.models.ApiManagementSkusResult": null, + "azure.mgmt.apimanagement.models.ApiManagementSkuZoneDetails": null, + "azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksListResult": null, + "azure.mgmt.apimanagement.models.WorkspaceLinksBaseProperties": null, + "azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksProperties": null, + "azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksResource": null, + "azure.mgmt.apimanagement.models.ApiReleaseCollection": null, + "azure.mgmt.apimanagement.models.ApiReleaseContract": null, + "azure.mgmt.apimanagement.models.ApiRevisionCollection": null, + "azure.mgmt.apimanagement.models.ApiRevisionContract": null, + "azure.mgmt.apimanagement.models.ApiRevisionInfoContract": null, + "azure.mgmt.apimanagement.models.ApiTagResourceContractProperties": null, + "azure.mgmt.apimanagement.models.ApiUpdateContract": null, + "azure.mgmt.apimanagement.models.ApiVersionConstraint": null, + "azure.mgmt.apimanagement.models.ApiVersionSetCollection": null, + "azure.mgmt.apimanagement.models.ApiVersionSetContract": null, + "azure.mgmt.apimanagement.models.ApiVersionSetContractDetails": null, + "azure.mgmt.apimanagement.models.ApiVersionSetEntityBase": null, + "azure.mgmt.apimanagement.models.ApiVersionSetContractProperties": null, + "azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters": null, + "azure.mgmt.apimanagement.models.ApiVersionSetUpdateParametersProperties": null, + "azure.mgmt.apimanagement.models.ArmIdWrapper": null, + "azure.mgmt.apimanagement.models.AssociationContract": null, + "azure.mgmt.apimanagement.models.AuthenticationSettingsContract": null, + "azure.mgmt.apimanagement.models.AuthorizationAccessPolicyCollection": null, + "azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract": null, + "azure.mgmt.apimanagement.models.AuthorizationCollection": null, + "azure.mgmt.apimanagement.models.AuthorizationConfirmConsentCodeRequestContract": null, + "azure.mgmt.apimanagement.models.AuthorizationContract": null, + "azure.mgmt.apimanagement.models.AuthorizationError": null, + "azure.mgmt.apimanagement.models.AuthorizationLoginRequestContract": null, + "azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract": null, + "azure.mgmt.apimanagement.models.AuthorizationProviderCollection": null, + "azure.mgmt.apimanagement.models.AuthorizationProviderContract": null, + "azure.mgmt.apimanagement.models.AuthorizationProviderKeyVaultCreateProperties": null, + "azure.mgmt.apimanagement.models.AuthorizationProviderKeyVaultContract": null, + "azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2GrantTypes": null, + "azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2Settings": null, + "azure.mgmt.apimanagement.models.AuthorizationServerCollection": null, + "azure.mgmt.apimanagement.models.AuthorizationServerContract": null, + "azure.mgmt.apimanagement.models.AuthorizationServerContractBaseProperties": null, + "azure.mgmt.apimanagement.models.AuthorizationServerContractProperties": null, + "azure.mgmt.apimanagement.models.AuthorizationServerSecretsContract": null, + "azure.mgmt.apimanagement.models.AuthorizationServerUpdateContract": null, + "azure.mgmt.apimanagement.models.AuthorizationServerUpdateContractProperties": null, + "azure.mgmt.apimanagement.models.BackendAuthorizationHeaderCredentials": null, + "azure.mgmt.apimanagement.models.BackendBaseParameters": null, + "azure.mgmt.apimanagement.models.BackendPool": null, + "azure.mgmt.apimanagement.models.BackendBaseParametersPool": null, + "azure.mgmt.apimanagement.models.BackendCircuitBreaker": null, + "azure.mgmt.apimanagement.models.BackendCollection": null, + "azure.mgmt.apimanagement.models.BackendConfiguration": null, + "azure.mgmt.apimanagement.models.BackendContract": null, + "azure.mgmt.apimanagement.models.BackendContractProperties": null, + "azure.mgmt.apimanagement.models.BackendCredentialsContract": null, + "azure.mgmt.apimanagement.models.BackendFailureResponse": null, + "azure.mgmt.apimanagement.models.BackendPoolItem": null, + "azure.mgmt.apimanagement.models.BackendProperties": null, + "azure.mgmt.apimanagement.models.BackendProxyContract": null, + "azure.mgmt.apimanagement.models.BackendReconnectContract": null, + "azure.mgmt.apimanagement.models.BackendServiceFabricClusterProperties": null, + "azure.mgmt.apimanagement.models.BackendSessionAffinity": null, + "azure.mgmt.apimanagement.models.BackendSessionId": null, + "azure.mgmt.apimanagement.models.BackendSubnetConfiguration": null, + "azure.mgmt.apimanagement.models.BackendTlsProperties": null, + "azure.mgmt.apimanagement.models.BackendUpdateParameterProperties": null, + "azure.mgmt.apimanagement.models.BackendUpdateParameters": null, + "azure.mgmt.apimanagement.models.BodyDiagnosticSettings": null, + "azure.mgmt.apimanagement.models.CacheCollection": null, + "azure.mgmt.apimanagement.models.CacheContract": null, + "azure.mgmt.apimanagement.models.CacheUpdateParameters": null, + "azure.mgmt.apimanagement.models.CertificateCollection": null, + "azure.mgmt.apimanagement.models.CertificateConfiguration": null, + "azure.mgmt.apimanagement.models.CertificateContract": null, + "azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters": null, + "azure.mgmt.apimanagement.models.CertificateInformation": null, + "azure.mgmt.apimanagement.models.CircuitBreakerFailureCondition": null, + "azure.mgmt.apimanagement.models.CircuitBreakerRule": null, + "azure.mgmt.apimanagement.models.ClientApplicationCollection": null, + "azure.mgmt.apimanagement.models.ClientApplicationContract": null, + "azure.mgmt.apimanagement.models.ClientApplicationProductLinkCollection": null, + "azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract": null, + "azure.mgmt.apimanagement.models.ClientApplicationSecretsContract": null, + "azure.mgmt.apimanagement.models.ClientApplicationSecretsContractEntra": null, + "azure.mgmt.apimanagement.models.ClientSecretContract": null, + "azure.mgmt.apimanagement.models.ConfigurationApi": null, + "azure.mgmt.apimanagement.models.ConnectivityCheckRequest": null, + "azure.mgmt.apimanagement.models.ConnectivityCheckRequestDestination": null, + "azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfiguration": null, + "azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration": null, + "azure.mgmt.apimanagement.models.ConnectivityCheckRequestSource": null, + "azure.mgmt.apimanagement.models.ConnectivityCheckResponse": null, + "azure.mgmt.apimanagement.models.ConnectivityHop": null, + "azure.mgmt.apimanagement.models.ConnectivityIssue": null, + "azure.mgmt.apimanagement.models.ConnectivityStatusContract": null, + "azure.mgmt.apimanagement.models.ContentItemCollection": null, + "azure.mgmt.apimanagement.models.ContentItemContract": null, + "azure.mgmt.apimanagement.models.ContentTypeCollection": null, + "azure.mgmt.apimanagement.models.ContentTypeContract": null, + "azure.mgmt.apimanagement.models.DataMasking": null, + "azure.mgmt.apimanagement.models.DataMaskingEntity": null, + "azure.mgmt.apimanagement.models.DeletedServiceContract": null, + "azure.mgmt.apimanagement.models.DeletedServicesCollection": null, + "azure.mgmt.apimanagement.models.DeployConfigurationParameters": null, + "azure.mgmt.apimanagement.models.DiagnosticCollection": null, + "azure.mgmt.apimanagement.models.DiagnosticContract": null, + "azure.mgmt.apimanagement.models.DiagnosticUpdateContract": null, + "azure.mgmt.apimanagement.models.DocumentationCollection": null, + "azure.mgmt.apimanagement.models.DocumentationContract": null, + "azure.mgmt.apimanagement.models.DocumentationUpdateContract": null, + "azure.mgmt.apimanagement.models.EmailTemplateCollection": null, + "azure.mgmt.apimanagement.models.EmailTemplateContract": null, + "azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties": null, + "azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters": null, + "azure.mgmt.apimanagement.models.EndpointDependency": null, + "azure.mgmt.apimanagement.models.EndpointDetail": null, + "azure.mgmt.apimanagement.models.ErrorAdditionalInfo": null, + "azure.mgmt.apimanagement.models.ErrorDetail": null, + "azure.mgmt.apimanagement.models.ErrorFieldContract": null, + "azure.mgmt.apimanagement.models.ErrorResponse": null, + "azure.mgmt.apimanagement.models.ErrorResponseBody": null, + "azure.mgmt.apimanagement.models.FailureStatusCodeRange": null, + "azure.mgmt.apimanagement.models.FrontendConfiguration": null, + "azure.mgmt.apimanagement.models.GatewayCertificateAuthorityCollection": null, + "azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract": null, + "azure.mgmt.apimanagement.models.GatewayCollection": null, + "azure.mgmt.apimanagement.models.GatewayConfigurationApi": null, + "azure.mgmt.apimanagement.models.GatewayContract": null, + "azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract": null, + "azure.mgmt.apimanagement.models.GatewayHostnameBindingCertificate": null, + "azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVault": null, + "azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVaultLastStatus": null, + "azure.mgmt.apimanagement.models.GatewayHostnameBindingListResult": null, + "azure.mgmt.apimanagement.models.GatewayHostnameBindingResource": null, + "azure.mgmt.apimanagement.models.GatewayHostnameConfigurationCollection": null, + "azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract": null, + "azure.mgmt.apimanagement.models.GatewayKeyRegenerationRequestContract": null, + "azure.mgmt.apimanagement.models.GatewayKeysContract": null, + "azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContract": null, + "azure.mgmt.apimanagement.models.GatewayListTraceContract": null, + "azure.mgmt.apimanagement.models.GatewayResourceSkuResult": null, + "azure.mgmt.apimanagement.models.GatewayResourceSkuResults": null, + "azure.mgmt.apimanagement.models.GatewaySku": null, + "azure.mgmt.apimanagement.models.GatewaySkuCapacity": null, + "azure.mgmt.apimanagement.models.GatewayTokenContract": null, + "azure.mgmt.apimanagement.models.GatewayTokenRequestContract": null, + "azure.mgmt.apimanagement.models.GenerateSsoUrlResult": null, + "azure.mgmt.apimanagement.models.GlobalSchemaCollection": null, + "azure.mgmt.apimanagement.models.GlobalSchemaContract": null, + "azure.mgmt.apimanagement.models.GroupCollection": null, + "azure.mgmt.apimanagement.models.GroupContract": null, + "azure.mgmt.apimanagement.models.GroupContractProperties": null, + "azure.mgmt.apimanagement.models.GroupCreateParameters": null, + "azure.mgmt.apimanagement.models.GroupUpdateParameters": null, + "azure.mgmt.apimanagement.models.HostnameConfiguration": null, + "azure.mgmt.apimanagement.models.HTTPHeader": null, + "azure.mgmt.apimanagement.models.HttpMessageDiagnostic": null, + "azure.mgmt.apimanagement.models.IdentityProviderBaseParameters": null, + "azure.mgmt.apimanagement.models.IdentityProviderContract": null, + "azure.mgmt.apimanagement.models.IdentityProviderContractProperties": null, + "azure.mgmt.apimanagement.models.IdentityProviderCreateContract": null, + "azure.mgmt.apimanagement.models.IdentityProviderCreateContractProperties": null, + "azure.mgmt.apimanagement.models.IdentityProviderList": null, + "azure.mgmt.apimanagement.models.IdentityProviderUpdateParameters": null, + "azure.mgmt.apimanagement.models.IdentityProviderUpdateProperties": null, + "azure.mgmt.apimanagement.models.IssueAttachmentCollection": null, + "azure.mgmt.apimanagement.models.IssueAttachmentContract": null, + "azure.mgmt.apimanagement.models.IssueCollection": null, + "azure.mgmt.apimanagement.models.IssueCommentCollection": null, + "azure.mgmt.apimanagement.models.IssueCommentContract": null, + "azure.mgmt.apimanagement.models.IssueContract": null, + "azure.mgmt.apimanagement.models.IssueContractBaseProperties": null, + "azure.mgmt.apimanagement.models.IssueContractProperties": null, + "azure.mgmt.apimanagement.models.IssueUpdateContract": null, + "azure.mgmt.apimanagement.models.IssueUpdateContractProperties": null, + "azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties": null, + "azure.mgmt.apimanagement.models.KeyVaultContractProperties": null, + "azure.mgmt.apimanagement.models.KeyVaultLastAccessStatusContractProperties": null, + "azure.mgmt.apimanagement.models.LLMDiagnosticSettings": null, + "azure.mgmt.apimanagement.models.LLMMessageDiagnosticSettings": null, + "azure.mgmt.apimanagement.models.LoggerCollection": null, + "azure.mgmt.apimanagement.models.LoggerContract": null, + "azure.mgmt.apimanagement.models.LoggerUpdateContract": null, + "azure.mgmt.apimanagement.models.ManagedServiceIdentity": null, + "azure.mgmt.apimanagement.models.MigrateToStv2Contract": null, + "azure.mgmt.apimanagement.models.NamedValueCollection": null, + "azure.mgmt.apimanagement.models.NamedValueContract": null, + "azure.mgmt.apimanagement.models.NamedValueEntityBaseParameters": null, + "azure.mgmt.apimanagement.models.NamedValueContractProperties": null, + "azure.mgmt.apimanagement.models.NamedValueCreateContract": null, + "azure.mgmt.apimanagement.models.NamedValueCreateContractProperties": null, + "azure.mgmt.apimanagement.models.NamedValueSecretContract": null, + "azure.mgmt.apimanagement.models.NamedValueUpdateParameterProperties": null, + "azure.mgmt.apimanagement.models.NamedValueUpdateParameters": null, + "azure.mgmt.apimanagement.models.NetworkStatusContract": null, + "azure.mgmt.apimanagement.models.NetworkStatusContractByLocation": null, + "azure.mgmt.apimanagement.models.NotificationCollection": null, + "azure.mgmt.apimanagement.models.NotificationContract": null, + "azure.mgmt.apimanagement.models.OAuth2AuthenticationSettingsContract": null, + "azure.mgmt.apimanagement.models.OpenIdAuthenticationSettingsContract": null, + "azure.mgmt.apimanagement.models.OpenIdConnectProviderCollection": null, + "azure.mgmt.apimanagement.models.OpenidConnectProviderContract": null, + "azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContract": null, + "azure.mgmt.apimanagement.models.Operation": null, + "azure.mgmt.apimanagement.models.OperationCollection": null, + "azure.mgmt.apimanagement.models.OperationContract": null, + "azure.mgmt.apimanagement.models.OperationEntityBaseContract": null, + "azure.mgmt.apimanagement.models.OperationContractProperties": null, + "azure.mgmt.apimanagement.models.OperationDisplay": null, + "azure.mgmt.apimanagement.models.OperationListResult": null, + "azure.mgmt.apimanagement.models.OperationResultContract": null, + "azure.mgmt.apimanagement.models.OperationResultLogItemContract": null, + "azure.mgmt.apimanagement.models.OperationStatusResult": null, + "azure.mgmt.apimanagement.models.OperationTagResourceContractProperties": null, + "azure.mgmt.apimanagement.models.OperationUpdateContract": null, + "azure.mgmt.apimanagement.models.OperationUpdateContractProperties": null, + "azure.mgmt.apimanagement.models.OutboundEnvironmentEndpoint": null, + "azure.mgmt.apimanagement.models.OutboundEnvironmentEndpointList": null, + "azure.mgmt.apimanagement.models.ParameterContract": null, + "azure.mgmt.apimanagement.models.ParameterExampleContract": null, + "azure.mgmt.apimanagement.models.PipelineDiagnosticSettings": null, + "azure.mgmt.apimanagement.models.PolicyCollection": null, + "azure.mgmt.apimanagement.models.PolicyContract": null, + "azure.mgmt.apimanagement.models.PolicyDescriptionCollection": null, + "azure.mgmt.apimanagement.models.PolicyDescriptionContract": null, + "azure.mgmt.apimanagement.models.PolicyFragmentCollection": null, + "azure.mgmt.apimanagement.models.PolicyFragmentContract": null, + "azure.mgmt.apimanagement.models.PolicyRestrictionCollection": null, + "azure.mgmt.apimanagement.models.PolicyRestrictionContract": null, + "azure.mgmt.apimanagement.models.PolicyRestrictionUpdateContract": null, + "azure.mgmt.apimanagement.models.PolicyWithComplianceCollection": null, + "azure.mgmt.apimanagement.models.PolicyWithComplianceContract": null, + "azure.mgmt.apimanagement.models.PortalConfigCollection": null, + "azure.mgmt.apimanagement.models.PortalConfigContract": null, + "azure.mgmt.apimanagement.models.PortalConfigCorsProperties": null, + "azure.mgmt.apimanagement.models.PortalConfigCspProperties": null, + "azure.mgmt.apimanagement.models.PortalConfigDelegationProperties": null, + "azure.mgmt.apimanagement.models.PortalConfigPropertiesSignin": null, + "azure.mgmt.apimanagement.models.PortalConfigPropertiesSignup": null, + "azure.mgmt.apimanagement.models.PortalConfigTermsOfServiceProperties": null, + "azure.mgmt.apimanagement.models.PortalDelegationSettings": null, + "azure.mgmt.apimanagement.models.PortalRevisionCollection": null, + "azure.mgmt.apimanagement.models.PortalRevisionContract": null, + "azure.mgmt.apimanagement.models.PortalSettingsCollection": null, + "azure.mgmt.apimanagement.models.PortalSettingsContract": null, + "azure.mgmt.apimanagement.models.PortalSettingValidationKeyContract": null, + "azure.mgmt.apimanagement.models.PortalSigninSettings": null, + "azure.mgmt.apimanagement.models.PortalSignupSettings": null, + "azure.mgmt.apimanagement.models.PrivateEndpoint": null, + "azure.mgmt.apimanagement.models.PrivateEndpointConnection": null, + "azure.mgmt.apimanagement.models.PrivateEndpointConnectionListResult": null, + "azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequest": null, + "azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequestProperties": null, + "azure.mgmt.apimanagement.models.PrivateLinkResource": null, + "azure.mgmt.apimanagement.models.PrivateLinkResourceListResult": null, + "azure.mgmt.apimanagement.models.PrivateLinkServiceConnectionState": null, + "azure.mgmt.apimanagement.models.ProductApiLinkCollection": null, + "azure.mgmt.apimanagement.models.ProductApiLinkContract": null, + "azure.mgmt.apimanagement.models.ProductApplicationContract": null, + "azure.mgmt.apimanagement.models.ProductApplicationContractEntra": null, + "azure.mgmt.apimanagement.models.ProductCollection": null, + "azure.mgmt.apimanagement.models.ProductContract": null, + "azure.mgmt.apimanagement.models.ProductEntityBaseParameters": null, + "azure.mgmt.apimanagement.models.ProductContractProperties": null, + "azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication": null, + "azure.mgmt.apimanagement.models.ProductGroupLinkCollection": null, + "azure.mgmt.apimanagement.models.ProductGroupLinkContract": null, + "azure.mgmt.apimanagement.models.ProductTagResourceContractProperties": null, + "azure.mgmt.apimanagement.models.ProductUpdateParameters": null, + "azure.mgmt.apimanagement.models.ProductUpdateProperties": null, + "azure.mgmt.apimanagement.models.QuotaCounterCollection": null, + "azure.mgmt.apimanagement.models.QuotaCounterContract": null, + "azure.mgmt.apimanagement.models.QuotaCounterValueContract": null, + "azure.mgmt.apimanagement.models.QuotaCounterValueContractProperties": null, + "azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract": null, + "azure.mgmt.apimanagement.models.RecipientEmailCollection": null, + "azure.mgmt.apimanagement.models.RecipientEmailContract": null, + "azure.mgmt.apimanagement.models.RecipientsContractProperties": null, + "azure.mgmt.apimanagement.models.RecipientUserCollection": null, + "azure.mgmt.apimanagement.models.RecipientUserContract": null, + "azure.mgmt.apimanagement.models.RegionContract": null, + "azure.mgmt.apimanagement.models.RegionListResult": null, + "azure.mgmt.apimanagement.models.RegistrationDelegationSettingsProperties": null, + "azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper": null, + "azure.mgmt.apimanagement.models.ReportCollection": null, + "azure.mgmt.apimanagement.models.ReportRecordContract": null, + "azure.mgmt.apimanagement.models.RepresentationContract": null, + "azure.mgmt.apimanagement.models.RequestContract": null, + "azure.mgmt.apimanagement.models.RequestReportCollection": null, + "azure.mgmt.apimanagement.models.RequestReportRecordContract": null, + "azure.mgmt.apimanagement.models.ResolverCollection": null, + "azure.mgmt.apimanagement.models.ResolverContract": null, + "azure.mgmt.apimanagement.models.ResolverResultContract": null, + "azure.mgmt.apimanagement.models.ResolverResultLogItemContract": null, + "azure.mgmt.apimanagement.models.ResolverUpdateContract": null, + "azure.mgmt.apimanagement.models.ResourceCollection": null, + "azure.mgmt.apimanagement.models.ResourceCollectionValueItem": null, + "azure.mgmt.apimanagement.models.ResourceLocationDataContract": null, + "azure.mgmt.apimanagement.models.ResourceSku": null, + "azure.mgmt.apimanagement.models.ResourceSkuCapacity": null, + "azure.mgmt.apimanagement.models.ResourceSkuResult": null, + "azure.mgmt.apimanagement.models.ResourceSkuResults": null, + "azure.mgmt.apimanagement.models.ResponseContract": null, + "azure.mgmt.apimanagement.models.SamplingSettings": null, + "azure.mgmt.apimanagement.models.SaveConfigurationParameter": null, + "azure.mgmt.apimanagement.models.SchemaCollection": null, + "azure.mgmt.apimanagement.models.SchemaContract": null, + "azure.mgmt.apimanagement.models.SubscriptionCollection": null, + "azure.mgmt.apimanagement.models.SubscriptionContract": null, + "azure.mgmt.apimanagement.models.SubscriptionCreateParameters": null, + "azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract": null, + "azure.mgmt.apimanagement.models.SubscriptionKeysContract": null, + "azure.mgmt.apimanagement.models.SubscriptionsDelegationSettingsProperties": null, + "azure.mgmt.apimanagement.models.SubscriptionUpdateParameters": null, + "azure.mgmt.apimanagement.models.SystemData": null, + "azure.mgmt.apimanagement.models.TagApiLinkCollection": null, + "azure.mgmt.apimanagement.models.TagApiLinkContract": null, + "azure.mgmt.apimanagement.models.TagCollection": null, + "azure.mgmt.apimanagement.models.TagContract": null, + "azure.mgmt.apimanagement.models.TagCreateUpdateParameters": null, + "azure.mgmt.apimanagement.models.TagDescriptionBaseProperties": null, + "azure.mgmt.apimanagement.models.TagDescriptionCollection": null, + "azure.mgmt.apimanagement.models.TagDescriptionContract": null, + "azure.mgmt.apimanagement.models.TagDescriptionContractProperties": null, + "azure.mgmt.apimanagement.models.TagDescriptionCreateParameters": null, + "azure.mgmt.apimanagement.models.TagOperationLinkCollection": null, + "azure.mgmt.apimanagement.models.TagOperationLinkContract": null, + "azure.mgmt.apimanagement.models.TagProductLinkCollection": null, + "azure.mgmt.apimanagement.models.TagProductLinkContract": null, + "azure.mgmt.apimanagement.models.TagResourceCollection": null, + "azure.mgmt.apimanagement.models.TagResourceContract": null, + "azure.mgmt.apimanagement.models.TagResourceContractProperties": null, + "azure.mgmt.apimanagement.models.TenantConfigurationSyncStateContract": null, + "azure.mgmt.apimanagement.models.TenantSettingsCollection": null, + "azure.mgmt.apimanagement.models.TenantSettingsContract": null, + "azure.mgmt.apimanagement.models.TermsOfServiceProperties": null, + "azure.mgmt.apimanagement.models.TokenBodyParameterContract": null, + "azure.mgmt.apimanagement.models.ToolCollection": null, + "azure.mgmt.apimanagement.models.ToolContract": null, + "azure.mgmt.apimanagement.models.UserAssignedIdentity": null, + "azure.mgmt.apimanagement.models.UserCollection": null, + "azure.mgmt.apimanagement.models.UserContract": null, + "azure.mgmt.apimanagement.models.UserEntityBaseParameters": null, + "azure.mgmt.apimanagement.models.UserContractProperties": null, + "azure.mgmt.apimanagement.models.UserCreateParameterProperties": null, + "azure.mgmt.apimanagement.models.UserCreateParameters": null, + "azure.mgmt.apimanagement.models.UserIdentityCollection": null, + "azure.mgmt.apimanagement.models.UserIdentityContract": null, + "azure.mgmt.apimanagement.models.UserIdentityProperties": null, + "azure.mgmt.apimanagement.models.UserTokenParameters": null, + "azure.mgmt.apimanagement.models.UserTokenResult": null, + "azure.mgmt.apimanagement.models.UserUpdateParameters": null, + "azure.mgmt.apimanagement.models.UserUpdateParametersProperties": null, + "azure.mgmt.apimanagement.models.VirtualNetworkConfiguration": null, + "azure.mgmt.apimanagement.models.WikiCollection": null, + "azure.mgmt.apimanagement.models.WikiContract": null, + "azure.mgmt.apimanagement.models.WikiDocumentationContract": null, + "azure.mgmt.apimanagement.models.WikiUpdateContract": null, + "azure.mgmt.apimanagement.models.WorkspaceCollection": null, + "azure.mgmt.apimanagement.models.WorkspaceContract": null, + "azure.mgmt.apimanagement.models.WorkspaceLinksGateway": null, + "azure.mgmt.apimanagement.models.X509CertificateName": null, + "azure.mgmt.apimanagement.models.ApiGatewaySkuType": null, + "azure.mgmt.apimanagement.models.CreatedByType": null, + "azure.mgmt.apimanagement.models.VirtualNetworkType": null, + "azure.mgmt.apimanagement.models.GatewaySkuCapacityScaleType": null, + "azure.mgmt.apimanagement.models.PolicyComplianceState": null, + "azure.mgmt.apimanagement.models.Protocol": null, + "azure.mgmt.apimanagement.models.BearerTokenSendingMethods": null, + "azure.mgmt.apimanagement.models.ApiType": null, + "azure.mgmt.apimanagement.models.VersioningScheme": null, + "azure.mgmt.apimanagement.models.PolicyContentFormat": null, + "azure.mgmt.apimanagement.models.ProductAuthType": null, + "azure.mgmt.apimanagement.models.ProductState": null, + "azure.mgmt.apimanagement.models.DataMaskingMode": null, + "azure.mgmt.apimanagement.models.AlwaysLog": null, + "azure.mgmt.apimanagement.models.SamplingType": null, + "azure.mgmt.apimanagement.models.LlmDiagnosticSettings": null, + "azure.mgmt.apimanagement.models.LlmMessageLogTypes": null, + "azure.mgmt.apimanagement.models.HttpCorrelationProtocol": null, + "azure.mgmt.apimanagement.models.Verbosity": null, + "azure.mgmt.apimanagement.models.OperationNameFormat": null, + "azure.mgmt.apimanagement.models.State": null, + "azure.mgmt.apimanagement.models.AuthorizationType": null, + "azure.mgmt.apimanagement.models.OAuth2GrantType": null, + "azure.mgmt.apimanagement.models.GrantType": null, + "azure.mgmt.apimanagement.models.AuthorizationMethod": null, + "azure.mgmt.apimanagement.models.ClientAuthenticationMethod": null, + "azure.mgmt.apimanagement.models.BearerTokenSendingMethod": null, + "azure.mgmt.apimanagement.models.CarbonEmissionCategory": null, + "azure.mgmt.apimanagement.models.BackendSessionIdSource": null, + "azure.mgmt.apimanagement.models.BackendType": null, + "azure.mgmt.apimanagement.models.BackendProtocol": null, + "azure.mgmt.apimanagement.models.ClientApplicationState": null, + "azure.mgmt.apimanagement.models.Origin": null, + "azure.mgmt.apimanagement.models.Severity": null, + "azure.mgmt.apimanagement.models.IssueType": null, + "azure.mgmt.apimanagement.models.SkuType": null, + "azure.mgmt.apimanagement.models.ResourceSkuCapacityScaleType": null, + "azure.mgmt.apimanagement.models.HostnameType": null, + "azure.mgmt.apimanagement.models.CertificateSource": null, + "azure.mgmt.apimanagement.models.CertificateStatus": null, + "azure.mgmt.apimanagement.models.NatGatewayState": null, + "azure.mgmt.apimanagement.models.PlatformVersion": null, + "azure.mgmt.apimanagement.models.CertificateConfigurationStoreName": null, + "azure.mgmt.apimanagement.models.PrivateEndpointServiceConnectionStatus": null, + "azure.mgmt.apimanagement.models.ApimIdentityType": null, + "azure.mgmt.apimanagement.models.PublicNetworkAccess": null, + "azure.mgmt.apimanagement.models.LegacyApiState": null, + "azure.mgmt.apimanagement.models.LegacyPortalStatus": null, + "azure.mgmt.apimanagement.models.DeveloperPortalStatus": null, + "azure.mgmt.apimanagement.models.ReleaseChannel": null, + "azure.mgmt.apimanagement.models.KeyVaultFetchCode": null, + "azure.mgmt.apimanagement.models.ManagedServiceIdentityType": null, + "azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContractPurpose": null, + "azure.mgmt.apimanagement.models.GroupType": null, + "azure.mgmt.apimanagement.models.UserState": null, + "azure.mgmt.apimanagement.models.IdentityProviderType": null, + "azure.mgmt.apimanagement.models.LoggerType": null, + "azure.mgmt.apimanagement.models.ConnectivityStatusType": null, + "azure.mgmt.apimanagement.models.PolicyFragmentContentFormat": null, + "azure.mgmt.apimanagement.models.PolicyRestrictionRequireBase": null, + "azure.mgmt.apimanagement.models.PortalSettingsCspMode": null, + "azure.mgmt.apimanagement.models.PortalRevisionStatus": null, + "azure.mgmt.apimanagement.models.PrivateEndpointConnectionProvisioningState": null, + "azure.mgmt.apimanagement.models.SubscriptionState": null, + "azure.mgmt.apimanagement.models.SchemaType": null, + "azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionsType": null, + "azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionsReasonCode": null, + "azure.mgmt.apimanagement.models.ApiManagementSkuCapacityScaleType": null, + "azure.mgmt.apimanagement.models.ContentFormat": null, + "azure.mgmt.apimanagement.models.SoapApiType": null, + "azure.mgmt.apimanagement.models.TranslateRequiredQueryParametersConduct": null, + "azure.mgmt.apimanagement.models.PolicyIdName": null, + "azure.mgmt.apimanagement.models.PolicyExportFormat": null, + "azure.mgmt.apimanagement.models.ExportFormat": null, + "azure.mgmt.apimanagement.models.ExportApi": null, + "azure.mgmt.apimanagement.models.ExportResultFormat": null, + "azure.mgmt.apimanagement.models.PreferredIPVersion": null, + "azure.mgmt.apimanagement.models.ConnectivityCheckProtocol": null, + "azure.mgmt.apimanagement.models.Method": null, + "azure.mgmt.apimanagement.models.ConnectionStatus": null, + "azure.mgmt.apimanagement.models.AccessType": null, + "azure.mgmt.apimanagement.models.MigrateToStv2Mode": null, + "azure.mgmt.apimanagement.models.TemplateName": null, + "azure.mgmt.apimanagement.models.NotificationName": null, + "azure.mgmt.apimanagement.models.SettingsTypeName": null, + "azure.mgmt.apimanagement.models.AppType": null, + "azure.mgmt.apimanagement.models.AccessIdName": null, + "azure.mgmt.apimanagement.models.ConfigurationIdName": null, + "azure.mgmt.apimanagement.models.Confirmation": null, + "azure.mgmt.apimanagement.models.KeyVaultRefreshState": null, + "azure.mgmt.apimanagement.models.NameAvailabilityReason": null, + "azure.mgmt.apimanagement.models.KeyType": null, + "azure.mgmt.apimanagement.models.AsyncOperationStatus": null, + "azure.mgmt.apimanagement.models.AsyncResolverStatus": null, + "azure.mgmt.apimanagement.models.PolicyScopeContract": null, + "azure.mgmt.apimanagement.operations.ApiGatewayOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiGatewayOperations.begin_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.begin_update": null, + "azure.mgmt.apimanagement.operations.ApiGatewayOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiGatewayOperations.begin_delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.begin_delete": null, + "azure.mgmt.apimanagement.operations.ApiGatewayOperations.list_by_resource_group": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.list_by_resource_group": null, + "azure.mgmt.apimanagement.operations.ApiGatewayOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.list": null, + "azure.mgmt.apimanagement.operations.ApiManagementGatewaySkusOperations.list_available_skus": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementGatewaySkusOperations.list_available_skus": null, + "azure.mgmt.apimanagement.operations.AllPoliciesOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.AllPoliciesOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ApiOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ApiOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperations.update": null, + "azure.mgmt.apimanagement.operations.ApiOperations.begin_delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperations.begin_delete": null, + "azure.mgmt.apimanagement.operations.ApiOperations.list_by_tags": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperations.list_by_tags": null, + "azure.mgmt.apimanagement.operations.ApiRevisionOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ApiRevisionOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ApiReleaseOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ApiReleaseOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiReleaseOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiReleaseOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiReleaseOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.update": null, + "azure.mgmt.apimanagement.operations.ApiReleaseOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.delete": null, + "azure.mgmt.apimanagement.operations.ApiOperationOperations.list_by_api": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.list_by_api": null, + "azure.mgmt.apimanagement.operations.ApiOperationOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiOperationOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiOperationOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiOperationOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.update": null, + "azure.mgmt.apimanagement.operations.ApiOperationOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.delete": null, + "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.list_by_operation": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.list_by_operation": null, + "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.delete": null, + "azure.mgmt.apimanagement.operations.TagOperations.list_by_operation": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.list_by_operation": null, + "azure.mgmt.apimanagement.operations.TagOperations.get_entity_state_by_operation": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_entity_state_by_operation": null, + "azure.mgmt.apimanagement.operations.TagOperations.get_by_operation": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_by_operation": null, + "azure.mgmt.apimanagement.operations.TagOperations.assign_to_operation": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.assign_to_operation": null, + "azure.mgmt.apimanagement.operations.TagOperations.detach_from_operation": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.detach_from_operation": null, + "azure.mgmt.apimanagement.operations.TagOperations.list_by_api": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.list_by_api": null, + "azure.mgmt.apimanagement.operations.TagOperations.get_entity_state_by_api": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_entity_state_by_api": null, + "azure.mgmt.apimanagement.operations.TagOperations.get_by_api": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_by_api": null, + "azure.mgmt.apimanagement.operations.TagOperations.assign_to_api": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.assign_to_api": null, + "azure.mgmt.apimanagement.operations.TagOperations.detach_from_api": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.detach_from_api": null, + "azure.mgmt.apimanagement.operations.TagOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.TagOperations.get_entity_state_by_product": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_entity_state_by_product": null, + "azure.mgmt.apimanagement.operations.TagOperations.get_by_product": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_by_product": null, + "azure.mgmt.apimanagement.operations.TagOperations.assign_to_product": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.assign_to_product": null, + "azure.mgmt.apimanagement.operations.TagOperations.detach_from_product": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.detach_from_product": null, + "azure.mgmt.apimanagement.operations.TagOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.TagOperations.get_entity_state": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_entity_state": null, + "azure.mgmt.apimanagement.operations.TagOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.get": null, + "azure.mgmt.apimanagement.operations.TagOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.TagOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.update": null, + "azure.mgmt.apimanagement.operations.TagOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.TagOperations.delete": null, + "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.list_by_api": null, + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.list_by_api": null, + "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.get": null, + "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.update": null, + "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.delete": null, + "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.list_by_resolver": null, + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.list_by_resolver": null, + "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.get": null, + "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.delete": null, + "azure.mgmt.apimanagement.operations.ApiProductOperations.list_by_apis": null, + "azure.mgmt.apimanagement.aio.operations.ApiProductOperations.list_by_apis": null, + "azure.mgmt.apimanagement.operations.ApiPolicyOperations.list_by_api": null, + "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.list_by_api": null, + "azure.mgmt.apimanagement.operations.ApiPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiPolicyOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiPolicyOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.delete": null, + "azure.mgmt.apimanagement.operations.ApiSchemaOperations.list_by_api": null, + "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.list_by_api": null, + "azure.mgmt.apimanagement.operations.ApiSchemaOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiSchemaOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiSchemaOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiSchemaOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.delete": null, + "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.update": null, + "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.delete": null, + "azure.mgmt.apimanagement.operations.ApiIssueOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ApiIssueOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiIssueOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiIssueOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiIssueOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.update": null, + "azure.mgmt.apimanagement.operations.ApiIssueOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.delete": null, + "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.delete": null, + "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.delete": null, + "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.delete": null, + "azure.mgmt.apimanagement.operations.OperationOperations.list_by_tags": null, + "azure.mgmt.apimanagement.aio.operations.OperationOperations.list_by_tags": null, + "azure.mgmt.apimanagement.operations.ApiWikiOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiWikiOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiWikiOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiWikiOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.update": null, + "azure.mgmt.apimanagement.operations.ApiWikiOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.delete": null, + "azure.mgmt.apimanagement.operations.ApiWikisOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.ApiWikisOperations.list": null, + "azure.mgmt.apimanagement.operations.ApiToolOperations.list_by_api": null, + "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.list_by_api": null, + "azure.mgmt.apimanagement.operations.ApiToolOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiToolOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiToolOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiToolOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.update": null, + "azure.mgmt.apimanagement.operations.ApiToolOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.delete": null, + "azure.mgmt.apimanagement.operations.ApiExportOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiExportOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.update": null, + "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.delete": null, + "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.get": null, + "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.delete": null, + "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.refresh_secret": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.refresh_secret": null, + "azure.mgmt.apimanagement.operations.AuthorizationOperations.list_by_authorization_provider": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.list_by_authorization_provider": null, + "azure.mgmt.apimanagement.operations.AuthorizationOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.get": null, + "azure.mgmt.apimanagement.operations.AuthorizationOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.AuthorizationOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.delete": null, + "azure.mgmt.apimanagement.operations.AuthorizationOperations.confirm_consent_code": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.confirm_consent_code": null, + "azure.mgmt.apimanagement.operations.AuthorizationLoginLinksOperations.post": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationLoginLinksOperations.post": null, + "azure.mgmt.apimanagement.operations.AuthorizationAccessPolicyOperations.list_by_authorization": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationAccessPolicyOperations.list_by_authorization": null, + "azure.mgmt.apimanagement.operations.AuthorizationAccessPolicyOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationAccessPolicyOperations.get": null, + "azure.mgmt.apimanagement.operations.AuthorizationAccessPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationAccessPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.AuthorizationAccessPolicyOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationAccessPolicyOperations.delete": null, + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.get": null, + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.update": null, + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.delete": null, + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.list_secrets": null, + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.list_secrets": null, + "azure.mgmt.apimanagement.operations.BackendOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.BackendOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.BackendOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.BackendOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.BackendOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.BackendOperations.get": null, + "azure.mgmt.apimanagement.operations.BackendOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.BackendOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.BackendOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.BackendOperations.update": null, + "azure.mgmt.apimanagement.operations.BackendOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.BackendOperations.delete": null, + "azure.mgmt.apimanagement.operations.BackendOperations.reconnect": null, + "azure.mgmt.apimanagement.aio.operations.BackendOperations.reconnect": null, + "azure.mgmt.apimanagement.operations.CacheOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.CacheOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.CacheOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.CacheOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.CacheOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.CacheOperations.get": null, + "azure.mgmt.apimanagement.operations.CacheOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.CacheOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.CacheOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.CacheOperations.update": null, + "azure.mgmt.apimanagement.operations.CacheOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.CacheOperations.delete": null, + "azure.mgmt.apimanagement.operations.CertificateOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.CertificateOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.CertificateOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.CertificateOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.CertificateOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.CertificateOperations.get": null, + "azure.mgmt.apimanagement.operations.CertificateOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.CertificateOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.CertificateOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.CertificateOperations.delete": null, + "azure.mgmt.apimanagement.operations.CertificateOperations.refresh_secret": null, + "azure.mgmt.apimanagement.aio.operations.CertificateOperations.refresh_secret": null, + "azure.mgmt.apimanagement.operations.ClientApplicationOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ClientApplicationOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ClientApplicationOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.get": null, + "azure.mgmt.apimanagement.operations.ClientApplicationOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ClientApplicationOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.delete": null, + "azure.mgmt.apimanagement.operations.ClientApplicationOperations.list_secrets": null, + "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.list_secrets": null, + "azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations.list_by_client_applications": null, + "azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations.list_by_client_applications": null, + "azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations.get": null, + "azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations.create": null, + "azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations.create": null, + "azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations.delete": null, + "azure.mgmt.apimanagement.ApiManagementClient.begin_perform_connectivity_check_async": null, + "azure.mgmt.apimanagement.aio.ApiManagementClient.begin_perform_connectivity_check_async": null, + "azure.mgmt.apimanagement.operations.ContentTypeOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ContentTypeOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ContentTypeOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ContentTypeOperations.get": null, + "azure.mgmt.apimanagement.operations.ContentTypeOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ContentTypeOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ContentTypeOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ContentTypeOperations.delete": null, + "azure.mgmt.apimanagement.operations.ContentItemOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ContentItemOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ContentItemOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.get": null, + "azure.mgmt.apimanagement.operations.ContentItemOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ContentItemOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.delete": null, + "azure.mgmt.apimanagement.operations.DeletedServicesOperations.list_by_subscription": null, + "azure.mgmt.apimanagement.aio.operations.DeletedServicesOperations.list_by_subscription": null, + "azure.mgmt.apimanagement.operations.DeletedServicesOperations.get_by_name": null, + "azure.mgmt.apimanagement.aio.operations.DeletedServicesOperations.get_by_name": null, + "azure.mgmt.apimanagement.operations.DeletedServicesOperations.begin_purge": null, + "azure.mgmt.apimanagement.aio.operations.DeletedServicesOperations.begin_purge": null, + "azure.mgmt.apimanagement.operations.ApiManagementOperationsOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementOperationsOperations.list": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceSkusOperations.list_available_service_skus": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceSkusOperations.list_available_service_skus": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_restore": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_restore": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_backup": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_backup": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_update": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_delete": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_migrate_to_stv2": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_migrate_to_stv2": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.list_by_resource_group": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.list_by_resource_group": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.list": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.get_sso_token": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.get_sso_token": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.check_name_availability": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.check_name_availability": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.get_domain_ownership_identifier": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.get_domain_ownership_identifier": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_apply_network_configuration_updates": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_apply_network_configuration_updates": null, + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_refresh_hostnames": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_refresh_hostnames": null, + "azure.mgmt.apimanagement.operations.DiagnosticOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.DiagnosticOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.DiagnosticOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.get": null, + "azure.mgmt.apimanagement.operations.DiagnosticOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.DiagnosticOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.update": null, + "azure.mgmt.apimanagement.operations.DiagnosticOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.delete": null, + "azure.mgmt.apimanagement.operations.DocumentationOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.DocumentationOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.DocumentationOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.get": null, + "azure.mgmt.apimanagement.operations.DocumentationOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.DocumentationOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.update": null, + "azure.mgmt.apimanagement.operations.DocumentationOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.delete": null, + "azure.mgmt.apimanagement.operations.EmailTemplateOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.EmailTemplateOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.EmailTemplateOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.get": null, + "azure.mgmt.apimanagement.operations.EmailTemplateOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.EmailTemplateOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.update": null, + "azure.mgmt.apimanagement.operations.EmailTemplateOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.delete": null, + "azure.mgmt.apimanagement.operations.ApiGatewayConfigConnectionOperations.list_by_gateway": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayConfigConnectionOperations.list_by_gateway": null, + "azure.mgmt.apimanagement.operations.ApiGatewayConfigConnectionOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayConfigConnectionOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiGatewayConfigConnectionOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayConfigConnectionOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiGatewayConfigConnectionOperations.begin_delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayConfigConnectionOperations.begin_delete": null, + "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.list_by_gateway": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.list_by_gateway": null, + "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.begin_delete": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.begin_delete": null, + "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.begin_refresh_secret": null, + "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.begin_refresh_secret": null, + "azure.mgmt.apimanagement.operations.GatewayOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.GatewayOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.GatewayOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.get": null, + "azure.mgmt.apimanagement.operations.GatewayOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.GatewayOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.update": null, + "azure.mgmt.apimanagement.operations.GatewayOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.delete": null, + "azure.mgmt.apimanagement.operations.GatewayOperations.list_keys": null, + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.list_keys": null, + "azure.mgmt.apimanagement.operations.GatewayOperations.regenerate_key": null, + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.regenerate_key": null, + "azure.mgmt.apimanagement.operations.GatewayOperations.generate_token": null, + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.generate_token": null, + "azure.mgmt.apimanagement.operations.GatewayOperations.invalidate_debug_credentials": null, + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.invalidate_debug_credentials": null, + "azure.mgmt.apimanagement.operations.GatewayOperations.list_debug_credentials": null, + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.list_debug_credentials": null, + "azure.mgmt.apimanagement.operations.GatewayOperations.list_trace": null, + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.list_trace": null, + "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.get": null, + "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.delete": null, + "azure.mgmt.apimanagement.operations.GatewayApiOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.GatewayApiOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.GatewayApiOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.GatewayApiOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.GatewayApiOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.GatewayApiOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.GatewayApiOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.GatewayApiOperations.delete": null, + "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.get": null, + "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.delete": null, + "azure.mgmt.apimanagement.operations.GroupOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.GroupOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.GroupOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.GroupOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.GroupOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.GroupOperations.get": null, + "azure.mgmt.apimanagement.operations.GroupOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.GroupOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.GroupOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.GroupOperations.update": null, + "azure.mgmt.apimanagement.operations.GroupOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.GroupOperations.delete": null, + "azure.mgmt.apimanagement.operations.GroupUserOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.GroupUserOperations.list": null, + "azure.mgmt.apimanagement.operations.GroupUserOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.aio.operations.GroupUserOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.operations.GroupUserOperations.create": null, + "azure.mgmt.apimanagement.aio.operations.GroupUserOperations.create": null, + "azure.mgmt.apimanagement.operations.GroupUserOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.GroupUserOperations.delete": null, + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.get": null, + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.update": null, + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.delete": null, + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.list_secrets": null, + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.list_secrets": null, + "azure.mgmt.apimanagement.operations.IssueOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.IssueOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.IssueOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.IssueOperations.get": null, + "azure.mgmt.apimanagement.operations.LoggerOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.LoggerOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.LoggerOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.LoggerOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.LoggerOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.LoggerOperations.get": null, + "azure.mgmt.apimanagement.operations.LoggerOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.LoggerOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.LoggerOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.LoggerOperations.update": null, + "azure.mgmt.apimanagement.operations.LoggerOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.LoggerOperations.delete": null, + "azure.mgmt.apimanagement.operations.NamedValueOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.NamedValueOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.NamedValueOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.get": null, + "azure.mgmt.apimanagement.operations.NamedValueOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.NamedValueOperations.begin_update": null, + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.begin_update": null, + "azure.mgmt.apimanagement.operations.NamedValueOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.delete": null, + "azure.mgmt.apimanagement.operations.NamedValueOperations.list_value": null, + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.list_value": null, + "azure.mgmt.apimanagement.operations.NamedValueOperations.begin_refresh_secret": null, + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.begin_refresh_secret": null, + "azure.mgmt.apimanagement.operations.NetworkStatusOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.NetworkStatusOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.NetworkStatusOperations.list_by_location": null, + "azure.mgmt.apimanagement.aio.operations.NetworkStatusOperations.list_by_location": null, + "azure.mgmt.apimanagement.operations.NotificationOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.NotificationOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.NotificationOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.NotificationOperations.get": null, + "azure.mgmt.apimanagement.operations.NotificationOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.NotificationOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations.list_by_notification": null, + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientUserOperations.list_by_notification": null, + "azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientUserOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientUserOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientUserOperations.delete": null, + "azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations.list_by_notification": null, + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations.list_by_notification": null, + "azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations.delete": null, + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.get": null, + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.update": null, + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.delete": null, + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.list_secrets": null, + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.list_secrets": null, + "azure.mgmt.apimanagement.operations.OutboundNetworkDependenciesEndpointsOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.OutboundNetworkDependenciesEndpointsOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.PolicyOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.PolicyOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.PolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.PolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.PolicyOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.PolicyOperations.get": null, + "azure.mgmt.apimanagement.operations.PolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.PolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.PolicyOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.PolicyOperations.delete": null, + "azure.mgmt.apimanagement.operations.PolicyDescriptionOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.PolicyDescriptionOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.get": null, + "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.delete": null, + "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.list_references": null, + "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.list_references": null, + "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.get": null, + "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.update": null, + "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.delete": null, + "azure.mgmt.apimanagement.operations.PolicyRestrictionValidationsOperations.begin_by_service": null, + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionValidationsOperations.begin_by_service": null, + "azure.mgmt.apimanagement.operations.PortalConfigOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.PortalConfigOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.PortalConfigOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.get": null, + "azure.mgmt.apimanagement.operations.PortalConfigOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.update": null, + "azure.mgmt.apimanagement.operations.PortalConfigOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.PortalRevisionOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.PortalRevisionOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.PortalRevisionOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.get": null, + "azure.mgmt.apimanagement.operations.PortalRevisionOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.PortalRevisionOperations.begin_update": null, + "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.begin_update": null, + "azure.mgmt.apimanagement.operations.PortalSettingsOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.PortalSettingsOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.SignInSettingsOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.SignInSettingsOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations.get": null, + "azure.mgmt.apimanagement.operations.SignInSettingsOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations.update": null, + "azure.mgmt.apimanagement.operations.SignInSettingsOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.SignUpSettingsOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.SignUpSettingsOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations.get": null, + "azure.mgmt.apimanagement.operations.SignUpSettingsOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations.update": null, + "azure.mgmt.apimanagement.operations.SignUpSettingsOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.get": null, + "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.update": null, + "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.list_secrets": null, + "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.list_secrets": null, + "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.get_by_name": null, + "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.get_by_name": null, + "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.begin_delete": null, + "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.begin_delete": null, + "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.list_private_link_resources": null, + "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.list_private_link_resources": null, + "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.get_private_link_resource": null, + "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.get_private_link_resource": null, + "azure.mgmt.apimanagement.operations.ProductOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ProductOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ProductOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ProductOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ProductOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ProductOperations.get": null, + "azure.mgmt.apimanagement.operations.ProductOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ProductOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ProductOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.ProductOperations.update": null, + "azure.mgmt.apimanagement.operations.ProductOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ProductOperations.delete": null, + "azure.mgmt.apimanagement.operations.ProductOperations.list_by_tags": null, + "azure.mgmt.apimanagement.aio.operations.ProductOperations.list_by_tags": null, + "azure.mgmt.apimanagement.operations.ProductApiOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.ProductApiOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.ProductApiOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.aio.operations.ProductApiOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.operations.ProductApiOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ProductApiOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ProductApiOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ProductApiOperations.delete": null, + "azure.mgmt.apimanagement.operations.ProductGroupOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.ProductGroupOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.ProductGroupOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.aio.operations.ProductGroupOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.operations.ProductGroupOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ProductGroupOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ProductGroupOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ProductGroupOperations.delete": null, + "azure.mgmt.apimanagement.operations.ProductSubscriptionsOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.ProductSubscriptionsOperations.list": null, + "azure.mgmt.apimanagement.operations.ProductPolicyOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.ProductPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ProductPolicyOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.get": null, + "azure.mgmt.apimanagement.operations.ProductPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ProductPolicyOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.delete": null, + "azure.mgmt.apimanagement.operations.ProductWikiOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.ProductWikiOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.get": null, + "azure.mgmt.apimanagement.operations.ProductWikiOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ProductWikiOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.update": null, + "azure.mgmt.apimanagement.operations.ProductWikiOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.delete": null, + "azure.mgmt.apimanagement.operations.ProductWikisOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.ProductWikisOperations.list": null, + "azure.mgmt.apimanagement.operations.ProductApiLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.ProductApiLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.ProductApiLinkOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ProductApiLinkOperations.get": null, + "azure.mgmt.apimanagement.operations.ProductApiLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ProductApiLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ProductApiLinkOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ProductApiLinkOperations.delete": null, + "azure.mgmt.apimanagement.operations.ProductGroupLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.ProductGroupLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.ProductGroupLinkOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ProductGroupLinkOperations.get": null, + "azure.mgmt.apimanagement.operations.ProductGroupLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.ProductGroupLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.ProductGroupLinkOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.ProductGroupLinkOperations.delete": null, + "azure.mgmt.apimanagement.operations.QuotaByCounterKeysOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.QuotaByCounterKeysOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.QuotaByCounterKeysOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.QuotaByCounterKeysOperations.update": null, + "azure.mgmt.apimanagement.operations.QuotaByPeriodKeysOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.QuotaByPeriodKeysOperations.get": null, + "azure.mgmt.apimanagement.operations.QuotaByPeriodKeysOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.QuotaByPeriodKeysOperations.update": null, + "azure.mgmt.apimanagement.operations.RegionOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.RegionOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_api": null, + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_api": null, + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_user": null, + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_user": null, + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_operation": null, + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_operation": null, + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_geo": null, + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_geo": null, + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_subscription": null, + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_subscription": null, + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_time": null, + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_time": null, + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_request": null, + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_request": null, + "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.get": null, + "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.delete": null, + "azure.mgmt.apimanagement.operations.TenantSettingsOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.TenantSettingsOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.TenantSettingsOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.TenantSettingsOperations.get": null, + "azure.mgmt.apimanagement.operations.ApiManagementSkusOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementSkusOperations.list": null, + "azure.mgmt.apimanagement.operations.SubscriptionOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.list": null, + "azure.mgmt.apimanagement.operations.SubscriptionOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.SubscriptionOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.get": null, + "azure.mgmt.apimanagement.operations.SubscriptionOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.SubscriptionOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.update": null, + "azure.mgmt.apimanagement.operations.SubscriptionOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.delete": null, + "azure.mgmt.apimanagement.operations.SubscriptionOperations.regenerate_primary_key": null, + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.regenerate_primary_key": null, + "azure.mgmt.apimanagement.operations.SubscriptionOperations.regenerate_secondary_key": null, + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.regenerate_secondary_key": null, + "azure.mgmt.apimanagement.operations.SubscriptionOperations.list_secrets": null, + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.list_secrets": null, + "azure.mgmt.apimanagement.operations.TagResourceOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.TagResourceOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.TagApiLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.TagApiLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.TagApiLinkOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.TagApiLinkOperations.get": null, + "azure.mgmt.apimanagement.operations.TagApiLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.TagApiLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.TagApiLinkOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.TagApiLinkOperations.delete": null, + "azure.mgmt.apimanagement.operations.TagOperationLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.TagOperationLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.TagOperationLinkOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.TagOperationLinkOperations.get": null, + "azure.mgmt.apimanagement.operations.TagOperationLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.TagOperationLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.TagOperationLinkOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.TagOperationLinkOperations.delete": null, + "azure.mgmt.apimanagement.operations.TagProductLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.TagProductLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.TagProductLinkOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.TagProductLinkOperations.get": null, + "azure.mgmt.apimanagement.operations.TagProductLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.TagProductLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.TagProductLinkOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.TagProductLinkOperations.delete": null, + "azure.mgmt.apimanagement.operations.TenantAccessOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.TenantAccessOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.TenantAccessOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.get": null, + "azure.mgmt.apimanagement.operations.TenantAccessOperations.create": null, + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.create": null, + "azure.mgmt.apimanagement.operations.TenantAccessOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.update": null, + "azure.mgmt.apimanagement.operations.TenantAccessOperations.regenerate_primary_key": null, + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.regenerate_primary_key": null, + "azure.mgmt.apimanagement.operations.TenantAccessOperations.regenerate_secondary_key": null, + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.regenerate_secondary_key": null, + "azure.mgmt.apimanagement.operations.TenantAccessOperations.list_secrets": null, + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.list_secrets": null, + "azure.mgmt.apimanagement.operations.TenantAccessGitOperations.regenerate_primary_key": null, + "azure.mgmt.apimanagement.aio.operations.TenantAccessGitOperations.regenerate_primary_key": null, + "azure.mgmt.apimanagement.operations.TenantAccessGitOperations.regenerate_secondary_key": null, + "azure.mgmt.apimanagement.aio.operations.TenantAccessGitOperations.regenerate_secondary_key": null, + "azure.mgmt.apimanagement.operations.TenantConfigurationOperations.begin_deploy": null, + "azure.mgmt.apimanagement.aio.operations.TenantConfigurationOperations.begin_deploy": null, + "azure.mgmt.apimanagement.operations.TenantConfigurationOperations.begin_save": null, + "azure.mgmt.apimanagement.aio.operations.TenantConfigurationOperations.begin_save": null, + "azure.mgmt.apimanagement.operations.TenantConfigurationOperations.begin_validate": null, + "azure.mgmt.apimanagement.aio.operations.TenantConfigurationOperations.begin_validate": null, + "azure.mgmt.apimanagement.operations.TenantConfigurationOperations.get_sync_state": null, + "azure.mgmt.apimanagement.aio.operations.TenantConfigurationOperations.get_sync_state": null, + "azure.mgmt.apimanagement.operations.UserOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.UserOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.UserOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.UserOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.UserOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.UserOperations.get": null, + "azure.mgmt.apimanagement.operations.UserOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.UserOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.UserOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.UserOperations.update": null, + "azure.mgmt.apimanagement.operations.UserOperations.begin_delete": null, + "azure.mgmt.apimanagement.aio.operations.UserOperations.begin_delete": null, + "azure.mgmt.apimanagement.operations.UserOperations.generate_sso_url": null, + "azure.mgmt.apimanagement.aio.operations.UserOperations.generate_sso_url": null, + "azure.mgmt.apimanagement.operations.UserOperations.get_shared_access_token": null, + "azure.mgmt.apimanagement.aio.operations.UserOperations.get_shared_access_token": null, + "azure.mgmt.apimanagement.operations.UserGroupOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.UserGroupOperations.list": null, + "azure.mgmt.apimanagement.operations.UserSubscriptionOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.UserSubscriptionOperations.list": null, + "azure.mgmt.apimanagement.operations.UserSubscriptionOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.UserSubscriptionOperations.get": null, + "azure.mgmt.apimanagement.operations.UserIdentitiesOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.UserIdentitiesOperations.list": null, + "azure.mgmt.apimanagement.operations.UserConfirmationPasswordOperations.send": null, + "azure.mgmt.apimanagement.aio.operations.UserConfirmationPasswordOperations.send": null, + "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.list_by_workspace": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.list_by_workspace": null, + "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.update": null, + "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.list_by_workspace": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.list_by_workspace": null, + "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.refresh_secret": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.refresh_secret": null, + "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.list_by_workspace": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.list_by_workspace": null, + "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.update": null, + "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.list_by_workspace": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.list_by_workspace": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.update": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.delete": null, + "azure.mgmt.apimanagement.operations.ApiManagementWorkspaceLinksOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementWorkspaceLinksOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.ApiManagementWorkspaceLinkOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.ApiManagementWorkspaceLinkOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.list_by_workspace": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.list_by_workspace": null, + "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.update": null, + "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.WorkspaceOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.update": null, + "azure.mgmt.apimanagement.operations.WorkspaceOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.list_by_api": null, + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.list_by_api": null, + "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.begin_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.begin_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.list_value": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.list_value": null, + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.begin_refresh_secret": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.begin_refresh_secret": null, + "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceNotificationOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.WorkspaceNotificationOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceNotificationOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations.list_by_notification": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations.list_by_notification": null, + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations.list_by_notification": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations.list_by_notification": null, + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.list_references": null, + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.list_references": null, + "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.update": null, + "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations.list": null, + "azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations.check_entity_exists": null, + "azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations.create": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations.create": null, + "azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.list": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.list": null, + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.update": null, + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.regenerate_primary_key": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.regenerate_primary_key": null, + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.regenerate_secondary_key": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.regenerate_secondary_key": null, + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.list_secrets": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.list_secrets": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.update": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.update": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiRevisionOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiRevisionOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.update": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.list_by_api": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.list_by_api": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.update": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.list_by_operation": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.list_by_operation": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.list_by_api": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.list_by_api": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.list_by_api": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.list_by_api": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.begin_create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.update": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.get_entity_tag": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.list_by_service": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.list_by_service": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.get_entity_state": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.get_entity_state": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.update": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations.list_by_product": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations.get": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations.create_or_update": null, + "azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations.delete": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations.delete": null, + "azure.mgmt.apimanagement.operations.WorkspaceApiExportOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiExportOperations.get": null, + "azure.mgmt.apimanagement.operations.OperationStatusOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.OperationStatusOperations.get": null, + "azure.mgmt.apimanagement.operations.OperationsResultsOperations.get": null, + "azure.mgmt.apimanagement.aio.operations.OperationsResultsOperations.get": null + } +} \ No newline at end of file diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py index 0954fe940a13..8a8b5da2dfc0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py @@ -7,27 +7,29 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from . import models as _models from ._configuration import ApiManagementClientConfiguration -from ._serialization import Deserializer, Serializer +from ._utils.serialization import Deserializer, Serializer from .operations import ( AllPoliciesOperations, ApiDiagnosticOperations, ApiExportOperations, ApiGatewayConfigConnectionOperations, + ApiGatewayHostnameBindingOperations, ApiGatewayOperations, ApiIssueAttachmentOperations, ApiIssueCommentOperations, ApiIssueOperations, - ApiManagementClientOperationsMixin, ApiManagementGatewaySkusOperations, ApiManagementOperationsOperations, ApiManagementServiceOperations, @@ -44,6 +46,7 @@ ApiRevisionOperations, ApiSchemaOperations, ApiTagDescriptionOperations, + ApiToolOperations, ApiVersionSetOperations, ApiWikiOperations, ApiWikisOperations, @@ -55,6 +58,8 @@ BackendOperations, CacheOperations, CertificateOperations, + ClientApplicationOperations, + ClientApplicationProductLinkOperations, ContentItemOperations, ContentTypeOperations, DelegationSettingsOperations, @@ -156,13 +161,15 @@ WorkspaceTagOperationLinkOperations, WorkspaceTagOperations, WorkspaceTagProductLinkOperations, + _ApiManagementClientOperationsMixin, ) if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials import TokenCredential -class ApiManagementClient(ApiManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes +class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """ApiManagement Client. :ivar api_gateway: ApiGatewayOperations operations @@ -212,6 +219,8 @@ class ApiManagementClient(ApiManagementClientOperationsMixin): # pylint: disabl :vartype api_wiki: azure.mgmt.apimanagement.operations.ApiWikiOperations :ivar api_wikis: ApiWikisOperations operations :vartype api_wikis: azure.mgmt.apimanagement.operations.ApiWikisOperations + :ivar api_tool: ApiToolOperations operations + :vartype api_tool: azure.mgmt.apimanagement.operations.ApiToolOperations :ivar api_export: ApiExportOperations operations :vartype api_export: azure.mgmt.apimanagement.operations.ApiExportOperations :ivar api_version_set: ApiVersionSetOperations operations @@ -236,6 +245,11 @@ class ApiManagementClient(ApiManagementClientOperationsMixin): # pylint: disabl :vartype cache: azure.mgmt.apimanagement.operations.CacheOperations :ivar certificate: CertificateOperations operations :vartype certificate: azure.mgmt.apimanagement.operations.CertificateOperations + :ivar client_application: ClientApplicationOperations operations + :vartype client_application: azure.mgmt.apimanagement.operations.ClientApplicationOperations + :ivar client_application_product_link: ClientApplicationProductLinkOperations operations + :vartype client_application_product_link: + azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations :ivar content_type: ContentTypeOperations operations :vartype content_type: azure.mgmt.apimanagement.operations.ContentTypeOperations :ivar content_item: ContentItemOperations operations @@ -260,6 +274,9 @@ class ApiManagementClient(ApiManagementClientOperationsMixin): # pylint: disabl :ivar api_gateway_config_connection: ApiGatewayConfigConnectionOperations operations :vartype api_gateway_config_connection: azure.mgmt.apimanagement.operations.ApiGatewayConfigConnectionOperations + :ivar api_gateway_hostname_binding: ApiGatewayHostnameBindingOperations operations + :vartype api_gateway_hostname_binding: + azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations :ivar gateway: GatewayOperations operations :vartype gateway: azure.mgmt.apimanagement.operations.GatewayOperations :ivar gateway_hostname_configuration: GatewayHostnameConfigurationOperations operations @@ -490,10 +507,13 @@ class ApiManagementClient(ApiManagementClientOperationsMixin): # pylint: disabl :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2024-05-01". Note that overriding this - default value may result in unsupported behavior. + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-03-01-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -503,12 +523,24 @@ def __init__( self, credential: "TokenCredential", subscription_id: str, - base_url: str = "https://management.azure.com", + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ApiManagementClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, + subscription_id=subscription_id, + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -527,7 +559,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -569,6 +601,7 @@ def __init__( self.operation = OperationOperations(self._client, self._config, self._serialize, self._deserialize) self.api_wiki = ApiWikiOperations(self._client, self._config, self._serialize, self._deserialize) self.api_wikis = ApiWikisOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_tool = ApiToolOperations(self._client, self._config, self._serialize, self._deserialize) self.api_export = ApiExportOperations(self._client, self._config, self._serialize, self._deserialize) self.api_version_set = ApiVersionSetOperations(self._client, self._config, self._serialize, self._deserialize) self.authorization_provider = AuthorizationProviderOperations( @@ -587,6 +620,12 @@ def __init__( self.backend = BackendOperations(self._client, self._config, self._serialize, self._deserialize) self.cache = CacheOperations(self._client, self._config, self._serialize, self._deserialize) self.certificate = CertificateOperations(self._client, self._config, self._serialize, self._deserialize) + self.client_application = ClientApplicationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.client_application_product_link = ClientApplicationProductLinkOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.content_type = ContentTypeOperations(self._client, self._config, self._serialize, self._deserialize) self.content_item = ContentItemOperations(self._client, self._config, self._serialize, self._deserialize) self.deleted_services = DeletedServicesOperations( @@ -607,6 +646,9 @@ def __init__( self.api_gateway_config_connection = ApiGatewayConfigConnectionOperations( self._client, self._config, self._serialize, self._deserialize ) + self.api_gateway_hostname_binding = ApiGatewayHostnameBindingOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.gateway = GatewayOperations(self._client, self._config, self._serialize, self._deserialize) self.gateway_hostname_configuration = GatewayHostnameConfigurationOperations( self._client, self._config, self._serialize, self._deserialize diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py index 9a0a60b29f72..6449d26f9220 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy @@ -14,6 +14,7 @@ from ._version import VERSION if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials import TokenCredential @@ -27,13 +28,22 @@ class ApiManagementClientConfiguration: # pylint: disable=too-many-instance-att :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2024-05-01". Note that overriding this - default value may result in unsupported behavior. + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-03-01-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2024-05-01") + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any + ) -> None: + api_version: str = kwargs.pop("api_version", "2025-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -42,6 +52,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs self.credential = credential self.subscription_id = subscription_id + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-apimanagement/{}".format(VERSION)) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_patch.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_patch.py index 17dbc073e01b..d3be7c117232 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_patch.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_patch.py @@ -28,5 +28,7 @@ # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md + + def patch_sdk(): pass diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/__init__.py new file mode 100644 index 000000000000..0af9b28f6607 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_serialization.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/serialization.py similarity index 92% rename from sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_serialization.py rename to sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/serialization.py index b24ab2885450..6da830e0cf4a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_serialization.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/serialization.py @@ -1,28 +1,10 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pyright: reportUnnecessaryTypeIgnoreComment=false @@ -39,7 +21,6 @@ import sys import codecs from typing import ( - Dict, Any, cast, Optional, @@ -48,10 +29,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, - List, ) try: @@ -61,13 +39,13 @@ import xml.etree.ElementTree as ET import isodate # type: ignore +from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") -ModelType = TypeVar("ModelType", bound="Model") JSON = MutableMapping[str, Any] @@ -185,73 +163,7 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], except NameError: _long_type = int - -class UTC(datetime.tzinfo): - """Time Zone info for handling UTC""" - - def utcoffset(self, dt): - """UTF offset for UTC is 0. - - :param datetime.datetime dt: The datetime - :returns: The offset - :rtype: datetime.timedelta - """ - return datetime.timedelta(0) - - def tzname(self, dt): - """Timestamp representation. - - :param datetime.datetime dt: The datetime - :returns: The timestamp representation - :rtype: str - """ - return "Z" - - def dst(self, dt): - """No daylight saving for UTC. - - :param datetime.datetime dt: The datetime - :returns: The daylight saving time - :rtype: datetime.timedelta - """ - return datetime.timedelta(hours=1) - - -try: - from datetime import timezone as _FixedOffset # type: ignore -except ImportError: # Python 2.7 - - class _FixedOffset(datetime.tzinfo): # type: ignore - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param datetime.timedelta offset: offset in timedelta format - """ - - def __init__(self, offset) -> None: - self.__offset = offset - - def utcoffset(self, dt): - return self.__offset - - def tzname(self, dt): - return str(self.__offset.total_seconds() / 3600) - - def __repr__(self): - return "".format(self.tzname(None)) - - def dst(self, dt): - return datetime.timedelta(0) - - def __getinitargs__(self): - return (self.__offset,) - - -try: - from datetime import timezone - - TZ_UTC = timezone.utc -except ImportError: - TZ_UTC = UTC() # type: ignore +TZ_UTC = datetime.timezone.utc _FLATTEN = re.compile(r"(? None: - self.additional_properties: Optional[Dict[str, Any]] = {} + self.additional_properties: Optional[dict[str, Any]] = {} for k in kwargs: # pylint: disable=consider-using-dict-items if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) @@ -397,7 +309,7 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: def as_dict( self, keep_readonly: bool = True, - key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer, **kwargs: Any ) -> JSON: """Return a dict that can be serialized using json.dump. @@ -450,25 +362,25 @@ def _infer_class_models(cls): return client_models @classmethod - def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def from_dict( - cls: Type[ModelType], + cls, data: Any, - key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, - ) -> ModelType: + ) -> Self: """Parse a dict using given key extractor return a model. By default consider key @@ -479,8 +391,8 @@ def from_dict( :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -500,7 +412,7 @@ def _flatten_subtype(cls, key, objects): return {} result = dict(cls._subtype_map[key]) for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access + result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access return result @classmethod @@ -614,7 +526,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True @@ -626,7 +538,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict - :raises: SerializationError if serialization fails. + :raises SerializationError: if serialization fails. :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) @@ -665,7 +577,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to if attr_name == "additional_properties" and attr_desc["key"] == "": if target_obj.additional_properties is not None: - serialized.update(target_obj.additional_properties) + serialized |= target_obj.additional_properties continue try: @@ -736,8 +648,8 @@ def body(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict - :raises: SerializationError if serialization fails. - :raises: ValueError if data is None + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized request body """ @@ -781,8 +693,8 @@ def url(self, name, data, data_type, **kwargs): :param str data_type: The type to be serialized from. :rtype: str :returns: The serialized URL path - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None """ try: output = self.serialize_data(data, data_type, **kwargs) @@ -805,8 +717,8 @@ def query(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, list - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized query parameter """ try: @@ -835,8 +747,8 @@ def header(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized header """ try: @@ -855,9 +767,9 @@ def serialize_data(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :raises: AttributeError if required data is None. - :raises: ValueError if data is None - :raises: SerializationError if serialization fails. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. :returns: The serialized data. :rtype: str, int, float, bool, dict, list """ @@ -875,7 +787,7 @@ def serialize_data(self, data, data_type, **kwargs): # If dependencies is empty, try with current data class # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) + enum_type = self.dependencies.get(data_type, cast(type, data.__class__)) if issubclass(enum_type, Enum): return Serializer.serialize_enum(data, enum_obj=enum_type) @@ -909,13 +821,20 @@ def serialize_basic(cls, data, data_type, **kwargs): :param str data_type: Type of object in the iterable. :rtype: str, int, float, bool :return: serialized object + :raises TypeError: raise if data_type is not one of str, int, float, bool. """ custom_serializer = cls._get_custom_serializers(data_type, **kwargs) if custom_serializer: return custom_serializer(data) if data_type == "str": return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec # pylint: disable=eval-used + if data_type == "int": + return int(data) + if data_type == "float": + return float(data) + if data_type == "bool": + return bool(data) + raise TypeError("Unknown basic data type: {}".format(data_type)) @classmethod def serialize_unicode(cls, data): @@ -1192,7 +1111,7 @@ def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: TypeError if format invalid. + :raises TypeError: if format invalid. :return: serialized rfc """ try: @@ -1218,7 +1137,7 @@ def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: SerializationError if format invalid. + :raises SerializationError: if format invalid. :return: serialized iso """ if isinstance(attr, str): @@ -1251,7 +1170,7 @@ def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: int - :raises: SerializationError if format invalid + :raises SerializationError: if format invalid :return: serialied unix """ if isinstance(attr, int): @@ -1270,7 +1189,7 @@ def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argumen while "." in key: # Need the cast, as for some reasons "split" is typed as list[str | Any] - dict_keys = cast(List[str], _FLATTEN.split(key)) + dict_keys = cast(list[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1429,7 +1348,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument # Iter and wrapped, should have found one node only (the wrap one) if len(children) != 1: raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( xml_name ) ) @@ -1472,7 +1391,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much @@ -1488,7 +1407,7 @@ def __call__(self, target_obj, response_data, content_type=None): :param str target_obj: Target data type to deserialize to. :param requests.Response response_data: REST response object. :param str content_type: Swagger "produces" if available. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1502,7 +1421,7 @@ def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return :param str target_obj: Target data type to deserialize to. :param object data: Object to deserialize. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1717,7 +1636,7 @@ def deserialize_data(self, data, data_type): # pylint: disable=too-many-return- :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1799,7 +1718,7 @@ def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return :param dict attr: Dictionary to be deserialized. :return: Deserialized object. :rtype: dict - :raises: TypeError if non-builtin datatype encountered. + :raises TypeError: if non-builtin datatype encountered. """ if attr is None: return None @@ -1845,7 +1764,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return :param str data_type: deserialization data type. :return: Deserialized basic type. :rtype: str, int, float or bool - :raises: TypeError if string format is not valid. + :raises TypeError: if string format is not valid or data_type is not one of str, int, float, bool. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1871,7 +1790,11 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return if data_type == "str": return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec # pylint: disable=eval-used + if data_type == "int": + return int(attr) + if data_type == "float": + return float(attr) + raise TypeError("Unknown basic data type: {}".format(data_type)) @staticmethod def deserialize_unicode(data): @@ -1936,7 +1859,7 @@ def deserialize_bytearray(attr): :param str attr: response string to be deserialized. :return: Deserialized bytearray :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1949,7 +1872,7 @@ def deserialize_base64(attr): :param str attr: response string to be deserialized. :return: Deserialized base64 string :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1964,7 +1887,7 @@ def deserialize_decimal(attr): :param str attr: response string to be deserialized. :return: Deserialized decimal - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. :rtype: decimal """ if isinstance(attr, ET.Element): @@ -1982,7 +1905,7 @@ def deserialize_long(attr): :param str attr: response string to be deserialized. :return: Deserialized int :rtype: long or int - :raises: ValueError if string format invalid. + :raises ValueError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1995,7 +1918,7 @@ def deserialize_duration(attr): :param str attr: response string to be deserialized. :return: Deserialized duration :rtype: TimeDelta - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2013,7 +1936,7 @@ def deserialize_date(attr): :param str attr: response string to be deserialized. :return: Deserialized date :rtype: Date - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2029,7 +1952,7 @@ def deserialize_time(attr): :param str attr: response string to be deserialized. :return: Deserialized time :rtype: datetime.time - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2044,14 +1967,14 @@ def deserialize_rfc(attr): :param str attr: response string to be deserialized. :return: Deserialized RFC datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) @@ -2067,7 +1990,7 @@ def deserialize_iso(attr): :param str attr: response string to be deserialized. :return: Deserialized ISO datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2105,7 +2028,7 @@ def deserialize_unix(attr): :param int attr: Object to be serialized. :return: Deserialized datetime :rtype: Datetime - :raises: DeserializationError if format invalid + :raises DeserializationError: if format invalid """ if isinstance(attr, ET.Element): attr = int(attr.text) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_vendor.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/utils.py similarity index 67% rename from sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_vendor.py rename to sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/utils.py index f2113d194e26..39b612f39a9b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_vendor.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/utils.py @@ -6,20 +6,20 @@ # -------------------------------------------------------------------------- from abc import ABC -from typing import TYPE_CHECKING - -from ._configuration import ApiManagementClientConfiguration +from typing import Generic, TYPE_CHECKING, TypeVar if TYPE_CHECKING: - from azure.core import PipelineClient + from .serialization import Deserializer, Serializer + - from ._serialization import Deserializer, Serializer +TClient = TypeVar("TClient") +TConfig = TypeVar("TConfig") -class ApiManagementClientMixinABC(ABC): +class ClientMixinABC(ABC, Generic[TClient, TConfig]): """DO NOT use this class. It is for internal typing use only.""" - _client: "PipelineClient" - _config: ApiManagementClientConfiguration + _client: TClient + _config: TConfig _serialize: "Serializer" _deserialize: "Deserializer" diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py index 34ea7990c4b4..68f2cec05508 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py @@ -6,4 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "5.0.0" + +VERSION = "5.1.0b1" diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py index 9909f2d36dce..4405c8a41df1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py @@ -7,27 +7,29 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from .. import models as _models -from .._serialization import Deserializer, Serializer +from .._utils.serialization import Deserializer, Serializer from ._configuration import ApiManagementClientConfiguration from .operations import ( AllPoliciesOperations, ApiDiagnosticOperations, ApiExportOperations, ApiGatewayConfigConnectionOperations, + ApiGatewayHostnameBindingOperations, ApiGatewayOperations, ApiIssueAttachmentOperations, ApiIssueCommentOperations, ApiIssueOperations, - ApiManagementClientOperationsMixin, ApiManagementGatewaySkusOperations, ApiManagementOperationsOperations, ApiManagementServiceOperations, @@ -44,6 +46,7 @@ ApiRevisionOperations, ApiSchemaOperations, ApiTagDescriptionOperations, + ApiToolOperations, ApiVersionSetOperations, ApiWikiOperations, ApiWikisOperations, @@ -55,6 +58,8 @@ BackendOperations, CacheOperations, CertificateOperations, + ClientApplicationOperations, + ClientApplicationProductLinkOperations, ContentItemOperations, ContentTypeOperations, DelegationSettingsOperations, @@ -156,13 +161,15 @@ WorkspaceTagOperationLinkOperations, WorkspaceTagOperations, WorkspaceTagProductLinkOperations, + _ApiManagementClientOperationsMixin, ) if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential -class ApiManagementClient(ApiManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes +class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """ApiManagement Client. :ivar api_gateway: ApiGatewayOperations operations @@ -215,6 +222,8 @@ class ApiManagementClient(ApiManagementClientOperationsMixin): # pylint: disabl :vartype api_wiki: azure.mgmt.apimanagement.aio.operations.ApiWikiOperations :ivar api_wikis: ApiWikisOperations operations :vartype api_wikis: azure.mgmt.apimanagement.aio.operations.ApiWikisOperations + :ivar api_tool: ApiToolOperations operations + :vartype api_tool: azure.mgmt.apimanagement.aio.operations.ApiToolOperations :ivar api_export: ApiExportOperations operations :vartype api_export: azure.mgmt.apimanagement.aio.operations.ApiExportOperations :ivar api_version_set: ApiVersionSetOperations operations @@ -239,6 +248,12 @@ class ApiManagementClient(ApiManagementClientOperationsMixin): # pylint: disabl :vartype cache: azure.mgmt.apimanagement.aio.operations.CacheOperations :ivar certificate: CertificateOperations operations :vartype certificate: azure.mgmt.apimanagement.aio.operations.CertificateOperations + :ivar client_application: ClientApplicationOperations operations + :vartype client_application: + azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations + :ivar client_application_product_link: ClientApplicationProductLinkOperations operations + :vartype client_application_product_link: + azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations :ivar content_type: ContentTypeOperations operations :vartype content_type: azure.mgmt.apimanagement.aio.operations.ContentTypeOperations :ivar content_item: ContentItemOperations operations @@ -263,6 +278,9 @@ class ApiManagementClient(ApiManagementClientOperationsMixin): # pylint: disabl :ivar api_gateway_config_connection: ApiGatewayConfigConnectionOperations operations :vartype api_gateway_config_connection: azure.mgmt.apimanagement.aio.operations.ApiGatewayConfigConnectionOperations + :ivar api_gateway_hostname_binding: ApiGatewayHostnameBindingOperations operations + :vartype api_gateway_hostname_binding: + azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations :ivar gateway: GatewayOperations operations :vartype gateway: azure.mgmt.apimanagement.aio.operations.GatewayOperations :ivar gateway_hostname_configuration: GatewayHostnameConfigurationOperations operations @@ -503,10 +521,13 @@ class ApiManagementClient(ApiManagementClientOperationsMixin): # pylint: disabl :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2024-05-01". Note that overriding this - default value may result in unsupported behavior. + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-03-01-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -516,12 +537,24 @@ def __init__( self, credential: "AsyncTokenCredential", subscription_id: str, - base_url: str = "https://management.azure.com", + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ApiManagementClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, + subscription_id=subscription_id, + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -540,7 +573,9 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, base_url), policies=_policies, **kwargs + ) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -582,6 +617,7 @@ def __init__( self.operation = OperationOperations(self._client, self._config, self._serialize, self._deserialize) self.api_wiki = ApiWikiOperations(self._client, self._config, self._serialize, self._deserialize) self.api_wikis = ApiWikisOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_tool = ApiToolOperations(self._client, self._config, self._serialize, self._deserialize) self.api_export = ApiExportOperations(self._client, self._config, self._serialize, self._deserialize) self.api_version_set = ApiVersionSetOperations(self._client, self._config, self._serialize, self._deserialize) self.authorization_provider = AuthorizationProviderOperations( @@ -600,6 +636,12 @@ def __init__( self.backend = BackendOperations(self._client, self._config, self._serialize, self._deserialize) self.cache = CacheOperations(self._client, self._config, self._serialize, self._deserialize) self.certificate = CertificateOperations(self._client, self._config, self._serialize, self._deserialize) + self.client_application = ClientApplicationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.client_application_product_link = ClientApplicationProductLinkOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.content_type = ContentTypeOperations(self._client, self._config, self._serialize, self._deserialize) self.content_item = ContentItemOperations(self._client, self._config, self._serialize, self._deserialize) self.deleted_services = DeletedServicesOperations( @@ -620,6 +662,9 @@ def __init__( self.api_gateway_config_connection = ApiGatewayConfigConnectionOperations( self._client, self._config, self._serialize, self._deserialize ) + self.api_gateway_hostname_binding = ApiGatewayHostnameBindingOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.gateway = GatewayOperations(self._client, self._config, self._serialize, self._deserialize) self.gateway_hostname_configuration = GatewayHostnameConfigurationOperations( self._client, self._config, self._serialize, self._deserialize diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_configuration.py index e98cd26fa776..81c540aca034 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy @@ -14,6 +14,7 @@ from .._version import VERSION if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential @@ -27,13 +28,22 @@ class ApiManagementClientConfiguration: # pylint: disable=too-many-instance-att :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2024-05-01". Note that overriding this - default value may result in unsupported behavior. + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-03-01-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2024-05-01") + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any + ) -> None: + api_version: str = kwargs.pop("api_version", "2025-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -42,6 +52,7 @@ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **k self.credential = credential self.subscription_id = subscription_id + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-apimanagement/{}".format(VERSION)) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_patch.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_patch.py index 17dbc073e01b..d3be7c117232 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_patch.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_patch.py @@ -28,5 +28,7 @@ # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md + + def patch_sdk(): pass diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_vendor.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_vendor.py deleted file mode 100644 index 2e1a55b2278d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_vendor.py +++ /dev/null @@ -1,25 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from abc import ABC -from typing import TYPE_CHECKING - -from ._configuration import ApiManagementClientConfiguration - -if TYPE_CHECKING: - from azure.core import AsyncPipelineClient - - from .._serialization import Deserializer, Serializer - - -class ApiManagementClientMixinABC(ABC): - """DO NOT use this class. It is for internal typing use only.""" - - _client: "AsyncPipelineClient" - _config: ApiManagementClientConfiguration - _serialize: "Serializer" - _deserialize: "Deserializer" diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/__init__.py index 203221376c61..22aa559c73b5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -34,6 +35,7 @@ from ._operation_operations import OperationOperations # type: ignore from ._api_wiki_operations import ApiWikiOperations # type: ignore from ._api_wikis_operations import ApiWikisOperations # type: ignore +from ._api_tool_operations import ApiToolOperations # type: ignore from ._api_export_operations import ApiExportOperations # type: ignore from ._api_version_set_operations import ApiVersionSetOperations # type: ignore from ._authorization_provider_operations import AuthorizationProviderOperations # type: ignore @@ -44,7 +46,9 @@ from ._backend_operations import BackendOperations # type: ignore from ._cache_operations import CacheOperations # type: ignore from ._certificate_operations import CertificateOperations # type: ignore -from ._api_management_client_operations import ApiManagementClientOperationsMixin # type: ignore +from ._client_application_operations import ClientApplicationOperations # type: ignore +from ._client_application_product_link_operations import ClientApplicationProductLinkOperations # type: ignore +from ._api_management_client_operations import _ApiManagementClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._content_type_operations import ContentTypeOperations # type: ignore from ._content_item_operations import ContentItemOperations # type: ignore from ._deleted_services_operations import DeletedServicesOperations # type: ignore @@ -55,6 +59,7 @@ from ._documentation_operations import DocumentationOperations # type: ignore from ._email_template_operations import EmailTemplateOperations # type: ignore from ._api_gateway_config_connection_operations import ApiGatewayConfigConnectionOperations # type: ignore +from ._api_gateway_hostname_binding_operations import ApiGatewayHostnameBindingOperations # type: ignore from ._gateway_operations import GatewayOperations # type: ignore from ._gateway_hostname_configuration_operations import GatewayHostnameConfigurationOperations # type: ignore from ._gateway_api_operations import GatewayApiOperations # type: ignore @@ -177,6 +182,7 @@ "OperationOperations", "ApiWikiOperations", "ApiWikisOperations", + "ApiToolOperations", "ApiExportOperations", "ApiVersionSetOperations", "AuthorizationProviderOperations", @@ -187,7 +193,8 @@ "BackendOperations", "CacheOperations", "CertificateOperations", - "ApiManagementClientOperationsMixin", + "ClientApplicationOperations", + "ClientApplicationProductLinkOperations", "ContentTypeOperations", "ContentItemOperations", "DeletedServicesOperations", @@ -198,6 +205,7 @@ "DocumentationOperations", "EmailTemplateOperations", "ApiGatewayConfigConnectionOperations", + "ApiGatewayHostnameBindingOperations", "GatewayOperations", "GatewayHostnameConfigurationOperations", "GatewayApiOperations", diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_all_policies_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_all_policies_operations.py index 2790f4292610..235020b9ae16 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_all_policies_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_all_policies_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._all_policies_operations import build_list_by_service_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class AllPoliciesOperations: @@ -49,15 +49,15 @@ class AllPoliciesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncIterable["_models.AllPoliciesContract"]: + ) -> AsyncItemPaged["_models.AllPoliciesContract"]: """Status of all policies of API Management services. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -132,7 +132,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py index 9881fd878d66..fbcfbd4d8769 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_diagnostic_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiDiagnosticOperations: @@ -58,10 +58,10 @@ class ApiDiagnosticOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -73,7 +73,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.DiagnosticContract"]: + ) -> AsyncItemPaged["_models.DiagnosticContract"]: """Lists all diagnostics of an API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -164,7 +164,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -227,7 +230,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -293,7 +299,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -466,7 +475,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -639,7 +651,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -712,7 +727,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py index 762c47cb71de..c8384bfb656f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +24,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_export_operations import build_get_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiExportOperations: @@ -47,10 +47,10 @@ class ApiExportOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -119,7 +119,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiExportResult", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_config_connection_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_config_connection_operations.py index 565bb3afbc55..9785bf119717 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_config_connection_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_config_connection_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,19 +33,18 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_gateway_config_connection_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_gateway_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiGatewayConfigConnectionOperations: @@ -60,16 +61,15 @@ class ApiGatewayConfigConnectionOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_gateway( self, resource_group_name: str, gateway_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ApiManagementGatewayConfigConnectionResource"]: - # pylint: disable=line-too-long + ) -> AsyncItemPaged["_models.ApiManagementGatewayConfigConnectionResource"]: """List all API Management gateway config connections within a gateway. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -145,7 +145,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -204,7 +207,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize( @@ -275,7 +281,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -296,7 +305,6 @@ async def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource]: - # pylint: disable=line-too-long """Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. @@ -332,7 +340,6 @@ async def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource]: - # pylint: disable=line-too-long """Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. @@ -366,7 +373,6 @@ async def begin_create_or_update( parameters: Union[_models.ApiManagementGatewayConfigConnectionResource, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource]: - # pylint: disable=line-too-long """Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. @@ -485,7 +491,10 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_hostname_binding_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_hostname_binding_operations.py new file mode 100644 index 000000000000..1033b068a6b2 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_hostname_binding_operations.py @@ -0,0 +1,724 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core import AsyncPipelineClient +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer +from ...operations._api_gateway_hostname_binding_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_by_gateway_request, + build_refresh_secret_request, +) +from .._configuration import ApiManagementClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list + + +class ApiGatewayHostnameBindingOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_gateway_hostname_binding` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_gateway( + self, resource_group_name: str, gateway_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.GatewayHostnameBindingResource"]: + """List all API Management gateway hostname bindings within a gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :return: An iterator like instance of either GatewayHostnameBindingResource or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.GatewayHostnameBindingListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_list_by_gateway_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("GatewayHostnameBindingListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any + ) -> _models.GatewayHostnameBindingResource: + """Gets an API Management gateway hostname binding resource description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :return: GatewayHostnameBindingResource or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.GatewayHostnameBindingResource] = kwargs.pop("cls", None) + + _request = build_get_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("GatewayHostnameBindingResource", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: Union[_models.GatewayHostnameBindingResource, IO[bytes]], + if_match: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "GatewayHostnameBindingResource") + + _request = build_create_or_update_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + if_match=if_match, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: _models.GatewayHostnameBindingResource, + if_match: Optional[str] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource + :param if_match: ETag of the Entity. Not required when creating an entity, but required when + updating an entity. Default value is None. + :type if_match: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either GatewayHostnameBindingResource or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: IO[bytes], + if_match: Optional[str] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Required. + :type parameters: IO[bytes] + :param if_match: ETag of the Entity. Not required when creating an entity, but required when + updating an entity. Default value is None. + :type if_match: str + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either GatewayHostnameBindingResource or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: Union[_models.GatewayHostnameBindingResource, IO[bytes]], + if_match: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Is either a GatewayHostnameBindingResource type or a IO[bytes] type. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource or IO[bytes] + :param if_match: ETag of the Entity. Not required when creating an entity, but required when + updating an entity. Default value is None. + :type if_match: str + :return: An instance of AsyncLROPoller that returns either GatewayHostnameBindingResource or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayHostnameBindingResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + parameters=parameters, + if_match=if_match, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = self._deserialize("GatewayHostnameBindingResource", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.GatewayHostnameBindingResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.GatewayHostnameBindingResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, if_match: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_delete_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + if_match=if_match, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, if_match: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing API Management gateway hostname binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param if_match: ETag of the Entity. ETag should match the current entity state from the header + response of the GET request or it should be * for unconditional update. Required. + :type if_match: str + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + if_match=if_match, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _refresh_secret_initial( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_refresh_secret_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_refresh_secret( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Refresh the secret for an API Management gateway hostname binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._refresh_secret_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_operations.py index 175669ee48ff..b88bac02f827 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_gateway_operations import ( build_create_or_update_request, build_delete_request, @@ -39,13 +41,11 @@ build_list_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiGatewayOperations: @@ -62,10 +62,10 @@ class ApiGatewayOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_or_update_initial( self, @@ -124,7 +124,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -325,7 +328,10 @@ async def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -519,7 +525,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiManagementGatewayResource", pipeline_response.http_response) @@ -568,7 +577,10 @@ async def _delete_initial(self, resource_group_name: str, gateway_name: str, **k except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -650,7 +662,7 @@ def get_long_running_output(pipeline_response): @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ApiManagementGatewayResource"]: + ) -> AsyncItemPaged["_models.ApiManagementGatewayResource"]: """List all API Management gateways within a resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -723,7 +735,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -731,7 +746,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.ApiManagementGatewayResource"]: + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ApiManagementGatewayResource"]: """List all API Management gateways within a subscription. :return: An iterator like instance of either ApiManagementGatewayResource or the result of @@ -800,7 +815,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py index 83c1f537a3f6..d3815eada750 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_issue_attachment_operations import ( build_create_or_update_request, build_delete_request, @@ -34,13 +36,11 @@ build_get_request, build_list_by_service_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiIssueAttachmentOperations: @@ -57,10 +57,10 @@ class ApiIssueAttachmentOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -73,7 +73,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.IssueAttachmentContract"]: + ) -> AsyncItemPaged["_models.IssueAttachmentContract"]: """Lists all attachments for the Issue associated with the specified API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -170,7 +170,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -238,7 +241,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -308,7 +314,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -494,7 +503,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -578,7 +590,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py index 25300c24057a..66331cf76c7c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_issue_comment_operations import ( build_create_or_update_request, build_delete_request, @@ -34,13 +36,11 @@ build_get_request, build_list_by_service_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiIssueCommentOperations: @@ -57,10 +57,10 @@ class ApiIssueCommentOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -73,7 +73,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.IssueCommentContract"]: + ) -> AsyncItemPaged["_models.IssueCommentContract"]: """Lists all comments for the Issue associated with the specified API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -170,7 +170,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -238,7 +241,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -308,7 +314,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -494,7 +503,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -578,7 +590,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py index efcfa6ba3635..fe1ae2b169bc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_issue_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiIssueOperations: @@ -58,10 +58,10 @@ class ApiIssueOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -74,7 +74,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.IssueContract"]: + ) -> AsyncItemPaged["_models.IssueContract"]: """Lists all issues associated with the specified API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -168,7 +168,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -231,7 +234,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -306,7 +312,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -479,7 +488,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -652,7 +664,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -725,7 +740,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_client_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_client_operations.py index 189af14c47ab..1ab13070b6d6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_client_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -28,18 +30,18 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.utils import ClientMixinABC from ...operations._api_management_client_operations import build_perform_connectivity_check_async_request -from .._vendor import ApiManagementClientMixinABC +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list -class ApiManagementClientOperationsMixin(ApiManagementClientMixinABC): +class _ApiManagementClientOperationsMixin( + ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], ApiManagementClientConfiguration] +): async def _perform_connectivity_check_async_initial( # pylint: disable=name-too-long self, @@ -98,7 +100,10 @@ async def _perform_connectivity_check_async_initial( # pylint: disable=name-too except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_gateway_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_gateway_skus_operations.py index d0c12f8ed75b..8488fb6094a8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_gateway_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_gateway_skus_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_management_gateway_skus_operations import build_list_available_skus_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiManagementGatewaySkusOperations: @@ -49,15 +49,15 @@ class ApiManagementGatewaySkusOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_available_skus( self, resource_group_name: str, gateway_name: str, **kwargs: Any - ) -> AsyncIterable["_models.GatewayResourceSkuResult"]: + ) -> AsyncItemPaged["_models.GatewayResourceSkuResult"]: """Gets available SKUs for API Management gateway. Gets all available SKU for a given API Management gateway. @@ -135,7 +135,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py index 5eae2a76603a..2487f2da57c2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_management_operations_operations import build_list_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiManagementOperationsOperations: @@ -49,13 +49,13 @@ class ApiManagementOperationsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: """Lists all of the available REST API operations of the Microsoft.ApiManagement provider. :return: An iterator like instance of either Operation or the result of cls(response) @@ -121,7 +121,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py index 69a9bb21dd4e..8e3cdd6328fb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_management_service_operations import ( build_apply_network_configuration_updates_request, build_backup_request, @@ -44,19 +46,18 @@ build_list_by_resource_group_request, build_list_request, build_migrate_to_stv2_request, + build_refresh_hostnames_request, build_restore_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list -class ApiManagementServiceOperations: +class ApiManagementServiceOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. @@ -70,10 +71,10 @@ class ApiManagementServiceOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _restore_initial( self, @@ -132,7 +133,10 @@ async def _restore_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -344,7 +348,10 @@ async def _backup_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -550,7 +557,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -751,7 +761,10 @@ async def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -945,7 +958,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) @@ -994,7 +1010,10 @@ async def _delete_initial(self, resource_group_name: str, service_name: str, **k except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1093,9 +1112,10 @@ async def _migrate_to_stv2_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if parameters else None _json = None _content = None if isinstance(parameters, (IOBase, bytes)): @@ -1133,7 +1153,10 @@ async def _migrate_to_stv2_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1240,6 +1263,7 @@ async def begin_migrate_to_stv2( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1287,7 +1311,7 @@ def get_long_running_output(pipeline_response): @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ApiManagementServiceResource"]: + ) -> AsyncItemPaged["_models.ApiManagementServiceResource"]: """List all API Management services within a resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1360,7 +1384,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1368,7 +1395,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.ApiManagementServiceResource"]: + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ApiManagementServiceResource"]: """Lists all API Management services within an Azure subscription. :return: An iterator like instance of either ApiManagementServiceResource or the result of @@ -1437,7 +1464,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1492,7 +1522,10 @@ async def get_sso_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiManagementServiceGetSsoTokenResult", pipeline_response.http_response) @@ -1597,7 +1630,10 @@ async def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiManagementServiceNameAvailabilityResult", pipeline_response.http_response) @@ -1648,7 +1684,10 @@ async def get_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize( @@ -1680,9 +1719,10 @@ async def _apply_network_configuration_updates_initial( # pylint: disable=name- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if parameters else None _json = None _content = None if isinstance(parameters, (IOBase, bytes)): @@ -1720,7 +1760,10 @@ async def _apply_network_configuration_updates_initial( # pylint: disable=name- except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1834,6 +1877,7 @@ async def begin_apply_network_configuration_updates( # pylint: disable=name-too api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1877,3 +1921,125 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller[_models.ApiManagementServiceResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) + + async def _refresh_hostnames_initial( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_refresh_hostnames_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_refresh_hostnames( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from + KeyVault on the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._refresh_hostnames_initial( + resource_group_name=resource_group_name, + service_name=service_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py index 39f51d8ad742..63676f131c49 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_management_service_skus_operations import build_list_available_service_skus_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiManagementServiceSkusOperations: @@ -49,15 +49,15 @@ class ApiManagementServiceSkusOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_available_service_skus( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ResourceSkuResult"]: + ) -> AsyncItemPaged["_models.ResourceSkuResult"]: """Gets available SKUs for API Management service. Gets all available SKU for a given API Management service. @@ -134,7 +134,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py index 9ce0ebd79619..e9e994f397a1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_management_skus_operations import build_list_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiManagementSkusOperations: @@ -49,13 +49,13 @@ class ApiManagementSkusOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.ApiManagementSku"]: + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ApiManagementSku"]: """Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. :return: An iterator like instance of either ApiManagementSku or the result of cls(response) @@ -123,7 +123,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_link_operations.py index b4e0aa89a2b5..724670ad95dc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_link_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +24,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_management_workspace_link_operations import build_get_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiManagementWorkspaceLinkOperations: @@ -47,10 +47,10 @@ class ApiManagementWorkspaceLinkOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -104,7 +104,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiManagementWorkspaceLinksResource", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_links_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_links_operations.py index 9aa6b9d0732b..11ac4a1a4061 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_links_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_links_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_management_workspace_links_operations import build_list_by_service_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiManagementWorkspaceLinksOperations: @@ -49,15 +49,15 @@ class ApiManagementWorkspaceLinksOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ApiManagementWorkspaceLinksResource"]: + ) -> AsyncItemPaged["_models.ApiManagementWorkspaceLinksResource"]: """List all API Management workspaceLinks for a service. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -133,7 +133,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py index ac020ef67700..03b80d1aa7a9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_operation_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_api_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiOperationOperations: @@ -58,10 +58,10 @@ class ApiOperationOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( @@ -74,7 +74,7 @@ def list_by_api( skip: Optional[int] = None, tags: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.OperationContract"]: + ) -> AsyncItemPaged["_models.OperationContract"]: """Lists a collection of the operations for the specified API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -172,7 +172,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -235,7 +238,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -301,7 +307,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -474,7 +483,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -647,7 +659,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -720,7 +735,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py index 5b6f8fe5229e..6862ebd13bb8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,6 +25,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_operation_policy_operations import ( build_create_or_update_request, build_delete_request, @@ -31,13 +33,11 @@ build_get_request, build_list_by_operation_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiOperationPolicyOperations: @@ -54,10 +54,10 @@ class ApiOperationPolicyOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list_by_operation( @@ -115,7 +115,10 @@ async def list_by_operation( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PolicyCollection", pipeline_response.http_response) @@ -190,7 +193,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -270,7 +276,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -453,7 +462,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -536,7 +548,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py index cba9f10016f4..ce43396eaeb7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_operations import ( build_create_or_update_request, build_delete_request, @@ -40,13 +42,11 @@ build_list_by_tags_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiOperations: @@ -63,10 +63,10 @@ class ApiOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -79,7 +79,7 @@ def list_by_service( tags: Optional[str] = None, expand_api_version_set: Optional[bool] = None, **kwargs: Any - ) -> AsyncIterable["_models.ApiContract"]: + ) -> AsyncItemPaged["_models.ApiContract"]: """Lists all APIs of the API Management service instance. .. seealso:: @@ -179,7 +179,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -236,7 +239,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, api_ if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -296,7 +302,10 @@ async def get(self, resource_group_name: str, service_name: str, api_id: str, ** if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -370,7 +379,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -696,7 +708,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -759,7 +774,10 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -860,7 +878,7 @@ def list_by_tags( skip: Optional[int] = None, include_not_tagged_apis: Optional[bool] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagResourceContract"]: + ) -> AsyncItemPaged["_models.TagResourceContract"]: """Lists a collection of apis associated with tags. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -956,7 +974,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py index 58eeade32347..dc6ec421cfef 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,6 +25,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_policy_operations import ( build_create_or_update_request, build_delete_request, @@ -31,13 +33,11 @@ build_get_request, build_list_by_api_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiPolicyOperations: @@ -54,10 +54,10 @@ class ApiPolicyOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list_by_api( @@ -111,7 +111,10 @@ async def list_by_api( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PolicyCollection", pipeline_response.http_response) @@ -181,7 +184,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -256,7 +262,10 @@ async def get( if response.status_code not in [200, 200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -426,7 +435,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -504,7 +516,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py index 2d79dfc3e08a..1d5d3b16741f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_product_operations import build_list_by_apis_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiProductOperations: @@ -49,10 +49,10 @@ class ApiProductOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_apis( @@ -64,7 +64,7 @@ def list_by_apis( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ProductContract"]: + ) -> AsyncItemPaged["_models.ProductContract"]: """Lists all Products, which the API is part of. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -155,7 +155,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py index 1bbb5a632234..0be2bf72e494 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_release_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiReleaseOperations: @@ -58,10 +58,10 @@ class ApiReleaseOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -73,7 +73,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ApiReleaseContract"]: + ) -> AsyncItemPaged["_models.ApiReleaseContract"]: """Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. @@ -166,7 +166,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -229,7 +232,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -295,7 +301,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -468,7 +477,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -641,7 +653,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -714,7 +729,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py index dcec88bc096d..c5a832ad6fcb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_revision_operations import build_list_by_service_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiRevisionOperations: @@ -49,10 +49,10 @@ class ApiRevisionOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -64,7 +64,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ApiRevisionContract"]: + ) -> AsyncItemPaged["_models.ApiRevisionContract"]: """Lists all revisions of an API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -155,7 +155,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py index e45336e46911..ae66ad7c5dff 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_schema_operations import ( build_create_or_update_request, build_delete_request, @@ -38,13 +40,11 @@ build_get_request, build_list_by_api_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiSchemaOperations: @@ -61,10 +61,10 @@ class ApiSchemaOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( @@ -76,7 +76,7 @@ def list_by_api( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.SchemaContract"]: + ) -> AsyncItemPaged["_models.SchemaContract"]: """Get the schema configuration at the API level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -167,7 +167,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -230,7 +233,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -296,7 +302,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -372,7 +381,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -635,7 +647,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py index b371ccf2ec5b..1314b30213de 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_tag_description_operations import ( build_create_or_update_request, build_delete_request, @@ -34,13 +36,11 @@ build_get_request, build_list_by_service_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiTagDescriptionOperations: @@ -57,10 +57,10 @@ class ApiTagDescriptionOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -72,7 +72,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagDescriptionContract"]: + ) -> AsyncItemPaged["_models.TagDescriptionContract"]: """Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. @@ -166,7 +166,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -229,7 +232,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -295,7 +301,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -468,7 +477,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -547,7 +559,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tool_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tool_operations.py new file mode 100644 index 000000000000..a43851fc606a --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tool_operations.py @@ -0,0 +1,707 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core import AsyncPipelineClient +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer +from ...operations._api_tool_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_entity_tag_request, + build_get_request, + build_list_by_api_request, + build_update_request, +) +from .._configuration import ApiManagementClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list + + +class ApiToolOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_tool` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + api_id: str, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ToolContract"]: + """Lists a collection of the MCP tools for the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :type filter: str + :param top: Number of records to return. Default value is None. + :type top: int + :param skip: Number of records to skip. Default value is None. + :type skip: int + :return: An iterator like instance of either ToolContract or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ToolContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ToolCollection] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ToolCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API tool specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :return: bool or the result of cls(response) + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any + ) -> _models.ToolContract: + """Gets the details of the API Tool specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) + + _request = build_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("ToolContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: _models.ToolContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: Union[_models.ToolContract, IO[bytes]], + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Is either a ToolContract type or a IO[bytes] type. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract or IO[bytes] + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ToolContract") + + _request = build_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("ToolContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: _models.ToolContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: Union[_models.ToolContract, IO[bytes]], + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Is either a ToolContract type or a IO[bytes] + type. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract or IO[bytes] + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ToolContract") + + _request = build_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("ToolContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any + ) -> None: + """Deletes the specified tool in the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py index 29a0b39a5f8a..dc50a789a3d6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_version_set_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiVersionSetOperations: @@ -58,10 +58,10 @@ class ApiVersionSetOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -72,7 +72,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ApiVersionSetContract"]: + ) -> AsyncItemPaged["_models.ApiVersionSetContract"]: """Lists a collection of API Version Sets in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -159,7 +159,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -218,7 +221,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -280,7 +286,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -440,7 +449,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -600,7 +612,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -669,7 +684,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wiki_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wiki_operations.py index 66514ebb2e91..7398f70aeebf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wiki_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wiki_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,6 +25,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_wiki_operations import ( build_create_or_update_request, build_delete_request, @@ -31,13 +33,11 @@ build_get_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiWikiOperations: @@ -54,10 +54,10 @@ class ApiWikiOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get_entity_tag(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> bool: @@ -109,7 +109,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, api_ if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -171,7 +174,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -331,7 +337,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -491,7 +500,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -560,7 +572,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wikis_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wikis_operations.py index 9ad0dd4ad9e0..b298a422aa59 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wikis_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wikis_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._api_wikis_operations import build_list_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ApiWikisOperations: @@ -49,10 +49,10 @@ class ApiWikisOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -64,7 +64,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.WikiContract"]: + ) -> AsyncItemPaged["_models.WikiContract"]: """Gets the wikis for an API specified by its identifier. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -153,7 +153,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_access_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_access_policy_operations.py index 06ee014074c4..5a3110d26f0d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_access_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_access_policy_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._authorization_access_policy_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_authorization_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class AuthorizationAccessPolicyOperations: @@ -56,10 +56,10 @@ class AuthorizationAccessPolicyOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_authorization( @@ -72,7 +72,7 @@ def list_by_authorization( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.AuthorizationAccessPolicyContract"]: + ) -> AsyncItemPaged["_models.AuthorizationAccessPolicyContract"]: """Lists a collection of authorization access policy defined within a authorization. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -167,7 +167,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -237,7 +240,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -415,7 +421,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -496,7 +505,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_login_links_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_login_links_operations.py index c6e9f677ae55..0d845359ba91 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_login_links_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_login_links_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +25,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._authorization_login_links_operations import build_post_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class AuthorizationLoginLinksOperations: @@ -48,10 +48,10 @@ class AuthorizationLoginLinksOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload async def post( @@ -195,7 +195,10 @@ async def post( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_operations.py index 1f2b8ad8c689..464ff263c6de 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._authorization_operations import ( build_confirm_consent_code_request, build_create_or_update_request, @@ -34,13 +36,11 @@ build_get_request, build_list_by_authorization_provider_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class AuthorizationOperations: @@ -57,10 +57,10 @@ class AuthorizationOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_authorization_provider( @@ -72,7 +72,7 @@ def list_by_authorization_provider( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.AuthorizationContract"]: + ) -> AsyncItemPaged["_models.AuthorizationContract"]: """Lists a collection of authorization providers defined within a authorization provider. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -164,7 +164,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -230,7 +233,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -397,7 +403,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -474,7 +483,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -623,7 +635,10 @@ async def confirm_consent_code( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_provider_operations.py index 5719a1eb32c8..6d18ec635a00 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_provider_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,19 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._authorization_provider_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_service_request, + build_refresh_secret_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class AuthorizationProviderOperations: @@ -56,10 +57,10 @@ class AuthorizationProviderOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -70,7 +71,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.AuthorizationProviderContract"]: + ) -> AsyncItemPaged["_models.AuthorizationProviderContract"]: """Lists a collection of authorization providers defined within a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -159,7 +160,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -217,7 +221,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -374,7 +381,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -442,8 +452,78 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def refresh_secret( + self, resource_group_name: str, service_name: str, authorization_provider_id: str, **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Refreshes the Key Vault reference secret for the specified authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :return: AuthorizationProviderContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) + + _request = build_refresh_secret_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("AuthorizationProviderContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py index f762a29d30ae..84781ffa1b00 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._authorization_server_operations import ( build_create_or_update_request, build_delete_request, @@ -36,13 +38,11 @@ build_list_secrets_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class AuthorizationServerOperations: @@ -59,10 +59,10 @@ class AuthorizationServerOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -73,7 +73,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.AuthorizationServerContract"]: + ) -> AsyncItemPaged["_models.AuthorizationServerContract"]: """Lists a collection of authorization servers defined within a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -162,7 +162,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -218,7 +221,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, auth if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -279,7 +285,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -436,7 +445,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -594,7 +606,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -662,7 +677,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -719,7 +737,10 @@ async def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py index fe358714eee4..d79bc5489ea7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._backend_operations import ( build_create_or_update_request, build_delete_request, @@ -36,13 +38,11 @@ build_reconnect_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class BackendOperations: @@ -59,10 +59,10 @@ class BackendOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -73,7 +73,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.BackendContract"]: + ) -> AsyncItemPaged["_models.BackendContract"]: """Lists a collection of backends in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -162,7 +162,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -219,7 +222,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, back if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -281,7 +287,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -441,7 +450,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -601,7 +613,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -670,7 +685,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -780,9 +798,10 @@ async def reconnect( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[None] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if parameters else None _json = None _content = None if isinstance(parameters, (IOBase, bytes)): @@ -816,7 +835,10 @@ async def reconnect( if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py index 845f97fac892..d73e4f7fd7fd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._cache_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class CacheOperations: @@ -58,10 +58,10 @@ class CacheOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -71,7 +71,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.CacheContract"]: + ) -> AsyncItemPaged["_models.CacheContract"]: """Lists a collection of all external Caches in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -151,7 +151,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -208,7 +211,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, cach if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -270,7 +276,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -439,7 +448,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -599,7 +611,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -668,7 +683,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py index c36e9ba4046f..8d4b2f51aa0b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._certificate_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_refresh_secret_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class CertificateOperations: @@ -58,10 +58,10 @@ class CertificateOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -73,7 +73,7 @@ def list_by_service( skip: Optional[int] = None, is_key_vault_refresh_failed: Optional[bool] = None, **kwargs: Any - ) -> AsyncIterable["_models.CertificateContract"]: + ) -> AsyncItemPaged["_models.CertificateContract"]: """Lists a collection of all certificates in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -166,7 +166,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -225,7 +228,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -287,7 +293,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -460,7 +469,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -529,7 +541,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -591,7 +606,10 @@ async def refresh_secret( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_operations.py new file mode 100644 index 000000000000..095f13c9b27e --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_operations.py @@ -0,0 +1,582 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core import AsyncPipelineClient +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer +from ...operations._client_application_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_entity_tag_request, + build_get_request, + build_list_by_service_request, + build_list_secrets_request, +) +from .._configuration import ApiManagementClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list + + +class ClientApplicationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`client_application` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ClientApplicationContract"]: + """Lists a collection of client applications in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
state | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
|. Default value is None. + :type filter: str + :param top: Number of records to return. Default value is None. + :type top: int + :param skip: Number of records to skip. Default value is None. + :type skip: int + :return: An iterator like instance of either ClientApplicationContract or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ClientApplicationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ClientApplicationCollection] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ClientApplicationCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: bool or the result of cls(response) + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> _models.ClientApplicationContract: + """Gets the details of the client application specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: ClientApplicationContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ClientApplicationContract] = kwargs.pop("cls", None) + + _request = build_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("ClientApplicationContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: _models.ClientApplicationContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: Union[_models.ClientApplicationContract, IO[bytes]], + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Is either a ClientApplicationContract type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationContract or IO[bytes] + :return: ClientApplicationContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ClientApplicationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ClientApplicationContract") + + _request = build_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("ClientApplicationContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> None: + """Delete client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def list_secrets( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> _models.ClientApplicationSecretsContract: + """Retrived client application secrets. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: ClientApplicationSecretsContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationSecretsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ClientApplicationSecretsContract] = kwargs.pop("cls", None) + + _request = build_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ClientApplicationSecretsContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_product_link_operations.py new file mode 100644 index 000000000000..59319a92f4fd --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_product_link_operations.py @@ -0,0 +1,475 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core import AsyncPipelineClient +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer +from ...operations._client_application_product_link_operations import ( + build_create_request, + build_delete_request, + build_get_request, + build_list_by_client_applications_request, +) +from .._configuration import ApiManagementClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list + + +class ClientApplicationProductLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`client_application_product_link` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_client_applications( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ClientApplicationProductLinkContract"]: + """Lists a collection of product links associated with the specified client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param top: Number of records to return. Default value is None. + :type top: int + :param skip: Number of records to skip. Default value is None. + :type skip: int + :return: An iterator like instance of either ClientApplicationProductLinkContract or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ClientApplicationProductLinkCollection] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_list_by_client_applications_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ClientApplicationProductLinkCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Gets the product link for the client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :return: ClientApplicationProductLinkContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ClientApplicationProductLinkContract] = kwargs.pop("cls", None) + + _request = build_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + client_application_product_link_id=client_application_product_link_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("ClientApplicationProductLinkContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: _models.ClientApplicationProductLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationProductLinkContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationProductLinkContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: Union[_models.ClientApplicationProductLinkContract, IO[bytes]], + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Is either a ClientApplicationProductLinkContract type or + a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract or + IO[bytes] + :return: ClientApplicationProductLinkContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ClientApplicationProductLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ClientApplicationProductLinkContract") + + _request = build_create_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + client_application_product_link_id=client_application_product_link_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ClientApplicationProductLinkContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified Product from the specified client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + client_application_product_link_id=client_application_product_link_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py index 13aff7d8c64b..46917f388fd6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._content_item_operations import ( build_create_or_update_request, build_delete_request, @@ -34,13 +36,11 @@ build_get_request, build_list_by_service_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ContentItemOperations: @@ -57,15 +57,15 @@ class ContentItemOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, content_type_id: str, **kwargs: Any - ) -> AsyncIterable["_models.ContentItemContract"]: + ) -> AsyncItemPaged["_models.ContentItemContract"]: """Lists developer portal's content items specified by the provided content type. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -143,7 +143,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -205,7 +208,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -269,7 +275,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -436,7 +445,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -513,7 +525,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py index f96fe5d0409d..9cb48ff15bed 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._content_type_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_service_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ContentTypeOperations: @@ -56,15 +56,15 @@ class ContentTypeOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ContentTypeContract"]: + ) -> AsyncItemPaged["_models.ContentTypeContract"]: """Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. @@ -140,7 +140,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -199,7 +202,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -362,7 +368,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -432,7 +441,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py index 45313c9ac26f..3d4d0e59bb98 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,6 +25,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._delegation_settings_operations import ( build_create_or_update_request, build_get_entity_tag_request, @@ -31,13 +33,11 @@ build_list_secrets_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class DelegationSettingsOperations: @@ -54,10 +54,10 @@ class DelegationSettingsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: @@ -105,7 +105,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, **kw if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -161,7 +164,10 @@ async def get(self, resource_group_name: str, service_name: str, **kwargs: Any) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -308,7 +314,10 @@ async def update( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -448,7 +457,10 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalDelegationSettings", pipeline_response.http_response) @@ -506,7 +518,10 @@ async def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalSettingValidationKeyContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py index 9e65b1b506af..7dd1426dad94 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Optional, TypeVar, Union, cast +from collections.abc import MutableMapping +from typing import Any, AsyncIterator, Callable, Optional, TypeVar, Union, cast import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,18 +31,17 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._deleted_services_operations import ( build_get_by_name_request, build_list_by_subscription_request, build_purge_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class DeletedServicesOperations: @@ -58,13 +58,13 @@ class DeletedServicesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DeletedServiceContract"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.DeletedServiceContract"]: """Lists all soft-deleted services available for undelete for the given subscription. :return: An iterator like instance of either DeletedServiceContract or the result of @@ -133,7 +133,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -185,7 +188,10 @@ async def get_by_name(self, service_name: str, location: str, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("DeletedServiceContract", pipeline_response.http_response) @@ -234,7 +240,10 @@ async def _purge_initial(self, service_name: str, location: str, **kwargs: Any) except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py index 896fa136079f..a7e315c48da4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._diagnostic_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class DiagnosticOperations: @@ -58,10 +58,10 @@ class DiagnosticOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -72,7 +72,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.DiagnosticContract"]: + ) -> AsyncItemPaged["_models.DiagnosticContract"]: """Lists all diagnostics of the API Management service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -159,7 +159,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -218,7 +221,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -280,7 +286,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -440,7 +449,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -600,7 +612,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -669,7 +684,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_documentation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_documentation_operations.py index 30d773c25067..a313f5668d5c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_documentation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_documentation_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._documentation_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class DocumentationOperations: @@ -58,10 +58,10 @@ class DocumentationOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -72,7 +72,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.DocumentationContract"]: + ) -> AsyncItemPaged["_models.DocumentationContract"]: """Lists all Documentations of the API Management service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -159,7 +159,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -218,7 +221,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -280,7 +286,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -440,7 +449,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -600,7 +612,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -669,7 +684,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py index 5ab26ebe965c..4d4260c84ba4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._email_template_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class EmailTemplateOperations: @@ -58,10 +58,10 @@ class EmailTemplateOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -72,7 +72,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.EmailTemplateContract"]: + ) -> AsyncItemPaged["_models.EmailTemplateContract"]: """Gets all email templates. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -160,7 +160,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -229,7 +232,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -301,7 +307,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -479,7 +488,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("EmailTemplateContract", pipeline_response.http_response) @@ -654,7 +666,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -734,7 +749,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py index ffc8f89bf547..35809fecd96f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._gateway_api_operations import ( build_create_or_update_request, build_delete_request, build_get_entity_tag_request, build_list_by_service_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class GatewayApiOperations: @@ -56,10 +56,10 @@ class GatewayApiOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -71,7 +71,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ApiContract"]: + ) -> AsyncItemPaged["_models.ApiContract"]: """Lists a collection of the APIs associated with a gateway. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -161,7 +161,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -224,7 +227,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -347,9 +353,10 @@ async def create_or_update( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if parameters else None _json = None _content = None if isinstance(parameters, (IOBase, bytes)): @@ -384,7 +391,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiContract", pipeline_response.http_response) @@ -450,7 +460,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py index 9def3c98c543..820e74760b3b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._gateway_certificate_authority_operations import ( build_create_or_update_request, build_delete_request, @@ -34,13 +36,11 @@ build_get_request, build_list_by_service_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class GatewayCertificateAuthorityOperations: @@ -57,10 +57,10 @@ class GatewayCertificateAuthorityOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -72,7 +72,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.GatewayCertificateAuthorityContract"]: + ) -> AsyncItemPaged["_models.GatewayCertificateAuthorityContract"]: """Lists the collection of Certificate Authorities for the specified Gateway entity. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -163,7 +163,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -226,7 +229,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -292,7 +298,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -466,7 +475,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -545,7 +557,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py index e5fdde2121e2..607f8c7d48ee 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._gateway_hostname_configuration_operations import ( build_create_or_update_request, build_delete_request, @@ -34,13 +36,11 @@ build_get_request, build_list_by_service_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class GatewayHostnameConfigurationOperations: @@ -57,10 +57,10 @@ class GatewayHostnameConfigurationOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -72,7 +72,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.GatewayHostnameConfigurationContract"]: + ) -> AsyncItemPaged["_models.GatewayHostnameConfigurationContract"]: """Lists the collection of hostname configurations for the specified gateway. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -165,7 +165,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -229,7 +232,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -295,7 +301,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -469,7 +478,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -542,7 +554,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py index 0fa13aef7d80..23f9f0327d55 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,6 +29,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._gateway_operations import ( build_create_or_update_request, build_delete_request, @@ -42,13 +44,11 @@ build_regenerate_key_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class GatewayOperations: @@ -65,10 +65,10 @@ class GatewayOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -79,7 +79,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.GatewayContract"]: + ) -> AsyncItemPaged["_models.GatewayContract"]: """Lists a collection of gateways registered with service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -168,7 +168,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -225,7 +228,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, gate if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -287,7 +293,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -446,7 +455,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -605,7 +617,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -674,7 +689,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -732,7 +750,10 @@ async def list_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -880,7 +901,10 @@ async def regenerate_key( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1019,7 +1043,10 @@ async def generate_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("GatewayTokenContract", pipeline_response.http_response) @@ -1081,7 +1108,10 @@ async def invalidate_debug_credentials( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1222,7 +1252,10 @@ async def list_debug_credentials( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("GatewayDebugCredentialsContract", pipeline_response.http_response) @@ -1242,7 +1275,7 @@ async def list_trace( *, content_type: str = "application/json", **kwargs: Any - ) -> Dict[str, Any]: + ) -> dict[str, Any]: """Fetches trace collected by gateway. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1273,7 +1306,7 @@ async def list_trace( *, content_type: str = "application/json", **kwargs: Any - ) -> Dict[str, Any]: + ) -> dict[str, Any]: """Fetches trace collected by gateway. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1302,7 +1335,7 @@ async def list_trace( gateway_id: str, parameters: Union[_models.GatewayListTraceContract, IO[bytes]], **kwargs: Any - ) -> Dict[str, Any]: + ) -> dict[str, Any]: """Fetches trace collected by gateway. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1333,7 +1366,7 @@ async def list_trace( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Dict[str, Any]] = kwargs.pop("cls", None) + cls: ClsType[dict[str, Any]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1366,7 +1399,10 @@ async def list_trace( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("{object}", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_global_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_global_schema_operations.py index f6850773d42e..f633e945d182 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_global_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_global_schema_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._global_schema_operations import ( build_create_or_update_request, build_delete_request, @@ -38,13 +40,11 @@ build_get_request, build_list_by_service_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class GlobalSchemaOperations: @@ -61,10 +61,10 @@ class GlobalSchemaOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -75,7 +75,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.GlobalSchemaContract"]: + ) -> AsyncItemPaged["_models.GlobalSchemaContract"]: """Lists a collection of schemas registered with service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -163,7 +163,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -220,7 +223,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, sche if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -282,7 +288,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -356,7 +365,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -594,7 +606,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_operations.py index 6ac7ef1673df..d5e71327b687 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._graph_ql_api_resolver_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_api_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class GraphQLApiResolverOperations: @@ -58,10 +58,10 @@ class GraphQLApiResolverOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( @@ -73,7 +73,7 @@ def list_by_api( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ResolverContract"]: + ) -> AsyncItemPaged["_models.ResolverContract"]: """Lists a collection of the resolvers for the specified GraphQL API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -167,7 +167,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -230,7 +233,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -296,7 +302,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -469,7 +478,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -642,7 +654,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -715,7 +730,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_policy_operations.py index 53d6283a5d7e..beb00c6d3d00 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_policy_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._graph_ql_api_resolver_policy_operations import ( build_create_or_update_request, build_delete_request, @@ -34,13 +36,11 @@ build_get_request, build_list_by_resolver_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class GraphQLApiResolverPolicyOperations: @@ -57,15 +57,15 @@ class GraphQLApiResolverPolicyOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_resolver( self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any - ) -> AsyncIterable["_models.PolicyContract"]: + ) -> AsyncItemPaged["_models.PolicyContract"]: """Get the list of policy configuration at the GraphQL API Resolver level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -148,7 +148,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -221,7 +224,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -301,7 +307,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -484,7 +493,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -567,7 +579,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py index bf25f250c280..d81ed5030bbc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._group_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class GroupOperations: @@ -58,10 +58,10 @@ class GroupOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -72,7 +72,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.GroupContract"]: + ) -> AsyncItemPaged["_models.GroupContract"]: """Lists a collection of groups defined within a service instance. .. seealso:: @@ -163,7 +163,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -220,7 +223,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, grou if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -282,7 +288,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -442,7 +451,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -602,7 +614,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -671,7 +686,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py index d8c2c475d220..8fd24f3e63a8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,19 +27,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._group_user_operations import ( build_check_entity_exists_request, build_create_request, build_delete_request, build_list_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class GroupUserOperations: @@ -55,10 +55,10 @@ class GroupUserOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -70,7 +70,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.UserContract"]: + ) -> AsyncItemPaged["_models.UserContract"]: """Lists a collection of user entities associated with the group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -164,7 +164,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -227,7 +230,10 @@ async def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -290,7 +296,10 @@ async def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("UserContract", pipeline_response.http_response) @@ -356,7 +365,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py index 1cdbc3a5f1f2..131b5902851b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +29,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._identity_provider_operations import ( build_create_or_update_request, build_delete_request, @@ -36,13 +39,11 @@ build_list_secrets_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class IdentityProviderOperations: @@ -59,15 +60,15 @@ class IdentityProviderOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncIterable["_models.IdentityProviderContract"]: + ) -> AsyncItemPaged["_models.IdentityProviderContract"]: """Lists a collection of Identity Provider configured in the specified service instance. .. seealso:: @@ -147,7 +148,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -210,7 +214,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -277,7 +284,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -437,7 +447,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -598,7 +611,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -672,7 +688,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -734,7 +753,10 @@ async def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py index 6961970de772..eff273462529 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,14 +27,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._issue_operations import build_get_request, build_list_by_service_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class IssueOperations: @@ -50,10 +50,10 @@ class IssueOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -64,7 +64,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.IssueContract"]: + ) -> AsyncItemPaged["_models.IssueContract"]: """Lists a collection of issues in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -154,7 +154,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -213,7 +216,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py index 0f117def0225..3f68508840a5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._logger_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class LoggerOperations: @@ -58,10 +58,10 @@ class LoggerOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -72,7 +72,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.LoggerContract"]: + ) -> AsyncItemPaged["_models.LoggerContract"]: """Lists a collection of loggers in the specified service instance. .. seealso:: @@ -164,7 +164,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -221,7 +224,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, logg if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -283,7 +289,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -443,7 +452,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -603,7 +615,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -672,7 +687,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py index f754b36972ab..8a8849c4d3c8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._named_value_operations import ( build_create_or_update_request, build_delete_request, @@ -42,13 +44,11 @@ build_refresh_secret_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NamedValueOperations: @@ -65,10 +65,10 @@ class NamedValueOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -80,7 +80,7 @@ def list_by_service( skip: Optional[int] = None, is_key_vault_refresh_failed: Optional[bool] = None, **kwargs: Any - ) -> AsyncIterable["_models.NamedValueContract"]: + ) -> AsyncItemPaged["_models.NamedValueContract"]: """Lists a collection of named values defined within a service instance. .. seealso:: @@ -175,7 +175,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -233,7 +236,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -294,7 +300,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -368,7 +377,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -605,7 +617,10 @@ async def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -835,7 +850,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -892,7 +910,10 @@ async def list_value( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -947,7 +968,10 @@ async def _refresh_secret_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py index 0e986b6138a1..ed9d44afd7e8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, List, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +24,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._network_status_operations import build_list_by_location_request, build_list_by_service_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NetworkStatusOperations: @@ -47,10 +47,10 @@ class NetworkStatusOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list_by_service( @@ -102,7 +102,10 @@ async def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("[NetworkStatusContractByLocation]", pipeline_response.http_response) @@ -166,7 +169,10 @@ async def list_by_location( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("NetworkStatusContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py index 336c03e534a3..bf9592081b87 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,18 +27,17 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._notification_operations import ( build_create_or_update_request, build_get_request, build_list_by_service_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NotificationOperations: @@ -54,10 +54,10 @@ class NotificationOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -67,7 +67,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.NotificationContract"]: + ) -> AsyncItemPaged["_models.NotificationContract"]: """Lists a collection of properties defined within a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -149,7 +149,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -214,7 +217,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) @@ -287,7 +293,10 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py index 61a2a1698409..5225c1245dc2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,19 +24,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._notification_recipient_email_operations import ( build_check_entity_exists_request, build_create_or_update_request, build_delete_request, build_list_by_notification_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NotificationRecipientEmailOperations: @@ -52,10 +52,10 @@ class NotificationRecipientEmailOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list_by_notification( @@ -115,7 +115,10 @@ async def list_by_notification( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientEmailCollection", pipeline_response.http_response) @@ -187,7 +190,10 @@ async def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -256,7 +262,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientEmailContract", pipeline_response.http_response) @@ -328,7 +337,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py index a2e4abdcb19a..2f691ded6bf9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,19 +24,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._notification_recipient_user_operations import ( build_check_entity_exists_request, build_create_or_update_request, build_delete_request, build_list_by_notification_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NotificationRecipientUserOperations: @@ -52,10 +52,10 @@ class NotificationRecipientUserOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list_by_notification( @@ -115,7 +115,10 @@ async def list_by_notification( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientUserCollection", pipeline_response.http_response) @@ -188,7 +191,10 @@ async def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -258,7 +264,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientUserContract", pipeline_response.http_response) @@ -331,7 +340,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py index 9cde741be2f7..2209a30df5bf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._open_id_connect_provider_operations import ( build_create_or_update_request, build_delete_request, @@ -36,13 +38,11 @@ build_list_secrets_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class OpenIdConnectProviderOperations: @@ -59,10 +59,10 @@ class OpenIdConnectProviderOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -73,7 +73,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.OpenidConnectProviderContract"]: + ) -> AsyncItemPaged["_models.OpenidConnectProviderContract"]: """Lists of all the OpenId Connect Providers. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -162,7 +162,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -218,7 +221,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, opid if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -279,7 +285,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -436,7 +445,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -594,7 +606,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -662,7 +677,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -719,7 +737,10 @@ async def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py index 3b731658e591..924610da6cd0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._operation_operations import build_list_by_tags_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class OperationOperations: @@ -49,10 +49,10 @@ class OperationOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_tags( @@ -65,7 +65,7 @@ def list_by_tags( skip: Optional[int] = None, include_not_tagged_operations: Optional[bool] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagResourceContract"]: + ) -> AsyncItemPaged["_models.TagResourceContract"]: """Lists a collection of operations associated with tags. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -164,7 +164,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_status_operations.py index 4edfc523857d..da0dd713baed 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_status_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_status_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +24,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._operation_status_operations import build_get_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class OperationStatusOperations: @@ -47,10 +47,10 @@ class OperationStatusOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationStatusResult: @@ -97,7 +97,10 @@ async def get(self, location: str, operation_id: str, **kwargs: Any) -> _models. if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("OperationStatusResult", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operations_results_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operations_results_operations.py index 2c8cf6e77d66..119323bed5ed 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operations_results_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operations_results_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +24,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._operations_results_operations import build_get_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class OperationsResultsOperations: @@ -47,10 +47,10 @@ class OperationsResultsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get(self, location: str, operation_id: str, **kwargs: Any) -> None: @@ -98,7 +98,10 @@ async def get(self, location: str, operation_id: str, **kwargs: Any) -> None: if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py index 53fb8bdd4011..ece5e06914a3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +24,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._outbound_network_dependencies_endpoints_operations import build_list_by_service_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class OutboundNetworkDependenciesEndpointsOperations: # pylint: disable=name-too-long @@ -47,10 +47,10 @@ class OutboundNetworkDependenciesEndpointsOperations: # pylint: disable=name-to def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list_by_service( @@ -100,7 +100,10 @@ async def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("OutboundEnvironmentEndpointList", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_patch.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_patch.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py index 9bd29ff7d46f..e3c5e39b65cb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +24,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._policy_description_operations import build_list_by_service_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class PolicyDescriptionOperations: @@ -47,10 +47,10 @@ class PolicyDescriptionOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list_by_service( @@ -108,7 +108,10 @@ async def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PolicyDescriptionCollection", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_fragment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_fragment_operations.py index 3bec4879c317..6863fddbe4c5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_fragment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_fragment_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._policy_fragment_operations import ( build_create_or_update_request, build_delete_request, @@ -39,13 +41,11 @@ build_list_by_service_request, build_list_references_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class PolicyFragmentOperations: @@ -62,10 +62,10 @@ class PolicyFragmentOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -77,7 +77,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.PolicyFragmentContract"]: + ) -> AsyncItemPaged["_models.PolicyFragmentContract"]: """Gets all policy fragments. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -170,7 +170,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -226,7 +229,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, id: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -296,7 +302,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -370,7 +379,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -602,7 +614,10 @@ async def delete(self, resource_group_name: str, service_name: str, id: str, if_ if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -671,7 +686,10 @@ async def list_references( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ResourceCollection", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py index cd0400287e57..906c952356fe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._policy_operations import ( build_create_or_update_request, build_delete_request, @@ -34,13 +36,11 @@ build_get_request, build_list_by_service_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class PolicyOperations: @@ -57,15 +57,15 @@ class PolicyOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncIterable["_models.PolicyContract"]: + ) -> AsyncItemPaged["_models.PolicyContract"]: """Lists all the Global Policy definitions of the Api Management service. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -140,7 +140,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -199,7 +202,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -269,7 +275,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -426,7 +435,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -499,7 +511,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_operations.py index 1b0806cfc831..cfa4d78ff7a5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._policy_restriction_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class PolicyRestrictionOperations: @@ -58,15 +58,15 @@ class PolicyRestrictionOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncIterable["_models.PolicyRestrictionContract"]: + ) -> AsyncItemPaged["_models.PolicyRestrictionContract"]: """Gets all policy restrictions of API Management services. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -142,7 +142,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -200,7 +203,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -261,7 +267,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -418,7 +427,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -575,7 +587,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -648,7 +663,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_validations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_validations_operations.py index 3f6e6151f067..8f0f46e9b9f2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_validations_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_validations_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterator, Callable, Dict, Optional, TypeVar, Union, cast +from collections.abc import MutableMapping +from typing import Any, AsyncIterator, Callable, Optional, TypeVar, Union, cast +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,13 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._policy_restriction_validations_operations import build_by_service_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class PolicyRestrictionValidationsOperations: @@ -51,10 +51,10 @@ class PolicyRestrictionValidationsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _by_service_initial( self, resource_group_name: str, service_name: str, **kwargs: Any @@ -97,7 +97,10 @@ async def _by_service_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_config_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_config_operations.py index cd945ce89aae..6d7ccaa51e63 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_config_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_config_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._portal_config_operations import ( build_create_or_update_request, build_get_entity_tag_request, @@ -34,13 +36,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class PortalConfigOperations: @@ -57,15 +57,15 @@ class PortalConfigOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncIterable["_models.PortalConfigContract"]: + ) -> AsyncItemPaged["_models.PortalConfigContract"]: """Lists the developer portal configurations. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -141,7 +141,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -199,7 +202,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -260,7 +266,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -417,7 +426,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalConfigContract", pipeline_response.http_response) @@ -571,7 +583,10 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalConfigContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py index 0bf334a9d9c0..6820d26269e3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._portal_revision_operations import ( build_create_or_update_request, build_get_entity_tag_request, @@ -38,13 +40,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class PortalRevisionOperations: @@ -61,10 +61,10 @@ class PortalRevisionOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -75,7 +75,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.PortalRevisionContract"]: + ) -> AsyncItemPaged["_models.PortalRevisionContract"]: """Lists developer portal's revisions. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -171,7 +171,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -230,7 +233,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -292,7 +298,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -364,7 +373,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -596,7 +608,10 @@ async def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py index 16e87d348f65..bb1c096437b2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +24,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._portal_settings_operations import build_list_by_service_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class PortalSettingsOperations: @@ -47,10 +47,10 @@ class PortalSettingsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list_by_service( @@ -100,7 +100,10 @@ async def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalSettingsCollection", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_private_endpoint_connection_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_private_endpoint_connection_operations.py index ef470b0dab26..5657a13a2e8b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_private_endpoint_connection_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_private_endpoint_connection_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._private_endpoint_connection_operations import ( build_create_or_update_request, build_delete_request, @@ -39,13 +41,11 @@ build_list_by_service_request, build_list_private_link_resources_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class PrivateEndpointConnectionOperations: @@ -62,15 +62,15 @@ class PrivateEndpointConnectionOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncIterable["_models.PrivateEndpointConnection"]: + ) -> AsyncItemPaged["_models.PrivateEndpointConnection"]: """Lists all private endpoint connections of the API Management service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -146,7 +146,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -204,7 +207,10 @@ async def get_by_name( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) @@ -273,7 +279,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -470,7 +479,10 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -590,7 +602,10 @@ async def list_private_link_resources( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PrivateLinkResourceListResult", pipeline_response.http_response) @@ -651,7 +666,10 @@ async def get_private_link_resource( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_link_operations.py index a7d4f814c7b2..5b0a90ec3dd5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_link_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._product_api_link_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ProductApiLinkOperations: @@ -56,10 +56,10 @@ class ProductApiLinkOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -71,7 +71,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ProductApiLinkContract"]: + ) -> AsyncItemPaged["_models.ProductApiLinkContract"]: """Lists a collection of the API links associated with a product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -163,7 +163,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -226,7 +229,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -386,7 +392,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ProductApiLinkContract", pipeline_response.http_response) @@ -452,7 +461,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py index 8f147a231cec..a3a1688bf59e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,19 +27,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._product_api_operations import ( build_check_entity_exists_request, build_create_or_update_request, build_delete_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ProductApiOperations: @@ -55,10 +55,10 @@ class ProductApiOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -70,7 +70,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ApiContract"]: + ) -> AsyncItemPaged["_models.ApiContract"]: """Lists a collection of the APIs associated with a product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -164,7 +164,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -227,7 +230,10 @@ async def check_entity_exists( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -290,7 +296,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiContract", pipeline_response.http_response) @@ -356,7 +365,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_link_operations.py index c423d677c8d2..b3ba3f64e917 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_link_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._product_group_link_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ProductGroupLinkOperations: @@ -56,10 +56,10 @@ class ProductGroupLinkOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -71,7 +71,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ProductGroupLinkContract"]: + ) -> AsyncItemPaged["_models.ProductGroupLinkContract"]: """Lists a collection of the group links associated with a product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -163,7 +163,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -226,7 +229,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -386,7 +392,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ProductGroupLinkContract", pipeline_response.http_response) @@ -452,7 +461,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py index d6b614d9abf1..803775ff70ee 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,19 +27,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._product_group_operations import ( build_check_entity_exists_request, build_create_or_update_request, build_delete_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ProductGroupOperations: @@ -55,10 +55,10 @@ class ProductGroupOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -70,7 +70,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.GroupContract"]: + ) -> AsyncItemPaged["_models.GroupContract"]: """Lists the collection of developer groups associated with the specified product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -160,7 +160,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -223,7 +226,10 @@ async def check_entity_exists( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -286,7 +292,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("GroupContract", pipeline_response.http_response) @@ -352,7 +361,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py index 35f7894e8ab5..3833e05a46b1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._product_operations import ( build_create_or_update_request, build_delete_request, @@ -36,13 +38,11 @@ build_list_by_tags_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ProductOperations: @@ -59,10 +59,10 @@ class ProductOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -75,7 +75,7 @@ def list_by_service( expand_groups: Optional[bool] = None, tags: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.ProductContract"]: + ) -> AsyncItemPaged["_models.ProductContract"]: """Lists a collection of products in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -173,7 +173,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -230,7 +233,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, prod if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -292,7 +298,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -452,7 +461,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -612,7 +624,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -691,7 +706,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -707,7 +725,7 @@ def list_by_tags( skip: Optional[int] = None, include_not_tagged_products: Optional[bool] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagResourceContract"]: + ) -> AsyncItemPaged["_models.TagResourceContract"]: """Lists a collection of products associated with tags. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -801,7 +819,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py index 7ffd980975bc..77f4351dbbe4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._product_policy_operations import ( build_create_or_update_request, build_delete_request, @@ -34,13 +36,11 @@ build_get_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ProductPolicyOperations: @@ -57,15 +57,15 @@ class ProductPolicyOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any - ) -> AsyncIterable["_models.PolicyContract"]: + ) -> AsyncItemPaged["_models.PolicyContract"]: """Get the policy configuration at the Product level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -144,7 +144,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -211,7 +214,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -286,7 +292,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -456,7 +465,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -534,7 +546,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py index 5fe22cee8f23..f61cf3e63f50 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._product_subscriptions_operations import build_list_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ProductSubscriptionsOperations: @@ -49,10 +49,10 @@ class ProductSubscriptionsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -64,7 +64,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.SubscriptionContract"]: + ) -> AsyncItemPaged["_models.SubscriptionContract"]: """Lists the collection of subscriptions to the specified product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -163,7 +163,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wiki_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wiki_operations.py index 14844ac94543..e33a107f2aba 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wiki_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wiki_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,6 +25,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._product_wiki_operations import ( build_create_or_update_request, build_delete_request, @@ -31,13 +33,11 @@ build_get_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ProductWikiOperations: @@ -54,10 +54,10 @@ class ProductWikiOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get_entity_tag(self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any) -> bool: @@ -109,7 +109,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, prod if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -171,7 +174,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -331,7 +337,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -491,7 +500,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -560,7 +572,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wikis_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wikis_operations.py index 574fb5d2d9af..81d5dec2de04 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wikis_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wikis_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._product_wikis_operations import build_list_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ProductWikisOperations: @@ -49,10 +49,10 @@ class ProductWikisOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -64,7 +64,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.WikiContract"]: + ) -> AsyncItemPaged["_models.WikiContract"]: """Gets the details of the Wiki for a Product specified by its identifier. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -153,7 +153,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py index c8679ddfc692..91418bc9e405 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._quota_by_counter_keys_operations import build_list_by_service_request, build_update_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class QuotaByCounterKeysOperations: @@ -48,10 +49,10 @@ class QuotaByCounterKeysOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list_by_service( @@ -112,7 +113,10 @@ async def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("QuotaCounterCollection", pipeline_response.http_response) @@ -267,7 +271,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("QuotaCounterCollection", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py index ec3163d5d8b2..61c277bab60e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._quota_by_period_keys_operations import build_get_request, build_update_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class QuotaByPeriodKeysOperations: @@ -48,10 +49,10 @@ class QuotaByPeriodKeysOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -115,7 +116,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("QuotaCounterContract", pipeline_response.http_response) @@ -277,7 +281,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("QuotaCounterContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py index efb82fa92e34..4ba4c6f8613c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._region_operations import build_list_by_service_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class RegionOperations: @@ -49,15 +49,15 @@ class RegionOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncIterable["_models.RegionContract"]: + ) -> AsyncItemPaged["_models.RegionContract"]: """Lists all azure regions in which the service exists. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -132,7 +132,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py index 63a13f22666b..b53611ee81d8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._reports_operations import ( build_list_by_api_request, build_list_by_geo_request, @@ -36,13 +39,11 @@ build_list_by_time_request, build_list_by_user_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ReportsOperations: @@ -59,10 +60,10 @@ class ReportsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( @@ -74,7 +75,7 @@ def list_by_api( skip: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.ReportRecordContract"]: + ) -> AsyncItemPaged["_models.ReportRecordContract"]: """Lists report records by API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -162,7 +163,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -179,7 +183,7 @@ def list_by_user( skip: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.ReportRecordContract"]: + ) -> AsyncItemPaged["_models.ReportRecordContract"]: """Lists report records by User. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -280,7 +284,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -297,7 +304,7 @@ def list_by_operation( skip: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.ReportRecordContract"]: + ) -> AsyncItemPaged["_models.ReportRecordContract"]: """Lists report records by API Operations. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -398,7 +405,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -415,7 +425,7 @@ def list_by_product( skip: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.ReportRecordContract"]: + ) -> AsyncItemPaged["_models.ReportRecordContract"]: """Lists report records by Product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -515,7 +525,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -531,7 +544,7 @@ def list_by_geo( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ReportRecordContract"]: + ) -> AsyncItemPaged["_models.ReportRecordContract"]: """Lists report records by geography. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -628,7 +641,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -645,7 +661,7 @@ def list_by_subscription( skip: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.ReportRecordContract"]: + ) -> AsyncItemPaged["_models.ReportRecordContract"]: """Lists report records by subscription. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -745,7 +761,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -763,7 +782,7 @@ def list_by_time( skip: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.ReportRecordContract"]: + ) -> AsyncItemPaged["_models.ReportRecordContract"]: """Lists report records by Time. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -868,7 +887,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -884,7 +906,7 @@ def list_by_request( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.RequestReportRecordContract"]: + ) -> AsyncItemPaged["_models.RequestReportRecordContract"]: """Lists report records by Request. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -973,7 +995,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py index 19b18f81a5bb..c80a98c89719 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,19 +25,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._sign_in_settings_operations import ( build_create_or_update_request, build_get_entity_tag_request, build_get_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class SignInSettingsOperations: @@ -53,10 +53,10 @@ class SignInSettingsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: @@ -104,7 +104,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, **kw if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -160,7 +163,10 @@ async def get(self, resource_group_name: str, service_name: str, **kwargs: Any) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -307,7 +313,10 @@ async def update( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -447,7 +456,10 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalSigninSettings", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py index 6702258170b6..47cfed02bf8f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,19 +25,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._sign_up_settings_operations import ( build_create_or_update_request, build_get_entity_tag_request, build_get_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class SignUpSettingsOperations: @@ -53,10 +53,10 @@ class SignUpSettingsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: @@ -104,7 +104,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, **kw if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -160,7 +163,10 @@ async def get(self, resource_group_name: str, service_name: str, **kwargs: Any) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -307,7 +313,10 @@ async def update( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -447,7 +456,10 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalSignupSettings", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py index 7139573c106e..e0fd5ca09372 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._subscription_operations import ( build_create_or_update_request, build_delete_request, @@ -38,13 +40,11 @@ build_regenerate_secondary_key_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class SubscriptionOperations: @@ -61,10 +61,10 @@ class SubscriptionOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -75,7 +75,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.SubscriptionContract"]: + ) -> AsyncItemPaged["_models.SubscriptionContract"]: """Lists all subscriptions of the API Management service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -170,7 +170,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -228,7 +231,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, sid: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -290,7 +296,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -488,7 +497,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -686,7 +698,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -753,7 +768,10 @@ async def delete(self, resource_group_name: str, service_name: str, sid: str, if if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -811,7 +829,10 @@ async def regenerate_primary_key( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -869,7 +890,10 @@ async def regenerate_secondary_key( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -927,7 +951,10 @@ async def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_api_link_operations.py index d9889610cbdf..c7e1bba44880 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_api_link_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._tag_api_link_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class TagApiLinkOperations: @@ -56,10 +56,10 @@ class TagApiLinkOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -71,7 +71,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagApiLinkContract"]: + ) -> AsyncItemPaged["_models.TagApiLinkContract"]: """Lists a collection of the API links associated with a tag. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -162,7 +162,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -225,7 +228,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -385,7 +391,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagApiLinkContract", pipeline_response.http_response) @@ -451,7 +460,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operation_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operation_link_operations.py index 8503afc71b88..e9152c78b5f9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operation_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operation_link_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._tag_operation_link_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class TagOperationLinkOperations: @@ -56,10 +56,10 @@ class TagOperationLinkOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -71,7 +71,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagOperationLinkContract"]: + ) -> AsyncItemPaged["_models.TagOperationLinkContract"]: """Lists a collection of the operation links associated with a tag. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -163,7 +163,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -226,7 +229,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -386,7 +392,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagOperationLinkContract", pipeline_response.http_response) @@ -452,7 +461,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py index 2c818b1ede0d..b03702378eb2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,6 +29,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._tag_operations import ( build_assign_to_api_request, build_assign_to_operation_request, @@ -51,13 +53,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class TagOperations: # pylint: disable=too-many-public-methods @@ -74,10 +74,10 @@ class TagOperations: # pylint: disable=too-many-public-methods def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_operation( @@ -90,7 +90,7 @@ def list_by_operation( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagContract"]: + ) -> AsyncItemPaged["_models.TagContract"]: """Lists all Tags associated with the Operation. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -185,7 +185,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -252,7 +255,10 @@ async def get_entity_state_by_operation( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -322,7 +328,10 @@ async def get_by_operation( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -395,7 +404,10 @@ async def assign_to_operation( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagContract", pipeline_response.http_response) @@ -465,7 +477,10 @@ async def detach_from_operation( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -481,7 +496,7 @@ def list_by_api( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagContract"]: + ) -> AsyncItemPaged["_models.TagContract"]: """Lists all Tags associated with the API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -572,7 +587,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -635,7 +653,10 @@ async def get_entity_state_by_api( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -701,7 +722,10 @@ async def get_by_api( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -770,7 +794,10 @@ async def assign_to_api( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -839,7 +866,10 @@ async def detach_from_api( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -855,7 +885,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagContract"]: + ) -> AsyncItemPaged["_models.TagContract"]: """Lists all Tags associated with the Product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -946,7 +976,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1009,7 +1042,10 @@ async def get_entity_state_by_product( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1075,7 +1111,10 @@ async def get_by_product( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1144,7 +1183,10 @@ async def assign_to_product( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagContract", pipeline_response.http_response) @@ -1210,7 +1252,10 @@ async def detach_from_product( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1226,7 +1271,7 @@ def list_by_service( skip: Optional[int] = None, scope: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagContract"]: + ) -> AsyncItemPaged["_models.TagContract"]: """Lists a collection of tags defined within a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1316,7 +1361,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1373,7 +1421,10 @@ async def get_entity_state(self, resource_group_name: str, service_name: str, ta if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1433,7 +1484,10 @@ async def get(self, resource_group_name: str, service_name: str, tag_id: str, ** if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1593,7 +1647,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1753,7 +1810,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1822,7 +1882,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_product_link_operations.py index 5f4b903b31a1..b57550525437 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_product_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_product_link_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._tag_product_link_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class TagProductLinkOperations: @@ -56,10 +56,10 @@ class TagProductLinkOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -71,7 +71,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagProductLinkContract"]: + ) -> AsyncItemPaged["_models.TagProductLinkContract"]: """Lists a collection of the product links associated with a tag. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -163,7 +163,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -226,7 +229,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -386,7 +392,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagProductLinkContract", pipeline_response.http_response) @@ -452,7 +461,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py index 9d0bbee438a1..6a30781df48d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._tag_resource_operations import build_list_by_service_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class TagResourceOperations: @@ -49,10 +49,10 @@ class TagResourceOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -63,7 +63,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagResourceContract"]: + ) -> AsyncItemPaged["_models.TagResourceContract"]: """Lists a collection of resources associated with tags. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -161,7 +161,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py index 9d526e9f9205..a7318be1a6fc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,17 +24,16 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._tenant_access_git_operations import ( build_regenerate_primary_key_request, build_regenerate_secondary_key_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class TenantAccessGitOperations: @@ -50,10 +50,10 @@ class TenantAccessGitOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def regenerate_primary_key( @@ -107,7 +107,10 @@ async def regenerate_primary_key( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -165,7 +168,10 @@ async def regenerate_secondary_key( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py index d24cf8f944c2..af56ef20b4d0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._tenant_access_operations import ( build_create_request, build_get_entity_tag_request, @@ -37,13 +39,11 @@ build_regenerate_secondary_key_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class TenantAccessOperations: @@ -60,15 +60,15 @@ class TenantAccessOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, filter: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.AccessInformationContract"]: + ) -> AsyncItemPaged["_models.AccessInformationContract"]: """Returns list of access infos - for Git and Management endpoints. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -147,7 +147,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -206,7 +209,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -268,7 +274,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -429,7 +438,10 @@ async def create( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -590,7 +602,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -655,7 +670,10 @@ async def regenerate_primary_key( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -713,7 +731,10 @@ async def regenerate_secondary_key( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -771,7 +792,10 @@ async def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py index 2d31e057a4b3..6b5c6b740622 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -28,19 +30,18 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._tenant_configuration_operations import ( build_deploy_request, build_get_sync_state_request, build_save_request, build_validate_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class TenantConfigurationOperations: @@ -57,10 +58,10 @@ class TenantConfigurationOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _deploy_initial( self, @@ -121,7 +122,10 @@ async def _deploy_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -353,7 +357,10 @@ async def _save_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -585,7 +592,10 @@ async def _validate_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -803,7 +813,10 @@ async def get_sync_state( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TenantConfigurationSyncStateContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py index 3c1b2172ba33..3ea3542ca8fb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,14 +27,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._tenant_settings_operations import build_get_request, build_list_by_service_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class TenantSettingsOperations: @@ -50,15 +50,15 @@ class TenantSettingsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, filter: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.TenantSettingsContract"]: + ) -> AsyncItemPaged["_models.TenantSettingsContract"]: """Public settings. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -137,7 +137,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -199,7 +202,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py index 9de0b5d32208..1fdf50cbf35e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +24,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._user_confirmation_password_operations import build_send_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class UserConfirmationPasswordOperations: @@ -47,10 +47,10 @@ class UserConfirmationPasswordOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def send( @@ -114,7 +114,10 @@ async def send( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py index 10cf896115aa..e4a58f109b75 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._user_group_operations import build_list_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class UserGroupOperations: @@ -49,10 +49,10 @@ class UserGroupOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -64,7 +64,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.GroupContract"]: + ) -> AsyncItemPaged["_models.GroupContract"]: """Lists all user groups. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -157,7 +157,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py index 0ca5c2dbda7f..eba4cefd7680 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._user_identities_operations import build_list_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class UserIdentitiesOperations: @@ -49,15 +49,15 @@ class UserIdentitiesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any - ) -> AsyncIterable["_models.UserIdentityContract"]: + ) -> AsyncItemPaged["_models.UserIdentityContract"]: """List of all user identities. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -137,7 +137,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py index b2927b9970e1..7095ae8cc563 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._user_operations import ( build_create_or_update_request, build_delete_request, @@ -41,13 +44,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class UserOperations: @@ -64,10 +65,10 @@ class UserOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -79,7 +80,7 @@ def list_by_service( skip: Optional[int] = None, expand_groups: Optional[bool] = None, **kwargs: Any - ) -> AsyncIterable["_models.UserContract"]: + ) -> AsyncItemPaged["_models.UserContract"]: """Lists a collection of registered users in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -173,7 +174,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -230,7 +234,10 @@ async def get_entity_tag(self, resource_group_name: str, service_name: str, user if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -292,7 +299,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -462,7 +472,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -622,7 +635,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -689,7 +705,10 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -844,7 +863,10 @@ async def generate_sso_url( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("GenerateSsoUrlResult", pipeline_response.http_response) @@ -988,7 +1010,10 @@ async def get_shared_access_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("UserTokenResult", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py index 89a33003da46..cec4a4c19ab4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,14 +27,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._user_subscription_operations import build_get_request, build_list_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class UserSubscriptionOperations: @@ -50,10 +50,10 @@ class UserSubscriptionOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -65,7 +65,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.SubscriptionContract"]: + ) -> AsyncItemPaged["_models.SubscriptionContract"]: """Lists the collection of subscriptions of the specified user. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -163,7 +163,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -226,7 +229,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_diagnostic_operations.py index 66a0a8fcd151..40f155246551 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_diagnostic_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_api_diagnostic_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_workspace_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceApiDiagnosticOperations: @@ -58,10 +58,10 @@ class WorkspaceApiDiagnosticOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_workspace( @@ -74,7 +74,7 @@ def list_by_workspace( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.DiagnosticContract"]: + ) -> AsyncItemPaged["_models.DiagnosticContract"]: """Lists all diagnostics of an API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -169,7 +169,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -242,7 +245,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -318,7 +324,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -504,7 +513,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -690,7 +702,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -774,7 +789,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_export_operations.py index abf7f1ca2b8d..1b2f1dbcf9dc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_export_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_export_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +24,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_api_export_operations import build_get_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceApiExportOperations: @@ -47,10 +47,10 @@ class WorkspaceApiExportOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -124,7 +124,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiExportResult", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_operations.py index 4feb9293dcc2..6121d37a577a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_api_operation_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_api_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceApiOperationOperations: @@ -58,10 +58,10 @@ class WorkspaceApiOperationOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( @@ -75,7 +75,7 @@ def list_by_api( skip: Optional[int] = None, tags: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.OperationContract"]: + ) -> AsyncItemPaged["_models.OperationContract"]: """Lists a collection of the operations for the specified API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -177,7 +177,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -250,7 +253,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -326,7 +332,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -512,7 +521,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -698,7 +710,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -782,7 +797,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_policy_operations.py index 016834ac3744..c4029c5aeddc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_policy_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_api_operation_policy_operations import ( build_create_or_update_request, build_delete_request, @@ -34,13 +36,11 @@ build_get_request, build_list_by_operation_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceApiOperationPolicyOperations: @@ -57,10 +57,10 @@ class WorkspaceApiOperationPolicyOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_operation( @@ -71,7 +71,7 @@ def list_by_operation( api_id: str, operation_id: str, **kwargs: Any - ) -> AsyncIterable["_models.PolicyContract"]: + ) -> AsyncItemPaged["_models.PolicyContract"]: """Get the list of policy configuration at the API Operation level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -158,7 +158,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -235,7 +238,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -320,7 +326,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -516,7 +525,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -604,7 +616,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operations.py index c69bd4f4a5f5..dd236855f76f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_api_operations import ( build_create_or_update_request, build_delete_request, @@ -39,13 +41,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceApiOperations: @@ -62,10 +62,10 @@ class WorkspaceApiOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -79,7 +79,7 @@ def list_by_service( tags: Optional[str] = None, expand_api_version_set: Optional[bool] = None, **kwargs: Any - ) -> AsyncIterable["_models.ApiContract"]: + ) -> AsyncItemPaged["_models.ApiContract"]: """Lists all APIs of the workspace in an API Management service instance. .. seealso:: @@ -183,7 +183,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -246,7 +249,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -312,7 +318,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -388,7 +397,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -743,7 +755,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -826,7 +841,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_policy_operations.py index 4c22485d489b..2d30fbb29ce4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_policy_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_api_policy_operations import ( build_create_or_update_request, build_delete_request, @@ -34,13 +36,11 @@ build_get_request, build_list_by_api_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceApiPolicyOperations: @@ -57,15 +57,15 @@ class WorkspaceApiPolicyOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any - ) -> AsyncIterable["_models.PolicyContract"]: + ) -> AsyncItemPaged["_models.PolicyContract"]: """Get the policy configuration at the API level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -148,7 +148,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -220,7 +223,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -300,7 +306,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -483,7 +492,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -566,7 +578,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_release_operations.py index 150703859497..2bf21d6eb15a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_release_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_release_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_api_release_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceApiReleaseOperations: @@ -58,10 +58,10 @@ class WorkspaceApiReleaseOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -74,7 +74,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ApiReleaseContract"]: + ) -> AsyncItemPaged["_models.ApiReleaseContract"]: """Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. @@ -171,7 +171,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -244,7 +247,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -320,7 +326,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -506,7 +515,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -692,7 +704,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -776,7 +791,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_revision_operations.py index e77deaadf15d..3129cdf47f25 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_revision_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,14 +26,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_api_revision_operations import build_list_by_service_request +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceApiRevisionOperations: @@ -49,10 +49,10 @@ class WorkspaceApiRevisionOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -65,7 +65,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ApiRevisionContract"]: + ) -> AsyncItemPaged["_models.ApiRevisionContract"]: """Lists all revisions of an API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -160,7 +160,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_schema_operations.py index f5fa24fd5cec..2e6ef4095cb2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_schema_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_api_schema_operations import ( build_create_or_update_request, build_delete_request, @@ -38,13 +40,11 @@ build_get_request, build_list_by_api_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceApiSchemaOperations: @@ -61,10 +61,10 @@ class WorkspaceApiSchemaOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( @@ -77,7 +77,7 @@ def list_by_api( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.SchemaContract"]: + ) -> AsyncItemPaged["_models.SchemaContract"]: """Get the schema configuration at the API level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -172,7 +172,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -239,7 +242,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -309,7 +315,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -387,7 +396,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -668,7 +680,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_version_set_operations.py index c0099fc6f9c6..f54a0f1b051b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_version_set_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_version_set_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_api_version_set_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceApiVersionSetOperations: @@ -58,10 +58,10 @@ class WorkspaceApiVersionSetOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -73,7 +73,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ApiVersionSetContract"]: + ) -> AsyncItemPaged["_models.ApiVersionSetContract"]: """Lists a collection of API Version Sets in the specified workspace with a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -164,7 +164,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -227,7 +230,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -293,7 +299,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -466,7 +475,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -639,7 +651,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -718,7 +733,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_backend_operations.py index a993ef4e31d7..d82a5a3d0fd9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_backend_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_backend_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_backend_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_workspace_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceBackendOperations: @@ -58,10 +58,10 @@ class WorkspaceBackendOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_workspace( @@ -73,7 +73,7 @@ def list_by_workspace( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.BackendContract"]: + ) -> AsyncItemPaged["_models.BackendContract"]: """Lists a collection of backends in the specified workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -166,7 +166,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -229,7 +232,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -295,7 +301,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -468,7 +477,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -641,7 +653,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -720,7 +735,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_certificate_operations.py index 1c935d911156..f38a04c227d3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_certificate_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_certificate_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_certificate_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_workspace_request, build_refresh_secret_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceCertificateOperations: @@ -58,10 +58,10 @@ class WorkspaceCertificateOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_workspace( @@ -74,7 +74,7 @@ def list_by_workspace( skip: Optional[int] = None, is_key_vault_refresh_failed: Optional[bool] = None, **kwargs: Any - ) -> AsyncIterable["_models.CertificateContract"]: + ) -> AsyncItemPaged["_models.CertificateContract"]: """Lists a collection of all certificates in the specified workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -171,7 +171,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -234,7 +237,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -300,7 +306,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -486,7 +495,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -565,7 +577,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -631,7 +646,10 @@ async def refresh_secret( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_diagnostic_operations.py index 53cec2414680..d10643d7d6fc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_diagnostic_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_diagnostic_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_workspace_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceDiagnosticOperations: @@ -58,10 +58,10 @@ class WorkspaceDiagnosticOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_workspace( @@ -73,7 +73,7 @@ def list_by_workspace( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.DiagnosticContract"]: + ) -> AsyncItemPaged["_models.DiagnosticContract"]: """Lists all diagnostics in the specified workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -164,7 +164,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -227,7 +230,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -293,7 +299,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -466,7 +475,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -639,7 +651,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -718,7 +733,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_global_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_global_schema_operations.py index ce644caac83e..eccab1265468 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_global_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_global_schema_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_global_schema_operations import ( build_create_or_update_request, build_delete_request, @@ -38,13 +40,11 @@ build_get_request, build_list_by_service_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceGlobalSchemaOperations: @@ -61,10 +61,10 @@ class WorkspaceGlobalSchemaOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -76,7 +76,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.GlobalSchemaContract"]: + ) -> AsyncItemPaged["_models.GlobalSchemaContract"]: """Lists a collection of schemas registered with workspace in a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -168,7 +168,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -231,7 +234,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -297,7 +303,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -373,7 +382,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -637,7 +649,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_operations.py index 9ab7df544de9..7cda62bb7e98 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_group_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceGroupOperations: @@ -58,10 +58,10 @@ class WorkspaceGroupOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -73,7 +73,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.GroupContract"]: + ) -> AsyncItemPaged["_models.GroupContract"]: """Lists a collection of groups defined within a workspace in a service instance. .. seealso:: @@ -168,7 +168,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -231,7 +234,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -297,7 +303,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -470,7 +479,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -643,7 +655,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -722,7 +737,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_user_operations.py index c13ddfc5e3ab..6afffbc7f257 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_user_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,19 +27,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_group_user_operations import ( build_check_entity_exists_request, build_create_request, build_delete_request, build_list_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceGroupUserOperations: @@ -55,10 +55,10 @@ class WorkspaceGroupUserOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -71,7 +71,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.UserContract"]: + ) -> AsyncItemPaged["_models.UserContract"]: """Lists a collection of user entities associated with the group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -169,7 +169,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -236,7 +239,10 @@ async def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -303,7 +309,10 @@ async def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("UserContract", pipeline_response.http_response) @@ -373,7 +382,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_logger_operations.py index 8005c83f6ac9..682423cb86e9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_logger_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_logger_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_logger_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_workspace_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceLoggerOperations: @@ -58,10 +58,10 @@ class WorkspaceLoggerOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_workspace( @@ -73,7 +73,7 @@ def list_by_workspace( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.LoggerContract"]: + ) -> AsyncItemPaged["_models.LoggerContract"]: """Lists a collection of loggers in the specified workspace. .. seealso:: @@ -169,7 +169,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -232,7 +235,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -298,7 +304,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -471,7 +480,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -644,7 +656,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -723,7 +738,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_named_value_operations.py index 5fc96e18e53a..b2c4b18f0b1f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_named_value_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_named_value_operations.py @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_named_value_operations import ( build_create_or_update_request, build_delete_request, @@ -42,13 +44,11 @@ build_refresh_secret_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceNamedValueOperations: @@ -65,10 +65,10 @@ class WorkspaceNamedValueOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -81,7 +81,7 @@ def list_by_service( skip: Optional[int] = None, is_key_vault_refresh_failed: Optional[Union[str, _models.KeyVaultRefreshState]] = None, **kwargs: Any - ) -> AsyncIterable["_models.NamedValueContract"]: + ) -> AsyncItemPaged["_models.NamedValueContract"]: """Lists a collection of named values defined within a workspace in a service instance. .. seealso:: @@ -180,7 +180,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -242,7 +245,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -307,7 +313,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -383,7 +392,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -635,7 +647,10 @@ async def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -888,7 +903,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -949,7 +967,10 @@ async def list_value( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1005,7 +1026,10 @@ async def _refresh_secret_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_operations.py index cf753870d22d..2d5bf26feebd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,18 +27,17 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_notification_operations import ( build_create_or_update_request, build_get_request, build_list_by_service_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceNotificationOperations: @@ -54,10 +54,10 @@ class WorkspaceNotificationOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -68,7 +68,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.NotificationContract"]: + ) -> AsyncItemPaged["_models.NotificationContract"]: """Lists a collection of properties defined within a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -154,7 +154,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -224,7 +227,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) @@ -302,7 +308,10 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_email_operations.py index 2c98bad34835..5a7b3c5cd68c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_email_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_email_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,19 +24,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_notification_recipient_email_operations import ( build_check_entity_exists_request, build_create_or_update_request, build_delete_request, build_list_by_notification_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceNotificationRecipientEmailOperations: # pylint: disable=name-too-long @@ -52,10 +52,10 @@ class WorkspaceNotificationRecipientEmailOperations: # pylint: disable=name-too def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list_by_notification( @@ -120,7 +120,10 @@ async def list_by_notification( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientEmailCollection", pipeline_response.http_response) @@ -197,7 +200,10 @@ async def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -271,7 +277,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientEmailContract", pipeline_response.http_response) @@ -348,7 +357,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_user_operations.py index c68a1729b1df..3c729d9dc708 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_user_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,19 +24,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_notification_recipient_user_operations import ( build_check_entity_exists_request, build_create_or_update_request, build_delete_request, build_list_by_notification_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceNotificationRecipientUserOperations: # pylint: disable=name-too-long @@ -52,10 +52,10 @@ class WorkspaceNotificationRecipientUserOperations: # pylint: disable=name-too- def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list_by_notification( @@ -120,7 +120,10 @@ async def list_by_notification( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientUserCollection", pipeline_response.http_response) @@ -198,7 +201,10 @@ async def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -273,7 +279,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientUserContract", pipeline_response.http_response) @@ -351,7 +360,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_operations.py index 8ead8275f43e..5cd5b7612c28 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceOperations: @@ -58,10 +58,10 @@ class WorkspaceOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -72,7 +72,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.WorkspaceContract"]: + ) -> AsyncItemPaged["_models.WorkspaceContract"]: """Lists all workspaces of the API Management service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -160,7 +160,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -219,7 +222,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -281,7 +287,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -441,7 +450,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -601,7 +613,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -670,7 +685,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_fragment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_fragment_operations.py index 97ef12f628a7..76723c37f049 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_fragment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_fragment_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_policy_fragment_operations import ( build_create_or_update_request, build_delete_request, @@ -39,13 +41,11 @@ build_list_by_service_request, build_list_references_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspacePolicyFragmentOperations: @@ -62,10 +62,10 @@ class WorkspacePolicyFragmentOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -78,7 +78,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.PolicyFragmentContract"]: + ) -> AsyncItemPaged["_models.PolicyFragmentContract"]: """Gets all policy fragments defined within a workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -175,7 +175,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -237,7 +240,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -312,7 +318,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -388,7 +397,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -639,7 +651,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -713,7 +728,10 @@ async def list_references( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ResourceCollection", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_operations.py index 7966b954e973..ce89c4287bfc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_policy_operations import ( build_create_or_update_request, build_delete_request, @@ -34,13 +36,11 @@ build_get_request, build_list_by_api_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspacePolicyOperations: @@ -57,15 +57,15 @@ class WorkspacePolicyOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any - ) -> AsyncIterable["_models.PolicyContract"]: + ) -> AsyncItemPaged["_models.PolicyContract"]: """Get the policy configuration at the workspace level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -144,7 +144,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -211,7 +214,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -286,7 +292,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -456,7 +465,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -534,7 +546,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_api_link_operations.py index 45f523999da0..879032c78c50 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_api_link_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_product_api_link_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceProductApiLinkOperations: @@ -56,10 +56,10 @@ class WorkspaceProductApiLinkOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -72,7 +72,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ProductApiLinkContract"]: + ) -> AsyncItemPaged["_models.ProductApiLinkContract"]: """Lists a collection of the API links associated with a product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -168,7 +168,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -241,7 +244,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -414,7 +420,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ProductApiLinkContract", pipeline_response.http_response) @@ -490,7 +499,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_group_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_group_link_operations.py index 65c2a9dc4fad..2abafdf8e092 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_group_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_group_link_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_product_group_link_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceProductGroupLinkOperations: @@ -56,10 +56,10 @@ class WorkspaceProductGroupLinkOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -72,7 +72,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.ProductGroupLinkContract"]: + ) -> AsyncItemPaged["_models.ProductGroupLinkContract"]: """Lists a collection of the group links associated with a product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -168,7 +168,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -241,7 +244,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -414,7 +420,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ProductGroupLinkContract", pipeline_response.http_response) @@ -490,7 +499,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_operations.py index 5f53e4d56424..86989dc6cc4b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_product_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceProductOperations: @@ -58,10 +58,10 @@ class WorkspaceProductOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -75,7 +75,7 @@ def list_by_service( expand_groups: Optional[bool] = None, tags: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.ProductContract"]: + ) -> AsyncItemPaged["_models.ProductContract"]: """Lists a collection of products in the specified workspace in a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -177,7 +177,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -240,7 +243,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -306,7 +312,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -479,7 +488,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -652,7 +664,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -736,7 +751,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_policy_operations.py index ada97a7bd514..f2e50abbbfc0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_policy_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,6 +25,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_product_policy_operations import ( build_create_or_update_request, build_delete_request, @@ -31,13 +33,11 @@ build_get_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceProductPolicyOperations: @@ -54,10 +54,10 @@ class WorkspaceProductPolicyOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list_by_product( @@ -115,7 +115,10 @@ async def list_by_product( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PolicyCollection", pipeline_response.http_response) @@ -190,7 +193,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -270,7 +276,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -453,7 +462,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -536,7 +548,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_subscription_operations.py index 176b18d15cd6..c6711bef5abd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_subscription_operations.py @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,6 +29,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_subscription_operations import ( build_create_or_update_request, build_delete_request, @@ -39,13 +41,11 @@ build_regenerate_secondary_key_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceSubscriptionOperations: @@ -62,10 +62,10 @@ class WorkspaceSubscriptionOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -77,7 +77,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.SubscriptionContract"]: + ) -> AsyncItemPaged["_models.SubscriptionContract"]: """Lists all subscriptions of the workspace in an API Management service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -176,7 +176,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -240,7 +243,10 @@ async def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -306,7 +312,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -517,7 +526,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -728,7 +740,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -801,7 +816,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -864,7 +882,10 @@ async def regenerate_primary_key( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -927,7 +948,10 @@ async def regenerate_secondary_key( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -989,7 +1013,10 @@ async def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_api_link_operations.py index 8964a9711aa2..3a15a4a195ff 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_api_link_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_tag_api_link_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceTagApiLinkOperations: @@ -56,10 +56,10 @@ class WorkspaceTagApiLinkOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -72,7 +72,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagApiLinkContract"]: + ) -> AsyncItemPaged["_models.TagApiLinkContract"]: """Lists a collection of the API links associated with a tag. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -167,7 +167,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -240,7 +243,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -413,7 +419,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagApiLinkContract", pipeline_response.http_response) @@ -489,7 +498,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operation_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operation_link_operations.py index 92344df577dd..c73bac7f99ad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operation_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operation_link_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_tag_operation_link_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceTagOperationLinkOperations: @@ -56,10 +56,10 @@ class WorkspaceTagOperationLinkOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -72,7 +72,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagOperationLinkContract"]: + ) -> AsyncItemPaged["_models.TagOperationLinkContract"]: """Lists a collection of the operation links associated with a tag. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -168,7 +168,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -241,7 +244,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -414,7 +420,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagOperationLinkContract", pipeline_response.http_response) @@ -490,7 +499,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operations.py index 0b8536c46049..f0414b5e2f11 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_tag_operations import ( build_create_or_update_request, build_delete_request, @@ -35,13 +37,11 @@ build_list_by_service_request, build_update_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceTagOperations: @@ -58,10 +58,10 @@ class WorkspaceTagOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -74,7 +74,7 @@ def list_by_service( skip: Optional[int] = None, scope: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagContract"]: + ) -> AsyncItemPaged["_models.TagContract"]: """Lists a collection of tags defined within a workspace in a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -168,7 +168,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -231,7 +234,10 @@ async def get_entity_state( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -297,7 +303,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -470,7 +479,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -643,7 +655,10 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -716,7 +731,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_product_link_operations.py index 201f264de6aa..abaf97196459 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_product_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_product_link_operations.py @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,19 +28,18 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._workspace_tag_product_link_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_product_request, ) +from .._configuration import ApiManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class WorkspaceTagProductLinkOperations: @@ -56,10 +56,10 @@ class WorkspaceTagProductLinkOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -72,7 +72,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.TagProductLinkContract"]: + ) -> AsyncItemPaged["_models.TagProductLinkContract"]: """Lists a collection of the product links associated with a tag. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -168,7 +168,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -241,7 +244,10 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -414,7 +420,10 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagProductLinkContract", pipeline_response.http_response) @@ -490,7 +499,10 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py index 6e14ab4fbf4c..37cfc5f888e2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -99,6 +100,8 @@ AuthorizationLoginResponseContract, AuthorizationProviderCollection, AuthorizationProviderContract, + AuthorizationProviderKeyVaultContract, + AuthorizationProviderKeyVaultCreateProperties, AuthorizationProviderOAuth2GrantTypes, AuthorizationProviderOAuth2Settings, AuthorizationServerCollection, @@ -117,12 +120,15 @@ BackendContract, BackendContractProperties, BackendCredentialsContract, + BackendFailureResponse, BackendPool, BackendPoolItem, BackendProperties, BackendProxyContract, BackendReconnectContract, BackendServiceFabricClusterProperties, + BackendSessionAffinity, + BackendSessionId, BackendSubnetConfiguration, BackendTlsProperties, BackendUpdateParameterProperties, @@ -138,6 +144,12 @@ CertificateInformation, CircuitBreakerFailureCondition, CircuitBreakerRule, + ClientApplicationCollection, + ClientApplicationContract, + ClientApplicationProductLinkCollection, + ClientApplicationProductLinkContract, + ClientApplicationSecretsContract, + ClientApplicationSecretsContractEntra, ClientSecretContract, ConfigurationApi, ConnectivityCheckRequest, @@ -183,6 +195,11 @@ GatewayConfigurationApi, GatewayContract, GatewayDebugCredentialsContract, + GatewayHostnameBindingCertificate, + GatewayHostnameBindingKeyVault, + GatewayHostnameBindingKeyVaultLastStatus, + GatewayHostnameBindingListResult, + GatewayHostnameBindingResource, GatewayHostnameConfigurationCollection, GatewayHostnameConfigurationContract, GatewayKeyRegenerationRequestContract, @@ -227,9 +244,12 @@ KeyVaultContractCreateProperties, KeyVaultContractProperties, KeyVaultLastAccessStatusContractProperties, + LLMDiagnosticSettings, + LLMMessageDiagnosticSettings, LoggerCollection, LoggerContract, LoggerUpdateContract, + ManagedServiceIdentity, MigrateToStv2Contract, NamedValueCollection, NamedValueContract, @@ -304,10 +324,13 @@ PrivateLinkServiceConnectionState, ProductApiLinkCollection, ProductApiLinkContract, + ProductApplicationContract, + ProductApplicationContractEntra, ProductCollection, ProductContract, ProductContractProperties, ProductEntityBaseParameters, + ProductEntityBaseParametersApplication, ProductGroupLinkCollection, ProductGroupLinkContract, ProductTagResourceContractProperties, @@ -382,6 +405,9 @@ TenantSettingsContract, TermsOfServiceProperties, TokenBodyParameterContract, + ToolCollection, + ToolContract, + UserAssignedIdentity, UserCollection, UserContract, UserContractProperties, @@ -423,12 +449,15 @@ AuthorizationMethod, AuthorizationType, BackendProtocol, + BackendSessionIdSource, BackendType, BearerTokenSendingMethod, BearerTokenSendingMethods, + CarbonEmissionCategory, CertificateConfigurationStoreName, CertificateSource, CertificateStatus, + ClientApplicationState, ClientAuthenticationMethod, ConfigurationIdName, Confirmation, @@ -451,10 +480,14 @@ IdentityProviderType, IssueType, KeyType, + KeyVaultFetchCode, KeyVaultRefreshState, LegacyApiState, LegacyPortalStatus, + LlmDiagnosticSettings, + LlmMessageLogTypes, LoggerType, + ManagedServiceIdentityType, Method, MigrateToStv2Mode, NameAvailabilityReason, @@ -476,9 +509,11 @@ PreferredIPVersion, PrivateEndpointConnectionProvisioningState, PrivateEndpointServiceConnectionStatus, + ProductAuthType, ProductState, Protocol, PublicNetworkAccess, + ReleaseChannel, ResourceSkuCapacityScaleType, SamplingType, SchemaType, @@ -585,6 +620,8 @@ "AuthorizationLoginResponseContract", "AuthorizationProviderCollection", "AuthorizationProviderContract", + "AuthorizationProviderKeyVaultContract", + "AuthorizationProviderKeyVaultCreateProperties", "AuthorizationProviderOAuth2GrantTypes", "AuthorizationProviderOAuth2Settings", "AuthorizationServerCollection", @@ -603,12 +640,15 @@ "BackendContract", "BackendContractProperties", "BackendCredentialsContract", + "BackendFailureResponse", "BackendPool", "BackendPoolItem", "BackendProperties", "BackendProxyContract", "BackendReconnectContract", "BackendServiceFabricClusterProperties", + "BackendSessionAffinity", + "BackendSessionId", "BackendSubnetConfiguration", "BackendTlsProperties", "BackendUpdateParameterProperties", @@ -624,6 +664,12 @@ "CertificateInformation", "CircuitBreakerFailureCondition", "CircuitBreakerRule", + "ClientApplicationCollection", + "ClientApplicationContract", + "ClientApplicationProductLinkCollection", + "ClientApplicationProductLinkContract", + "ClientApplicationSecretsContract", + "ClientApplicationSecretsContractEntra", "ClientSecretContract", "ConfigurationApi", "ConnectivityCheckRequest", @@ -669,6 +715,11 @@ "GatewayConfigurationApi", "GatewayContract", "GatewayDebugCredentialsContract", + "GatewayHostnameBindingCertificate", + "GatewayHostnameBindingKeyVault", + "GatewayHostnameBindingKeyVaultLastStatus", + "GatewayHostnameBindingListResult", + "GatewayHostnameBindingResource", "GatewayHostnameConfigurationCollection", "GatewayHostnameConfigurationContract", "GatewayKeyRegenerationRequestContract", @@ -713,9 +764,12 @@ "KeyVaultContractCreateProperties", "KeyVaultContractProperties", "KeyVaultLastAccessStatusContractProperties", + "LLMDiagnosticSettings", + "LLMMessageDiagnosticSettings", "LoggerCollection", "LoggerContract", "LoggerUpdateContract", + "ManagedServiceIdentity", "MigrateToStv2Contract", "NamedValueCollection", "NamedValueContract", @@ -790,10 +844,13 @@ "PrivateLinkServiceConnectionState", "ProductApiLinkCollection", "ProductApiLinkContract", + "ProductApplicationContract", + "ProductApplicationContractEntra", "ProductCollection", "ProductContract", "ProductContractProperties", "ProductEntityBaseParameters", + "ProductEntityBaseParametersApplication", "ProductGroupLinkCollection", "ProductGroupLinkContract", "ProductTagResourceContractProperties", @@ -868,6 +925,9 @@ "TenantSettingsContract", "TermsOfServiceProperties", "TokenBodyParameterContract", + "ToolCollection", + "ToolContract", + "UserAssignedIdentity", "UserCollection", "UserContract", "UserContractProperties", @@ -906,12 +966,15 @@ "AuthorizationMethod", "AuthorizationType", "BackendProtocol", + "BackendSessionIdSource", "BackendType", "BearerTokenSendingMethod", "BearerTokenSendingMethods", + "CarbonEmissionCategory", "CertificateConfigurationStoreName", "CertificateSource", "CertificateStatus", + "ClientApplicationState", "ClientAuthenticationMethod", "ConfigurationIdName", "Confirmation", @@ -934,10 +997,14 @@ "IdentityProviderType", "IssueType", "KeyType", + "KeyVaultFetchCode", "KeyVaultRefreshState", "LegacyApiState", "LegacyPortalStatus", + "LlmDiagnosticSettings", + "LlmMessageLogTypes", "LoggerType", + "ManagedServiceIdentityType", "Method", "MigrateToStv2Mode", "NameAvailabilityReason", @@ -959,9 +1026,11 @@ "PreferredIPVersion", "PrivateEndpointConnectionProvisioningState", "PrivateEndpointServiceConnectionStatus", + "ProductAuthType", "ProductState", "Protocol", "PublicNetworkAccess", + "ReleaseChannel", "ResourceSkuCapacityScaleType", "SamplingType", "SchemaType", diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py index 8d9ebef387a5..003fda799ab2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -139,7 +140,7 @@ class AuthorizationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class BackendProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Backend communication protocol.""" + """Backend communication protocol. Required when backend type is 'Single'.""" HTTP = "http" """The Backend is a RESTful service.""" @@ -147,6 +148,14 @@ class BackendProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Backend is a SOAP service.""" +class BackendSessionIdSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Source from where the session id is extracted.""" + + COOKIE = "cookie" + """The session id is set by APIM gateway in a cookie and is extracted from the cookies in client + requests.""" + + class BackendType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of the backend. A backend can be either Single or Pool.""" @@ -172,6 +181,26 @@ class BearerTokenSendingMethods(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Access token will be transmitted as query parameters.""" +class CarbonEmissionCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Scope 2 carbon emission preference for the backend. When specified, the load balancer will + optimize traffic flow by routing to regions that have carbon emission less than or equal to the + specified category. However, when all other backends are not available it will route traffic to + these regions anyway. This requires the backend to be attributed with 'azureRegion' + information. + """ + + VERY_LOW = "VeryLow" + """Carbon intensity of less than or equal to 150 grams COâ‚‚e per KWh""" + LOW = "Low" + """Carbon intensity between 151 & 300 (incl) grams COâ‚‚e per KWh""" + MEDIUM = "Medium" + """Carbon intensity between 301 & 500 (incl) grams COâ‚‚e per KWh""" + HIGH = "High" + """Carbon intensity between 501 & 700 (incl) grams COâ‚‚e per KWh""" + VERY_HIGH = "VeryHigh" + """Carbon intensity of more than 700 grams COâ‚‚e per KWh""" + + class CertificateConfigurationStoreName(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. @@ -198,6 +227,24 @@ class CertificateStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): IN_PROGRESS = "InProgress" +class ClientApplicationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Client application state. The value derives the state of an application based on the statuses + of its associated ClientApplicationProductLinks. + """ + + PENDING = "pending" + """If there are no associated ClientApplicationLinks or all ClientApplicationLinks are in a state + that doesn't meet the criteria for the states: active, rejected, approved (e.g., a mix of + active and rejected without any approved).""" + ACTIVE = "active" + """If there are no approved ClientApplicationLink, but at least one ClientApplicationLink is + active, the Application is considered active""" + REJECTED = "rejected" + """If all ClientApplicationLinks are rejected, the Application is considered rejected""" + APPROVED = "approved" + """If at least one ClientApplicationLink is approved, the Application is considered approved""" + + class ClientAuthenticationMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ClientAuthenticationMethod.""" @@ -351,7 +398,9 @@ class ExportResultFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Export the API Definition in OpenAPI Specification 3.0 to Storage Blob.""" -class GatewayListDebugCredentialsContractPurpose(str, Enum, metaclass=CaseInsensitiveEnumMeta): +class GatewayListDebugCredentialsContractPurpose( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): """Purpose of debug credential.""" TRACING = "tracing" @@ -452,6 +501,13 @@ class KeyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): SECONDARY = "secondary" +class KeyVaultFetchCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The last status of the Key Vault certificate fetch process.""" + + SUCCESS = "Success" + FAILED = "Failed" + + class KeyVaultRefreshState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """KeyVaultRefreshState.""" @@ -485,6 +541,22 @@ class LegacyPortalStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Legacy Portal is disabled for the service.""" +class LlmDiagnosticSettings(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """LlmDiagnosticSettings.""" + + ENABLED = "enabled" + """Default LLM logs are enabled.""" + DISABLED = "disabled" + """Default LLM logs are disabled.""" + + +class LlmMessageLogTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """LlmMessageLogTypes.""" + + ALL = "all" + """Log all messages.""" + + class LoggerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Logger type.""" @@ -496,6 +568,17 @@ class LoggerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Azure Monitor""" +class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of managed service identity (where both SystemAssigned and UserAssigned types are + allowed). + """ + + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" + + class Method(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The HTTP method to be used.""" @@ -700,7 +783,9 @@ class PreferredIPVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): I_PV4 = "IPv4" -class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): +class PrivateEndpointConnectionProvisioningState( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): """The current provisioning state.""" SUCCEEDED = "Succeeded" @@ -717,6 +802,13 @@ class PrivateEndpointServiceConnectionStatus(str, Enum, metaclass=CaseInsensitiv REJECTED = "Rejected" +class ProductAuthType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """ProductAuthType.""" + + SUBSCRIPTION_KEY = "subscription-key" + APPLICATION_TOKEN = "application-token" + + class ProductState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is @@ -746,6 +838,17 @@ class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): DISABLED = "Disabled" +class ReleaseChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Release Channel of this API Management service.""" + + PREVIEW = "Preview" + """Preview Channel of the service.""" + DEFAULT = "Default" + """Default Channel of the service.""" + STABLE = "Stable" + """Stable Channel of the service.""" + + class ResourceSkuCapacityScaleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The scale type applicable to the sku.""" @@ -805,6 +908,8 @@ class SkuType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """BasicV2 SKU of Api Management.""" STANDARD_V2 = "StandardV2" """StandardV2 SKU of Api Management.""" + PREMIUM_V2 = "PremiumV2" + """PremiumV2 SKU of Api Management.""" class SoapApiType(str, Enum, metaclass=CaseInsensitiveEnumMeta): diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py index ae0e034c40b4..5f32d3fc75ab 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,20 +7,15 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime -import sys -from typing import Any, Dict, List, Literal, Optional, TYPE_CHECKING, Union +from typing import Any, Literal, Optional, TYPE_CHECKING, Union -from .. import _serialization - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore +from .._utils import serialization as _serialization if TYPE_CHECKING: from .. import models as _models -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] class AccessInformationCollection(_serialization.Model): @@ -53,9 +48,9 @@ def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: :paramtype count: int """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.AccessInformationContract"]] = None self.count = count - self.next_link = None + self.next_link: Optional[str] = None class Resource(_serialization.Model): @@ -64,7 +59,7 @@ class Resource(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -88,9 +83,9 @@ class Resource(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None class ProxyResource(Resource): @@ -100,7 +95,7 @@ class ProxyResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -116,7 +111,7 @@ class AccessInformationContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -370,7 +365,7 @@ def __init__( *, location: str, sku: "_models.ApiManagementServiceSkuProperties", - zones: Optional[List[str]] = None, + zones: Optional[list[str]] = None, public_ip_address_id: Optional[str] = None, virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, @@ -403,15 +398,15 @@ def __init__( self.location = location self.sku = sku self.zones = zones - self.public_ip_addresses = None - self.private_ip_addresses = None + self.public_ip_addresses: Optional[list[str]] = None + self.private_ip_addresses: Optional[list[str]] = None self.public_ip_address_id = public_ip_address_id self.virtual_network_configuration = virtual_network_configuration - self.gateway_regional_url = None + self.gateway_regional_url: Optional[str] = None self.nat_gateway_state = nat_gateway_state - self.outbound_public_ip_addresses = None + self.outbound_public_ip_addresses: Optional[list[str]] = None self.disable_gateway = disable_gateway - self.platform_version = None + self.platform_version: Optional[Union[str, "_models.PlatformVersion"]] = None class AllPoliciesCollection(_serialization.Model): @@ -431,7 +426,7 @@ class AllPoliciesCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.AllPoliciesContract"]] = None, + value: Optional[list["_models.AllPoliciesContract"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -452,7 +447,7 @@ class AllPoliciesContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -529,9 +524,9 @@ def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: :paramtype count: int """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.ApiContract"]] = None self.count = count - self.next_link = None + self.next_link: Optional[str] = None class ApiContactInformation(_serialization.Model): @@ -576,7 +571,7 @@ class ApiContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -687,7 +682,7 @@ class ApiContract(ProxyResource): "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, } - def __init__( # pylint: disable=too-many-locals + def __init__( self, *, description: Optional[str] = None, @@ -708,7 +703,7 @@ def __init__( # pylint: disable=too-many-locals display_name: Optional[str] = None, service_url: Optional[str] = None, path: Optional[str] = None, - protocols: Optional[List[Union[str, "_models.Protocol"]]] = None, + protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, api_version_set: Optional["_models.ApiVersionSetContractDetails"] = None, **kwargs: Any ) -> None: @@ -771,7 +766,7 @@ def __init__( # pylint: disable=too-many-locals self.api_revision = api_revision self.api_version = api_version self.is_current = is_current - self.is_online = None + self.is_online: Optional[bool] = None self.api_revision_description = api_revision_description self.api_version_description = api_version_description self.api_version_set_id = api_version_set_id @@ -785,7 +780,7 @@ def __init__( # pylint: disable=too-many-locals self.path = path self.protocols = protocols self.api_version_set = api_version_set - self.provisioning_state = None + self.provisioning_state: Optional[str] = None class ApiEntityBaseContract(_serialization.Model): @@ -923,7 +918,7 @@ def __init__( self.api_revision = api_revision self.api_version = api_version self.is_current = is_current - self.is_online = None + self.is_online: Optional[bool] = None self.api_revision_description = api_revision_description self.api_version_description = api_version_description self.api_version_set_id = api_version_set_id @@ -1056,7 +1051,7 @@ def __init__( source_api_id: Optional[str] = None, display_name: Optional[str] = None, service_url: Optional[str] = None, - protocols: Optional[List[Union[str, "_models.Protocol"]]] = None, + protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, api_version_set: Optional["_models.ApiVersionSetContractDetails"] = None, **kwargs: Any ) -> None: @@ -1134,7 +1129,7 @@ def __init__( self.path = path self.protocols = protocols self.api_version_set = api_version_set - self.provisioning_state = None + self.provisioning_state: Optional[str] = None class ApiContractUpdateProperties(ApiEntityBaseContract): @@ -1246,7 +1241,7 @@ def __init__( display_name: Optional[str] = None, service_url: Optional[str] = None, path: Optional[str] = None, - protocols: Optional[List[Union[str, "_models.Protocol"]]] = None, + protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, **kwargs: Any ) -> None: """ @@ -1388,12 +1383,11 @@ class ApiCreateOrUpdateParameter(_serialization.Model): ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector :ivar soap_api_type: Type of API to create. - * ``http`` creates a REST API * ``soap`` creates a SOAP pass-through API * ``websocket`` creates websocket API * ``graphql`` creates GraphQL API. - New types can be added in the future. Known values are: "http", "soap", "websocket", + New types can be added in the future. Known values are: "http", "soap", "websocket", "graphql", "odata", and "grpc". :vartype soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType :ivar translate_required_query_parameters_conduct: Strategy of translating required query @@ -1475,7 +1469,7 @@ def __init__( # pylint: disable=too-many-locals display_name: Optional[str] = None, service_url: Optional[str] = None, path: Optional[str] = None, - protocols: Optional[List[Union[str, "_models.Protocol"]]] = None, + protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, api_version_set: Optional["_models.ApiVersionSetContractDetails"] = None, value: Optional[str] = None, format: Optional[Union[str, "_models.ContentFormat"]] = None, @@ -1548,13 +1542,12 @@ def __init__( # pylint: disable=too-many-locals ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector :keyword soap_api_type: Type of API to create. - - * ``http`` creates a REST API - * ``soap`` creates a SOAP pass-through API - * ``websocket`` creates websocket API - * ``graphql`` creates GraphQL API. - New types can be added in the future. Known values are: "http", "soap", "websocket", - "graphql", "odata", and "grpc". + * ``http`` creates a REST API + * ``soap`` creates a SOAP pass-through API + * ``websocket`` creates websocket API + * ``graphql`` creates GraphQL API. + New types can be added in the future. Known values are: "http", "soap", "websocket", + "graphql", "odata", and "grpc". :paramtype soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType :keyword translate_required_query_parameters_conduct: Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', @@ -1570,7 +1563,7 @@ def __init__( # pylint: disable=too-many-locals self.api_revision = api_revision self.api_version = api_version self.is_current = is_current - self.is_online = None + self.is_online: Optional[bool] = None self.api_revision_description = api_revision_description self.api_version_description = api_version_description self.api_version_set_id = api_version_set_id @@ -1584,7 +1577,7 @@ def __init__( # pylint: disable=too-many-locals self.path = path self.protocols = protocols self.api_version_set = api_version_set - self.provisioning_state = None + self.provisioning_state: Optional[str] = None self.value = value self.format = format self.wsdl_selector = wsdl_selector @@ -1664,12 +1657,11 @@ class ApiCreateOrUpdateProperties(ApiContractProperties): ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector :ivar soap_api_type: Type of API to create. - * ``http`` creates a REST API * ``soap`` creates a SOAP pass-through API * ``websocket`` creates websocket API * ``graphql`` creates GraphQL API. - New types can be added in the future. Known values are: "http", "soap", "websocket", + New types can be added in the future. Known values are: "http", "soap", "websocket", "graphql", "odata", and "grpc". :vartype soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType :ivar translate_required_query_parameters_conduct: Strategy of translating required query @@ -1745,7 +1737,7 @@ def __init__( # pylint: disable=too-many-locals source_api_id: Optional[str] = None, display_name: Optional[str] = None, service_url: Optional[str] = None, - protocols: Optional[List[Union[str, "_models.Protocol"]]] = None, + protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, api_version_set: Optional["_models.ApiVersionSetContractDetails"] = None, value: Optional[str] = None, format: Optional[Union[str, "_models.ContentFormat"]] = None, @@ -1818,13 +1810,12 @@ def __init__( # pylint: disable=too-many-locals ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector :keyword soap_api_type: Type of API to create. - - * ``http`` creates a REST API - * ``soap`` creates a SOAP pass-through API - * ``websocket`` creates websocket API - * ``graphql`` creates GraphQL API. - New types can be added in the future. Known values are: "http", "soap", "websocket", - "graphql", "odata", and "grpc". + * ``http`` creates a REST API + * ``soap`` creates a SOAP pass-through API + * ``websocket`` creates websocket API + * ``graphql`` creates GraphQL API. + New types can be added in the future. Known values are: "http", "soap", "websocket", + "graphql", "odata", and "grpc". :paramtype soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType :keyword translate_required_query_parameters_conduct: Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', @@ -2046,9 +2037,9 @@ def __init__( :paramtype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType """ super().__init__(**kwargs) - self.provisioning_state = None - self.target_provisioning_state = None - self.created_at_utc = None + self.provisioning_state: Optional[str] = None + self.target_provisioning_state: Optional[str] = None + self.created_at_utc: Optional[datetime.datetime] = None self.frontend = frontend self.backend = backend self.configuration_api = configuration_api @@ -2080,7 +2071,7 @@ class ApiManagementGatewayConfigConnectionListResult(_serialization.Model): # p def __init__( self, *, - value: List["_models.ApiManagementGatewayConfigConnectionResource"], + value: list["_models.ApiManagementGatewayConfigConnectionResource"], next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -2104,7 +2095,7 @@ class ApiManagementGatewayConfigConnectionResource(ProxyResource): # pylint: di Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -2145,7 +2136,7 @@ class ApiManagementGatewayConfigConnectionResource(ProxyResource): # pylint: di } def __init__( - self, *, source_id: Optional[str] = None, hostnames: Optional[List[str]] = None, **kwargs: Any + self, *, source_id: Optional[str] = None, hostnames: Optional[list[str]] = None, **kwargs: Any ) -> None: """ :keyword source_id: The link to the API Management service workspace. @@ -2154,10 +2145,10 @@ def __init__( :paramtype hostnames: list[str] """ super().__init__(**kwargs) - self.etag = None - self.provisioning_state = None + self.etag: Optional[str] = None + self.provisioning_state: Optional[str] = None self.source_id = source_id - self.default_hostname = None + self.default_hostname: Optional[str] = None self.hostnames = hostnames @@ -2183,7 +2174,7 @@ class ApiManagementGatewayListResult(_serialization.Model): } def __init__( - self, *, value: List["_models.ApiManagementGatewayResource"], next_link: Optional[str] = None, **kwargs: Any + self, *, value: list["_models.ApiManagementGatewayResource"], next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: Result of the List API Management gateway operation. Required. @@ -2253,15 +2244,15 @@ class ApimResource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + def __init__(self, *, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.tags = tags @@ -2346,7 +2337,7 @@ def __init__( *, sku: "_models.ApiManagementGatewaySkuProperties", location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, frontend: Optional["_models.FrontendConfiguration"] = None, backend: Optional["_models.BackendConfiguration"] = None, configuration_api: Optional["_models.GatewayConfigurationApi"] = None, @@ -2373,12 +2364,12 @@ def __init__( """ super().__init__(tags=tags, **kwargs) self.sku = sku - self.system_data = None + self.system_data: Optional["_models.SystemData"] = None self.location = location - self.etag = None - self.provisioning_state = None - self.target_provisioning_state = None - self.created_at_utc = None + self.etag: Optional[str] = None + self.provisioning_state: Optional[str] = None + self.target_provisioning_state: Optional[str] = None + self.created_at_utc: Optional[datetime.datetime] = None self.frontend = frontend self.backend = backend self.configuration_api = configuration_api @@ -2524,7 +2515,7 @@ class ApiManagementGatewayUpdateParameters(ApimResource): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, sku: Optional["_models.ApiManagementGatewaySkuPropertiesForPatch"] = None, frontend: Optional["_models.FrontendConfiguration"] = None, backend: Optional["_models.BackendConfiguration"] = None, @@ -2550,10 +2541,10 @@ def __init__( """ super().__init__(tags=tags, **kwargs) self.sku = sku - self.etag = None - self.provisioning_state = None - self.target_provisioning_state = None - self.created_at_utc = None + self.etag: Optional[str] = None + self.provisioning_state: Optional[str] = None + self.target_provisioning_state: Optional[str] = None + self.created_at_utc: Optional[datetime.datetime] = None self.frontend = frontend self.backend = backend self.configuration_api = configuration_api @@ -2769,7 +2760,7 @@ class ApiManagementServiceBaseProperties(_serialization.Model): `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. # pylint: disable=line-too-long + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. :vartype custom_properties: dict[str, str] :ivar certificates: List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. @@ -2812,6 +2803,13 @@ class ApiManagementServiceBaseProperties(_serialization.Model): :ivar developer_portal_status: Status of developer portal in this API Management service. Known values are: "Enabled" and "Disabled". :vartype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus + :ivar release_channel: Release Channel of this API Management service. Known values are: + "Preview", "Default", and "Stable". + :vartype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel + :ivar zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If + this flag is set to True, will return a APIM service with Zone redundant or fail the request if + any underneath component cannot be zone redundant. + :vartype zone_redundant: bool """ _validation = { @@ -2866,29 +2864,33 @@ class ApiManagementServiceBaseProperties(_serialization.Model): "platform_version": {"key": "platformVersion", "type": "str"}, "legacy_portal_status": {"key": "legacyPortalStatus", "type": "str"}, "developer_portal_status": {"key": "developerPortalStatus", "type": "str"}, + "release_channel": {"key": "releaseChannel", "type": "str"}, + "zone_redundant": {"key": "zoneRedundant", "type": "bool"}, } def __init__( # pylint: disable=too-many-locals self, *, notification_sender_email: Optional[str] = None, - hostname_configurations: Optional[List["_models.HostnameConfiguration"]] = None, + hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = None, public_ip_address_id: Optional[str] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, configuration_api: Optional["_models.ConfigurationApi"] = None, virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, - additional_locations: Optional[List["_models.AdditionalLocation"]] = None, - custom_properties: Optional[Dict[str, str]] = None, - certificates: Optional[List["_models.CertificateConfiguration"]] = None, + additional_locations: Optional[list["_models.AdditionalLocation"]] = None, + custom_properties: Optional[dict[str, str]] = None, + certificates: Optional[list["_models.CertificateConfiguration"]] = None, enable_client_certificate: bool = False, nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, disable_gateway: bool = False, virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, api_version_constraint: Optional["_models.ApiVersionConstraint"] = None, restore: bool = False, - private_endpoint_connections: Optional[List["_models.RemotePrivateEndpointConnectionWrapper"]] = None, + private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = None, legacy_portal_status: Union[str, "_models.LegacyPortalStatus"] = "Enabled", developer_portal_status: Union[str, "_models.DeveloperPortalStatus"] = "Enabled", + release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = None, + zone_redundant: bool = False, **kwargs: Any ) -> None: """ @@ -2940,7 +2942,7 @@ def __init__( # pylint: disable=too-many-locals `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. # pylint: disable=line-too-long + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. :paramtype custom_properties: dict[str, str] :keyword certificates: List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. @@ -2978,21 +2980,28 @@ def __init__( # pylint: disable=too-many-locals Known values are: "Enabled" and "Disabled". :paramtype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus + :keyword release_channel: Release Channel of this API Management service. Known values are: + "Preview", "Default", and "Stable". + :paramtype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel + :keyword zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If + this flag is set to True, will return a APIM service with Zone redundant or fail the request if + any underneath component cannot be zone redundant. + :paramtype zone_redundant: bool """ super().__init__(**kwargs) self.notification_sender_email = notification_sender_email - self.provisioning_state = None - self.target_provisioning_state = None - self.created_at_utc = None - self.gateway_url = None - self.gateway_regional_url = None - self.portal_url = None - self.management_api_url = None - self.scm_url = None - self.developer_portal_url = None + self.provisioning_state: Optional[str] = None + self.target_provisioning_state: Optional[str] = None + self.created_at_utc: Optional[datetime.datetime] = None + self.gateway_url: Optional[str] = None + self.gateway_regional_url: Optional[str] = None + self.portal_url: Optional[str] = None + self.management_api_url: Optional[str] = None + self.scm_url: Optional[str] = None + self.developer_portal_url: Optional[str] = None self.hostname_configurations = hostname_configurations - self.public_ip_addresses = None - self.private_ip_addresses = None + self.public_ip_addresses: Optional[list[str]] = None + self.private_ip_addresses: Optional[list[str]] = None self.public_ip_address_id = public_ip_address_id self.public_network_access = public_network_access self.configuration_api = configuration_api @@ -3002,15 +3011,17 @@ def __init__( # pylint: disable=too-many-locals self.certificates = certificates self.enable_client_certificate = enable_client_certificate self.nat_gateway_state = nat_gateway_state - self.outbound_public_ip_addresses = None + self.outbound_public_ip_addresses: Optional[list[str]] = None self.disable_gateway = disable_gateway self.virtual_network_type = virtual_network_type self.api_version_constraint = api_version_constraint self.restore = restore self.private_endpoint_connections = private_endpoint_connections - self.platform_version = None + self.platform_version: Optional[Union[str, "_models.PlatformVersion"]] = None self.legacy_portal_status = legacy_portal_status self.developer_portal_status = developer_portal_status + self.release_channel = release_channel + self.zone_redundant = zone_redundant class ApiManagementServiceCheckNameAvailabilityParameters(_serialization.Model): # pylint: disable=name-too-long @@ -3059,7 +3070,7 @@ class ApiManagementServiceGetDomainOwnershipIdentifierResult(_serialization.Mode def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.domain_ownership_identifier = None + self.domain_ownership_identifier: Optional[str] = None class ApiManagementServiceGetSsoTokenResult(_serialization.Model): @@ -3099,10 +3110,9 @@ class ApiManagementServiceIdentity(_serialization.Model): :ivar tenant_id: The client tenant id of the identity. :vartype tenant_id: str :ivar user_assigned_identities: The list of user identities associated with the resource. The - user identity - dictionary key references will be ARM resource ids in the form: + user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :vartype user_assigned_identities: dict[str, ~azure.mgmt.apimanagement.models.UserIdentityProperties] """ @@ -3124,7 +3134,7 @@ def __init__( self, *, type: Union[str, "_models.ApimIdentityType"], - user_assigned_identities: Optional[Dict[str, "_models.UserIdentityProperties"]] = None, + user_assigned_identities: Optional[dict[str, "_models.UserIdentityProperties"]] = None, **kwargs: Any ) -> None: """ @@ -3134,17 +3144,16 @@ def __init__( are: "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", and "None". :paramtype type: str or ~azure.mgmt.apimanagement.models.ApimIdentityType :keyword user_assigned_identities: The list of user identities associated with the resource. - The user identity - dictionary key references will be ARM resource ids in the form: + The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :paramtype user_assigned_identities: dict[str, ~azure.mgmt.apimanagement.models.UserIdentityProperties] """ super().__init__(**kwargs) self.type = type - self.principal_id = None - self.tenant_id = None + self.principal_id: Optional[str] = None + self.tenant_id: Optional[str] = None self.user_assigned_identities = user_assigned_identities @@ -3170,7 +3179,7 @@ class ApiManagementServiceListResult(_serialization.Model): } def __init__( - self, *, value: List["_models.ApiManagementServiceResource"], next_link: Optional[str] = None, **kwargs: Any + self, *, value: list["_models.ApiManagementServiceResource"], next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: Result of the List API Management services operation. Required. @@ -3224,8 +3233,8 @@ def __init__(self, *, reason: Optional[Union[str, "_models.NameAvailabilityReaso :paramtype reason: str or ~azure.mgmt.apimanagement.models.NameAvailabilityReason """ super().__init__(**kwargs) - self.name_available = None - self.message = None + self.name_available: Optional[bool] = None + self.message: Optional[str] = None self.reason = reason @@ -3312,7 +3321,7 @@ class ApiManagementServiceProperties(ApiManagementServiceBaseProperties): `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. # pylint: disable=line-too-long + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. :vartype custom_properties: dict[str, str] :ivar certificates: List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. @@ -3355,6 +3364,13 @@ class ApiManagementServiceProperties(ApiManagementServiceBaseProperties): :ivar developer_portal_status: Status of developer portal in this API Management service. Known values are: "Enabled" and "Disabled". :vartype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus + :ivar release_channel: Release Channel of this API Management service. Known values are: + "Preview", "Default", and "Stable". + :vartype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel + :ivar zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If + this flag is set to True, will return a APIM service with Zone redundant or fail the request if + any underneath component cannot be zone redundant. + :vartype zone_redundant: bool :ivar publisher_email: Publisher email. Required. :vartype publisher_email: str :ivar publisher_name: Publisher name. Required. @@ -3415,6 +3431,8 @@ class ApiManagementServiceProperties(ApiManagementServiceBaseProperties): "platform_version": {"key": "platformVersion", "type": "str"}, "legacy_portal_status": {"key": "legacyPortalStatus", "type": "str"}, "developer_portal_status": {"key": "developerPortalStatus", "type": "str"}, + "release_channel": {"key": "releaseChannel", "type": "str"}, + "zone_redundant": {"key": "zoneRedundant", "type": "bool"}, "publisher_email": {"key": "publisherEmail", "type": "str"}, "publisher_name": {"key": "publisherName", "type": "str"}, } @@ -3425,23 +3443,25 @@ def __init__( # pylint: disable=too-many-locals publisher_email: str, publisher_name: str, notification_sender_email: Optional[str] = None, - hostname_configurations: Optional[List["_models.HostnameConfiguration"]] = None, + hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = None, public_ip_address_id: Optional[str] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, configuration_api: Optional["_models.ConfigurationApi"] = None, virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, - additional_locations: Optional[List["_models.AdditionalLocation"]] = None, - custom_properties: Optional[Dict[str, str]] = None, - certificates: Optional[List["_models.CertificateConfiguration"]] = None, + additional_locations: Optional[list["_models.AdditionalLocation"]] = None, + custom_properties: Optional[dict[str, str]] = None, + certificates: Optional[list["_models.CertificateConfiguration"]] = None, enable_client_certificate: bool = False, nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, disable_gateway: bool = False, virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, api_version_constraint: Optional["_models.ApiVersionConstraint"] = None, restore: bool = False, - private_endpoint_connections: Optional[List["_models.RemotePrivateEndpointConnectionWrapper"]] = None, + private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = None, legacy_portal_status: Union[str, "_models.LegacyPortalStatus"] = "Enabled", developer_portal_status: Union[str, "_models.DeveloperPortalStatus"] = "Enabled", + release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = None, + zone_redundant: bool = False, **kwargs: Any ) -> None: """ @@ -3493,7 +3513,7 @@ def __init__( # pylint: disable=too-many-locals `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. # pylint: disable=line-too-long + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. :paramtype custom_properties: dict[str, str] :keyword certificates: List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. @@ -3531,6 +3551,13 @@ def __init__( # pylint: disable=too-many-locals Known values are: "Enabled" and "Disabled". :paramtype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus + :keyword release_channel: Release Channel of this API Management service. Known values are: + "Preview", "Default", and "Stable". + :paramtype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel + :keyword zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If + this flag is set to True, will return a APIM service with Zone redundant or fail the request if + any underneath component cannot be zone redundant. + :paramtype zone_redundant: bool :keyword publisher_email: Publisher email. Required. :paramtype publisher_email: str :keyword publisher_name: Publisher name. Required. @@ -3555,6 +3582,8 @@ def __init__( # pylint: disable=too-many-locals private_endpoint_connections=private_endpoint_connections, legacy_portal_status=legacy_portal_status, developer_portal_status=developer_portal_status, + release_channel=release_channel, + zone_redundant=zone_redundant, **kwargs ) self.publisher_email = publisher_email @@ -3664,7 +3693,7 @@ class ApiManagementServiceResource(ApimResource): `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. # pylint: disable=line-too-long + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. :vartype custom_properties: dict[str, str] :ivar certificates: List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. @@ -3707,6 +3736,13 @@ class ApiManagementServiceResource(ApimResource): :ivar developer_portal_status: Status of developer portal in this API Management service. Known values are: "Enabled" and "Disabled". :vartype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus + :ivar release_channel: Release Channel of this API Management service. Known values are: + "Preview", "Default", and "Stable". + :vartype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel + :ivar zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If + this flag is set to True, will return a APIM service with Zone redundant or fail the request if + any underneath component cannot be zone redundant. + :vartype zone_redundant: bool :ivar publisher_email: Publisher email. Required. :vartype publisher_email: str :ivar publisher_name: Publisher name. Required. @@ -3787,6 +3823,8 @@ class ApiManagementServiceResource(ApimResource): "platform_version": {"key": "properties.platformVersion", "type": "str"}, "legacy_portal_status": {"key": "properties.legacyPortalStatus", "type": "str"}, "developer_portal_status": {"key": "properties.developerPortalStatus", "type": "str"}, + "release_channel": {"key": "properties.releaseChannel", "type": "str"}, + "zone_redundant": {"key": "properties.zoneRedundant", "type": "bool"}, "publisher_email": {"key": "properties.publisherEmail", "type": "str"}, "publisher_name": {"key": "properties.publisherName", "type": "str"}, } @@ -3798,27 +3836,29 @@ def __init__( # pylint: disable=too-many-locals location: str, publisher_email: str, publisher_name: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, identity: Optional["_models.ApiManagementServiceIdentity"] = None, - zones: Optional[List[str]] = None, + zones: Optional[list[str]] = None, notification_sender_email: Optional[str] = None, - hostname_configurations: Optional[List["_models.HostnameConfiguration"]] = None, + hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = None, public_ip_address_id: Optional[str] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, configuration_api: Optional["_models.ConfigurationApi"] = None, virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, - additional_locations: Optional[List["_models.AdditionalLocation"]] = None, - custom_properties: Optional[Dict[str, str]] = None, - certificates: Optional[List["_models.CertificateConfiguration"]] = None, + additional_locations: Optional[list["_models.AdditionalLocation"]] = None, + custom_properties: Optional[dict[str, str]] = None, + certificates: Optional[list["_models.CertificateConfiguration"]] = None, enable_client_certificate: bool = False, nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, disable_gateway: bool = False, virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, api_version_constraint: Optional["_models.ApiVersionConstraint"] = None, restore: bool = False, - private_endpoint_connections: Optional[List["_models.RemotePrivateEndpointConnectionWrapper"]] = None, + private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = None, legacy_portal_status: Union[str, "_models.LegacyPortalStatus"] = "Enabled", developer_portal_status: Union[str, "_models.DeveloperPortalStatus"] = "Enabled", + release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = None, + zone_redundant: bool = False, **kwargs: Any ) -> None: """ @@ -3880,7 +3920,7 @@ def __init__( # pylint: disable=too-many-locals `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. # pylint: disable=line-too-long + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. :paramtype custom_properties: dict[str, str] :keyword certificates: List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. @@ -3918,6 +3958,13 @@ def __init__( # pylint: disable=too-many-locals Known values are: "Enabled" and "Disabled". :paramtype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus + :keyword release_channel: Release Channel of this API Management service. Known values are: + "Preview", "Default", and "Stable". + :paramtype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel + :keyword zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If + this flag is set to True, will return a APIM service with Zone redundant or fail the request if + any underneath component cannot be zone redundant. + :paramtype zone_redundant: bool :keyword publisher_email: Publisher email. Required. :paramtype publisher_email: str :keyword publisher_name: Publisher name. Required. @@ -3926,23 +3973,23 @@ def __init__( # pylint: disable=too-many-locals super().__init__(tags=tags, **kwargs) self.sku = sku self.identity = identity - self.system_data = None + self.system_data: Optional["_models.SystemData"] = None self.location = location - self.etag = None + self.etag: Optional[str] = None self.zones = zones self.notification_sender_email = notification_sender_email - self.provisioning_state = None - self.target_provisioning_state = None - self.created_at_utc = None - self.gateway_url = None - self.gateway_regional_url = None - self.portal_url = None - self.management_api_url = None - self.scm_url = None - self.developer_portal_url = None + self.provisioning_state: Optional[str] = None + self.target_provisioning_state: Optional[str] = None + self.created_at_utc: Optional[datetime.datetime] = None + self.gateway_url: Optional[str] = None + self.gateway_regional_url: Optional[str] = None + self.portal_url: Optional[str] = None + self.management_api_url: Optional[str] = None + self.scm_url: Optional[str] = None + self.developer_portal_url: Optional[str] = None self.hostname_configurations = hostname_configurations - self.public_ip_addresses = None - self.private_ip_addresses = None + self.public_ip_addresses: Optional[list[str]] = None + self.private_ip_addresses: Optional[list[str]] = None self.public_ip_address_id = public_ip_address_id self.public_network_access = public_network_access self.configuration_api = configuration_api @@ -3952,15 +3999,17 @@ def __init__( # pylint: disable=too-many-locals self.certificates = certificates self.enable_client_certificate = enable_client_certificate self.nat_gateway_state = nat_gateway_state - self.outbound_public_ip_addresses = None + self.outbound_public_ip_addresses: Optional[list[str]] = None self.disable_gateway = disable_gateway self.virtual_network_type = virtual_network_type self.api_version_constraint = api_version_constraint self.restore = restore self.private_endpoint_connections = private_endpoint_connections - self.platform_version = None + self.platform_version: Optional[Union[str, "_models.PlatformVersion"]] = None self.legacy_portal_status = legacy_portal_status self.developer_portal_status = developer_portal_status + self.release_channel = release_channel + self.zone_redundant = zone_redundant self.publisher_email = publisher_email self.publisher_name = publisher_name @@ -3971,7 +4020,7 @@ class ApiManagementServiceSkuProperties(_serialization.Model): All required parameters must be populated in order to send to server. :ivar name: Name of the Sku. Required. Known values are: "Developer", "Standard", "Premium", - "Basic", "Consumption", "Isolated", "BasicV2", and "StandardV2". + "Basic", "Consumption", "Isolated", "BasicV2", "StandardV2", and "PremiumV2". :vartype name: str or ~azure.mgmt.apimanagement.models.SkuType :ivar capacity: Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0. Required. @@ -3991,7 +4040,7 @@ class ApiManagementServiceSkuProperties(_serialization.Model): def __init__(self, *, name: Union[str, "_models.SkuType"], capacity: int, **kwargs: Any) -> None: """ :keyword name: Name of the Sku. Required. Known values are: "Developer", "Standard", "Premium", - "Basic", "Consumption", "Isolated", "BasicV2", and "StandardV2". + "Basic", "Consumption", "Isolated", "BasicV2", "StandardV2", and "PremiumV2". :paramtype name: str or ~azure.mgmt.apimanagement.models.SkuType :keyword capacity: Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0. Required. @@ -4099,7 +4148,7 @@ class ApiManagementServiceUpdateParameters(ApimResource): `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. # pylint: disable=line-too-long + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. :vartype custom_properties: dict[str, str] :ivar certificates: List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. @@ -4142,6 +4191,13 @@ class ApiManagementServiceUpdateParameters(ApimResource): :ivar developer_portal_status: Status of developer portal in this API Management service. Known values are: "Enabled" and "Disabled". :vartype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus + :ivar release_channel: Release Channel of this API Management service. Known values are: + "Preview", "Default", and "Stable". + :vartype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel + :ivar zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If + this flag is set to True, will return a APIM service with Zone redundant or fail the request if + any underneath component cannot be zone redundant. + :vartype zone_redundant: bool :ivar publisher_email: Publisher email. :vartype publisher_email: str :ivar publisher_name: Publisher name. @@ -4217,6 +4273,8 @@ class ApiManagementServiceUpdateParameters(ApimResource): "platform_version": {"key": "properties.platformVersion", "type": "str"}, "legacy_portal_status": {"key": "properties.legacyPortalStatus", "type": "str"}, "developer_portal_status": {"key": "properties.developerPortalStatus", "type": "str"}, + "release_channel": {"key": "properties.releaseChannel", "type": "str"}, + "zone_redundant": {"key": "properties.zoneRedundant", "type": "bool"}, "publisher_email": {"key": "properties.publisherEmail", "type": "str"}, "publisher_name": {"key": "properties.publisherName", "type": "str"}, } @@ -4224,28 +4282,30 @@ class ApiManagementServiceUpdateParameters(ApimResource): def __init__( # pylint: disable=too-many-locals self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, sku: Optional["_models.ApiManagementServiceSkuProperties"] = None, identity: Optional["_models.ApiManagementServiceIdentity"] = None, - zones: Optional[List[str]] = None, + zones: Optional[list[str]] = None, notification_sender_email: Optional[str] = None, - hostname_configurations: Optional[List["_models.HostnameConfiguration"]] = None, + hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = None, public_ip_address_id: Optional[str] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, configuration_api: Optional["_models.ConfigurationApi"] = None, virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, - additional_locations: Optional[List["_models.AdditionalLocation"]] = None, - custom_properties: Optional[Dict[str, str]] = None, - certificates: Optional[List["_models.CertificateConfiguration"]] = None, + additional_locations: Optional[list["_models.AdditionalLocation"]] = None, + custom_properties: Optional[dict[str, str]] = None, + certificates: Optional[list["_models.CertificateConfiguration"]] = None, enable_client_certificate: bool = False, nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, disable_gateway: bool = False, virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, api_version_constraint: Optional["_models.ApiVersionConstraint"] = None, restore: bool = False, - private_endpoint_connections: Optional[List["_models.RemotePrivateEndpointConnectionWrapper"]] = None, + private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = None, legacy_portal_status: Union[str, "_models.LegacyPortalStatus"] = "Enabled", developer_portal_status: Union[str, "_models.DeveloperPortalStatus"] = "Enabled", + release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = None, + zone_redundant: bool = False, publisher_email: Optional[str] = None, publisher_name: Optional[str] = None, **kwargs: Any @@ -4307,7 +4367,7 @@ def __init__( # pylint: disable=too-many-locals `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. # pylint: disable=line-too-long + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. :paramtype custom_properties: dict[str, str] :keyword certificates: List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. @@ -4345,6 +4405,13 @@ def __init__( # pylint: disable=too-many-locals Known values are: "Enabled" and "Disabled". :paramtype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus + :keyword release_channel: Release Channel of this API Management service. Known values are: + "Preview", "Default", and "Stable". + :paramtype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel + :keyword zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If + this flag is set to True, will return a APIM service with Zone redundant or fail the request if + any underneath component cannot be zone redundant. + :paramtype zone_redundant: bool :keyword publisher_email: Publisher email. :paramtype publisher_email: str :keyword publisher_name: Publisher name. @@ -4353,21 +4420,21 @@ def __init__( # pylint: disable=too-many-locals super().__init__(tags=tags, **kwargs) self.sku = sku self.identity = identity - self.etag = None + self.etag: Optional[str] = None self.zones = zones self.notification_sender_email = notification_sender_email - self.provisioning_state = None - self.target_provisioning_state = None - self.created_at_utc = None - self.gateway_url = None - self.gateway_regional_url = None - self.portal_url = None - self.management_api_url = None - self.scm_url = None - self.developer_portal_url = None + self.provisioning_state: Optional[str] = None + self.target_provisioning_state: Optional[str] = None + self.created_at_utc: Optional[datetime.datetime] = None + self.gateway_url: Optional[str] = None + self.gateway_regional_url: Optional[str] = None + self.portal_url: Optional[str] = None + self.management_api_url: Optional[str] = None + self.scm_url: Optional[str] = None + self.developer_portal_url: Optional[str] = None self.hostname_configurations = hostname_configurations - self.public_ip_addresses = None - self.private_ip_addresses = None + self.public_ip_addresses: Optional[list[str]] = None + self.private_ip_addresses: Optional[list[str]] = None self.public_ip_address_id = public_ip_address_id self.public_network_access = public_network_access self.configuration_api = configuration_api @@ -4377,15 +4444,17 @@ def __init__( # pylint: disable=too-many-locals self.certificates = certificates self.enable_client_certificate = enable_client_certificate self.nat_gateway_state = nat_gateway_state - self.outbound_public_ip_addresses = None + self.outbound_public_ip_addresses: Optional[list[str]] = None self.disable_gateway = disable_gateway self.virtual_network_type = virtual_network_type self.api_version_constraint = api_version_constraint self.restore = restore self.private_endpoint_connections = private_endpoint_connections - self.platform_version = None + self.platform_version: Optional[Union[str, "_models.PlatformVersion"]] = None self.legacy_portal_status = legacy_portal_status self.developer_portal_status = developer_portal_status + self.release_channel = release_channel + self.zone_redundant = zone_redundant self.publisher_email = publisher_email self.publisher_name = publisher_name @@ -4471,7 +4540,7 @@ class ApiManagementServiceUpdateProperties(ApiManagementServiceBaseProperties): `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. # pylint: disable=line-too-long + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. :vartype custom_properties: dict[str, str] :ivar certificates: List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. @@ -4514,6 +4583,13 @@ class ApiManagementServiceUpdateProperties(ApiManagementServiceBaseProperties): :ivar developer_portal_status: Status of developer portal in this API Management service. Known values are: "Enabled" and "Disabled". :vartype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus + :ivar release_channel: Release Channel of this API Management service. Known values are: + "Preview", "Default", and "Stable". + :vartype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel + :ivar zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If + this flag is set to True, will return a APIM service with Zone redundant or fail the request if + any underneath component cannot be zone redundant. + :vartype zone_redundant: bool :ivar publisher_email: Publisher email. :vartype publisher_email: str :ivar publisher_name: Publisher name. @@ -4574,6 +4650,8 @@ class ApiManagementServiceUpdateProperties(ApiManagementServiceBaseProperties): "platform_version": {"key": "platformVersion", "type": "str"}, "legacy_portal_status": {"key": "legacyPortalStatus", "type": "str"}, "developer_portal_status": {"key": "developerPortalStatus", "type": "str"}, + "release_channel": {"key": "releaseChannel", "type": "str"}, + "zone_redundant": {"key": "zoneRedundant", "type": "bool"}, "publisher_email": {"key": "publisherEmail", "type": "str"}, "publisher_name": {"key": "publisherName", "type": "str"}, } @@ -4582,23 +4660,25 @@ def __init__( # pylint: disable=too-many-locals self, *, notification_sender_email: Optional[str] = None, - hostname_configurations: Optional[List["_models.HostnameConfiguration"]] = None, + hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = None, public_ip_address_id: Optional[str] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, configuration_api: Optional["_models.ConfigurationApi"] = None, virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, - additional_locations: Optional[List["_models.AdditionalLocation"]] = None, - custom_properties: Optional[Dict[str, str]] = None, - certificates: Optional[List["_models.CertificateConfiguration"]] = None, + additional_locations: Optional[list["_models.AdditionalLocation"]] = None, + custom_properties: Optional[dict[str, str]] = None, + certificates: Optional[list["_models.CertificateConfiguration"]] = None, enable_client_certificate: bool = False, nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, disable_gateway: bool = False, virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, api_version_constraint: Optional["_models.ApiVersionConstraint"] = None, restore: bool = False, - private_endpoint_connections: Optional[List["_models.RemotePrivateEndpointConnectionWrapper"]] = None, + private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = None, legacy_portal_status: Union[str, "_models.LegacyPortalStatus"] = "Enabled", developer_portal_status: Union[str, "_models.DeveloperPortalStatus"] = "Enabled", + release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = None, + zone_redundant: bool = False, publisher_email: Optional[str] = None, publisher_name: Optional[str] = None, **kwargs: Any @@ -4652,7 +4732,7 @@ def __init__( # pylint: disable=too-many-locals `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. # pylint: disable=line-too-long + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. :paramtype custom_properties: dict[str, str] :keyword certificates: List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. @@ -4690,6 +4770,13 @@ def __init__( # pylint: disable=too-many-locals Known values are: "Enabled" and "Disabled". :paramtype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus + :keyword release_channel: Release Channel of this API Management service. Known values are: + "Preview", "Default", and "Stable". + :paramtype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel + :keyword zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If + this flag is set to True, will return a APIM service with Zone redundant or fail the request if + any underneath component cannot be zone redundant. + :paramtype zone_redundant: bool :keyword publisher_email: Publisher email. :paramtype publisher_email: str :keyword publisher_name: Publisher name. @@ -4714,6 +4801,8 @@ def __init__( # pylint: disable=too-many-locals private_endpoint_connections=private_endpoint_connections, legacy_portal_status=legacy_portal_status, developer_portal_status=developer_portal_status, + release_channel=release_channel, + zone_redundant=zone_redundant, **kwargs ) self.publisher_email = publisher_email @@ -4792,19 +4881,19 @@ class ApiManagementSku(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.resource_type = None - self.name = None - self.tier = None - self.size = None - self.family = None - self.kind = None - self.capacity = None - self.locations = None - self.location_info = None - self.api_versions = None - self.costs = None - self.capabilities = None - self.restrictions = None + self.resource_type: Optional[str] = None + self.name: Optional[str] = None + self.tier: Optional[str] = None + self.size: Optional[str] = None + self.family: Optional[str] = None + self.kind: Optional[str] = None + self.capacity: Optional["_models.ApiManagementSkuCapacity"] = None + self.locations: Optional[list[str]] = None + self.location_info: Optional[list["_models.ApiManagementSkuLocationInfo"]] = None + self.api_versions: Optional[list[str]] = None + self.costs: Optional[list["_models.ApiManagementSkuCosts"]] = None + self.capabilities: Optional[list["_models.ApiManagementSkuCapabilities"]] = None + self.restrictions: Optional[list["_models.ApiManagementSkuRestrictions"]] = None class ApiManagementSkuCapabilities(_serialization.Model): @@ -4831,8 +4920,8 @@ class ApiManagementSkuCapabilities(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.name = None - self.value = None + self.name: Optional[str] = None + self.value: Optional[str] = None class ApiManagementSkuCapacity(_serialization.Model): @@ -4868,10 +4957,10 @@ class ApiManagementSkuCapacity(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None + self.minimum: Optional[int] = None + self.maximum: Optional[int] = None + self.default: Optional[int] = None + self.scale_type: Optional[Union[str, "_models.ApiManagementSkuCapacityScaleType"]] = None class ApiManagementSkuCosts(_serialization.Model): @@ -4902,9 +4991,9 @@ class ApiManagementSkuCosts(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.meter_id = None - self.quantity = None - self.extended_unit = None + self.meter_id: Optional[str] = None + self.quantity: Optional[int] = None + self.extended_unit: Optional[str] = None class ApiManagementSkuLocationInfo(_serialization.Model): @@ -4935,9 +5024,9 @@ class ApiManagementSkuLocationInfo(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.location = None - self.zones = None - self.zone_details = None + self.location: Optional[str] = None + self.zones: Optional[list[str]] = None + self.zone_details: Optional[list["_models.ApiManagementSkuZoneDetails"]] = None class ApiManagementSkuRestrictionInfo(_serialization.Model): @@ -4964,8 +5053,8 @@ class ApiManagementSkuRestrictionInfo(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.locations = None - self.zones = None + self.locations: Optional[list[str]] = None + self.zones: Optional[list[str]] = None class ApiManagementSkuRestrictions(_serialization.Model): @@ -5003,10 +5092,10 @@ class ApiManagementSkuRestrictions(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.type = None - self.values = None - self.restriction_info = None - self.reason_code = None + self.type: Optional[Union[str, "_models.ApiManagementSkuRestrictionsType"]] = None + self.values: Optional[list[str]] = None + self.restriction_info: Optional["_models.ApiManagementSkuRestrictionInfo"] = None + self.reason_code: Optional[Union[str, "_models.ApiManagementSkuRestrictionsReasonCode"]] = None class ApiManagementSkusResult(_serialization.Model): @@ -5033,14 +5122,14 @@ class ApiManagementSkusResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.ApiManagementSku"], **kwargs: Any) -> None: + def __init__(self, *, value: list["_models.ApiManagementSku"], **kwargs: Any) -> None: """ :keyword value: The list of skus available for the subscription. Required. :paramtype value: list[~azure.mgmt.apimanagement.models.ApiManagementSku] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class ApiManagementSkuZoneDetails(_serialization.Model): @@ -5068,8 +5157,8 @@ class ApiManagementSkuZoneDetails(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.name = None - self.capabilities = None + self.name: Optional[list[str]] = None + self.capabilities: Optional[list["_models.ApiManagementSkuCapabilities"]] = None class ApiManagementWorkspaceLinksListResult(_serialization.Model): @@ -5096,7 +5185,7 @@ class ApiManagementWorkspaceLinksListResult(_serialization.Model): def __init__( self, *, - value: List["_models.ApiManagementWorkspaceLinksResource"], + value: list["_models.ApiManagementWorkspaceLinksResource"], next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -5130,7 +5219,7 @@ def __init__( self, *, workspace_id: Optional[str] = None, - gateways: Optional[List["_models.WorkspaceLinksGateway"]] = None, + gateways: Optional[list["_models.WorkspaceLinksGateway"]] = None, **kwargs: Any ) -> None: """ @@ -5160,7 +5249,7 @@ class ApiManagementWorkspaceLinksResource(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -5195,7 +5284,7 @@ def __init__( self, *, workspace_id: Optional[str] = None, - gateways: Optional[List["_models.WorkspaceLinksGateway"]] = None, + gateways: Optional[list["_models.WorkspaceLinksGateway"]] = None, **kwargs: Any ) -> None: """ @@ -5205,7 +5294,7 @@ def __init__( :paramtype gateways: list[~azure.mgmt.apimanagement.models.WorkspaceLinksGateway] """ super().__init__(**kwargs) - self.etag = None + self.etag: Optional[str] = None self.workspace_id = workspace_id self.gateways = gateways @@ -5240,9 +5329,9 @@ def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: :paramtype count: int """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.ApiReleaseContract"]] = None self.count = count - self.next_link = None + self.next_link: Optional[str] = None class ApiReleaseContract(ProxyResource): @@ -5251,7 +5340,7 @@ class ApiReleaseContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -5296,8 +5385,8 @@ def __init__(self, *, api_id: Optional[str] = None, notes: Optional[str] = None, """ super().__init__(**kwargs) self.api_id = api_id - self.created_date_time = None - self.updated_date_time = None + self.created_date_time: Optional[datetime.datetime] = None + self.updated_date_time: Optional[datetime.datetime] = None self.notes = notes @@ -5331,9 +5420,9 @@ def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: :paramtype count: int """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.ApiRevisionContract"]] = None self.count = count - self.next_link = None + self.next_link: Optional[str] = None class ApiRevisionContract(_serialization.Model): @@ -5386,14 +5475,14 @@ class ApiRevisionContract(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.api_id = None - self.api_revision = None - self.created_date_time = None - self.updated_date_time = None - self.description = None - self.private_url = None - self.is_online = None - self.is_current = None + self.api_id: Optional[str] = None + self.api_revision: Optional[str] = None + self.created_date_time: Optional[datetime.datetime] = None + self.updated_date_time: Optional[datetime.datetime] = None + self.description: Optional[str] = None + self.private_url: Optional[str] = None + self.is_online: Optional[bool] = None + self.is_current: Optional[bool] = None class ApiRevisionInfoContract(_serialization.Model): @@ -5560,7 +5649,7 @@ def __init__( name: Optional[str] = None, service_url: Optional[str] = None, path: Optional[str] = None, - protocols: Optional[List[Union[str, "_models.Protocol"]]] = None, + protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, **kwargs: Any ) -> None: """ @@ -5747,7 +5836,7 @@ def __init__( display_name: Optional[str] = None, service_url: Optional[str] = None, path: Optional[str] = None, - protocols: Optional[List[Union[str, "_models.Protocol"]]] = None, + protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, **kwargs: Any ) -> None: """ @@ -5804,7 +5893,7 @@ def __init__( self.api_revision = api_revision self.api_version = api_version self.is_current = is_current - self.is_online = None + self.is_online: Optional[bool] = None self.api_revision_description = api_revision_description self.api_version_description = api_version_description self.api_version_set_id = api_version_set_id @@ -5860,7 +5949,7 @@ class ApiVersionSetCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.ApiVersionSetContract"]] = None, + value: Optional[list["_models.ApiVersionSetContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -5885,7 +5974,7 @@ class ApiVersionSetContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -6297,7 +6386,7 @@ class ArmIdWrapper(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None + self.id: Optional[str] = None class AssociationContract(ProxyResource): @@ -6306,7 +6395,7 @@ class AssociationContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -6374,8 +6463,8 @@ def __init__( *, o_auth2: Optional["_models.OAuth2AuthenticationSettingsContract"] = None, openid: Optional["_models.OpenIdAuthenticationSettingsContract"] = None, - o_auth2_authentication_settings: Optional[List["_models.OAuth2AuthenticationSettingsContract"]] = None, - openid_authentication_settings: Optional[List["_models.OpenIdAuthenticationSettingsContract"]] = None, + o_auth2_authentication_settings: Optional[list["_models.OAuth2AuthenticationSettingsContract"]] = None, + openid_authentication_settings: Optional[list["_models.OpenIdAuthenticationSettingsContract"]] = None, **kwargs: Any ) -> None: """ @@ -6419,7 +6508,7 @@ class AuthorizationAccessPolicyCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.AuthorizationAccessPolicyContract"]] = None, + value: Optional[list["_models.AuthorizationAccessPolicyContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -6444,7 +6533,7 @@ class AuthorizationAccessPolicyContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -6477,7 +6566,7 @@ class AuthorizationAccessPolicyContract(ProxyResource): def __init__( self, *, - app_ids: Optional[List[str]] = None, + app_ids: Optional[list[str]] = None, tenant_id: Optional[str] = None, object_id: Optional[str] = None, **kwargs: Any @@ -6516,7 +6605,7 @@ class AuthorizationCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.AuthorizationContract"]] = None, + value: Optional[list["_models.AuthorizationContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -6563,7 +6652,7 @@ class AuthorizationContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -6605,7 +6694,7 @@ def __init__( *, authorization_type: Optional[Union[str, "_models.AuthorizationType"]] = None, o_auth2_grant_type: Optional[Union[str, "_models.OAuth2GrantType"]] = None, - parameters: Optional[Dict[str, str]] = None, + parameters: Optional[dict[str, str]] = None, error: Optional["_models.AuthorizationError"] = None, status: Optional[str] = None, **kwargs: Any @@ -6714,7 +6803,7 @@ class AuthorizationProviderCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.AuthorizationProviderContract"]] = None, + value: Optional[list["_models.AuthorizationProviderContract"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -6735,7 +6824,7 @@ class AuthorizationProviderContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -6788,6 +6877,65 @@ def __init__( self.oauth2 = oauth2 +class AuthorizationProviderKeyVaultCreateProperties(_serialization.Model): # pylint: disable=name-too-long + """Authorization Provider KeyVault create contract properties. + + :ivar secret_identifier: Key vault secret identifier for client secret. When provided, client + secret will be retrieved from the provided key vault secret. + :vartype secret_identifier: str + """ + + _attribute_map = { + "secret_identifier": {"key": "secretIdentifier", "type": "str"}, + } + + def __init__(self, *, secret_identifier: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword secret_identifier: Key vault secret identifier for client secret. When provided, + client secret will be retrieved from the provided key vault secret. + :paramtype secret_identifier: str + """ + super().__init__(**kwargs) + self.secret_identifier = secret_identifier + + +class AuthorizationProviderKeyVaultContract(AuthorizationProviderKeyVaultCreateProperties): + """Authorization Provider KeyVault contract properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar secret_identifier: Key vault secret identifier for client secret. When provided, client + secret will be retrieved from the provided key vault secret. + :vartype secret_identifier: str + :ivar updated: When the secret was last updated in key vault. + :vartype updated: ~datetime.datetime + :ivar last_status: Last time sync and refresh of secret from key vault. + :vartype last_status: + ~azure.mgmt.apimanagement.models.KeyVaultLastAccessStatusContractProperties + """ + + _validation = { + "updated": {"readonly": True}, + "last_status": {"readonly": True}, + } + + _attribute_map = { + "secret_identifier": {"key": "secretIdentifier", "type": "str"}, + "updated": {"key": "updated", "type": "iso-8601"}, + "last_status": {"key": "lastStatus", "type": "KeyVaultLastAccessStatusContractProperties"}, + } + + def __init__(self, *, secret_identifier: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword secret_identifier: Key vault secret identifier for client secret. When provided, + client secret will be retrieved from the provided key vault secret. + :paramtype secret_identifier: str + """ + super().__init__(secret_identifier=secret_identifier, **kwargs) + self.updated: Optional[datetime.datetime] = None + self.last_status: Optional["_models.KeyVaultLastAccessStatusContractProperties"] = None + + class AuthorizationProviderOAuth2GrantTypes(_serialization.Model): """Authorization Provider oauth2 grant types settings. @@ -6805,8 +6953,8 @@ class AuthorizationProviderOAuth2GrantTypes(_serialization.Model): def __init__( self, *, - authorization_code: Optional[Dict[str, str]] = None, - client_credentials: Optional[Dict[str, str]] = None, + authorization_code: Optional[dict[str, str]] = None, + client_credentials: Optional[dict[str, str]] = None, **kwargs: Any ) -> None: """ @@ -6827,11 +6975,14 @@ class AuthorizationProviderOAuth2Settings(_serialization.Model): :vartype redirect_url: str :ivar grant_types: OAuth2 settings. :vartype grant_types: ~azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2GrantTypes + :ivar key_vault: Key Vault reference for client secret storage. + :vartype key_vault: ~azure.mgmt.apimanagement.models.AuthorizationProviderKeyVaultContract """ _attribute_map = { "redirect_url": {"key": "redirectUrl", "type": "str"}, "grant_types": {"key": "grantTypes", "type": "AuthorizationProviderOAuth2GrantTypes"}, + "key_vault": {"key": "keyVault", "type": "AuthorizationProviderKeyVaultContract"}, } def __init__( @@ -6839,6 +6990,7 @@ def __init__( *, redirect_url: Optional[str] = None, grant_types: Optional["_models.AuthorizationProviderOAuth2GrantTypes"] = None, + key_vault: Optional["_models.AuthorizationProviderKeyVaultContract"] = None, **kwargs: Any ) -> None: """ @@ -6846,10 +6998,13 @@ def __init__( :paramtype redirect_url: str :keyword grant_types: OAuth2 settings. :paramtype grant_types: ~azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2GrantTypes + :keyword key_vault: Key Vault reference for client secret storage. + :paramtype key_vault: ~azure.mgmt.apimanagement.models.AuthorizationProviderKeyVaultContract """ super().__init__(**kwargs) self.redirect_url = redirect_url self.grant_types = grant_types + self.key_vault = key_vault class AuthorizationServerCollection(_serialization.Model): @@ -6872,7 +7027,7 @@ class AuthorizationServerCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.AuthorizationServerContract"]] = None, + value: Optional[list["_models.AuthorizationServerContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -6897,7 +7052,7 @@ class AuthorizationServerContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -7002,13 +7157,13 @@ def __init__( self, *, description: Optional[str] = None, - authorization_methods: Optional[List[Union[str, "_models.AuthorizationMethod"]]] = None, - client_authentication_method: Optional[List[Union[str, "_models.ClientAuthenticationMethod"]]] = None, - token_body_parameters: Optional[List["_models.TokenBodyParameterContract"]] = None, + authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = None, + client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = None, + token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = None, token_endpoint: Optional[str] = None, support_state: Optional[bool] = None, default_scope: Optional[str] = None, - bearer_token_sending_methods: Optional[List[Union[str, "_models.BearerTokenSendingMethod"]]] = None, + bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = None, resource_owner_username: Optional[str] = None, resource_owner_password: Optional[str] = None, display_name: Optional[str] = None, @@ -7016,7 +7171,7 @@ def __init__( use_in_api_documentation: Optional[bool] = None, client_registration_endpoint: Optional[str] = None, authorization_endpoint: Optional[str] = None, - grant_types: Optional[List[Union[str, "_models.GrantType"]]] = None, + grant_types: Optional[list[Union[str, "_models.GrantType"]]] = None, client_id: Optional[str] = None, client_secret: Optional[str] = None, **kwargs: Any @@ -7166,13 +7321,13 @@ def __init__( self, *, description: Optional[str] = None, - authorization_methods: Optional[List[Union[str, "_models.AuthorizationMethod"]]] = None, - client_authentication_method: Optional[List[Union[str, "_models.ClientAuthenticationMethod"]]] = None, - token_body_parameters: Optional[List["_models.TokenBodyParameterContract"]] = None, + authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = None, + client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = None, + token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = None, token_endpoint: Optional[str] = None, support_state: Optional[bool] = None, default_scope: Optional[str] = None, - bearer_token_sending_methods: Optional[List[Union[str, "_models.BearerTokenSendingMethod"]]] = None, + bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = None, resource_owner_username: Optional[str] = None, resource_owner_password: Optional[str] = None, **kwargs: Any @@ -7334,16 +7489,16 @@ def __init__( display_name: str, client_registration_endpoint: str, authorization_endpoint: str, - grant_types: List[Union[str, "_models.GrantType"]], + grant_types: list[Union[str, "_models.GrantType"]], client_id: str, description: Optional[str] = None, - authorization_methods: Optional[List[Union[str, "_models.AuthorizationMethod"]]] = None, - client_authentication_method: Optional[List[Union[str, "_models.ClientAuthenticationMethod"]]] = None, - token_body_parameters: Optional[List["_models.TokenBodyParameterContract"]] = None, + authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = None, + client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = None, + token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = None, token_endpoint: Optional[str] = None, support_state: Optional[bool] = None, default_scope: Optional[str] = None, - bearer_token_sending_methods: Optional[List[Union[str, "_models.BearerTokenSendingMethod"]]] = None, + bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = None, resource_owner_username: Optional[str] = None, resource_owner_password: Optional[str] = None, use_in_test_console: Optional[bool] = None, @@ -7488,7 +7643,7 @@ class AuthorizationServerUpdateContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -7593,13 +7748,13 @@ def __init__( self, *, description: Optional[str] = None, - authorization_methods: Optional[List[Union[str, "_models.AuthorizationMethod"]]] = None, - client_authentication_method: Optional[List[Union[str, "_models.ClientAuthenticationMethod"]]] = None, - token_body_parameters: Optional[List["_models.TokenBodyParameterContract"]] = None, + authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = None, + client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = None, + token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = None, token_endpoint: Optional[str] = None, support_state: Optional[bool] = None, default_scope: Optional[str] = None, - bearer_token_sending_methods: Optional[List[Union[str, "_models.BearerTokenSendingMethod"]]] = None, + bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = None, resource_owner_username: Optional[str] = None, resource_owner_password: Optional[str] = None, display_name: Optional[str] = None, @@ -7607,7 +7762,7 @@ def __init__( use_in_api_documentation: Optional[bool] = None, client_registration_endpoint: Optional[str] = None, authorization_endpoint: Optional[str] = None, - grant_types: Optional[List[Union[str, "_models.GrantType"]]] = None, + grant_types: Optional[list[Union[str, "_models.GrantType"]]] = None, client_id: Optional[str] = None, client_secret: Optional[str] = None, **kwargs: Any @@ -7795,13 +7950,13 @@ def __init__( self, *, description: Optional[str] = None, - authorization_methods: Optional[List[Union[str, "_models.AuthorizationMethod"]]] = None, - client_authentication_method: Optional[List[Union[str, "_models.ClientAuthenticationMethod"]]] = None, - token_body_parameters: Optional[List["_models.TokenBodyParameterContract"]] = None, + authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = None, + client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = None, + token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = None, token_endpoint: Optional[str] = None, support_state: Optional[bool] = None, default_scope: Optional[str] = None, - bearer_token_sending_methods: Optional[List[Union[str, "_models.BearerTokenSendingMethod"]]] = None, + bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = None, resource_owner_username: Optional[str] = None, resource_owner_password: Optional[str] = None, display_name: Optional[str] = None, @@ -7809,7 +7964,7 @@ def __init__( use_in_api_documentation: Optional[bool] = None, client_registration_endpoint: Optional[str] = None, authorization_endpoint: Optional[str] = None, - grant_types: Optional[List[Union[str, "_models.GrantType"]]] = None, + grant_types: Optional[list[Union[str, "_models.GrantType"]]] = None, client_id: Optional[str] = None, client_secret: Optional[str] = None, **kwargs: Any @@ -7955,6 +8110,9 @@ class BackendBaseParameters(_serialization.Model): :vartype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties :ivar circuit_breaker: Backend Circuit Breaker Configuration. :vartype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker + :ivar azure_region: Azure region in which the backend is deployed. Can be optionally specified + to use features such as carbon-optimized load balancer. + :vartype azure_region: str :ivar pool: :vartype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool :ivar type: Type of the backend. A backend can be either Single or Pool. Known values are: @@ -7977,6 +8135,7 @@ class BackendBaseParameters(_serialization.Model): "proxy": {"key": "proxy", "type": "BackendProxyContract"}, "tls": {"key": "tls", "type": "BackendTlsProperties"}, "circuit_breaker": {"key": "circuitBreaker", "type": "BackendCircuitBreaker"}, + "azure_region": {"key": "azureRegion", "type": "str"}, "pool": {"key": "pool", "type": "BackendBaseParametersPool"}, "type": {"key": "type", "type": "str"}, } @@ -7992,6 +8151,7 @@ def __init__( proxy: Optional["_models.BackendProxyContract"] = None, tls: Optional["_models.BackendTlsProperties"] = None, circuit_breaker: Optional["_models.BackendCircuitBreaker"] = None, + azure_region: Optional[str] = None, pool: Optional["_models.BackendBaseParametersPool"] = None, type: Optional[Union[str, "_models.BackendType"]] = None, **kwargs: Any @@ -8014,6 +8174,9 @@ def __init__( :paramtype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties :keyword circuit_breaker: Backend Circuit Breaker Configuration. :paramtype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker + :keyword azure_region: Azure region in which the backend is deployed. Can be optionally + specified to use features such as carbon-optimized load balancer. + :paramtype azure_region: str :keyword pool: :paramtype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool :keyword type: Type of the backend. A backend can be either Single or Pool. Known values are: @@ -8029,6 +8192,7 @@ def __init__( self.proxy = proxy self.tls = tls self.circuit_breaker = circuit_breaker + self.azure_region = azure_region self.pool = pool self.type = type @@ -8038,6 +8202,11 @@ class BackendPool(_serialization.Model): :ivar services: The list of backend entities belonging to a pool. :vartype services: list[~azure.mgmt.apimanagement.models.BackendPoolItem] + :ivar failure_response: The response to be returned when all the backends in the pool are + inactive. + :vartype failure_response: ~azure.mgmt.apimanagement.models.BackendFailureResponse + :ivar session_affinity: The session stickiness properties of the backend pool. + :vartype session_affinity: ~azure.mgmt.apimanagement.models.BackendSessionAffinity """ _validation = { @@ -8046,15 +8215,31 @@ class BackendPool(_serialization.Model): _attribute_map = { "services": {"key": "services", "type": "[BackendPoolItem]"}, + "failure_response": {"key": "failureResponse", "type": "BackendFailureResponse"}, + "session_affinity": {"key": "sessionAffinity", "type": "BackendSessionAffinity"}, } - def __init__(self, *, services: Optional[List["_models.BackendPoolItem"]] = None, **kwargs: Any) -> None: + def __init__( + self, + *, + services: Optional[list["_models.BackendPoolItem"]] = None, + failure_response: Optional["_models.BackendFailureResponse"] = None, + session_affinity: Optional["_models.BackendSessionAffinity"] = None, + **kwargs: Any + ) -> None: """ :keyword services: The list of backend entities belonging to a pool. :paramtype services: list[~azure.mgmt.apimanagement.models.BackendPoolItem] + :keyword failure_response: The response to be returned when all the backends in the pool are + inactive. + :paramtype failure_response: ~azure.mgmt.apimanagement.models.BackendFailureResponse + :keyword session_affinity: The session stickiness properties of the backend pool. + :paramtype session_affinity: ~azure.mgmt.apimanagement.models.BackendSessionAffinity """ super().__init__(**kwargs) self.services = services + self.failure_response = failure_response + self.session_affinity = session_affinity class BackendBaseParametersPool(BackendPool): @@ -8062,6 +8247,11 @@ class BackendBaseParametersPool(BackendPool): :ivar services: The list of backend entities belonging to a pool. :vartype services: list[~azure.mgmt.apimanagement.models.BackendPoolItem] + :ivar failure_response: The response to be returned when all the backends in the pool are + inactive. + :vartype failure_response: ~azure.mgmt.apimanagement.models.BackendFailureResponse + :ivar session_affinity: The session stickiness properties of the backend pool. + :vartype session_affinity: ~azure.mgmt.apimanagement.models.BackendSessionAffinity """ @@ -8080,7 +8270,7 @@ class BackendCircuitBreaker(_serialization.Model): "rules": {"key": "rules", "type": "[CircuitBreakerRule]"}, } - def __init__(self, *, rules: Optional[List["_models.CircuitBreakerRule"]] = None, **kwargs: Any) -> None: + def __init__(self, *, rules: Optional[list["_models.CircuitBreakerRule"]] = None, **kwargs: Any) -> None: """ :keyword rules: The rules for tripping the backend. :paramtype rules: list[~azure.mgmt.apimanagement.models.CircuitBreakerRule] @@ -8109,7 +8299,7 @@ class BackendCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.BackendContract"]] = None, + value: Optional[list["_models.BackendContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -8154,7 +8344,7 @@ class BackendContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -8178,14 +8368,18 @@ class BackendContract(ProxyResource): :vartype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties :ivar circuit_breaker: Backend Circuit Breaker Configuration. :vartype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker + :ivar azure_region: Azure region in which the backend is deployed. Can be optionally specified + to use features such as carbon-optimized load balancer. + :vartype azure_region: str :ivar pool: :vartype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool :ivar type_properties_type: Type of the backend. A backend can be either Single or Pool. Known values are: "Single" and "Pool". :vartype type_properties_type: str or ~azure.mgmt.apimanagement.models.BackendType - :ivar url: Runtime Url of the Backend. + :ivar url: Runtime Url of the Backend. Required when backend type is 'Single'. :vartype url: str - :ivar protocol: Backend communication protocol. Known values are: "http" and "soap". + :ivar protocol: Backend communication protocol. Required when backend type is 'Single'. Known + values are: "http" and "soap". :vartype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol """ @@ -8211,6 +8405,7 @@ class BackendContract(ProxyResource): "proxy": {"key": "properties.proxy", "type": "BackendProxyContract"}, "tls": {"key": "properties.tls", "type": "BackendTlsProperties"}, "circuit_breaker": {"key": "properties.circuitBreaker", "type": "BackendCircuitBreaker"}, + "azure_region": {"key": "properties.azureRegion", "type": "str"}, "pool": {"key": "properties.pool", "type": "BackendBaseParametersPool"}, "type_properties_type": {"key": "properties.type", "type": "str"}, "url": {"key": "properties.url", "type": "str"}, @@ -8228,6 +8423,7 @@ def __init__( proxy: Optional["_models.BackendProxyContract"] = None, tls: Optional["_models.BackendTlsProperties"] = None, circuit_breaker: Optional["_models.BackendCircuitBreaker"] = None, + azure_region: Optional[str] = None, pool: Optional["_models.BackendBaseParametersPool"] = None, type_properties_type: Optional[Union[str, "_models.BackendType"]] = None, url: Optional[str] = None, @@ -8252,14 +8448,18 @@ def __init__( :paramtype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties :keyword circuit_breaker: Backend Circuit Breaker Configuration. :paramtype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker + :keyword azure_region: Azure region in which the backend is deployed. Can be optionally + specified to use features such as carbon-optimized load balancer. + :paramtype azure_region: str :keyword pool: :paramtype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool :keyword type_properties_type: Type of the backend. A backend can be either Single or Pool. Known values are: "Single" and "Pool". :paramtype type_properties_type: str or ~azure.mgmt.apimanagement.models.BackendType - :keyword url: Runtime Url of the Backend. + :keyword url: Runtime Url of the Backend. Required when backend type is 'Single'. :paramtype url: str - :keyword protocol: Backend communication protocol. Known values are: "http" and "soap". + :keyword protocol: Backend communication protocol. Required when backend type is 'Single'. + Known values are: "http" and "soap". :paramtype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol """ super().__init__(**kwargs) @@ -8271,6 +8471,7 @@ def __init__( self.proxy = proxy self.tls = tls self.circuit_breaker = circuit_breaker + self.azure_region = azure_region self.pool = pool self.type_properties_type = type_properties_type self.url = url @@ -8280,8 +8481,6 @@ def __init__( class BackendContractProperties(BackendBaseParameters): """Parameters supplied to the Create Backend operation. - All required parameters must be populated in order to send to server. - :ivar title: Backend Title. :vartype title: str :ivar description: Backend Description. @@ -8299,14 +8498,18 @@ class BackendContractProperties(BackendBaseParameters): :vartype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties :ivar circuit_breaker: Backend Circuit Breaker Configuration. :vartype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker + :ivar azure_region: Azure region in which the backend is deployed. Can be optionally specified + to use features such as carbon-optimized load balancer. + :vartype azure_region: str :ivar pool: :vartype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool :ivar type: Type of the backend. A backend can be either Single or Pool. Known values are: "Single" and "Pool". :vartype type: str or ~azure.mgmt.apimanagement.models.BackendType - :ivar url: Runtime Url of the Backend. Required. + :ivar url: Runtime Url of the Backend. Required when backend type is 'Single'. :vartype url: str - :ivar protocol: Backend communication protocol. Required. Known values are: "http" and "soap". + :ivar protocol: Backend communication protocol. Required when backend type is 'Single'. Known + values are: "http" and "soap". :vartype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol """ @@ -8314,8 +8517,7 @@ class BackendContractProperties(BackendBaseParameters): "title": {"max_length": 300, "min_length": 1}, "description": {"max_length": 2000, "min_length": 1}, "resource_id": {"max_length": 2000, "min_length": 1}, - "url": {"required": True, "max_length": 2000, "min_length": 1}, - "protocol": {"required": True}, + "url": {"max_length": 2000, "min_length": 1}, } _attribute_map = { @@ -8327,6 +8529,7 @@ class BackendContractProperties(BackendBaseParameters): "proxy": {"key": "proxy", "type": "BackendProxyContract"}, "tls": {"key": "tls", "type": "BackendTlsProperties"}, "circuit_breaker": {"key": "circuitBreaker", "type": "BackendCircuitBreaker"}, + "azure_region": {"key": "azureRegion", "type": "str"}, "pool": {"key": "pool", "type": "BackendBaseParametersPool"}, "type": {"key": "type", "type": "str"}, "url": {"key": "url", "type": "str"}, @@ -8336,8 +8539,6 @@ class BackendContractProperties(BackendBaseParameters): def __init__( self, *, - url: str, - protocol: Union[str, "_models.BackendProtocol"], title: Optional[str] = None, description: Optional[str] = None, resource_id: Optional[str] = None, @@ -8346,8 +8547,11 @@ def __init__( proxy: Optional["_models.BackendProxyContract"] = None, tls: Optional["_models.BackendTlsProperties"] = None, circuit_breaker: Optional["_models.BackendCircuitBreaker"] = None, + azure_region: Optional[str] = None, pool: Optional["_models.BackendBaseParametersPool"] = None, type: Optional[Union[str, "_models.BackendType"]] = None, + url: Optional[str] = None, + protocol: Optional[Union[str, "_models.BackendProtocol"]] = None, **kwargs: Any ) -> None: """ @@ -8368,15 +8572,18 @@ def __init__( :paramtype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties :keyword circuit_breaker: Backend Circuit Breaker Configuration. :paramtype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker + :keyword azure_region: Azure region in which the backend is deployed. Can be optionally + specified to use features such as carbon-optimized load balancer. + :paramtype azure_region: str :keyword pool: :paramtype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool :keyword type: Type of the backend. A backend can be either Single or Pool. Known values are: "Single" and "Pool". :paramtype type: str or ~azure.mgmt.apimanagement.models.BackendType - :keyword url: Runtime Url of the Backend. Required. + :keyword url: Runtime Url of the Backend. Required when backend type is 'Single'. :paramtype url: str - :keyword protocol: Backend communication protocol. Required. Known values are: "http" and - "soap". + :keyword protocol: Backend communication protocol. Required when backend type is 'Single'. + Known values are: "http" and "soap". :paramtype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol """ super().__init__( @@ -8388,6 +8595,7 @@ def __init__( proxy=proxy, tls=tls, circuit_breaker=circuit_breaker, + azure_region=azure_region, pool=pool, type=type, **kwargs @@ -8428,10 +8636,10 @@ class BackendCredentialsContract(_serialization.Model): def __init__( self, *, - certificate_ids: Optional[List[str]] = None, - certificate: Optional[List[str]] = None, - query: Optional[Dict[str, List[str]]] = None, - header: Optional[Dict[str, List[str]]] = None, + certificate_ids: Optional[list[str]] = None, + certificate: Optional[list[str]] = None, + query: Optional[dict[str, list[str]]] = None, + header: Optional[dict[str, list[str]]] = None, authorization: Optional["_models.BackendAuthorizationHeaderCredentials"] = None, **kwargs: Any ) -> None: @@ -8457,6 +8665,30 @@ def __init__( self.authorization = authorization +class BackendFailureResponse(_serialization.Model): + """The response to be returned when a backend fails to respond. + + :ivar status_code: The status code of the response. + :vartype status_code: int + """ + + _validation = { + "status_code": {"maximum": 599, "minimum": 100}, + } + + _attribute_map = { + "status_code": {"key": "statusCode", "type": "int"}, + } + + def __init__(self, *, status_code: Optional[int] = None, **kwargs: Any) -> None: + """ + :keyword status_code: The status code of the response. + :paramtype status_code: int + """ + super().__init__(**kwargs) + self.status_code = status_code + + class BackendPoolItem(_serialization.Model): """Backend pool service information. @@ -8471,6 +8703,14 @@ class BackendPoolItem(_serialization.Model): :ivar priority: The priority of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified. :vartype priority: int + :ivar preferred_carbon_emission: Scope 2 carbon emission preference for the backend. When + specified, the load balancer will optimize traffic flow by routing to regions that have carbon + emission less than or equal to the specified category. However, when all other backends are not + available it will route traffic to these regions anyway. This requires the backend to be + attributed with 'azureRegion' information. Known values are: "VeryLow", "Low", "Medium", + "High", and "VeryHigh". + :vartype preferred_carbon_emission: str or + ~azure.mgmt.apimanagement.models.CarbonEmissionCategory """ _validation = { @@ -8483,6 +8723,7 @@ class BackendPoolItem(_serialization.Model): "id": {"key": "id", "type": "str"}, "weight": {"key": "weight", "type": "int"}, "priority": {"key": "priority", "type": "int"}, + "preferred_carbon_emission": {"key": "preferredCarbonEmission", "type": "str"}, } def __init__( @@ -8491,6 +8732,7 @@ def __init__( id: str, # pylint: disable=redefined-builtin weight: Optional[int] = None, priority: Optional[int] = None, + preferred_carbon_emission: Optional[Union[str, "_models.CarbonEmissionCategory"]] = None, **kwargs: Any ) -> None: """ @@ -8503,11 +8745,20 @@ def __init__( :keyword priority: The priority of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified. :paramtype priority: int + :keyword preferred_carbon_emission: Scope 2 carbon emission preference for the backend. When + specified, the load balancer will optimize traffic flow by routing to regions that have carbon + emission less than or equal to the specified category. However, when all other backends are not + available it will route traffic to these regions anyway. This requires the backend to be + attributed with 'azureRegion' information. Known values are: "VeryLow", "Low", "Medium", + "High", and "VeryHigh". + :paramtype preferred_carbon_emission: str or + ~azure.mgmt.apimanagement.models.CarbonEmissionCategory """ super().__init__(**kwargs) self.id = id self.weight = weight self.priority = priority + self.preferred_carbon_emission = preferred_carbon_emission class BackendProperties(_serialization.Model): @@ -8582,7 +8833,7 @@ class BackendReconnectContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -8655,12 +8906,12 @@ class BackendServiceFabricClusterProperties(_serialization.Model): def __init__( self, *, - management_endpoints: List[str], + management_endpoints: list[str], client_certificate_id: Optional[str] = None, client_certificatethumbprint: Optional[str] = None, max_partition_resolution_retries: Optional[int] = None, - server_certificate_thumbprints: Optional[List[str]] = None, - server_x509_names: Optional[List["_models.X509CertificateName"]] = None, + server_certificate_thumbprints: Optional[list[str]] = None, + server_x509_names: Optional[list["_models.X509CertificateName"]] = None, **kwargs: Any ) -> None: """ @@ -8689,6 +8940,58 @@ def __init__( self.server_x509_names = server_x509_names +class BackendSessionAffinity(_serialization.Model): + """The session stickiness properties of the backend pool. + + :ivar session_id: The id that identifies the requests belonging to the same session. + :vartype session_id: ~azure.mgmt.apimanagement.models.BackendSessionId + """ + + _attribute_map = { + "session_id": {"key": "sessionId", "type": "BackendSessionId"}, + } + + def __init__(self, *, session_id: Optional["_models.BackendSessionId"] = None, **kwargs: Any) -> None: + """ + :keyword session_id: The id that identifies the requests belonging to the same session. + :paramtype session_id: ~azure.mgmt.apimanagement.models.BackendSessionId + """ + super().__init__(**kwargs) + self.session_id = session_id + + +class BackendSessionId(_serialization.Model): + """The properties of the id that identifies the requests belonging to the same session. + + :ivar source: Source from where the session id is extracted. "cookie" + :vartype source: str or ~azure.mgmt.apimanagement.models.BackendSessionIdSource + :ivar name: Name of the variable that refers to the session id. + :vartype name: str + """ + + _attribute_map = { + "source": {"key": "source", "type": "str"}, + "name": {"key": "name", "type": "str"}, + } + + def __init__( + self, + *, + source: Optional[Union[str, "_models.BackendSessionIdSource"]] = None, + name: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword source: Source from where the session id is extracted. "cookie" + :paramtype source: str or ~azure.mgmt.apimanagement.models.BackendSessionIdSource + :keyword name: Name of the variable that refers to the session id. + :paramtype name: str + """ + super().__init__(**kwargs) + self.source = source + self.name = name + + class BackendSubnetConfiguration(_serialization.Model): """Information regarding how the subnet to which the gateway should be injected. @@ -8718,15 +9021,28 @@ class BackendTlsProperties(_serialization.Model): :ivar validate_certificate_name: Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. :vartype validate_certificate_name: bool + :ivar server_certificate_thumbprints: Thumbprints of certificates used by the backend host for + TLS communication. + :vartype server_certificate_thumbprints: list[str] + :ivar server_x509_names: Server X509 Certificate Names of the Backend Host. + :vartype server_x509_names: list[~azure.mgmt.apimanagement.models.X509CertificateName] """ _attribute_map = { "validate_certificate_chain": {"key": "validateCertificateChain", "type": "bool"}, "validate_certificate_name": {"key": "validateCertificateName", "type": "bool"}, + "server_certificate_thumbprints": {"key": "serverCertificateThumbprints", "type": "[str]"}, + "server_x509_names": {"key": "serverX509Names", "type": "[X509CertificateName]"}, } def __init__( - self, *, validate_certificate_chain: bool = True, validate_certificate_name: bool = True, **kwargs: Any + self, + *, + validate_certificate_chain: bool = True, + validate_certificate_name: bool = True, + server_certificate_thumbprints: Optional[list[str]] = None, + server_x509_names: Optional[list["_models.X509CertificateName"]] = None, + **kwargs: Any ) -> None: """ :keyword validate_certificate_chain: Flag indicating whether SSL certificate chain validation @@ -8735,10 +9051,17 @@ def __init__( :keyword validate_certificate_name: Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. :paramtype validate_certificate_name: bool + :keyword server_certificate_thumbprints: Thumbprints of certificates used by the backend host + for TLS communication. + :paramtype server_certificate_thumbprints: list[str] + :keyword server_x509_names: Server X509 Certificate Names of the Backend Host. + :paramtype server_x509_names: list[~azure.mgmt.apimanagement.models.X509CertificateName] """ super().__init__(**kwargs) self.validate_certificate_chain = validate_certificate_chain self.validate_certificate_name = validate_certificate_name + self.server_certificate_thumbprints = server_certificate_thumbprints + self.server_x509_names = server_x509_names class BackendUpdateParameterProperties(BackendBaseParameters): @@ -8761,6 +9084,9 @@ class BackendUpdateParameterProperties(BackendBaseParameters): :vartype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties :ivar circuit_breaker: Backend Circuit Breaker Configuration. :vartype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker + :ivar azure_region: Azure region in which the backend is deployed. Can be optionally specified + to use features such as carbon-optimized load balancer. + :vartype azure_region: str :ivar pool: :vartype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool :ivar type: Type of the backend. A backend can be either Single or Pool. Known values are: @@ -8788,6 +9114,7 @@ class BackendUpdateParameterProperties(BackendBaseParameters): "proxy": {"key": "proxy", "type": "BackendProxyContract"}, "tls": {"key": "tls", "type": "BackendTlsProperties"}, "circuit_breaker": {"key": "circuitBreaker", "type": "BackendCircuitBreaker"}, + "azure_region": {"key": "azureRegion", "type": "str"}, "pool": {"key": "pool", "type": "BackendBaseParametersPool"}, "type": {"key": "type", "type": "str"}, "url": {"key": "url", "type": "str"}, @@ -8805,6 +9132,7 @@ def __init__( proxy: Optional["_models.BackendProxyContract"] = None, tls: Optional["_models.BackendTlsProperties"] = None, circuit_breaker: Optional["_models.BackendCircuitBreaker"] = None, + azure_region: Optional[str] = None, pool: Optional["_models.BackendBaseParametersPool"] = None, type: Optional[Union[str, "_models.BackendType"]] = None, url: Optional[str] = None, @@ -8829,6 +9157,9 @@ def __init__( :paramtype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties :keyword circuit_breaker: Backend Circuit Breaker Configuration. :paramtype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker + :keyword azure_region: Azure region in which the backend is deployed. Can be optionally + specified to use features such as carbon-optimized load balancer. + :paramtype azure_region: str :keyword pool: :paramtype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool :keyword type: Type of the backend. A backend can be either Single or Pool. Known values are: @@ -8848,6 +9179,7 @@ def __init__( proxy=proxy, tls=tls, circuit_breaker=circuit_breaker, + azure_region=azure_region, pool=pool, type=type, **kwargs @@ -8876,6 +9208,9 @@ class BackendUpdateParameters(_serialization.Model): :vartype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties :ivar circuit_breaker: Backend Circuit Breaker Configuration. :vartype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker + :ivar azure_region: Azure region in which the backend is deployed. Can be optionally specified + to use features such as carbon-optimized load balancer. + :vartype azure_region: str :ivar pool: :vartype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool :ivar type: Type of the backend. A backend can be either Single or Pool. Known values are: @@ -8903,6 +9238,7 @@ class BackendUpdateParameters(_serialization.Model): "proxy": {"key": "properties.proxy", "type": "BackendProxyContract"}, "tls": {"key": "properties.tls", "type": "BackendTlsProperties"}, "circuit_breaker": {"key": "properties.circuitBreaker", "type": "BackendCircuitBreaker"}, + "azure_region": {"key": "properties.azureRegion", "type": "str"}, "pool": {"key": "properties.pool", "type": "BackendBaseParametersPool"}, "type": {"key": "properties.type", "type": "str"}, "url": {"key": "properties.url", "type": "str"}, @@ -8920,6 +9256,7 @@ def __init__( proxy: Optional["_models.BackendProxyContract"] = None, tls: Optional["_models.BackendTlsProperties"] = None, circuit_breaker: Optional["_models.BackendCircuitBreaker"] = None, + azure_region: Optional[str] = None, pool: Optional["_models.BackendBaseParametersPool"] = None, type: Optional[Union[str, "_models.BackendType"]] = None, url: Optional[str] = None, @@ -8944,6 +9281,9 @@ def __init__( :paramtype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties :keyword circuit_breaker: Backend Circuit Breaker Configuration. :paramtype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker + :keyword azure_region: Azure region in which the backend is deployed. Can be optionally + specified to use features such as carbon-optimized load balancer. + :paramtype azure_region: str :keyword pool: :paramtype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool :keyword type: Type of the backend. A backend can be either Single or Pool. Known values are: @@ -8963,6 +9303,7 @@ def __init__( self.proxy = proxy self.tls = tls self.circuit_breaker = circuit_breaker + self.azure_region = azure_region self.pool = pool self.type = type self.url = url @@ -9013,7 +9354,7 @@ class CacheCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.CacheContract"]] = None, + value: Optional[list["_models.CacheContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -9038,7 +9379,7 @@ class CacheContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -9178,7 +9519,7 @@ class CertificateCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.CertificateContract"]] = None, + value: Optional[list["_models.CertificateContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -9260,7 +9601,7 @@ class CertificateContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -9436,8 +9777,8 @@ def __init__( count: Optional[int] = None, percentage: Optional[int] = None, interval: Optional[datetime.timedelta] = None, - status_code_ranges: Optional[List["_models.FailureStatusCodeRange"]] = None, - error_reasons: Optional[List[str]] = None, + status_code_ranges: Optional[list["_models.FailureStatusCodeRange"]] = None, + error_reasons: Optional[list[str]] = None, **kwargs: Any ) -> None: """ @@ -9471,6 +9812,8 @@ class CircuitBreakerRule(_serialization.Model): :vartype trip_duration: ~datetime.timedelta :ivar accept_retry_after: flag to accept Retry-After header from the backend. :vartype accept_retry_after: bool + :ivar failure_response: The response of the backend when the circuit breaker gets open. + :vartype failure_response: ~azure.mgmt.apimanagement.models.BackendFailureResponse """ _attribute_map = { @@ -9478,6 +9821,7 @@ class CircuitBreakerRule(_serialization.Model): "failure_condition": {"key": "failureCondition", "type": "CircuitBreakerFailureCondition"}, "trip_duration": {"key": "tripDuration", "type": "duration"}, "accept_retry_after": {"key": "acceptRetryAfter", "type": "bool"}, + "failure_response": {"key": "failureResponse", "type": "BackendFailureResponse"}, } def __init__( @@ -9487,6 +9831,7 @@ def __init__( failure_condition: Optional["_models.CircuitBreakerFailureCondition"] = None, trip_duration: Optional[datetime.timedelta] = None, accept_retry_after: Optional[bool] = None, + failure_response: Optional["_models.BackendFailureResponse"] = None, **kwargs: Any ) -> None: """ @@ -9498,12 +9843,251 @@ def __init__( :paramtype trip_duration: ~datetime.timedelta :keyword accept_retry_after: flag to accept Retry-After header from the backend. :paramtype accept_retry_after: bool + :keyword failure_response: The response of the backend when the circuit breaker gets open. + :paramtype failure_response: ~azure.mgmt.apimanagement.models.BackendFailureResponse """ super().__init__(**kwargs) self.name = name self.failure_condition = failure_condition self.trip_duration = trip_duration self.accept_retry_after = accept_retry_after + self.failure_response = failure_response + + +class ClientApplicationCollection(_serialization.Model): + """Paged ClientApplication list representation. + + :ivar value: Page values. + :vartype value: list[~azure.mgmt.apimanagement.models.ClientApplicationContract] + :ivar next_link: Next page link if any. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[ClientApplicationContract]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, + *, + value: Optional[list["_models.ClientApplicationContract"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword value: Page values. + :paramtype value: list[~azure.mgmt.apimanagement.models.ClientApplicationContract] + :keyword next_link: Next page link if any. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ClientApplicationContract(ProxyResource): + """Client application details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar display_name: Client application name. + :vartype display_name: str + :ivar description: Client application description. + :vartype description: str + :ivar owner_id: A resource identifier for the user who owns the application. + :vartype owner_id: str + :ivar entra_application_id: Microsoft EntraID Application ID (Client ID). This is the value + that is used to identify the application when it is requesting access tokens from Microsoft + EntraID. This property is read-only and will be set by the system when the application is + created. + :vartype entra_application_id: str + :ivar entra_tenant_id: Tenant ID is a unique identifier (a GUID) for an organization directory + in Microsoft’s cloud. It’s used to identify tenants across Microsoft services. + :vartype entra_tenant_id: str + :ivar state: Client application state. The value derives the state of an application based on + the statuses of its associated ClientApplicationProductLinks. Known values are: "pending", + "active", "rejected", and "approved". + :vartype state: str or ~azure.mgmt.apimanagement.models.ClientApplicationState + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "display_name": {"max_length": 300}, + "description": {"max_length": 1000}, + "entra_application_id": {"readonly": True}, + "entra_tenant_id": {"readonly": True}, + "state": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "display_name": {"key": "properties.displayName", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "owner_id": {"key": "properties.ownerId", "type": "str"}, + "entra_application_id": {"key": "properties.entraApplicationId", "type": "str"}, + "entra_tenant_id": {"key": "properties.entraTenantId", "type": "str"}, + "state": {"key": "properties.state", "type": "str"}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + owner_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword display_name: Client application name. + :paramtype display_name: str + :keyword description: Client application description. + :paramtype description: str + :keyword owner_id: A resource identifier for the user who owns the application. + :paramtype owner_id: str + """ + super().__init__(**kwargs) + self.display_name = display_name + self.description = description + self.owner_id = owner_id + self.entra_application_id: Optional[str] = None + self.entra_tenant_id: Optional[str] = None + self.state: Optional[Union[str, "_models.ClientApplicationState"]] = None + + +class ClientApplicationProductLinkCollection(_serialization.Model): + """Paged ClientApplicationProductLinkContract list representation. + + :ivar value: Page values. + :vartype value: list[~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract] + :ivar next_link: Next page link if any. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[ClientApplicationProductLinkContract]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, + *, + value: Optional[list["_models.ClientApplicationProductLinkContract"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword value: Page values. + :paramtype value: list[~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract] + :keyword next_link: Next page link if any. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ClientApplicationProductLinkContract(ProxyResource): + """Specifies Client Application - Product link assignment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar product_id: The unique resource identifier of the Product. + :vartype product_id: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "product_id": {"key": "properties.productId", "type": "str"}, + } + + def __init__(self, *, product_id: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword product_id: The unique resource identifier of the Product. + :paramtype product_id: str + """ + super().__init__(**kwargs) + self.product_id = product_id + + +class ClientApplicationSecretsContract(_serialization.Model): + """Specifies client application secrets needed to authorize applications API calls. + + :ivar entra: Microsoft EntraID client application secrets. + :vartype entra: ~azure.mgmt.apimanagement.models.ClientApplicationSecretsContractEntra + """ + + _attribute_map = { + "entra": {"key": "entra", "type": "ClientApplicationSecretsContractEntra"}, + } + + def __init__( + self, *, entra: Optional["_models.ClientApplicationSecretsContractEntra"] = None, **kwargs: Any + ) -> None: + """ + :keyword entra: Microsoft EntraID client application secrets. + :paramtype entra: ~azure.mgmt.apimanagement.models.ClientApplicationSecretsContractEntra + """ + super().__init__(**kwargs) + self.entra = entra + + +class ClientApplicationSecretsContractEntra(_serialization.Model): + """Microsoft EntraID client application secrets. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar client_secret: EntraID client application secret. + :vartype client_secret: str + :ivar expires_at: EntraID client application secret expiration date. + :vartype expires_at: ~datetime.datetime + """ + + _validation = { + "expires_at": {"readonly": True}, + } + + _attribute_map = { + "client_secret": {"key": "clientSecret", "type": "str"}, + "expires_at": {"key": "expiresAt", "type": "iso-8601"}, + } + + def __init__(self, *, client_secret: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword client_secret: EntraID client application secret. + :paramtype client_secret: str + """ + super().__init__(**kwargs) + self.client_secret = client_secret + self.expires_at: Optional[datetime.datetime] = None class ClientSecretContract(_serialization.Model): @@ -9708,8 +10292,8 @@ def __init__( self, *, method: Optional[Union[str, "_models.Method"]] = None, - valid_status_codes: Optional[List[int]] = None, - headers: Optional[List["_models.HTTPHeader"]] = None, + valid_status_codes: Optional[list[int]] = None, + headers: Optional[list["_models.HTTPHeader"]] = None, **kwargs: Any ) -> None: """ @@ -9806,13 +10390,13 @@ class ConnectivityCheckResponse(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.hops = None - self.connection_status = None - self.avg_latency_in_ms = None - self.min_latency_in_ms = None - self.max_latency_in_ms = None - self.probes_sent = None - self.probes_failed = None + self.hops: Optional[list["_models.ConnectivityHop"]] = None + self.connection_status: Optional[Union[str, "_models.ConnectionStatus"]] = None + self.avg_latency_in_ms: Optional[int] = None + self.min_latency_in_ms: Optional[int] = None + self.max_latency_in_ms: Optional[int] = None + self.probes_sent: Optional[int] = None + self.probes_failed: Optional[int] = None class ConnectivityHop(_serialization.Model): @@ -9855,12 +10439,12 @@ class ConnectivityHop(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.type = None - self.id = None - self.address = None - self.resource_id = None - self.next_hop_ids = None - self.issues = None + self.type: Optional[str] = None + self.id: Optional[str] = None + self.address: Optional[str] = None + self.resource_id: Optional[str] = None + self.next_hop_ids: Optional[list[str]] = None + self.issues: Optional[list["_models.ConnectivityIssue"]] = None class ConnectivityIssue(_serialization.Model): @@ -9897,10 +10481,10 @@ class ConnectivityIssue(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.origin = None - self.severity = None - self.type = None - self.context = None + self.origin: Optional[Union[str, "_models.Origin"]] = None + self.severity: Optional[Union[str, "_models.Severity"]] = None + self.type: Optional[Union[str, "_models.IssueType"]] = None + self.context: Optional[list[dict[str, str]]] = None class ConnectivityStatusContract(_serialization.Model): @@ -10021,8 +10605,8 @@ class ContentItemCollection(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.ContentItemContract"]] = None + self.next_link: Optional[str] = None class ContentItemContract(ProxyResource): @@ -10031,7 +10615,7 @@ class ContentItemContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -10055,7 +10639,7 @@ class ContentItemContract(ProxyResource): "properties": {"key": "properties", "type": "{object}"}, } - def __init__(self, *, properties: Optional[Dict[str, Any]] = None, **kwargs: Any) -> None: + def __init__(self, *, properties: Optional[dict[str, Any]] = None, **kwargs: Any) -> None: """ :keyword properties: Properties of the content item. :paramtype properties: dict[str, any] @@ -10088,8 +10672,8 @@ class ContentTypeCollection(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.ContentTypeContract"]] = None + self.next_link: Optional[str] = None class ContentTypeContract(ProxyResource): @@ -10098,7 +10682,7 @@ class ContentTypeContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -10181,8 +10765,8 @@ class DataMasking(_serialization.Model): def __init__( self, *, - query_params: Optional[List["_models.DataMaskingEntity"]] = None, - headers: Optional[List["_models.DataMaskingEntity"]] = None, + query_params: Optional[list["_models.DataMaskingEntity"]] = None, + headers: Optional[list["_models.DataMaskingEntity"]] = None, **kwargs: Any ) -> None: """ @@ -10234,7 +10818,7 @@ class DeletedServiceContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -10291,7 +10875,7 @@ def __init__( :paramtype deletion_date: ~datetime.datetime """ super().__init__(**kwargs) - self.location = None + self.location: Optional[str] = None self.service_id = service_id self.scheduled_purge_date = scheduled_purge_date self.deletion_date = deletion_date @@ -10321,8 +10905,8 @@ class DeletedServicesCollection(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.DeletedServiceContract"]] = None + self.next_link: Optional[str] = None class DeployConfigurationParameters(_serialization.Model): @@ -10375,7 +10959,7 @@ class DiagnosticCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.DiagnosticContract"]] = None, + value: Optional[list["_models.DiagnosticContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -10400,7 +10984,7 @@ class DiagnosticContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -10418,6 +11002,8 @@ class DiagnosticContract(ProxyResource): :vartype frontend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings :ivar backend: Diagnostic settings for incoming/outgoing HTTP messages to the Backend. :vartype backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :ivar large_language_model: Large Language Models diagnostic settings. + :vartype large_language_model: ~azure.mgmt.apimanagement.models.LLMDiagnosticSettings :ivar log_client_ip: Log the ClientIP. Default is false. :vartype log_client_ip: bool :ivar http_correlation_protocol: Sets correlation protocol to use for Application Insights @@ -10450,6 +11036,7 @@ class DiagnosticContract(ProxyResource): "sampling": {"key": "properties.sampling", "type": "SamplingSettings"}, "frontend": {"key": "properties.frontend", "type": "PipelineDiagnosticSettings"}, "backend": {"key": "properties.backend", "type": "PipelineDiagnosticSettings"}, + "large_language_model": {"key": "properties.largeLanguageModel", "type": "LLMDiagnosticSettings"}, "log_client_ip": {"key": "properties.logClientIp", "type": "bool"}, "http_correlation_protocol": {"key": "properties.httpCorrelationProtocol", "type": "str"}, "verbosity": {"key": "properties.verbosity", "type": "str"}, @@ -10465,6 +11052,7 @@ def __init__( sampling: Optional["_models.SamplingSettings"] = None, frontend: Optional["_models.PipelineDiagnosticSettings"] = None, backend: Optional["_models.PipelineDiagnosticSettings"] = None, + large_language_model: Optional["_models.LLMDiagnosticSettings"] = None, log_client_ip: Optional[bool] = None, http_correlation_protocol: Optional[Union[str, "_models.HttpCorrelationProtocol"]] = None, verbosity: Optional[Union[str, "_models.Verbosity"]] = None, @@ -10484,6 +11072,8 @@ def __init__( :paramtype frontend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings :keyword backend: Diagnostic settings for incoming/outgoing HTTP messages to the Backend. :paramtype backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :keyword large_language_model: Large Language Models diagnostic settings. + :paramtype large_language_model: ~azure.mgmt.apimanagement.models.LLMDiagnosticSettings :keyword log_client_ip: Log the ClientIP. Default is false. :paramtype log_client_ip: bool :keyword http_correlation_protocol: Sets correlation protocol to use for Application Insights @@ -10506,6 +11096,7 @@ def __init__( self.sampling = sampling self.frontend = frontend self.backend = backend + self.large_language_model = large_language_model self.log_client_ip = log_client_ip self.http_correlation_protocol = http_correlation_protocol self.verbosity = verbosity @@ -10519,7 +11110,7 @@ class DiagnosticUpdateContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -10656,8 +11247,8 @@ class DocumentationCollection(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.DocumentationContract"]] = None + self.next_link: Optional[str] = None class DocumentationContract(ProxyResource): @@ -10666,7 +11257,7 @@ class DocumentationContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -10751,7 +11342,7 @@ class EmailTemplateCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.EmailTemplateContract"]] = None, + value: Optional[list["_models.EmailTemplateContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -10776,7 +11367,7 @@ class EmailTemplateContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -10827,7 +11418,7 @@ def __init__( body: Optional[str] = None, title: Optional[str] = None, description: Optional[str] = None, - parameters: Optional[List["_models.EmailTemplateParametersContractProperties"]] = None, + parameters: Optional[list["_models.EmailTemplateParametersContractProperties"]] = None, **kwargs: Any ) -> None: """ @@ -10848,7 +11439,7 @@ def __init__( self.body = body self.title = title self.description = description - self.is_default = None + self.is_default: Optional[bool] = None self.parameters = parameters @@ -10933,7 +11524,7 @@ def __init__( title: Optional[str] = None, description: Optional[str] = None, body: Optional[str] = None, - parameters: Optional[List["_models.EmailTemplateParametersContractProperties"]] = None, + parameters: Optional[list["_models.EmailTemplateParametersContractProperties"]] = None, **kwargs: Any ) -> None: """ @@ -10975,7 +11566,7 @@ def __init__( self, *, domain_name: Optional[str] = None, - endpoint_details: Optional[List["_models.EndpointDetail"]] = None, + endpoint_details: Optional[list["_models.EndpointDetail"]] = None, **kwargs: Any ) -> None: """ @@ -11039,8 +11630,8 @@ class ErrorAdditionalInfo(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.type = None - self.info = None + self.type: Optional[str] = None + self.info: Optional[JSON] = None class ErrorDetail(_serialization.Model): @@ -11079,11 +11670,11 @@ class ErrorDetail(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None + self.code: Optional[str] = None + self.message: Optional[str] = None + self.target: Optional[str] = None + self.details: Optional[list["_models.ErrorDetail"]] = None + self.additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = None class ErrorFieldContract(_serialization.Model): @@ -11164,7 +11755,7 @@ def __init__( *, code: Optional[str] = None, message: Optional[str] = None, - details: Optional[List["_models.ErrorFieldContract"]] = None, + details: Optional[list["_models.ErrorFieldContract"]] = None, **kwargs: Any ) -> None: """ @@ -11240,7 +11831,7 @@ class FrontendConfiguration(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.default_hostname = None + self.default_hostname: Optional[str] = None class GatewayCertificateAuthorityCollection(_serialization.Model): @@ -11267,8 +11858,8 @@ class GatewayCertificateAuthorityCollection(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.GatewayCertificateAuthorityContract"]] = None + self.next_link: Optional[str] = None class GatewayCertificateAuthorityContract(ProxyResource): @@ -11277,7 +11868,7 @@ class GatewayCertificateAuthorityContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -11340,9 +11931,9 @@ def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: :paramtype count: int """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.GatewayContract"]] = None self.count = count - self.next_link = None + self.next_link: Optional[str] = None class GatewayConfigurationApi(_serialization.Model): @@ -11366,7 +11957,7 @@ class GatewayConfigurationApi(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.hostname = None + self.hostname: Optional[str] = None class GatewayContract(ProxyResource): @@ -11375,13 +11966,15 @@ class GatewayContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.apimanagement.models.ManagedServiceIdentity :ivar location_data: Gateway location. :vartype location_data: ~azure.mgmt.apimanagement.models.ResourceLocationDataContract :ivar description: Gateway description. @@ -11399,6 +11992,7 @@ class GatewayContract(ProxyResource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, "location_data": {"key": "properties.locationData", "type": "ResourceLocationDataContract"}, "description": {"key": "properties.description", "type": "str"}, } @@ -11406,39 +12000,264 @@ class GatewayContract(ProxyResource): def __init__( self, *, + identity: Optional["_models.ManagedServiceIdentity"] = None, location_data: Optional["_models.ResourceLocationDataContract"] = None, description: Optional[str] = None, **kwargs: Any ) -> None: """ + :keyword identity: The managed service identities assigned to this resource. + :paramtype identity: ~azure.mgmt.apimanagement.models.ManagedServiceIdentity :keyword location_data: Gateway location. :paramtype location_data: ~azure.mgmt.apimanagement.models.ResourceLocationDataContract :keyword description: Gateway description. :paramtype description: str """ super().__init__(**kwargs) + self.identity = identity self.location_data = location_data self.description = description -class GatewayDebugCredentialsContract(_serialization.Model): - """Gateway debug credentials. +class GatewayDebugCredentialsContract(_serialization.Model): + """Gateway debug credentials. + + :ivar token: Gateway debug token. + :vartype token: str + """ + + _attribute_map = { + "token": {"key": "token", "type": "str"}, + } + + def __init__(self, *, token: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword token: Gateway debug token. + :paramtype token: str + """ + super().__init__(**kwargs) + self.token = token + + +class GatewayHostnameBindingCertificate(_serialization.Model): + """GatewayHostnameBindingCertificate. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar thumbprint: The thumbprint of the certificate. + :vartype thumbprint: str + :ivar subject: The subject of the certificate. + :vartype subject: str + :ivar expiry: The expiration date of the certificate. + :vartype expiry: ~datetime.datetime + """ + + _validation = { + "thumbprint": {"readonly": True}, + "subject": {"readonly": True}, + "expiry": {"readonly": True}, + } + + _attribute_map = { + "thumbprint": {"key": "thumbprint", "type": "str"}, + "subject": {"key": "subject", "type": "str"}, + "expiry": {"key": "expiry", "type": "iso-8601"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.thumbprint: Optional[str] = None + self.subject: Optional[str] = None + self.expiry: Optional[datetime.datetime] = None + + +class GatewayHostnameBindingKeyVault(_serialization.Model): + """GatewayHostnameBindingKeyVault. + + All required parameters must be populated in order to send to server. + + :ivar secret_id: The current provisioning state of the API Management gateway hostname binding. + Required. + :vartype secret_id: str + :ivar identity_client_id: The default hostname of the data-plane gateway. + :vartype identity_client_id: str + :ivar last_status: The last status of the Key Vault certificate fetch process. + :vartype last_status: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVaultLastStatus + """ + + _validation = { + "secret_id": {"required": True}, + } + + _attribute_map = { + "secret_id": {"key": "secretId", "type": "str"}, + "identity_client_id": {"key": "identityClientId", "type": "str"}, + "last_status": {"key": "lastStatus", "type": "GatewayHostnameBindingKeyVaultLastStatus"}, + } + + def __init__( + self, + *, + secret_id: str, + identity_client_id: Optional[str] = None, + last_status: Optional["_models.GatewayHostnameBindingKeyVaultLastStatus"] = None, + **kwargs: Any + ) -> None: + """ + :keyword secret_id: The current provisioning state of the API Management gateway hostname + binding. Required. + :paramtype secret_id: str + :keyword identity_client_id: The default hostname of the data-plane gateway. + :paramtype identity_client_id: str + :keyword last_status: The last status of the Key Vault certificate fetch process. + :paramtype last_status: + ~azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVaultLastStatus + """ + super().__init__(**kwargs) + self.secret_id = secret_id + self.identity_client_id = identity_client_id + self.last_status = last_status + + +class GatewayHostnameBindingKeyVaultLastStatus(_serialization.Model): + """GatewayHostnameBindingKeyVaultLastStatus. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The last status of the Key Vault certificate fetch process. Known values are: + "Success" and "Failed". + :vartype code: str or ~azure.mgmt.apimanagement.models.KeyVaultFetchCode + :ivar time_stamp_utc: The last time the Key Vault certificate fetch process was attempted. The + date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 + standard. + :vartype time_stamp_utc: ~datetime.datetime + :ivar last_success_time_stamp_utc: The last time the Key Vault certificate fetch process was + successful. Only when the fetch process has succeeded at least once and current state is + failed. The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by + the ISO 8601 standard. + :vartype last_success_time_stamp_utc: ~datetime.datetime + """ + + _validation = { + "code": {"readonly": True}, + "time_stamp_utc": {"readonly": True}, + "last_success_time_stamp_utc": {"readonly": True}, + } + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "time_stamp_utc": {"key": "timeStampUtc", "type": "iso-8601"}, + "last_success_time_stamp_utc": {"key": "lastSuccessTimeStampUtc", "type": "iso-8601"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.code: Optional[Union[str, "_models.KeyVaultFetchCode"]] = None + self.time_stamp_utc: Optional[datetime.datetime] = None + self.last_success_time_stamp_utc: Optional[datetime.datetime] = None + + +class GatewayHostnameBindingListResult(_serialization.Model): + """The response of the List API Management gateway hostname binding operation. + + All required parameters must be populated in order to send to server. + + :ivar value: Result of the List API Management gateway hostname binding operation. Required. + :vartype value: list[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list + of API Management gateway hostname bindings. + :vartype next_link: str + """ + + _validation = { + "value": {"required": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[GatewayHostnameBindingResource]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: list["_models.GatewayHostnameBindingResource"], next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: Result of the List API Management gateway hostname binding operation. Required. + :paramtype value: list[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :keyword next_link: Link to the next set of results. Not empty if Value contains incomplete + list of API Management gateway hostname bindings. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class GatewayHostnameBindingResource(ProxyResource): + """A single API Management gateway hostname binding resource in List or Get response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. - :ivar token: Gateway debug token. - :vartype token: str + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar etag: ETag of the resource. + :vartype etag: str + :ivar provisioning_state: The current provisioning state of the API Management gateway hostname + binding. + :vartype provisioning_state: str + :ivar hostname: The default hostname of the data-plane gateway. Required. + :vartype hostname: str + :ivar key_vault: The link to the API Management service workspace. Required. + :vartype key_vault: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVault + :ivar certificate: The hostnames of the data-plane gateway to which requests can be sent. + :vartype certificate: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingCertificate """ + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "etag": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "hostname": {"required": True}, + "key_vault": {"required": True}, + "certificate": {"readonly": True}, + } + _attribute_map = { - "token": {"key": "token", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "etag": {"key": "etag", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "hostname": {"key": "properties.hostname", "type": "str"}, + "key_vault": {"key": "properties.keyVault", "type": "GatewayHostnameBindingKeyVault"}, + "certificate": {"key": "properties.certificate", "type": "GatewayHostnameBindingCertificate"}, } - def __init__(self, *, token: Optional[str] = None, **kwargs: Any) -> None: + def __init__(self, *, hostname: str, key_vault: "_models.GatewayHostnameBindingKeyVault", **kwargs: Any) -> None: """ - :keyword token: Gateway debug token. - :paramtype token: str + :keyword hostname: The default hostname of the data-plane gateway. Required. + :paramtype hostname: str + :keyword key_vault: The link to the API Management service workspace. Required. + :paramtype key_vault: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVault """ super().__init__(**kwargs) - self.token = token + self.etag: Optional[str] = None + self.provisioning_state: Optional[str] = None + self.hostname = hostname + self.key_vault = key_vault + self.certificate: Optional["_models.GatewayHostnameBindingCertificate"] = None class GatewayHostnameConfigurationCollection(_serialization.Model): @@ -11465,8 +12284,8 @@ class GatewayHostnameConfigurationCollection(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.GatewayHostnameConfigurationContract"]] = None + self.next_link: Optional[str] = None class GatewayHostnameConfigurationContract(ProxyResource): @@ -11475,7 +12294,7 @@ class GatewayHostnameConfigurationContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -11633,7 +12452,7 @@ class GatewayListDebugCredentialsContract(_serialization.Model): def __init__( self, *, - purposes: List[Union[str, "_models.GatewayListDebugCredentialsContractPurpose"]], + purposes: list[Union[str, "_models.GatewayListDebugCredentialsContractPurpose"]], api_id: str, credentials_expire_after: Optional[datetime.timedelta] = None, **kwargs: Any @@ -11702,9 +12521,9 @@ class GatewayResourceSkuResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None + self.resource_type: Optional[str] = None + self.sku: Optional["_models.GatewaySku"] = None + self.capacity: Optional["_models.GatewaySkuCapacity"] = None class GatewayResourceSkuResults(_serialization.Model): @@ -11728,7 +12547,7 @@ class GatewayResourceSkuResults(_serialization.Model): } def __init__( - self, *, value: List["_models.GatewayResourceSkuResult"], next_link: Optional[str] = None, **kwargs: Any + self, *, value: list["_models.GatewayResourceSkuResult"], next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: The list of skus available for the gateway. Required. @@ -11796,10 +12615,10 @@ class GatewaySkuCapacity(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None + self.minimum: Optional[int] = None + self.maximum: Optional[int] = None + self.default: Optional[int] = None + self.scale_type: Optional[Union[str, "_models.GatewaySkuCapacityScaleType"]] = None class GatewayTokenContract(_serialization.Model): @@ -11911,9 +12730,9 @@ def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: :paramtype count: int """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.GlobalSchemaContract"]] = None self.count = count - self.next_link = None + self.next_link: Optional[str] = None class GlobalSchemaContract(ProxyResource): @@ -11922,7 +12741,7 @@ class GlobalSchemaContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -11984,7 +12803,7 @@ def __init__( self.description = description self.value = value self.document = document - self.provisioning_state = None + self.provisioning_state: Optional[str] = None class GroupCollection(_serialization.Model): @@ -12007,7 +12826,7 @@ class GroupCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.GroupContract"]] = None, + value: Optional[list["_models.GroupContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -12032,7 +12851,7 @@ class GroupContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -12099,7 +12918,7 @@ def __init__( super().__init__(**kwargs) self.display_name = display_name self.description = description - self.built_in = None + self.built_in: Optional[bool] = None self.type_properties_type = type_properties_type self.external_id = external_id @@ -12164,7 +12983,7 @@ def __init__( super().__init__(**kwargs) self.display_name = display_name self.description = description - self.built_in = None + self.built_in: Optional[bool] = None self.type = type self.external_id = external_id @@ -12456,7 +13275,7 @@ class HttpMessageDiagnostic(_serialization.Model): def __init__( self, *, - headers: Optional[List[str]] = None, + headers: Optional[list[str]] = None, body: Optional["_models.BodyDiagnosticSettings"] = None, data_masking: Optional["_models.DataMasking"] = None, **kwargs: Any @@ -12528,7 +13347,7 @@ def __init__( *, type: Optional[Union[str, "_models.IdentityProviderType"]] = None, signin_tenant: Optional[str] = None, - allowed_tenants: Optional[List[str]] = None, + allowed_tenants: Optional[list[str]] = None, authority: Optional[str] = None, signup_policy_name: Optional[str] = None, signin_policy_name: Optional[str] = None, @@ -12581,7 +13400,7 @@ class IdentityProviderContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -12618,6 +13437,8 @@ class IdentityProviderContract(ProxyResource): Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. :vartype client_secret: str + :ivar certificate_id: Certificate full resource ID used in external Identity Provider. + :vartype certificate_id: str """ _validation = { @@ -12649,6 +13470,7 @@ class IdentityProviderContract(ProxyResource): "client_library": {"key": "properties.clientLibrary", "type": "str"}, "client_id": {"key": "properties.clientId", "type": "str"}, "client_secret": {"key": "properties.clientSecret", "type": "str"}, + "certificate_id": {"key": "properties.certificateId", "type": "str"}, } def __init__( @@ -12656,7 +13478,7 @@ def __init__( *, type_properties_type: Optional[Union[str, "_models.IdentityProviderType"]] = None, signin_tenant: Optional[str] = None, - allowed_tenants: Optional[List[str]] = None, + allowed_tenants: Optional[list[str]] = None, authority: Optional[str] = None, signup_policy_name: Optional[str] = None, signin_policy_name: Optional[str] = None, @@ -12665,6 +13487,7 @@ def __init__( client_library: Optional[str] = None, client_id: Optional[str] = None, client_secret: Optional[str] = None, + certificate_id: Optional[str] = None, **kwargs: Any ) -> None: """ @@ -12700,6 +13523,8 @@ def __init__( Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. :paramtype client_secret: str + :keyword certificate_id: Certificate full resource ID used in external Identity Provider. + :paramtype certificate_id: str """ super().__init__(**kwargs) self.type_properties_type = type_properties_type @@ -12713,6 +13538,7 @@ def __init__( self.client_library = client_library self.client_id = client_id self.client_secret = client_secret + self.certificate_id = certificate_id class IdentityProviderContractProperties(IdentityProviderBaseParameters): @@ -12752,6 +13578,8 @@ class IdentityProviderContractProperties(IdentityProviderBaseParameters): Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. :vartype client_secret: str + :ivar certificate_id: Certificate full resource ID used in external Identity Provider. + :vartype certificate_id: str """ _validation = { @@ -12777,6 +13605,7 @@ class IdentityProviderContractProperties(IdentityProviderBaseParameters): "client_library": {"key": "clientLibrary", "type": "str"}, "client_id": {"key": "clientId", "type": "str"}, "client_secret": {"key": "clientSecret", "type": "str"}, + "certificate_id": {"key": "certificateId", "type": "str"}, } def __init__( @@ -12785,7 +13614,7 @@ def __init__( client_id: str, type: Optional[Union[str, "_models.IdentityProviderType"]] = None, signin_tenant: Optional[str] = None, - allowed_tenants: Optional[List[str]] = None, + allowed_tenants: Optional[list[str]] = None, authority: Optional[str] = None, signup_policy_name: Optional[str] = None, signin_policy_name: Optional[str] = None, @@ -12793,6 +13622,7 @@ def __init__( password_reset_policy_name: Optional[str] = None, client_library: Optional[str] = None, client_secret: Optional[str] = None, + certificate_id: Optional[str] = None, **kwargs: Any ) -> None: """ @@ -12828,6 +13658,8 @@ def __init__( Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. :paramtype client_secret: str + :keyword certificate_id: Certificate full resource ID used in external Identity Provider. + :paramtype certificate_id: str """ super().__init__( type=type, @@ -12843,6 +13675,7 @@ def __init__( ) self.client_id = client_id self.client_secret = client_secret + self.certificate_id = certificate_id class IdentityProviderCreateContract(ProxyResource): @@ -12851,7 +13684,7 @@ class IdentityProviderCreateContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -12888,6 +13721,8 @@ class IdentityProviderCreateContract(ProxyResource): Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. :vartype client_secret: str + :ivar certificate_id: Certificate full resource ID used in external Identity Provider. + :vartype certificate_id: str """ _validation = { @@ -12919,6 +13754,7 @@ class IdentityProviderCreateContract(ProxyResource): "client_library": {"key": "properties.clientLibrary", "type": "str"}, "client_id": {"key": "properties.clientId", "type": "str"}, "client_secret": {"key": "properties.clientSecret", "type": "str"}, + "certificate_id": {"key": "properties.certificateId", "type": "str"}, } def __init__( @@ -12926,7 +13762,7 @@ def __init__( *, type_properties_type: Optional[Union[str, "_models.IdentityProviderType"]] = None, signin_tenant: Optional[str] = None, - allowed_tenants: Optional[List[str]] = None, + allowed_tenants: Optional[list[str]] = None, authority: Optional[str] = None, signup_policy_name: Optional[str] = None, signin_policy_name: Optional[str] = None, @@ -12935,6 +13771,7 @@ def __init__( client_library: Optional[str] = None, client_id: Optional[str] = None, client_secret: Optional[str] = None, + certificate_id: Optional[str] = None, **kwargs: Any ) -> None: """ @@ -12970,6 +13807,8 @@ def __init__( Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. :paramtype client_secret: str + :keyword certificate_id: Certificate full resource ID used in external Identity Provider. + :paramtype certificate_id: str """ super().__init__(**kwargs) self.type_properties_type = type_properties_type @@ -12983,6 +13822,7 @@ def __init__( self.client_library = client_library self.client_id = client_id self.client_secret = client_secret + self.certificate_id = certificate_id class IdentityProviderCreateContractProperties(IdentityProviderBaseParameters): @@ -13022,6 +13862,8 @@ class IdentityProviderCreateContractProperties(IdentityProviderBaseParameters): Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. Required. :vartype client_secret: str + :ivar certificate_id: Certificate full resource ID used in external Identity Provider. + :vartype certificate_id: str """ _validation = { @@ -13047,6 +13889,7 @@ class IdentityProviderCreateContractProperties(IdentityProviderBaseParameters): "client_library": {"key": "clientLibrary", "type": "str"}, "client_id": {"key": "clientId", "type": "str"}, "client_secret": {"key": "clientSecret", "type": "str"}, + "certificate_id": {"key": "certificateId", "type": "str"}, } def __init__( @@ -13056,13 +13899,14 @@ def __init__( client_secret: str, type: Optional[Union[str, "_models.IdentityProviderType"]] = None, signin_tenant: Optional[str] = None, - allowed_tenants: Optional[List[str]] = None, + allowed_tenants: Optional[list[str]] = None, authority: Optional[str] = None, signup_policy_name: Optional[str] = None, signin_policy_name: Optional[str] = None, profile_editing_policy_name: Optional[str] = None, password_reset_policy_name: Optional[str] = None, client_library: Optional[str] = None, + certificate_id: Optional[str] = None, **kwargs: Any ) -> None: """ @@ -13098,6 +13942,8 @@ def __init__( Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. Required. :paramtype client_secret: str + :keyword certificate_id: Certificate full resource ID used in external Identity Provider. + :paramtype certificate_id: str """ super().__init__( type=type, @@ -13113,6 +13959,7 @@ def __init__( ) self.client_id = client_id self.client_secret = client_secret + self.certificate_id = certificate_id class IdentityProviderList(_serialization.Model): @@ -13135,7 +13982,7 @@ class IdentityProviderList(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.IdentityProviderContract"]] = None, + value: Optional[list["_models.IdentityProviderContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -13186,6 +14033,8 @@ class IdentityProviderUpdateParameters(_serialization.Model): authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. :vartype client_secret: str + :ivar certificate_id: Certificate full resource ID used in external Identity Provider. + :vartype certificate_id: str """ _validation = { @@ -13211,6 +14060,7 @@ class IdentityProviderUpdateParameters(_serialization.Model): "client_library": {"key": "properties.clientLibrary", "type": "str"}, "client_id": {"key": "properties.clientId", "type": "str"}, "client_secret": {"key": "properties.clientSecret", "type": "str"}, + "certificate_id": {"key": "properties.certificateId", "type": "str"}, } def __init__( @@ -13218,7 +14068,7 @@ def __init__( *, type: Optional[Union[str, "_models.IdentityProviderType"]] = None, signin_tenant: Optional[str] = None, - allowed_tenants: Optional[List[str]] = None, + allowed_tenants: Optional[list[str]] = None, authority: Optional[str] = None, signup_policy_name: Optional[str] = None, signin_policy_name: Optional[str] = None, @@ -13227,6 +14077,7 @@ def __init__( client_library: Optional[str] = None, client_id: Optional[str] = None, client_secret: Optional[str] = None, + certificate_id: Optional[str] = None, **kwargs: Any ) -> None: """ @@ -13261,6 +14112,8 @@ def __init__( authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. :paramtype client_secret: str + :keyword certificate_id: Certificate full resource ID used in external Identity Provider. + :paramtype certificate_id: str """ super().__init__(**kwargs) self.type = type @@ -13274,6 +14127,7 @@ def __init__( self.client_library = client_library self.client_id = client_id self.client_secret = client_secret + self.certificate_id = certificate_id class IdentityProviderUpdateProperties(IdentityProviderBaseParameters): @@ -13308,6 +14162,8 @@ class IdentityProviderUpdateProperties(IdentityProviderBaseParameters): authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. :vartype client_secret: str + :ivar certificate_id: Certificate full resource ID used in external Identity Provider. + :vartype certificate_id: str """ _validation = { @@ -13333,6 +14189,7 @@ class IdentityProviderUpdateProperties(IdentityProviderBaseParameters): "client_library": {"key": "clientLibrary", "type": "str"}, "client_id": {"key": "clientId", "type": "str"}, "client_secret": {"key": "clientSecret", "type": "str"}, + "certificate_id": {"key": "certificateId", "type": "str"}, } def __init__( @@ -13340,7 +14197,7 @@ def __init__( *, type: Optional[Union[str, "_models.IdentityProviderType"]] = None, signin_tenant: Optional[str] = None, - allowed_tenants: Optional[List[str]] = None, + allowed_tenants: Optional[list[str]] = None, authority: Optional[str] = None, signup_policy_name: Optional[str] = None, signin_policy_name: Optional[str] = None, @@ -13349,6 +14206,7 @@ def __init__( client_library: Optional[str] = None, client_id: Optional[str] = None, client_secret: Optional[str] = None, + certificate_id: Optional[str] = None, **kwargs: Any ) -> None: """ @@ -13383,6 +14241,8 @@ def __init__( authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. :paramtype client_secret: str + :keyword certificate_id: Certificate full resource ID used in external Identity Provider. + :paramtype certificate_id: str """ super().__init__( type=type, @@ -13398,6 +14258,7 @@ def __init__( ) self.client_id = client_id self.client_secret = client_secret + self.certificate_id = certificate_id class IssueAttachmentCollection(_serialization.Model): @@ -13430,9 +14291,9 @@ def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: :paramtype count: int """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.IssueAttachmentContract"]] = None self.count = count - self.next_link = None + self.next_link: Optional[str] = None class IssueAttachmentContract(ProxyResource): @@ -13441,7 +14302,7 @@ class IssueAttachmentContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -13525,9 +14386,9 @@ def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: :paramtype count: int """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.IssueContract"]] = None self.count = count - self.next_link = None + self.next_link: Optional[str] = None class IssueCommentCollection(_serialization.Model): @@ -13560,9 +14421,9 @@ def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: :paramtype count: int """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.IssueCommentContract"]] = None self.count = count - self.next_link = None + self.next_link: Optional[str] = None class IssueCommentContract(ProxyResource): @@ -13571,7 +14432,7 @@ class IssueCommentContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -13629,7 +14490,7 @@ class IssueContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -14053,6 +14914,85 @@ def __init__( self.time_stamp_utc = time_stamp_utc +class LLMDiagnosticSettings(_serialization.Model): + """Diagnostic settings for Large Language Models. + + :ivar logs: Specifies whether default diagnostic should be enabled for Large Language Models or + not. Known values are: "enabled" and "disabled". + :vartype logs: str or ~azure.mgmt.apimanagement.models.LlmDiagnosticSettings + :ivar requests: Diagnostic settings for Large Language Models requests. + :vartype requests: ~azure.mgmt.apimanagement.models.LLMMessageDiagnosticSettings + :ivar responses: Diagnostic settings for Large Language Models responses. + :vartype responses: ~azure.mgmt.apimanagement.models.LLMMessageDiagnosticSettings + """ + + _attribute_map = { + "logs": {"key": "logs", "type": "str"}, + "requests": {"key": "requests", "type": "LLMMessageDiagnosticSettings"}, + "responses": {"key": "responses", "type": "LLMMessageDiagnosticSettings"}, + } + + def __init__( + self, + *, + logs: Optional[Union[str, "_models.LlmDiagnosticSettings"]] = None, + requests: Optional["_models.LLMMessageDiagnosticSettings"] = None, + responses: Optional["_models.LLMMessageDiagnosticSettings"] = None, + **kwargs: Any + ) -> None: + """ + :keyword logs: Specifies whether default diagnostic should be enabled for Large Language Models + or not. Known values are: "enabled" and "disabled". + :paramtype logs: str or ~azure.mgmt.apimanagement.models.LlmDiagnosticSettings + :keyword requests: Diagnostic settings for Large Language Models requests. + :paramtype requests: ~azure.mgmt.apimanagement.models.LLMMessageDiagnosticSettings + :keyword responses: Diagnostic settings for Large Language Models responses. + :paramtype responses: ~azure.mgmt.apimanagement.models.LLMMessageDiagnosticSettings + """ + super().__init__(**kwargs) + self.logs = logs + self.requests = requests + self.responses = responses + + +class LLMMessageDiagnosticSettings(_serialization.Model): + """Diagnostic settings for Large Language Models Messages. + + :ivar messages: Specifies which message should be logged. Currently there is only 'all' option. + "all" + :vartype messages: str or ~azure.mgmt.apimanagement.models.LlmMessageLogTypes + :ivar max_size_in_bytes: Maximum size of message to logs in bytes. The default size is 32KB. + :vartype max_size_in_bytes: int + """ + + _validation = { + "max_size_in_bytes": {"maximum": 262144, "minimum": 1}, + } + + _attribute_map = { + "messages": {"key": "messages", "type": "str"}, + "max_size_in_bytes": {"key": "maxSizeInBytes", "type": "int"}, + } + + def __init__( + self, + *, + messages: Optional[Union[str, "_models.LlmMessageLogTypes"]] = None, + max_size_in_bytes: Optional[int] = None, + **kwargs: Any + ) -> None: + """ + :keyword messages: Specifies which message should be logged. Currently there is only 'all' + option. "all" + :paramtype messages: str or ~azure.mgmt.apimanagement.models.LlmMessageLogTypes + :keyword max_size_in_bytes: Maximum size of message to logs in bytes. The default size is 32KB. + :paramtype max_size_in_bytes: int + """ + super().__init__(**kwargs) + self.messages = messages + self.max_size_in_bytes = max_size_in_bytes + + class LoggerCollection(_serialization.Model): """Paged Logger list representation. @@ -14073,7 +15013,7 @@ class LoggerCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.LoggerContract"]] = None, + value: Optional[list["_models.LoggerContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -14098,7 +15038,7 @@ class LoggerContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -14111,8 +15051,7 @@ class LoggerContract(ProxyResource): :ivar description: Logger description. :vartype description: str :ivar credentials: The name and SendRule connection string of the event hub for azureEventHub - logger. - Instrumentation key for applicationInsights logger. + logger. Instrumentation key for applicationInsights logger. :vartype credentials: dict[str, str] :ivar is_buffered: Whether records are buffered in the logger before publishing. Default is assumed to be true. @@ -14145,7 +15084,7 @@ def __init__( *, logger_type: Optional[Union[str, "_models.LoggerType"]] = None, description: Optional[str] = None, - credentials: Optional[Dict[str, str]] = None, + credentials: Optional[dict[str, str]] = None, is_buffered: Optional[bool] = None, resource_id: Optional[str] = None, **kwargs: Any @@ -14157,8 +15096,7 @@ def __init__( :keyword description: Logger description. :paramtype description: str :keyword credentials: The name and SendRule connection string of the event hub for - azureEventHub logger. - Instrumentation key for applicationInsights logger. + azureEventHub logger. Instrumentation key for applicationInsights logger. :paramtype credentials: dict[str, str] :keyword is_buffered: Whether records are buffered in the logger before publishing. Default is assumed to be true. @@ -14202,7 +15140,7 @@ def __init__( *, logger_type: Optional[Union[str, "_models.LoggerType"]] = None, description: Optional[str] = None, - credentials: Optional[Dict[str, str]] = None, + credentials: Optional[dict[str, str]] = None, is_buffered: Optional[bool] = None, **kwargs: Any ) -> None: @@ -14225,6 +15163,70 @@ def __init__( self.is_buffered = is_buffered +class ManagedServiceIdentity(_serialization.Model): + """Managed service identity (system assigned and/or user assigned identities). + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: Type of managed service identity (where both SystemAssigned and UserAssigned types + are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and + "SystemAssigned,UserAssigned". + :vartype type: str or ~azure.mgmt.apimanagement.models.ManagedServiceIdentityType + :ivar user_assigned_identities: The set of user assigned identities associated with the + resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + The dictionary values can be empty objects ({}) in requests. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.apimanagement.models.UserAssignedIdentity] + """ + + _validation = { + "principal_id": {"readonly": True}, + "tenant_id": {"readonly": True}, + "type": {"required": True}, + } + + _attribute_map = { + "principal_id": {"key": "principalId", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{UserAssignedIdentity}"}, + } + + def __init__( + self, + *, + type: Union[str, "_models.ManagedServiceIdentityType"], + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword type: Type of managed service identity (where both SystemAssigned and UserAssigned + types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and + "SystemAssigned,UserAssigned". + :paramtype type: str or ~azure.mgmt.apimanagement.models.ManagedServiceIdentityType + :keyword user_assigned_identities: The set of user assigned identities associated with the + resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + The dictionary values can be empty objects ({}) in requests. + :paramtype user_assigned_identities: dict[str, + ~azure.mgmt.apimanagement.models.UserAssignedIdentity] + """ + super().__init__(**kwargs) + self.principal_id: Optional[str] = None + self.tenant_id: Optional[str] = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + class MigrateToStv2Contract(_serialization.Model): """Describes an available API Management SKU. @@ -14267,7 +15269,7 @@ class NamedValueCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.NamedValueContract"]] = None, + value: Optional[list["_models.NamedValueContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -14292,7 +15294,7 @@ class NamedValueContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -14342,7 +15344,7 @@ class NamedValueContract(ProxyResource): def __init__( self, *, - tags: Optional[List[str]] = None, + tags: Optional[list[str]] = None, secret: Optional[bool] = None, display_name: Optional[str] = None, value: Optional[str] = None, @@ -14371,7 +15373,7 @@ def __init__( self.display_name = display_name self.value = value self.key_vault = key_vault - self.provisioning_state = None + self.provisioning_state: Optional[str] = None class NamedValueEntityBaseParameters(_serialization.Model): @@ -14393,7 +15395,7 @@ class NamedValueEntityBaseParameters(_serialization.Model): "secret": {"key": "secret", "type": "bool"}, } - def __init__(self, *, tags: Optional[List[str]] = None, secret: Optional[bool] = None, **kwargs: Any) -> None: + def __init__(self, *, tags: Optional[list[str]] = None, secret: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword tags: Optional tags that when provided can be used to filter the NamedValue list. :paramtype tags: list[str] @@ -14451,7 +15453,7 @@ def __init__( self, *, display_name: str, - tags: Optional[List[str]] = None, + tags: Optional[list[str]] = None, secret: Optional[bool] = None, value: Optional[str] = None, key_vault: Optional["_models.KeyVaultContractProperties"] = None, @@ -14477,7 +15479,7 @@ def __init__( self.display_name = display_name self.value = value self.key_vault = key_vault - self.provisioning_state = None + self.provisioning_state: Optional[str] = None class NamedValueCreateContract(ProxyResource): @@ -14486,7 +15488,7 @@ class NamedValueCreateContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -14532,7 +15534,7 @@ class NamedValueCreateContract(ProxyResource): def __init__( self, *, - tags: Optional[List[str]] = None, + tags: Optional[list[str]] = None, secret: Optional[bool] = None, display_name: Optional[str] = None, value: Optional[str] = None, @@ -14602,7 +15604,7 @@ def __init__( self, *, display_name: str, - tags: Optional[List[str]] = None, + tags: Optional[list[str]] = None, secret: Optional[bool] = None, value: Optional[str] = None, key_vault: Optional["_models.KeyVaultContractCreateProperties"] = None, @@ -14685,7 +15687,7 @@ class NamedValueUpdateParameterProperties(NamedValueEntityBaseParameters): def __init__( self, *, - tags: Optional[List[str]] = None, + tags: Optional[list[str]] = None, secret: Optional[bool] = None, display_name: Optional[str] = None, value: Optional[str] = None, @@ -14748,7 +15750,7 @@ class NamedValueUpdateParameters(_serialization.Model): def __init__( self, *, - tags: Optional[List[str]] = None, + tags: Optional[list[str]] = None, secret: Optional[bool] = None, display_name: Optional[str] = None, value: Optional[str] = None, @@ -14801,7 +15803,7 @@ class NetworkStatusContract(_serialization.Model): } def __init__( - self, *, dns_servers: List[str], connectivity_status: List["_models.ConnectivityStatusContract"], **kwargs: Any + self, *, dns_servers: list[str], connectivity_status: list["_models.ConnectivityStatusContract"], **kwargs: Any ) -> None: """ :keyword dns_servers: Gets the list of DNS servers IPV4 addresses. Required. @@ -14872,7 +15874,7 @@ class NotificationCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.NotificationContract"]] = None, + value: Optional[list["_models.NotificationContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -14897,7 +15899,7 @@ class NotificationContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -14997,7 +15999,7 @@ def __init__( self, *, openid_provider_id: Optional[str] = None, - bearer_token_sending_methods: Optional[List[Union[str, "_models.BearerTokenSendingMethods"]]] = None, + bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethods"]]] = None, **kwargs: Any ) -> None: """ @@ -15032,7 +16034,7 @@ class OpenIdConnectProviderCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.OpenidConnectProviderContract"]] = None, + value: Optional[list["_models.OpenidConnectProviderContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -15057,7 +16059,7 @@ class OpenidConnectProviderContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -15293,9 +16295,9 @@ def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: :paramtype count: int """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.OperationContract"]] = None self.count = count - self.next_link = None + self.next_link: Optional[str] = None class OperationContract(ProxyResource): @@ -15304,7 +16306,7 @@ class OperationContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -15357,10 +16359,10 @@ class OperationContract(ProxyResource): def __init__( self, *, - template_parameters: Optional[List["_models.ParameterContract"]] = None, + template_parameters: Optional[list["_models.ParameterContract"]] = None, description: Optional[str] = None, request: Optional["_models.RequestContract"] = None, - responses: Optional[List["_models.ResponseContract"]] = None, + responses: Optional[list["_models.ResponseContract"]] = None, policies: Optional[str] = None, display_name: Optional[str] = None, method: Optional[str] = None, @@ -15428,10 +16430,10 @@ class OperationEntityBaseContract(_serialization.Model): def __init__( self, *, - template_parameters: Optional[List["_models.ParameterContract"]] = None, + template_parameters: Optional[list["_models.ParameterContract"]] = None, description: Optional[str] = None, request: Optional["_models.RequestContract"] = None, - responses: Optional[List["_models.ResponseContract"]] = None, + responses: Optional[list["_models.ResponseContract"]] = None, policies: Optional[str] = None, **kwargs: Any ) -> None: @@ -15504,10 +16506,10 @@ def __init__( display_name: str, method: str, url_template: str, - template_parameters: Optional[List["_models.ParameterContract"]] = None, + template_parameters: Optional[list["_models.ParameterContract"]] = None, description: Optional[str] = None, request: Optional["_models.RequestContract"] = None, - responses: Optional[List["_models.ResponseContract"]] = None, + responses: Optional[list["_models.ResponseContract"]] = None, policies: Optional[str] = None, **kwargs: Any ) -> None: @@ -15607,7 +16609,7 @@ class OperationListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: List of operations supported by the resource provider. @@ -15626,7 +16628,7 @@ class OperationResultContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -15709,7 +16711,7 @@ def __init__( self.updated = updated self.result_info = result_info self.error = error - self.action_log = None + self.action_log: Optional[list["_models.OperationResultLogItemContract"]] = None class OperationResultLogItemContract(_serialization.Model): @@ -15806,7 +16808,7 @@ def __init__( percent_complete: Optional[float] = None, start_time: Optional[datetime.datetime] = None, end_time: Optional[datetime.datetime] = None, - operations: Optional[List["_models.OperationStatusResult"]] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any ) -> None: @@ -15830,7 +16832,7 @@ def __init__( """ super().__init__(**kwargs) self.id = id - self.resource_id = None + self.resource_id: Optional[str] = None self.name = name self.status = status self.percent_complete = percent_complete @@ -15893,13 +16895,13 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin """ super().__init__(**kwargs) self.id = id - self.name = None - self.api_name = None - self.api_revision = None - self.api_version = None - self.description = None - self.method = None - self.url_template = None + self.name: Optional[str] = None + self.api_name: Optional[str] = None + self.api_revision: Optional[str] = None + self.api_version: Optional[str] = None + self.description: Optional[str] = None + self.method: Optional[str] = None + self.url_template: Optional[str] = None class OperationUpdateContract(_serialization.Model): @@ -15945,10 +16947,10 @@ class OperationUpdateContract(_serialization.Model): def __init__( self, *, - template_parameters: Optional[List["_models.ParameterContract"]] = None, + template_parameters: Optional[list["_models.ParameterContract"]] = None, description: Optional[str] = None, request: Optional["_models.RequestContract"] = None, - responses: Optional[List["_models.ResponseContract"]] = None, + responses: Optional[list["_models.ResponseContract"]] = None, policies: Optional[str] = None, display_name: Optional[str] = None, method: Optional[str] = None, @@ -16029,10 +17031,10 @@ class OperationUpdateContractProperties(OperationEntityBaseContract): def __init__( self, *, - template_parameters: Optional[List["_models.ParameterContract"]] = None, + template_parameters: Optional[list["_models.ParameterContract"]] = None, description: Optional[str] = None, request: Optional["_models.RequestContract"] = None, - responses: Optional[List["_models.ResponseContract"]] = None, + responses: Optional[list["_models.ResponseContract"]] = None, policies: Optional[str] = None, display_name: Optional[str] = None, method: Optional[str] = None, @@ -16092,7 +17094,7 @@ def __init__( self, *, category: Optional[str] = None, - endpoints: Optional[List["_models.EndpointDependency"]] = None, + endpoints: Optional[list["_models.EndpointDependency"]] = None, **kwargs: Any ) -> None: """ @@ -16130,14 +17132,14 @@ class OutboundEnvironmentEndpointList(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: + def __init__(self, *, value: list["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: """ :keyword value: Collection of resources. Required. :paramtype value: list[~azure.mgmt.apimanagement.models.OutboundEnvironmentEndpoint] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class ParameterContract(_serialization.Model): @@ -16190,10 +17192,10 @@ def __init__( description: Optional[str] = None, default_value: Optional[str] = None, required: Optional[bool] = None, - values: Optional[List[str]] = None, + values: Optional[list[str]] = None, schema_id: Optional[str] = None, type_name: Optional[str] = None, - examples: Optional[Dict[str, "_models.ParameterExampleContract"]] = None, + examples: Optional[dict[str, "_models.ParameterExampleContract"]] = None, **kwargs: Any ) -> None: """ @@ -16326,7 +17328,7 @@ class PolicyCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.PolicyContract"]] = None, + value: Optional[list["_models.PolicyContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -16351,7 +17353,7 @@ class PolicyContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -16411,7 +17413,7 @@ class PolicyDescriptionCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.PolicyDescriptionContract"]] = None, + value: Optional[list["_models.PolicyDescriptionContract"]] = None, count: Optional[int] = None, **kwargs: Any ) -> None: @@ -16432,7 +17434,7 @@ class PolicyDescriptionContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -16464,8 +17466,8 @@ class PolicyDescriptionContract(ProxyResource): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.description = None - self.scope = None + self.description: Optional[str] = None + self.scope: Optional[int] = None class PolicyFragmentCollection(_serialization.Model): @@ -16488,7 +17490,7 @@ class PolicyFragmentCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.PolicyFragmentContract"]] = None, + value: Optional[list["_models.PolicyFragmentContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -16513,7 +17515,7 @@ class PolicyFragmentContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -16568,7 +17570,7 @@ def __init__( self.value = value self.description = description self.format = format - self.provisioning_state = None + self.provisioning_state: Optional[str] = None class PolicyRestrictionCollection(_serialization.Model): @@ -16588,7 +17590,7 @@ class PolicyRestrictionCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.PolicyRestrictionContract"]] = None, + value: Optional[list["_models.PolicyRestrictionContract"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -16609,7 +17611,7 @@ class PolicyRestrictionContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -16707,7 +17709,7 @@ class PolicyWithComplianceCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.PolicyWithComplianceContract"]] = None, + value: Optional[list["_models.PolicyWithComplianceContract"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -16728,7 +17730,7 @@ class PolicyWithComplianceContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -16795,14 +17797,14 @@ class PortalConfigCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.PortalConfigContract"]] = None, **kwargs: Any) -> None: + def __init__(self, *, value: Optional[list["_models.PortalConfigContract"]] = None, **kwargs: Any) -> None: """ :keyword value: The developer portal configurations. :paramtype value: list[~azure.mgmt.apimanagement.models.PortalConfigContract] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class PortalConfigContract(ProxyResource): @@ -16811,7 +17813,7 @@ class PortalConfigContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -16895,7 +17897,7 @@ class PortalConfigCorsProperties(_serialization.Model): "allowed_origins": {"key": "allowedOrigins", "type": "[str]"}, } - def __init__(self, *, allowed_origins: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, allowed_origins: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword allowed_origins: Allowed origins, e.g. ``https://trusted.com``. :paramtype allowed_origins: list[str] @@ -16927,8 +17929,8 @@ def __init__( self, *, mode: Union[str, "_models.PortalSettingsCspMode"] = "disabled", - report_uri: Optional[List[str]] = None, - allowed_sources: Optional[List[str]] = None, + report_uri: Optional[list[str]] = None, + allowed_sources: Optional[list[str]] = None, **kwargs: Any ) -> None: """ @@ -17071,7 +18073,7 @@ class PortalDelegationSettings(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -17160,8 +18162,8 @@ class PortalRevisionCollection(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.PortalRevisionContract"]] = None + self.next_link: Optional[str] = None class PortalRevisionContract(ProxyResource): @@ -17170,7 +18172,7 @@ class PortalRevisionContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -17228,12 +18230,12 @@ def __init__(self, *, description: Optional[str] = None, is_current: Optional[bo """ super().__init__(**kwargs) self.description = description - self.status_details = None - self.status = None + self.status_details: Optional[str] = None + self.status: Optional[Union[str, "_models.PortalRevisionStatus"]] = None self.is_current = is_current - self.created_date_time = None - self.updated_date_time = None - self.provisioning_state = None + self.created_date_time: Optional[datetime.datetime] = None + self.updated_date_time: Optional[datetime.datetime] = None + self.provisioning_state: Optional[str] = None class PortalSettingsCollection(_serialization.Model): @@ -17253,7 +18255,7 @@ class PortalSettingsCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.PortalSettingsContract"]] = None, + value: Optional[list["_models.PortalSettingsContract"]] = None, count: Optional[int] = None, **kwargs: Any ) -> None: @@ -17274,7 +18276,7 @@ class PortalSettingsContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -17379,7 +18381,7 @@ class PortalSigninSettings(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -17418,7 +18420,7 @@ class PortalSignupSettings(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -17483,7 +18485,7 @@ class PrivateEndpoint(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None + self.id: Optional[str] = None class PrivateEndpointConnection(Resource): @@ -17492,7 +18494,7 @@ class PrivateEndpointConnection(Resource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -17548,7 +18550,7 @@ def __init__( super().__init__(**kwargs) self.private_endpoint = private_endpoint self.private_link_service_connection_state = private_link_service_connection_state - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.PrivateEndpointConnectionProvisioningState"]] = None class PrivateEndpointConnectionListResult(_serialization.Model): @@ -17562,7 +18564,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: + def __init__(self, *, value: Optional[list["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: Array of private endpoint connections. :paramtype value: list[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] @@ -17643,7 +18645,7 @@ class PrivateLinkResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -17675,14 +18677,14 @@ class PrivateLinkResource(Resource): "required_zone_names": {"key": "properties.requiredZoneNames", "type": "[str]"}, } - def __init__(self, *, required_zone_names: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, required_zone_names: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword required_zone_names: The private link resource Private link DNS zone name. :paramtype required_zone_names: list[str] """ super().__init__(**kwargs) - self.group_id = None - self.required_members = None + self.group_id: Optional[str] = None + self.required_members: Optional[list[str]] = None self.required_zone_names = required_zone_names @@ -17697,7 +18699,7 @@ class PrivateLinkResourceListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: + def __init__(self, *, value: Optional[list["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: Array of private link resources. :paramtype value: list[~azure.mgmt.apimanagement.models.PrivateLinkResource] @@ -17771,7 +18773,7 @@ class ProductApiLinkCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.ProductApiLinkContract"]] = None, + value: Optional[list["_models.ProductApiLinkContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -17796,7 +18798,7 @@ class ProductApiLinkContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -17829,6 +18831,58 @@ def __init__(self, *, api_id: Optional[str] = None, **kwargs: Any) -> None: self.api_id = api_id +class ProductApplicationContract(_serialization.Model): + """Specifies Microsoft Entra settings needed to authorize product API calls using client + applications. + + :ivar entra: Specifies Microsoft Entra settings needed to authorize product API calls using + client application with Microsoft Entra OAuth token. + :vartype entra: ~azure.mgmt.apimanagement.models.ProductApplicationContractEntra + """ + + _attribute_map = { + "entra": {"key": "entra", "type": "ProductApplicationContractEntra"}, + } + + def __init__(self, *, entra: Optional["_models.ProductApplicationContractEntra"] = None, **kwargs: Any) -> None: + """ + :keyword entra: Specifies Microsoft Entra settings needed to authorize product API calls using + client application with Microsoft Entra OAuth token. + :paramtype entra: ~azure.mgmt.apimanagement.models.ProductApplicationContractEntra + """ + super().__init__(**kwargs) + self.entra = entra + + +class ProductApplicationContractEntra(_serialization.Model): + """Specifies Microsoft Entra settings needed to authorize product API calls using client + application with Microsoft Entra OAuth token. + + :ivar application_id: Product facing EntraID application client ID. + :vartype application_id: str + :ivar audience: The EntraID application audience claim. The audience claim is used to validate + the token. + :vartype audience: str + """ + + _attribute_map = { + "application_id": {"key": "applicationId", "type": "str"}, + "audience": {"key": "audience", "type": "str"}, + } + + def __init__(self, *, application_id: Optional[str] = None, audience: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword application_id: Product facing EntraID application client ID. + :paramtype application_id: str + :keyword audience: The EntraID application audience claim. The audience claim is used to + validate the token. + :paramtype audience: str + """ + super().__init__(**kwargs) + self.application_id = application_id + self.audience = audience + + class ProductCollection(_serialization.Model): """Paged Products list representation. @@ -17849,7 +18903,7 @@ class ProductCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.ProductContract"]] = None, + value: Optional[list["_models.ProductContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -17874,7 +18928,7 @@ class ProductContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -17903,6 +18957,14 @@ class ProductContract(ProxyResource): at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :vartype subscriptions_limit: int + :ivar authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :ivar application: Specifies identity provider settings needed to authorize applications API + calls. + :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication :ivar state: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Known values are: "notPublished" and "published". @@ -17928,6 +18990,8 @@ class ProductContract(ProxyResource): "subscription_required": {"key": "properties.subscriptionRequired", "type": "bool"}, "approval_required": {"key": "properties.approvalRequired", "type": "bool"}, "subscriptions_limit": {"key": "properties.subscriptionsLimit", "type": "int"}, + "authentication_type": {"key": "properties.authenticationType", "type": "[str]"}, + "application": {"key": "properties.application", "type": "ProductEntityBaseParametersApplication"}, "state": {"key": "properties.state", "type": "str"}, "display_name": {"key": "properties.displayName", "type": "str"}, } @@ -17940,6 +19004,8 @@ def __init__( subscription_required: Optional[bool] = None, approval_required: Optional[bool] = None, subscriptions_limit: Optional[int] = None, + authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, + application: Optional["_models.ProductEntityBaseParametersApplication"] = None, state: Optional[Union[str, "_models.ProductState"]] = None, display_name: Optional[str] = None, **kwargs: Any @@ -17967,6 +19033,14 @@ def __init__( product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :paramtype subscriptions_limit: int + :keyword authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :paramtype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :keyword application: Specifies identity provider settings needed to authorize applications API + calls. + :paramtype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication :keyword state: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Known values are: "notPublished" and "published". @@ -17980,6 +19054,8 @@ def __init__( self.subscription_required = subscription_required self.approval_required = approval_required self.subscriptions_limit = subscriptions_limit + self.authentication_type = authentication_type + self.application = application self.state = state self.display_name = display_name @@ -18009,6 +19085,14 @@ class ProductEntityBaseParameters(_serialization.Model): at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :vartype subscriptions_limit: int + :ivar authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :ivar application: Specifies identity provider settings needed to authorize applications API + calls. + :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication :ivar state: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Known values are: "notPublished" and "published". @@ -18025,6 +19109,8 @@ class ProductEntityBaseParameters(_serialization.Model): "subscription_required": {"key": "subscriptionRequired", "type": "bool"}, "approval_required": {"key": "approvalRequired", "type": "bool"}, "subscriptions_limit": {"key": "subscriptionsLimit", "type": "int"}, + "authentication_type": {"key": "authenticationType", "type": "[str]"}, + "application": {"key": "application", "type": "ProductEntityBaseParametersApplication"}, "state": {"key": "state", "type": "str"}, } @@ -18036,6 +19122,8 @@ def __init__( subscription_required: Optional[bool] = None, approval_required: Optional[bool] = None, subscriptions_limit: Optional[int] = None, + authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, + application: Optional["_models.ProductEntityBaseParametersApplication"] = None, state: Optional[Union[str, "_models.ProductState"]] = None, **kwargs: Any ) -> None: @@ -18062,6 +19150,14 @@ def __init__( product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :paramtype subscriptions_limit: int + :keyword authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :paramtype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :keyword application: Specifies identity provider settings needed to authorize applications API + calls. + :paramtype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication :keyword state: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Known values are: "notPublished" and "published". @@ -18073,6 +19169,8 @@ def __init__( self.subscription_required = subscription_required self.approval_required = approval_required self.subscriptions_limit = subscriptions_limit + self.authentication_type = authentication_type + self.application = application self.state = state @@ -18103,6 +19201,14 @@ class ProductContractProperties(ProductEntityBaseParameters): at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :vartype subscriptions_limit: int + :ivar authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :ivar application: Specifies identity provider settings needed to authorize applications API + calls. + :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication :ivar state: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Known values are: "notPublished" and "published". @@ -18122,6 +19228,8 @@ class ProductContractProperties(ProductEntityBaseParameters): "subscription_required": {"key": "subscriptionRequired", "type": "bool"}, "approval_required": {"key": "approvalRequired", "type": "bool"}, "subscriptions_limit": {"key": "subscriptionsLimit", "type": "int"}, + "authentication_type": {"key": "authenticationType", "type": "[str]"}, + "application": {"key": "application", "type": "ProductEntityBaseParametersApplication"}, "state": {"key": "state", "type": "str"}, "display_name": {"key": "displayName", "type": "str"}, } @@ -18135,6 +19243,8 @@ def __init__( subscription_required: Optional[bool] = None, approval_required: Optional[bool] = None, subscriptions_limit: Optional[int] = None, + authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, + application: Optional["_models.ProductEntityBaseParametersApplication"] = None, state: Optional[Union[str, "_models.ProductState"]] = None, **kwargs: Any ) -> None: @@ -18161,6 +19271,14 @@ def __init__( product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :paramtype subscriptions_limit: int + :keyword authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :paramtype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :keyword application: Specifies identity provider settings needed to authorize applications API + calls. + :paramtype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication :keyword state: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Known values are: "notPublished" and "published". @@ -18174,12 +19292,23 @@ def __init__( subscription_required=subscription_required, approval_required=approval_required, subscriptions_limit=subscriptions_limit, + authentication_type=authentication_type, + application=application, state=state, **kwargs ) self.display_name = display_name +class ProductEntityBaseParametersApplication(ProductApplicationContract): + """Specifies identity provider settings needed to authorize applications API calls. + + :ivar entra: Specifies Microsoft Entra settings needed to authorize product API calls using + client application with Microsoft Entra OAuth token. + :vartype entra: ~azure.mgmt.apimanagement.models.ProductApplicationContractEntra + """ + + class ProductGroupLinkCollection(_serialization.Model): """Paged Product-group link list representation. @@ -18200,7 +19329,7 @@ class ProductGroupLinkCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.ProductGroupLinkContract"]] = None, + value: Optional[list["_models.ProductGroupLinkContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -18225,7 +19354,7 @@ class ProductGroupLinkContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -18285,6 +19414,14 @@ class ProductTagResourceContractProperties(ProductEntityBaseParameters): at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :vartype subscriptions_limit: int + :ivar authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :ivar application: Specifies identity provider settings needed to authorize applications API + calls. + :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication :ivar state: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Known values are: "notPublished" and "published". @@ -18306,6 +19443,8 @@ class ProductTagResourceContractProperties(ProductEntityBaseParameters): "subscription_required": {"key": "subscriptionRequired", "type": "bool"}, "approval_required": {"key": "approvalRequired", "type": "bool"}, "subscriptions_limit": {"key": "subscriptionsLimit", "type": "int"}, + "authentication_type": {"key": "authenticationType", "type": "[str]"}, + "application": {"key": "application", "type": "ProductEntityBaseParametersApplication"}, "state": {"key": "state", "type": "str"}, "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, @@ -18320,6 +19459,8 @@ def __init__( subscription_required: Optional[bool] = None, approval_required: Optional[bool] = None, subscriptions_limit: Optional[int] = None, + authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, + application: Optional["_models.ProductEntityBaseParametersApplication"] = None, state: Optional[Union[str, "_models.ProductState"]] = None, id: Optional[str] = None, # pylint: disable=redefined-builtin **kwargs: Any @@ -18347,6 +19488,14 @@ def __init__( product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :paramtype subscriptions_limit: int + :keyword authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :paramtype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :keyword application: Specifies identity provider settings needed to authorize applications API + calls. + :paramtype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication :keyword state: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Known values are: "notPublished" and "published". @@ -18362,6 +19511,8 @@ def __init__( subscription_required=subscription_required, approval_required=approval_required, subscriptions_limit=subscriptions_limit, + authentication_type=authentication_type, + application=application, state=state, **kwargs ) @@ -18394,6 +19545,14 @@ class ProductUpdateParameters(_serialization.Model): at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :vartype subscriptions_limit: int + :ivar authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :ivar application: Specifies identity provider settings needed to authorize applications API + calls. + :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication :ivar state: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Known values are: "notPublished" and "published". @@ -18413,6 +19572,8 @@ class ProductUpdateParameters(_serialization.Model): "subscription_required": {"key": "properties.subscriptionRequired", "type": "bool"}, "approval_required": {"key": "properties.approvalRequired", "type": "bool"}, "subscriptions_limit": {"key": "properties.subscriptionsLimit", "type": "int"}, + "authentication_type": {"key": "properties.authenticationType", "type": "[str]"}, + "application": {"key": "properties.application", "type": "ProductEntityBaseParametersApplication"}, "state": {"key": "properties.state", "type": "str"}, "display_name": {"key": "properties.displayName", "type": "str"}, } @@ -18425,6 +19586,8 @@ def __init__( subscription_required: Optional[bool] = None, approval_required: Optional[bool] = None, subscriptions_limit: Optional[int] = None, + authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, + application: Optional["_models.ProductEntityBaseParametersApplication"] = None, state: Optional[Union[str, "_models.ProductState"]] = None, display_name: Optional[str] = None, **kwargs: Any @@ -18452,6 +19615,14 @@ def __init__( product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :paramtype subscriptions_limit: int + :keyword authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :paramtype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :keyword application: Specifies identity provider settings needed to authorize applications API + calls. + :paramtype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication :keyword state: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Known values are: "notPublished" and "published". @@ -18465,6 +19636,8 @@ def __init__( self.subscription_required = subscription_required self.approval_required = approval_required self.subscriptions_limit = subscriptions_limit + self.authentication_type = authentication_type + self.application = application self.state = state self.display_name = display_name @@ -18494,6 +19667,14 @@ class ProductUpdateProperties(ProductEntityBaseParameters): at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :vartype subscriptions_limit: int + :ivar authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :ivar application: Specifies identity provider settings needed to authorize applications API + calls. + :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication :ivar state: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Known values are: "notPublished" and "published". @@ -18513,6 +19694,8 @@ class ProductUpdateProperties(ProductEntityBaseParameters): "subscription_required": {"key": "subscriptionRequired", "type": "bool"}, "approval_required": {"key": "approvalRequired", "type": "bool"}, "subscriptions_limit": {"key": "subscriptionsLimit", "type": "int"}, + "authentication_type": {"key": "authenticationType", "type": "[str]"}, + "application": {"key": "application", "type": "ProductEntityBaseParametersApplication"}, "state": {"key": "state", "type": "str"}, "display_name": {"key": "displayName", "type": "str"}, } @@ -18525,6 +19708,8 @@ def __init__( subscription_required: Optional[bool] = None, approval_required: Optional[bool] = None, subscriptions_limit: Optional[int] = None, + authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, + application: Optional["_models.ProductEntityBaseParametersApplication"] = None, state: Optional[Union[str, "_models.ProductState"]] = None, display_name: Optional[str] = None, **kwargs: Any @@ -18552,6 +19737,14 @@ def __init__( product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. :paramtype subscriptions_limit: int + :keyword authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :paramtype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :keyword application: Specifies identity provider settings needed to authorize applications API + calls. + :paramtype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication :keyword state: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Known values are: "notPublished" and "published". @@ -18565,6 +19758,8 @@ def __init__( subscription_required=subscription_required, approval_required=approval_required, subscriptions_limit=subscriptions_limit, + authentication_type=authentication_type, + application=application, state=state, **kwargs ) @@ -18591,7 +19786,7 @@ class QuotaCounterCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.QuotaCounterContract"]] = None, + value: Optional[list["_models.QuotaCounterContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -18782,7 +19977,7 @@ class RecipientEmailCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.RecipientEmailContract"]] = None, + value: Optional[list["_models.RecipientEmailContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -18807,7 +20002,7 @@ class RecipientEmailContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -18854,7 +20049,7 @@ class RecipientsContractProperties(_serialization.Model): "users": {"key": "users", "type": "[str]"}, } - def __init__(self, *, emails: Optional[List[str]] = None, users: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, emails: Optional[list[str]] = None, users: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword emails: List of Emails subscribed for the notification. :paramtype emails: list[str] @@ -18886,7 +20081,7 @@ class RecipientUserCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.RecipientUserContract"]] = None, + value: Optional[list["_models.RecipientUserContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -18911,7 +20106,7 @@ class RecipientUserContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -18977,7 +20172,7 @@ def __init__( :paramtype is_deleted: bool """ super().__init__(**kwargs) - self.name = None + self.name: Optional[str] = None self.is_master_region = is_master_region self.is_deleted = is_deleted @@ -19002,7 +20197,7 @@ class RegionListResult(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.RegionContract"]] = None, + value: Optional[list["_models.RegionContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -19112,8 +20307,8 @@ def __init__( self.type = type self.private_endpoint = private_endpoint self.private_link_service_connection_state = private_link_service_connection_state - self.provisioning_state = None - self.group_ids = None + self.provisioning_state: Optional[str] = None + self.group_ids: Optional[list[str]] = None class ReportCollection(_serialization.Model): @@ -19136,7 +20331,7 @@ class ReportCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.ReportRecordContract"]] = None, + value: Optional[list["_models.ReportRecordContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -19352,8 +20547,8 @@ def __init__( # pylint: disable=too-many-locals self.country = country self.region = region self.zip = zip - self.user_id = None - self.product_id = None + self.user_id: Optional[str] = None + self.product_id: Optional[str] = None self.api_id = api_id self.operation_id = operation_id self.api_region = api_region @@ -19413,8 +20608,8 @@ def __init__( content_type: str, schema_id: Optional[str] = None, type_name: Optional[str] = None, - form_parameters: Optional[List["_models.ParameterContract"]] = None, - examples: Optional[Dict[str, "_models.ParameterExampleContract"]] = None, + form_parameters: Optional[list["_models.ParameterContract"]] = None, + examples: Optional[dict[str, "_models.ParameterExampleContract"]] = None, **kwargs: Any ) -> None: """ @@ -19465,9 +20660,9 @@ def __init__( self, *, description: Optional[str] = None, - query_parameters: Optional[List["_models.ParameterContract"]] = None, - headers: Optional[List["_models.ParameterContract"]] = None, - representations: Optional[List["_models.RepresentationContract"]] = None, + query_parameters: Optional[list["_models.ParameterContract"]] = None, + headers: Optional[list["_models.ParameterContract"]] = None, + representations: Optional[list["_models.RepresentationContract"]] = None, **kwargs: Any ) -> None: """ @@ -19504,7 +20699,7 @@ class RequestReportCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.RequestReportRecordContract"]] = None, + value: Optional[list["_models.RequestReportRecordContract"]] = None, count: Optional[int] = None, **kwargs: Any ) -> None: @@ -19658,8 +20853,8 @@ def __init__( super().__init__(**kwargs) self.api_id = api_id self.operation_id = operation_id - self.product_id = None - self.user_id = None + self.product_id: Optional[str] = None + self.user_id: Optional[str] = None self.method = method self.url = url self.ip_address = ip_address @@ -19706,9 +20901,9 @@ def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: :paramtype count: int """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.ResolverContract"]] = None self.count = count - self.next_link = None + self.next_link: Optional[str] = None class ResolverContract(ProxyResource): @@ -19717,7 +20912,7 @@ class ResolverContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -19778,7 +20973,7 @@ class ResolverResultContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -19861,7 +21056,7 @@ def __init__( self.updated = updated self.result_info = result_info self.error = error - self.action_log = None + self.action_log: Optional[list["_models.ResolverResultLogItemContract"]] = None class ResolverResultLogItemContract(_serialization.Model): @@ -19968,7 +21163,7 @@ class ResourceCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.ResourceCollectionValueItem"]] = None, + value: Optional[list["_models.ResourceCollectionValueItem"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -19993,7 +21188,7 @@ class ResourceCollectionValueItem(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -20062,7 +21257,7 @@ class ResourceSku(_serialization.Model): """Describes an available API Management SKU. :ivar name: Name of the Sku. Known values are: "Developer", "Standard", "Premium", "Basic", - "Consumption", "Isolated", "BasicV2", and "StandardV2". + "Consumption", "Isolated", "BasicV2", "StandardV2", and "PremiumV2". :vartype name: str or ~azure.mgmt.apimanagement.models.SkuType """ @@ -20073,7 +21268,7 @@ class ResourceSku(_serialization.Model): def __init__(self, *, name: Optional[Union[str, "_models.SkuType"]] = None, **kwargs: Any) -> None: """ :keyword name: Name of the Sku. Known values are: "Developer", "Standard", "Premium", "Basic", - "Consumption", "Isolated", "BasicV2", and "StandardV2". + "Consumption", "Isolated", "BasicV2", "StandardV2", and "PremiumV2". :paramtype name: str or ~azure.mgmt.apimanagement.models.SkuType """ super().__init__(**kwargs) @@ -20113,10 +21308,10 @@ class ResourceSkuCapacity(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None + self.minimum: Optional[int] = None + self.maximum: Optional[int] = None + self.default: Optional[int] = None + self.scale_type: Optional[Union[str, "_models.ResourceSkuCapacityScaleType"]] = None class ResourceSkuResult(_serialization.Model): @@ -20147,9 +21342,9 @@ class ResourceSkuResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None + self.resource_type: Optional[str] = None + self.sku: Optional["_models.ResourceSku"] = None + self.capacity: Optional["_models.ResourceSkuCapacity"] = None class ResourceSkuResults(_serialization.Model): @@ -20173,7 +21368,7 @@ class ResourceSkuResults(_serialization.Model): } def __init__( - self, *, value: List["_models.ResourceSkuResult"], next_link: Optional[str] = None, **kwargs: Any + self, *, value: list["_models.ResourceSkuResult"], next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: The list of skus available for the service. Required. @@ -20217,8 +21412,8 @@ def __init__( *, status_code: int, description: Optional[str] = None, - representations: Optional[List["_models.RepresentationContract"]] = None, - headers: Optional[List["_models.ParameterContract"]] = None, + representations: Optional[list["_models.RepresentationContract"]] = None, + headers: Optional[list["_models.ParameterContract"]] = None, **kwargs: Any ) -> None: """ @@ -20333,9 +21528,9 @@ def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: :paramtype count: int """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.SchemaContract"]] = None self.count = count - self.next_link = None + self.next_link: Optional[str] = None class SchemaContract(ProxyResource): @@ -20344,7 +21539,7 @@ class SchemaContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -20419,7 +21614,7 @@ def __init__( """ super().__init__(**kwargs) self.content_type = content_type - self.provisioning_state = None + self.provisioning_state: Optional[str] = None self.value = value self.definitions = definitions self.components = components @@ -20445,7 +21640,7 @@ class SubscriptionCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.SubscriptionContract"]] = None, + value: Optional[list["_models.SubscriptionContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -20470,7 +21665,7 @@ class SubscriptionContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -20624,7 +21819,7 @@ def __init__( self.scope = scope self.display_name = display_name self.state = state - self.created_date = None + self.created_date: Optional[datetime.datetime] = None self.start_date = start_date self.expiration_date = expiration_date self.end_date = end_date @@ -20997,7 +22192,7 @@ class TagApiLinkCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.TagApiLinkContract"]] = None, + value: Optional[list["_models.TagApiLinkContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -21022,7 +22217,7 @@ class TagApiLinkContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -21075,7 +22270,7 @@ class TagCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.TagContract"]] = None, + value: Optional[list["_models.TagContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -21100,7 +22295,7 @@ class TagContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -21221,7 +22416,7 @@ class TagDescriptionCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.TagDescriptionContract"]] = None, + value: Optional[list["_models.TagDescriptionContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -21246,7 +22441,7 @@ class TagDescriptionContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -21437,7 +22632,7 @@ class TagOperationLinkCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.TagOperationLinkContract"]] = None, + value: Optional[list["_models.TagOperationLinkContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -21462,7 +22657,7 @@ class TagOperationLinkContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -21515,7 +22710,7 @@ class TagProductLinkCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.TagProductLinkContract"]] = None, + value: Optional[list["_models.TagProductLinkContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -21540,7 +22735,7 @@ class TagProductLinkContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -21593,7 +22788,7 @@ class TagResourceCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.TagResourceContract"]] = None, + value: Optional[list["_models.TagResourceContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -21706,7 +22901,7 @@ class TenantConfigurationSyncStateContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -21824,8 +23019,8 @@ class TenantSettingsCollection(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.TenantSettingsContract"]] = None + self.next_link: Optional[str] = None class TenantSettingsContract(ProxyResource): @@ -21834,7 +23029,7 @@ class TenantSettingsContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -21858,7 +23053,7 @@ class TenantSettingsContract(ProxyResource): "settings": {"key": "properties.settings", "type": "{str}"}, } - def __init__(self, *, settings: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + def __init__(self, *, settings: Optional[dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword settings: Tenant settings. :paramtype settings: dict[str, str] @@ -21939,6 +23134,126 @@ def __init__(self, *, name: str, value: str, **kwargs: Any) -> None: self.value = value +class ToolCollection(_serialization.Model): + """Paged Tool list representation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: Page values of Tools contract. + :vartype value: list[~azure.mgmt.apimanagement.models.ToolContract] + :ivar next_link: Next page link if any. + :vartype next_link: str + """ + + _validation = { + "value": {"readonly": True}, + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[ToolContract]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.value: Optional[list["_models.ToolContract"]] = None + self.next_link: Optional[str] = None + + +class ToolContract(ProxyResource): + """Tool details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar display_name: Tool Name. MCP tool name must contain only letters, numbers, underscores, + and hyphens. + :vartype display_name: str + :ivar description: Description of the tool. + :vartype description: str + :ivar operation_id: Identifier of the operation this MCP tool is associated with in the form of + /apis/{apiId}/operations/{operationId}. + :vartype operation_id: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "display_name": {"max_length": 300, "min_length": 1}, + "description": {"max_length": 1000}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "display_name": {"key": "properties.displayName", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "operation_id": {"key": "properties.operationId", "type": "str"}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + operation_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword display_name: Tool Name. MCP tool name must contain only letters, numbers, + underscores, and hyphens. + :paramtype display_name: str + :keyword description: Description of the tool. + :paramtype description: str + :keyword operation_id: Identifier of the operation this MCP tool is associated with in the form + of /apis/{apiId}/operations/{operationId}. + :paramtype operation_id: str + """ + super().__init__(**kwargs) + self.display_name = display_name + self.description = description + self.operation_id = operation_id + + +class UserAssignedIdentity(_serialization.Model): + """User assigned identity properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of the assigned identity. + :vartype principal_id: str + :ivar client_id: The client ID of the assigned identity. + :vartype client_id: str + """ + + _validation = { + "principal_id": {"readonly": True}, + "client_id": {"readonly": True}, + } + + _attribute_map = { + "principal_id": {"key": "principalId", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.principal_id: Optional[str] = None + self.client_id: Optional[str] = None + + class UserCollection(_serialization.Model): """Paged Users list representation. @@ -21959,7 +23274,7 @@ class UserCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.UserContract"]] = None, + value: Optional[list["_models.UserContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -21984,7 +23299,7 @@ class UserContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -22038,7 +23353,7 @@ def __init__( *, state: Union[str, "_models.UserState"] = "active", note: Optional[str] = None, - identities: Optional[List["_models.UserIdentityContract"]] = None, + identities: Optional[list["_models.UserIdentityContract"]] = None, first_name: Optional[str] = None, last_name: Optional[str] = None, email: Optional[str] = None, @@ -22072,7 +23387,7 @@ def __init__( self.last_name = last_name self.email = email self.registration_date = registration_date - self.groups = None + self.groups: Optional[list["_models.GroupContractProperties"]] = None class UserEntityBaseParameters(_serialization.Model): @@ -22099,7 +23414,7 @@ def __init__( *, state: Union[str, "_models.UserState"] = "active", note: Optional[str] = None, - identities: Optional[List["_models.UserIdentityContract"]] = None, + identities: Optional[list["_models.UserIdentityContract"]] = None, **kwargs: Any ) -> None: """ @@ -22164,7 +23479,7 @@ def __init__( *, state: Union[str, "_models.UserState"] = "active", note: Optional[str] = None, - identities: Optional[List["_models.UserIdentityContract"]] = None, + identities: Optional[list["_models.UserIdentityContract"]] = None, first_name: Optional[str] = None, last_name: Optional[str] = None, email: Optional[str] = None, @@ -22195,7 +23510,7 @@ def __init__( self.last_name = last_name self.email = email self.registration_date = registration_date - self.groups = None + self.groups: Optional[list["_models.GroupContractProperties"]] = None class UserCreateParameterProperties(UserEntityBaseParameters): @@ -22254,7 +23569,7 @@ def __init__( last_name: str, state: Union[str, "_models.UserState"] = "active", note: Optional[str] = None, - identities: Optional[List["_models.UserIdentityContract"]] = None, + identities: Optional[list["_models.UserIdentityContract"]] = None, password: Optional[str] = None, app_type: Optional[Union[str, "_models.AppType"]] = None, confirmation: Optional[Union[str, "_models.Confirmation"]] = None, @@ -22344,7 +23659,7 @@ def __init__( *, state: Union[str, "_models.UserState"] = "active", note: Optional[str] = None, - identities: Optional[List["_models.UserIdentityContract"]] = None, + identities: Optional[list["_models.UserIdentityContract"]] = None, email: Optional[str] = None, first_name: Optional[str] = None, last_name: Optional[str] = None, @@ -22410,7 +23725,7 @@ class UserIdentityCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.UserIdentityContract"]] = None, + value: Optional[list["_models.UserIdentityContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -22587,7 +23902,7 @@ def __init__( *, state: Union[str, "_models.UserState"] = "active", note: Optional[str] = None, - identities: Optional[List["_models.UserIdentityContract"]] = None, + identities: Optional[list["_models.UserIdentityContract"]] = None, email: Optional[str] = None, password: Optional[str] = None, first_name: Optional[str] = None, @@ -22665,7 +23980,7 @@ def __init__( *, state: Union[str, "_models.UserState"] = "active", note: Optional[str] = None, - identities: Optional[List["_models.UserIdentityContract"]] = None, + identities: Optional[list["_models.UserIdentityContract"]] = None, email: Optional[str] = None, password: Optional[str] = None, first_name: Optional[str] = None, @@ -22733,8 +24048,8 @@ def __init__(self, *, subnet_resource_id: Optional[str] = None, **kwargs: Any) - :paramtype subnet_resource_id: str """ super().__init__(**kwargs) - self.vnetid = None - self.subnetname = None + self.vnetid: Optional[str] = None + self.subnetname: Optional[str] = None self.subnet_resource_id = subnet_resource_id @@ -22762,8 +24077,8 @@ class WikiCollection(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.WikiContract"]] = None + self.next_link: Optional[str] = None class WikiContract(ProxyResource): @@ -22772,7 +24087,7 @@ class WikiContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -22796,7 +24111,7 @@ class WikiContract(ProxyResource): "documents": {"key": "properties.documents", "type": "[WikiDocumentationContract]"}, } - def __init__(self, *, documents: Optional[List["_models.WikiDocumentationContract"]] = None, **kwargs: Any) -> None: + def __init__(self, *, documents: Optional[list["_models.WikiDocumentationContract"]] = None, **kwargs: Any) -> None: """ :keyword documents: Collection wiki documents included into this wiki. :paramtype documents: list[~azure.mgmt.apimanagement.models.WikiDocumentationContract] @@ -22836,7 +24151,7 @@ class WikiUpdateContract(_serialization.Model): "documents": {"key": "properties.documents", "type": "[WikiDocumentationContract]"}, } - def __init__(self, *, documents: Optional[List["_models.WikiDocumentationContract"]] = None, **kwargs: Any) -> None: + def __init__(self, *, documents: Optional[list["_models.WikiDocumentationContract"]] = None, **kwargs: Any) -> None: """ :keyword documents: Collection wiki documents included into this wiki. :paramtype documents: list[~azure.mgmt.apimanagement.models.WikiDocumentationContract] @@ -22865,7 +24180,7 @@ class WorkspaceCollection(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.WorkspaceContract"]] = None, + value: Optional[list["_models.WorkspaceContract"]] = None, count: Optional[int] = None, next_link: Optional[str] = None, **kwargs: Any @@ -22890,7 +24205,7 @@ class WorkspaceContract(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_patch.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_patch.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py index 203221376c61..22aa559c73b5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -34,6 +35,7 @@ from ._operation_operations import OperationOperations # type: ignore from ._api_wiki_operations import ApiWikiOperations # type: ignore from ._api_wikis_operations import ApiWikisOperations # type: ignore +from ._api_tool_operations import ApiToolOperations # type: ignore from ._api_export_operations import ApiExportOperations # type: ignore from ._api_version_set_operations import ApiVersionSetOperations # type: ignore from ._authorization_provider_operations import AuthorizationProviderOperations # type: ignore @@ -44,7 +46,9 @@ from ._backend_operations import BackendOperations # type: ignore from ._cache_operations import CacheOperations # type: ignore from ._certificate_operations import CertificateOperations # type: ignore -from ._api_management_client_operations import ApiManagementClientOperationsMixin # type: ignore +from ._client_application_operations import ClientApplicationOperations # type: ignore +from ._client_application_product_link_operations import ClientApplicationProductLinkOperations # type: ignore +from ._api_management_client_operations import _ApiManagementClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._content_type_operations import ContentTypeOperations # type: ignore from ._content_item_operations import ContentItemOperations # type: ignore from ._deleted_services_operations import DeletedServicesOperations # type: ignore @@ -55,6 +59,7 @@ from ._documentation_operations import DocumentationOperations # type: ignore from ._email_template_operations import EmailTemplateOperations # type: ignore from ._api_gateway_config_connection_operations import ApiGatewayConfigConnectionOperations # type: ignore +from ._api_gateway_hostname_binding_operations import ApiGatewayHostnameBindingOperations # type: ignore from ._gateway_operations import GatewayOperations # type: ignore from ._gateway_hostname_configuration_operations import GatewayHostnameConfigurationOperations # type: ignore from ._gateway_api_operations import GatewayApiOperations # type: ignore @@ -177,6 +182,7 @@ "OperationOperations", "ApiWikiOperations", "ApiWikisOperations", + "ApiToolOperations", "ApiExportOperations", "ApiVersionSetOperations", "AuthorizationProviderOperations", @@ -187,7 +193,8 @@ "BackendOperations", "CacheOperations", "CertificateOperations", - "ApiManagementClientOperationsMixin", + "ClientApplicationOperations", + "ClientApplicationProductLinkOperations", "ContentTypeOperations", "ContentItemOperations", "DeletedServicesOperations", @@ -198,6 +205,7 @@ "DocumentationOperations", "EmailTemplateOperations", "ApiGatewayConfigConnectionOperations", + "ApiGatewayHostnameBindingOperations", "GatewayOperations", "GatewayHostnameConfigurationOperations", "GatewayApiOperations", diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_all_policies_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_all_policies_operations.py index 9b59982cf647..c044bfaa1cda 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_all_policies_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_all_policies_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -44,14 +44,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/allPolicies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -90,17 +90,17 @@ class AllPoliciesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> Iterable["_models.AllPoliciesContract"]: + ) -> ItemPaged["_models.AllPoliciesContract"]: """Status of all policies of API Management services. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -174,7 +174,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py index 6382e351679b..02038ba234ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +53,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -101,14 +100,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -145,14 +144,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -196,7 +195,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -204,7 +203,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -252,7 +251,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -260,7 +259,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -307,14 +306,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -358,12 +357,12 @@ class ApiDiagnosticOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -375,7 +374,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.DiagnosticContract"]: + ) -> ItemPaged["_models.DiagnosticContract"]: """Lists all diagnostics of an API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -465,7 +464,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -528,7 +530,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -594,7 +599,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -767,7 +775,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -940,7 +951,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1013,7 +1027,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py index 013cf8f4a80c..146a1860672c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -49,14 +49,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -98,12 +98,12 @@ class ApiExportOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -172,7 +172,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiExportResult", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_config_connection_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_config_connection_operations.py index 682fc3ca9df0..4cfe5dfc36c2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_config_connection_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_config_connection_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -49,14 +49,14 @@ def build_list_by_gateway_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -89,14 +89,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -137,7 +137,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -145,7 +145,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -194,14 +194,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -249,17 +249,17 @@ class ApiGatewayConfigConnectionOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_gateway( self, resource_group_name: str, gateway_name: str, **kwargs: Any - ) -> Iterable["_models.ApiManagementGatewayConfigConnectionResource"]: + ) -> ItemPaged["_models.ApiManagementGatewayConfigConnectionResource"]: """List all API Management gateway config connections within a gateway. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -335,7 +335,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -394,7 +397,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize( @@ -465,7 +471,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -671,7 +680,10 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_hostname_binding_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_hostname_binding_operations.py new file mode 100644 index 000000000000..3a4662bbb292 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_hostname_binding_operations.py @@ -0,0 +1,967 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core import PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest, HttpResponse +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_by_gateway_request( + resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings", + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "gatewayName": _SERIALIZER.url( + "gateway_name", + gateway_name, + "str", + max_length=45, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + resource_group_name: str, gateway_name: str, hostname_binding_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}", + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "gatewayName": _SERIALIZER.url( + "gateway_name", + gateway_name, + "str", + max_length=45, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "hostnameBindingName": _SERIALIZER.url( + "hostname_binding_name", + hostname_binding_name, + "str", + max_length=45, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + subscription_id: str, + *, + if_match: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}", + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "gatewayName": _SERIALIZER.url( + "gateway_name", + gateway_name, + "str", + max_length=45, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "hostnameBindingName": _SERIALIZER.url( + "hostname_binding_name", + hostname_binding_name, + "str", + max_length=45, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + subscription_id: str, + *, + if_match: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}", + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "gatewayName": _SERIALIZER.url( + "gateway_name", + gateway_name, + "str", + max_length=45, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "hostnameBindingName": _SERIALIZER.url( + "hostname_binding_name", + hostname_binding_name, + "str", + max_length=45, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_refresh_secret_request( + resource_group_name: str, gateway_name: str, hostname_binding_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}/refreshSecret", + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "gatewayName": _SERIALIZER.url( + "gateway_name", + gateway_name, + "str", + max_length=45, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "hostnameBindingName": _SERIALIZER.url( + "hostname_binding_name", + hostname_binding_name, + "str", + max_length=45, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class ApiGatewayHostnameBindingOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_gateway_hostname_binding` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_gateway( + self, resource_group_name: str, gateway_name: str, **kwargs: Any + ) -> ItemPaged["_models.GatewayHostnameBindingResource"]: + """List all API Management gateway hostname bindings within a gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :return: An iterator like instance of either GatewayHostnameBindingResource or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.GatewayHostnameBindingListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_list_by_gateway_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize("GatewayHostnameBindingListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any + ) -> _models.GatewayHostnameBindingResource: + """Gets an API Management gateway hostname binding resource description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :return: GatewayHostnameBindingResource or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.GatewayHostnameBindingResource] = kwargs.pop("cls", None) + + _request = build_get_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("GatewayHostnameBindingResource", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: Union[_models.GatewayHostnameBindingResource, IO[bytes]], + if_match: Optional[str] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "GatewayHostnameBindingResource") + + _request = build_create_or_update_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + if_match=if_match, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: _models.GatewayHostnameBindingResource, + if_match: Optional[str] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource + :param if_match: ETag of the Entity. Not required when creating an entity, but required when + updating an entity. Default value is None. + :type if_match: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either GatewayHostnameBindingResource or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: IO[bytes], + if_match: Optional[str] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Required. + :type parameters: IO[bytes] + :param if_match: ETag of the Entity. Not required when creating an entity, but required when + updating an entity. Default value is None. + :type if_match: str + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either GatewayHostnameBindingResource or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: Union[_models.GatewayHostnameBindingResource, IO[bytes]], + if_match: Optional[str] = None, + **kwargs: Any + ) -> LROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Is either a GatewayHostnameBindingResource type or a IO[bytes] type. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource or IO[bytes] + :param if_match: ETag of the Entity. Not required when creating an entity, but required when + updating an entity. Default value is None. + :type if_match: str + :return: An instance of LROPoller that returns either GatewayHostnameBindingResource or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayHostnameBindingResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + parameters=parameters, + if_match=if_match, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = self._deserialize("GatewayHostnameBindingResource", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.GatewayHostnameBindingResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.GatewayHostnameBindingResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, if_match: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_delete_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + if_match=if_match, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, if_match: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing API Management gateway hostname binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param if_match: ETag of the Entity. ETag should match the current entity state from the header + response of the GET request or it should be * for unconditional update. Required. + :type if_match: str + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + if_match=if_match, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _refresh_secret_initial( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_refresh_secret_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_refresh_secret( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Refresh the secret for an API Management gateway hostname binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._refresh_secret_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_operations.py index d8e350a3df4a..5356300a78c4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,7 +49,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -58,7 +57,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -93,7 +92,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -101,7 +100,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -134,14 +133,14 @@ def build_get_request(resource_group_name: str, gateway_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -174,14 +173,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -212,14 +211,14 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -242,7 +241,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -274,12 +273,12 @@ class ApiGatewayOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_or_update_initial( self, @@ -338,7 +337,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -539,7 +541,10 @@ def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -731,7 +736,10 @@ def get(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> _mo if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiManagementGatewayResource", pipeline_response.http_response) @@ -780,7 +788,10 @@ def _delete_initial(self, resource_group_name: str, gateway_name: str, **kwargs: except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -862,7 +873,7 @@ def get_long_running_output(pipeline_response): @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> Iterable["_models.ApiManagementGatewayResource"]: + ) -> ItemPaged["_models.ApiManagementGatewayResource"]: """List all API Management gateways within a resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -935,7 +946,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -943,7 +957,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.ApiManagementGatewayResource"]: + def list(self, **kwargs: Any) -> ItemPaged["_models.ApiManagementGatewayResource"]: """List all API Management gateways within a subscription. :return: An iterator like instance of either ApiManagementGatewayResource or the result of @@ -1012,7 +1026,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py index ca4c33388c87..dd3c6de1cb2a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +54,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -110,14 +110,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -163,14 +163,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -218,7 +218,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -226,7 +226,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -278,14 +278,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -332,12 +332,12 @@ class ApiIssueAttachmentOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -350,7 +350,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.IssueAttachmentContract"]: + ) -> ItemPaged["_models.IssueAttachmentContract"]: """Lists all attachments for the Issue associated with the specified API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -446,7 +446,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -514,7 +517,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -584,7 +590,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -770,7 +779,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -854,7 +866,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py index db6f536c5f4a..87a7553ca0ae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +54,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -110,14 +110,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -163,14 +163,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -218,7 +218,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -226,7 +226,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -278,14 +278,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -332,12 +332,12 @@ class ApiIssueCommentOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -350,7 +350,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.IssueCommentContract"]: + ) -> ItemPaged["_models.IssueCommentContract"]: """Lists all comments for the Issue associated with the specified API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -446,7 +446,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -514,7 +517,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -584,7 +590,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -770,7 +779,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -854,7 +866,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py index 1240eed0b38d..43b99613ea37 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -55,14 +54,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -106,14 +105,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -157,14 +156,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -212,7 +211,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -220,7 +219,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -268,7 +267,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -276,7 +275,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -323,14 +322,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -374,12 +373,12 @@ class ApiIssueOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -392,7 +391,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.IssueContract"]: + ) -> ItemPaged["_models.IssueContract"]: """Lists all issues associated with the specified API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -486,7 +485,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -549,7 +551,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -624,7 +629,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -797,7 +805,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -970,7 +981,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1043,7 +1057,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_client_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_client_operations.py index 166504f134dd..298fcfc46236 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_client_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -28,15 +30,13 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import ApiManagementClientMixinABC +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Serializer +from .._utils.utils import ClientMixinABC -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -48,7 +48,7 @@ def build_perform_connectivity_check_async_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -56,7 +56,7 @@ def build_perform_connectivity_check_async_request( # pylint: disable=name-too- _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -85,7 +85,9 @@ def build_perform_connectivity_check_async_request( # pylint: disable=name-too- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -class ApiManagementClientOperationsMixin(ApiManagementClientMixinABC): +class _ApiManagementClientOperationsMixin( + ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], ApiManagementClientConfiguration] +): def _perform_connectivity_check_async_initial( # pylint: disable=name-too-long self, @@ -144,7 +146,10 @@ def _perform_connectivity_check_async_initial( # pylint: disable=name-too-long except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_gateway_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_gateway_skus_operations.py index b87383018c70..60b927943cc8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_gateway_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_gateway_skus_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -44,14 +44,14 @@ def build_list_available_skus_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/skus", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -90,17 +90,17 @@ class ApiManagementGatewaySkusOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_available_skus( self, resource_group_name: str, gateway_name: str, **kwargs: Any - ) -> Iterable["_models.GatewayResourceSkuResult"]: + ) -> ItemPaged["_models.GatewayResourceSkuResult"]: """Gets available SKUs for API Management gateway. Gets all available SKU for a given API Management gateway. @@ -177,7 +177,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py index b2858e7b348f..8580551b91ec 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +26,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -42,7 +41,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -69,15 +68,15 @@ class ApiManagementOperationsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: + def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: """Lists all of the available REST API operations of the Microsoft.ApiManagement provider. :return: An iterator like instance of either Operation or the result of cls(response) @@ -143,7 +142,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py index 564425da4fce..b468cd878398 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,7 +49,7 @@ def build_restore_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -58,7 +57,7 @@ def build_restore_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -93,7 +92,7 @@ def build_backup_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -101,7 +100,7 @@ def build_backup_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -136,7 +135,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -144,7 +143,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -179,7 +178,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -187,7 +186,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -220,14 +219,14 @@ def build_get_request(resource_group_name: str, service_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -260,14 +259,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -300,7 +299,7 @@ def build_migrate_to_stv2_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -308,7 +307,7 @@ def build_migrate_to_stv2_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -341,14 +340,14 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -371,7 +370,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -397,14 +396,14 @@ def build_get_sso_token_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -435,14 +434,14 @@ def build_check_name_availability_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -466,13 +465,13 @@ def build_get_domain_ownership_identifier_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/getDomainOwnershipIdentifier" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -494,7 +493,7 @@ def build_apply_network_configuration_updates_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -502,7 +501,7 @@ def build_apply_network_configuration_updates_request( # pylint: disable=name-t _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -531,7 +530,47 @@ def build_apply_network_configuration_updates_request( # pylint: disable=name-t return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -class ApiManagementServiceOperations: +def build_refresh_hostnames_request( + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/refreshHostnames", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class ApiManagementServiceOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. @@ -543,12 +582,12 @@ class ApiManagementServiceOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _restore_initial( self, @@ -607,7 +646,10 @@ def _restore_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -819,7 +861,10 @@ def _backup_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1025,7 +1070,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1226,7 +1274,10 @@ def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1418,7 +1469,10 @@ def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _mo if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) @@ -1467,7 +1521,10 @@ def _delete_initial(self, resource_group_name: str, service_name: str, **kwargs: except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1566,9 +1623,10 @@ def _migrate_to_stv2_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if parameters else None _json = None _content = None if isinstance(parameters, (IOBase, bytes)): @@ -1606,7 +1664,10 @@ def _migrate_to_stv2_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1713,6 +1774,7 @@ def begin_migrate_to_stv2( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1760,7 +1822,7 @@ def get_long_running_output(pipeline_response): @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> Iterable["_models.ApiManagementServiceResource"]: + ) -> ItemPaged["_models.ApiManagementServiceResource"]: """List all API Management services within a resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1833,7 +1895,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1841,7 +1906,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.ApiManagementServiceResource"]: + def list(self, **kwargs: Any) -> ItemPaged["_models.ApiManagementServiceResource"]: """Lists all API Management services within an Azure subscription. :return: An iterator like instance of either ApiManagementServiceResource or the result of @@ -1910,7 +1975,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1965,7 +2033,10 @@ def get_sso_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiManagementServiceGetSsoTokenResult", pipeline_response.http_response) @@ -2070,7 +2141,10 @@ def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiManagementServiceNameAvailabilityResult", pipeline_response.http_response) @@ -2121,7 +2195,10 @@ def get_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize( @@ -2153,9 +2230,10 @@ def _apply_network_configuration_updates_initial( # pylint: disable=name-too-lo api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if parameters else None _json = None _content = None if isinstance(parameters, (IOBase, bytes)): @@ -2193,7 +2271,10 @@ def _apply_network_configuration_updates_initial( # pylint: disable=name-too-lo except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2307,6 +2388,7 @@ def begin_apply_network_configuration_updates( # pylint: disable=name-too-long api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -2350,3 +2432,123 @@ def get_long_running_output(pipeline_response): return LROPoller[_models.ApiManagementServiceResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) + + def _refresh_hostnames_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_refresh_hostnames_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_refresh_hostnames( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from + KeyVault on the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An instance of LROPoller that returns either ApiManagementServiceResource or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._refresh_hostnames_initial( + resource_group_name=resource_group_name, + service_name=service_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py index 8436ddd7660d..f49612ad6763 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -44,14 +44,14 @@ def build_list_available_service_skus_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -90,17 +90,17 @@ class ApiManagementServiceSkusOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_available_service_skus( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> Iterable["_models.ResourceSkuResult"]: + ) -> ItemPaged["_models.ResourceSkuResult"]: """Gets available SKUs for API Management service. Gets all available SKU for a given API Management service. @@ -176,7 +176,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py index 6eb949b73294..c745154972a8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +26,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -42,7 +41,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -74,15 +73,15 @@ class ApiManagementSkusOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.ApiManagementSku"]: + def list(self, **kwargs: Any) -> ItemPaged["_models.ApiManagementSku"]: """Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. :return: An iterator like instance of either ApiManagementSku or the result of cls(response) @@ -149,7 +148,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_link_operations.py index 05766f2d33a1..03629e4ac095 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_link_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -42,14 +42,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -91,12 +91,12 @@ class ApiManagementWorkspaceLinkOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -150,7 +150,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiManagementWorkspaceLinksResource", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_links_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_links_operations.py index 890288f7f54e..b4e53d334eee 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_links_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_links_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -44,14 +44,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -90,17 +90,17 @@ class ApiManagementWorkspaceLinksOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> Iterable["_models.ApiManagementWorkspaceLinksResource"]: + ) -> ItemPaged["_models.ApiManagementWorkspaceLinksResource"]: """List all API Management workspaceLinks for a service. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -176,7 +176,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py index bf99fb103f25..d292d5839dae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -55,14 +54,14 @@ def build_list_by_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -104,14 +103,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -146,14 +145,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -195,7 +194,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -203,7 +202,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -249,7 +248,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -257,7 +256,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -302,14 +301,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -351,12 +350,12 @@ class ApiOperationOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( @@ -369,7 +368,7 @@ def list_by_api( skip: Optional[int] = None, tags: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.OperationContract"]: + ) -> ItemPaged["_models.OperationContract"]: """Lists a collection of the operations for the specified API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -466,7 +465,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -529,7 +531,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -595,7 +600,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -768,7 +776,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -941,7 +952,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1014,7 +1028,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py index 122f8e1598e6..98ee2363f109 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +26,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -43,14 +43,14 @@ def build_list_by_operation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -91,14 +91,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -142,14 +142,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -195,7 +195,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -203,7 +203,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -251,14 +251,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -301,12 +301,12 @@ class ApiOperationPolicyOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_operation( @@ -364,7 +364,10 @@ def list_by_operation( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PolicyCollection", pipeline_response.http_response) @@ -439,7 +442,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -519,7 +525,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -702,7 +711,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -785,7 +797,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py index 0ee0b4e75196..bc0066f69c7c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -59,14 +58,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -109,14 +108,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -150,14 +149,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -197,7 +196,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -205,7 +204,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -243,7 +242,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -251,7 +250,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -295,14 +294,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -347,14 +346,14 @@ def build_list_by_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -401,12 +400,12 @@ class ApiOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -419,7 +418,7 @@ def list_by_service( tags: Optional[str] = None, expand_api_version_set: Optional[bool] = None, **kwargs: Any - ) -> Iterable["_models.ApiContract"]: + ) -> ItemPaged["_models.ApiContract"]: """Lists all APIs of the API Management service instance. .. seealso:: @@ -519,7 +518,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -576,7 +578,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, api_id: st if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -636,7 +641,10 @@ def get(self, resource_group_name: str, service_name: str, api_id: str, **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -710,7 +718,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1036,7 +1047,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1099,7 +1113,10 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1200,7 +1217,7 @@ def list_by_tags( skip: Optional[int] = None, include_not_tagged_apis: Optional[bool] = None, **kwargs: Any - ) -> Iterable["_models.TagResourceContract"]: + ) -> ItemPaged["_models.TagResourceContract"]: """Lists a collection of apis associated with tags. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1295,7 +1312,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py index 2fb3f8fbb747..3acd66cece90 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +26,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -43,14 +43,14 @@ def build_list_by_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -89,14 +89,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -138,7 +138,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop( "Accept", "application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml", @@ -148,7 +148,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -192,7 +192,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -200,7 +200,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -246,14 +246,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -295,12 +295,12 @@ class ApiPolicyOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( @@ -354,7 +354,10 @@ def list_by_api( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PolicyCollection", pipeline_response.http_response) @@ -424,7 +427,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -499,7 +505,10 @@ def get( if response.status_code not in [200, 200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -669,7 +678,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -747,7 +759,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py index 877f9f7ef8c8..54e1c73d53bc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_by_apis_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -105,12 +105,12 @@ class ApiProductOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_apis( @@ -122,7 +122,7 @@ def list_by_apis( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ProductContract"]: + ) -> ItemPaged["_models.ProductContract"]: """Lists all Products, which the API is part of. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -212,7 +212,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py index 171b0ace798e..5a3c6e65b2ba 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +53,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -101,14 +100,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -145,14 +144,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -196,7 +195,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -204,7 +203,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -252,7 +251,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -260,7 +259,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -307,14 +306,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -358,12 +357,12 @@ class ApiReleaseOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -375,7 +374,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ApiReleaseContract"]: + ) -> ItemPaged["_models.ApiReleaseContract"]: """Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. @@ -467,7 +466,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -530,7 +532,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -596,7 +601,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -769,7 +777,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -942,7 +953,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1015,7 +1029,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py index 31b395023920..55fc5f12741f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -105,12 +105,12 @@ class ApiRevisionOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -122,7 +122,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ApiRevisionContract"]: + ) -> ItemPaged["_models.ApiRevisionContract"]: """Lists all revisions of an API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -212,7 +212,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py index a7e511983205..31469d983cb2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -57,14 +57,14 @@ def build_list_by_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -104,14 +104,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -146,14 +146,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -195,7 +195,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -203,7 +203,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -250,14 +250,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -301,12 +301,12 @@ class ApiSchemaOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( @@ -318,7 +318,7 @@ def list_by_api( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.SchemaContract"]: + ) -> ItemPaged["_models.SchemaContract"]: """Get the schema configuration at the API level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -408,7 +408,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -471,7 +474,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -537,7 +543,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -613,7 +622,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -876,7 +888,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py index 33bdc6b622b3..3c1905710fb4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -105,14 +105,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -154,14 +154,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -205,7 +205,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -213,7 +213,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -261,14 +261,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -312,12 +312,12 @@ class ApiTagDescriptionOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -329,7 +329,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.TagDescriptionContract"]: + ) -> ItemPaged["_models.TagDescriptionContract"]: """Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. @@ -422,7 +422,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -485,7 +488,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -551,7 +557,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -724,7 +733,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -803,7 +815,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tool_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tool_operations.py new file mode 100644 index 000000000000..4f9d01c3a5d3 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tool_operations.py @@ -0,0 +1,983 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core import PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.rest import HttpRequest, HttpResponse +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_by_api_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_entity_tag_request( + resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), + "toolId": _SERIALIZER.url( + "tool_id", tool_id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)" + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), + "toolId": _SERIALIZER.url( + "tool_id", tool_id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)" + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), + "toolId": _SERIALIZER.url( + "tool_id", tool_id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)" + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_update_request( + resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), + "toolId": _SERIALIZER.url( + "tool_id", tool_id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)" + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), + "toolId": _SERIALIZER.url( + "tool_id", tool_id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)" + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class ApiToolOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_tool` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + api_id: str, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ToolContract"]: + """Lists a collection of the MCP tools for the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :type filter: str + :param top: Number of records to return. Default value is None. + :type top: int + :param skip: Number of records to skip. Default value is None. + :type skip: int + :return: An iterator like instance of either ToolContract or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ToolContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ToolCollection] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ToolCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API tool specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :return: bool or the result of cls(response) + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any + ) -> _models.ToolContract: + """Gets the details of the API Tool specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) + + _request = build_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("ToolContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: _models.ToolContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: Union[_models.ToolContract, IO[bytes]], + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Is either a ToolContract type or a IO[bytes] type. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract or IO[bytes] + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ToolContract") + + _request = build_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("ToolContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: _models.ToolContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: Union[_models.ToolContract, IO[bytes]], + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Is either a ToolContract type or a IO[bytes] + type. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract or IO[bytes] + :return: ToolContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ToolContract") + + _request = build_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("ToolContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any + ) -> None: + """Deletes the specified tool in the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py index ce4c938f9654..12d8556ed531 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -98,14 +98,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -141,14 +141,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -190,7 +190,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -198,7 +198,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -244,7 +244,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -252,7 +252,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -297,14 +297,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -347,12 +347,12 @@ class ApiVersionSetOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -363,7 +363,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ApiVersionSetContract"]: + ) -> ItemPaged["_models.ApiVersionSetContract"]: """Lists a collection of API Version Sets in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -449,7 +449,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -506,7 +509,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, version_se if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -568,7 +574,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -728,7 +737,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -888,7 +900,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -957,7 +972,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wiki_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wiki_operations.py index d8c2628388c5..fe6b48f02193 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wiki_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wiki_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +26,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -43,14 +43,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -84,14 +84,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -131,7 +131,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -139,7 +139,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -177,7 +177,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -185,7 +185,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -222,14 +222,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -270,12 +270,12 @@ class ApiWikiOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get_entity_tag(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> bool: @@ -327,7 +327,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, api_id: st if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -387,7 +390,10 @@ def get(self, resource_group_name: str, service_name: str, api_id: str, **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -547,7 +553,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -707,7 +716,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -776,7 +788,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wikis_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wikis_operations.py index d874ff248474..d44458bb27ff 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wikis_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wikis_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -105,12 +105,12 @@ class ApiWikisOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -122,7 +122,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.WikiContract"]: + ) -> ItemPaged["_models.WikiContract"]: """Gets the wikis for an API specified by its identifier. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -211,7 +211,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_access_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_access_policy_operations.py index df52f38ed2a0..fb35c521db50 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_access_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_access_policy_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +54,14 @@ def build_list_by_authorization_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -117,14 +117,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -184,7 +184,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -192,7 +192,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -256,14 +256,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -322,12 +322,12 @@ class AuthorizationAccessPolicyOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_authorization( @@ -340,7 +340,7 @@ def list_by_authorization( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.AuthorizationAccessPolicyContract"]: + ) -> ItemPaged["_models.AuthorizationAccessPolicyContract"]: """Lists a collection of authorization access policy defined within a authorization. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -435,7 +435,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -505,7 +508,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -683,7 +689,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -764,7 +773,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_login_links_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_login_links_operations.py index 084feae5cc96..2e3adb3474cf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_login_links_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_login_links_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +26,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -48,7 +48,7 @@ def build_post_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -56,7 +56,7 @@ def build_post_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -108,12 +108,12 @@ class AuthorizationLoginLinksOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload def post( @@ -257,7 +257,10 @@ def post( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_operations.py index 39109f9f6961..6a65222b2027 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_by_authorization_provider_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -112,14 +112,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -170,7 +170,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -178,7 +178,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -233,14 +233,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -290,7 +290,7 @@ def build_confirm_consent_code_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -298,7 +298,7 @@ def build_confirm_consent_code_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -350,12 +350,12 @@ class AuthorizationOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_authorization_provider( @@ -367,7 +367,7 @@ def list_by_authorization_provider( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.AuthorizationContract"]: + ) -> ItemPaged["_models.AuthorizationContract"]: """Lists a collection of authorization providers defined within a authorization provider. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -458,7 +458,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -524,7 +527,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -691,7 +697,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -768,7 +777,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -917,7 +929,10 @@ def confirm_consent_code( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_provider_operations.py index 1d2cf54911b2..aa445e152a78 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -98,14 +98,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -152,7 +152,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -160,7 +160,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -211,14 +211,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -254,6 +254,54 @@ def build_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) +def build_refresh_secret_request( + resource_group_name: str, service_name: str, authorization_provider_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/refreshSecret", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "authorizationProviderId": _SERIALIZER.url( + "authorization_provider_id", + authorization_provider_id, + "str", + max_length=256, + min_length=1, + pattern=r"^[^*#&+:<>?]+$", + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + class AuthorizationProviderOperations: """ .. warning:: @@ -266,12 +314,12 @@ class AuthorizationProviderOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -282,7 +330,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.AuthorizationProviderContract"]: + ) -> ItemPaged["_models.AuthorizationProviderContract"]: """Lists a collection of authorization providers defined within a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -371,7 +419,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -429,7 +480,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -586,7 +640,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -654,8 +711,78 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def refresh_secret( + self, resource_group_name: str, service_name: str, authorization_provider_id: str, **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Refreshes the Key Vault reference secret for the specified authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :return: AuthorizationProviderContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) + + _request = build_refresh_secret_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("AuthorizationProviderContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py index 3b1a63e19c7e..72c2561259f9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +52,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -99,14 +98,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -140,14 +139,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -187,7 +186,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -195,7 +194,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -233,7 +232,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -241,7 +240,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -278,14 +277,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -320,14 +319,14 @@ def build_list_secrets_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}/listSecrets", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -367,12 +366,12 @@ class AuthorizationServerOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -383,7 +382,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.AuthorizationServerContract"]: + ) -> ItemPaged["_models.AuthorizationServerContract"]: """Lists a collection of authorization servers defined within a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -472,7 +471,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -528,7 +530,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, authsid: s if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -589,7 +594,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -746,7 +754,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -904,7 +915,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -972,7 +986,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1029,7 +1046,10 @@ def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py index 6449985133ac..91fe0efb14d7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +52,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -99,14 +98,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -140,14 +139,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -187,7 +186,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -195,7 +194,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -233,7 +232,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -241,7 +240,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -278,14 +277,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -320,7 +319,7 @@ def build_reconnect_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -328,7 +327,7 @@ def build_reconnect_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -370,12 +369,12 @@ class BackendOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -386,7 +385,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.BackendContract"]: + ) -> ItemPaged["_models.BackendContract"]: """Lists a collection of backends in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -474,7 +473,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -531,7 +533,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, backend_id if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -593,7 +598,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -753,7 +761,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -913,7 +924,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -982,7 +996,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1092,9 +1109,10 @@ def reconnect( # pylint: disable=inconsistent-return-statements api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[None] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if parameters else None _json = None _content = None if isinstance(parameters, (IOBase, bytes)): @@ -1128,7 +1146,10 @@ def reconnect( # pylint: disable=inconsistent-return-statements if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py index 036c421cc1cd..8fb8dc6a2385 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -51,14 +51,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -95,14 +95,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -136,14 +136,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -183,7 +183,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -191,7 +191,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -229,7 +229,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -237,7 +237,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -274,14 +274,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -322,12 +322,12 @@ class CacheOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -337,7 +337,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.CacheContract"]: + ) -> ItemPaged["_models.CacheContract"]: """Lists a collection of all external Caches in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -417,7 +417,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -474,7 +477,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, cache_id: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -534,7 +540,10 @@ def get(self, resource_group_name: str, service_name: str, cache_id: str, **kwar if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -703,7 +712,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -863,7 +875,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -932,7 +947,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py index 1efcf08852ac..b6c75163c554 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -103,14 +103,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -146,14 +146,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -195,7 +195,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -203,7 +203,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -249,14 +249,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -293,14 +293,14 @@ def build_refresh_secret_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}/refreshSecret", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -342,12 +342,12 @@ class CertificateOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -359,7 +359,7 @@ def list_by_service( skip: Optional[int] = None, is_key_vault_refresh_failed: Optional[bool] = None, **kwargs: Any - ) -> Iterable["_models.CertificateContract"]: + ) -> ItemPaged["_models.CertificateContract"]: """Lists a collection of all certificates in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -451,7 +451,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -508,7 +511,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, certificat if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -570,7 +576,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -743,7 +752,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -812,7 +824,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -874,7 +889,10 @@ def refresh_secret( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_operations.py new file mode 100644 index 000000000000..dbe1d9e50621 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_operations.py @@ -0,0 +1,848 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core import PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.rest import HttpRequest, HttpResponse +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_by_service_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_entity_tag_request( + resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "clientApplicationId": _SERIALIZER.url( + "client_application_id", client_application_id, "str", max_length=256, min_length=1 + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "clientApplicationId": _SERIALIZER.url( + "client_application_id", client_application_id, "str", max_length=256, min_length=1 + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "clientApplicationId": _SERIALIZER.url( + "client_application_id", client_application_id, "str", max_length=256, min_length=1 + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "clientApplicationId": _SERIALIZER.url( + "client_application_id", client_application_id, "str", max_length=256, min_length=1 + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_secrets_request( + resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/listSecrets", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "clientApplicationId": _SERIALIZER.url( + "client_application_id", client_application_id, "str", max_length=256, min_length=1 + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class ClientApplicationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`client_application` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ClientApplicationContract"]: + """Lists a collection of client applications in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
state | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
|. Default value is None. + :type filter: str + :param top: Number of records to return. Default value is None. + :type top: int + :param skip: Number of records to skip. Default value is None. + :type skip: int + :return: An iterator like instance of either ClientApplicationContract or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ClientApplicationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ClientApplicationCollection] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ClientApplicationCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: bool or the result of cls(response) + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> _models.ClientApplicationContract: + """Gets the details of the client application specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: ClientApplicationContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ClientApplicationContract] = kwargs.pop("cls", None) + + _request = build_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("ClientApplicationContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: _models.ClientApplicationContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: Union[_models.ClientApplicationContract, IO[bytes]], + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Is either a ClientApplicationContract type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationContract or IO[bytes] + :return: ClientApplicationContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ClientApplicationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ClientApplicationContract") + + _request = build_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("ClientApplicationContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> None: + """Delete client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_secrets( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> _models.ClientApplicationSecretsContract: + """Retrived client application secrets. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: ClientApplicationSecretsContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationSecretsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ClientApplicationSecretsContract] = kwargs.pop("cls", None) + + _request = build_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ClientApplicationSecretsContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_product_link_operations.py new file mode 100644 index 000000000000..5ec26326cbc7 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_product_link_operations.py @@ -0,0 +1,694 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core import PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.rest import HttpRequest, HttpResponse +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_by_client_applications_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + client_application_id: str, + subscription_id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "clientApplicationId": _SERIALIZER.url( + "client_application_id", client_application_id, "str", max_length=256, min_length=1 + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks/{clientApplicationProductLinkId}", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "clientApplicationId": _SERIALIZER.url( + "client_application_id", client_application_id, "str", max_length=256, min_length=1 + ), + "clientApplicationProductLinkId": _SERIALIZER.url( + "client_application_product_link_id", + client_application_product_link_id, + "str", + max_length=256, + min_length=1, + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_request( + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks/{clientApplicationProductLinkId}", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "clientApplicationId": _SERIALIZER.url( + "client_application_id", client_application_id, "str", max_length=256, min_length=1 + ), + "clientApplicationProductLinkId": _SERIALIZER.url( + "client_application_product_link_id", + client_application_product_link_id, + "str", + max_length=256, + min_length=1, + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks/{clientApplicationProductLinkId}", + ) + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "serviceName": _SERIALIZER.url( + "service_name", + service_name, + "str", + max_length=50, + min_length=1, + pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + ), + "clientApplicationId": _SERIALIZER.url( + "client_application_id", client_application_id, "str", max_length=256, min_length=1 + ), + "clientApplicationProductLinkId": _SERIALIZER.url( + "client_application_product_link_id", + client_application_product_link_id, + "str", + max_length=256, + min_length=1, + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class ClientApplicationProductLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`client_application_product_link` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_client_applications( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ClientApplicationProductLinkContract"]: + """Lists a collection of product links associated with the specified client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param top: Number of records to return. Default value is None. + :type top: int + :param skip: Number of records to skip. Default value is None. + :type skip: int + :return: An iterator like instance of either ClientApplicationProductLinkContract or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ClientApplicationProductLinkCollection] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_list_by_client_applications_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ClientApplicationProductLinkCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Gets the product link for the client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :return: ClientApplicationProductLinkContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ClientApplicationProductLinkContract] = kwargs.pop("cls", None) + + _request = build_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + client_application_product_link_id=client_application_product_link_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = self._deserialize("ClientApplicationProductLinkContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: _models.ClientApplicationProductLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationProductLinkContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationProductLinkContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: Union[_models.ClientApplicationProductLinkContract, IO[bytes]], + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Is either a ClientApplicationProductLinkContract type or + a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract or + IO[bytes] + :return: ClientApplicationProductLinkContract or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ClientApplicationProductLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ClientApplicationProductLinkContract") + + _request = build_create_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + client_application_product_link_id=client_application_product_link_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("ClientApplicationProductLinkContract", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified Product from the specified client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + client_application_product_link_id=client_application_product_link_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py index 9c64277f242b..d333d1d60ff4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -45,14 +45,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -91,14 +91,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -138,14 +138,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -187,7 +187,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -195,7 +195,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -241,14 +241,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -290,17 +290,17 @@ class ContentItemOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, content_type_id: str, **kwargs: Any - ) -> Iterable["_models.ContentItemContract"]: + ) -> ItemPaged["_models.ContentItemContract"]: """Lists developer portal's content items specified by the provided content type. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -377,7 +377,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -439,7 +442,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -503,7 +509,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -670,7 +679,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -747,7 +759,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py index 2f4da9635f7c..f3e6cc497f86 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -45,14 +45,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -85,14 +85,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -132,7 +132,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -140,7 +140,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -184,14 +184,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -232,17 +232,17 @@ class ContentTypeOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> Iterable["_models.ContentTypeContract"]: + ) -> ItemPaged["_models.ContentTypeContract"]: """Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. @@ -317,7 +317,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -376,7 +379,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -539,7 +545,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -609,7 +618,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py index 302aa8c989bf..5e77b4569879 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +26,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -43,14 +43,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -81,14 +81,14 @@ def build_get_request(resource_group_name: str, service_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -121,7 +121,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -129,7 +129,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -165,7 +165,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -173,7 +173,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -210,14 +210,14 @@ def build_list_secrets_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -256,12 +256,12 @@ class DelegationSettingsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: @@ -309,7 +309,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -365,7 +368,10 @@ def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _mo if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -512,7 +518,10 @@ def update( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -652,7 +661,10 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalDelegationSettings", pipeline_response.http_response) @@ -710,7 +722,10 @@ def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalSettingValidationKeyContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py index d269e1857b77..f7073e2e46ba 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Iterator, Optional, TypeVar, Union, cast +from collections.abc import MutableMapping +from typing import Any, Callable, Iterator, Optional, TypeVar, Union, cast import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -29,14 +31,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -46,7 +46,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,14 +72,14 @@ def build_get_by_name_request(service_name: str, location: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "serviceName": _SERIALIZER.url( "service_name", @@ -108,14 +108,14 @@ def build_purge_request(service_name: str, location: str, subscription_id: str, _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "serviceName": _SERIALIZER.url( "service_name", @@ -152,15 +152,15 @@ class DeletedServicesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DeletedServiceContract"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.DeletedServiceContract"]: """Lists all soft-deleted services available for undelete for the given subscription. :return: An iterator like instance of either DeletedServiceContract or the result of @@ -228,7 +228,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -280,7 +283,10 @@ def get_by_name(self, service_name: str, location: str, **kwargs: Any) -> _model if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("DeletedServiceContract", pipeline_response.http_response) @@ -329,7 +335,10 @@ def _purge_initial(self, service_name: str, location: str, **kwargs: Any) -> Ite except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py index 7feed40782f4..68336bd6e1b4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -98,14 +98,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -141,14 +141,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -190,7 +190,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -198,7 +198,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -244,7 +244,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -252,7 +252,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -297,14 +297,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -347,12 +347,12 @@ class DiagnosticOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -363,7 +363,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.DiagnosticContract"]: + ) -> ItemPaged["_models.DiagnosticContract"]: """Lists all diagnostics of the API Management service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -449,7 +449,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -506,7 +509,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, diagnostic if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -568,7 +574,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -728,7 +737,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -888,7 +900,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -957,7 +972,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_documentation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_documentation_operations.py index 398a5998a3c0..64118940932e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_documentation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_documentation_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -98,14 +98,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -141,14 +141,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -190,7 +190,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -198,7 +198,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -244,7 +244,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -252,7 +252,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -297,14 +297,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -347,12 +347,12 @@ class DocumentationOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -363,7 +363,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.DocumentationContract"]: + ) -> ItemPaged["_models.DocumentationContract"]: """Lists all Documentations of the API Management service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -449,7 +449,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -506,7 +509,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, documentat if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -568,7 +574,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -728,7 +737,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -888,7 +900,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -957,7 +972,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py index 4e0ccfd883ca..6779e6f8dc60 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +52,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -103,14 +102,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -148,14 +147,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -195,7 +194,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -203,7 +202,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -247,7 +246,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -255,7 +254,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -298,14 +297,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -346,12 +345,12 @@ class EmailTemplateOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -362,7 +361,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.EmailTemplateContract"]: + ) -> ItemPaged["_models.EmailTemplateContract"]: """Gets all email templates. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -449,7 +448,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -518,7 +520,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -590,7 +595,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -768,7 +776,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("EmailTemplateContract", pipeline_response.http_response) @@ -943,7 +954,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1023,7 +1037,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py index 71c5d2039e7e..4a0a48d0c0bc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -100,14 +100,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -142,7 +142,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -150,7 +150,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -187,14 +187,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -235,12 +235,12 @@ class GatewayApiOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -252,7 +252,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ApiContract"]: + ) -> ItemPaged["_models.ApiContract"]: """Lists a collection of the APIs associated with a gateway. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -342,7 +342,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -405,7 +408,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -528,9 +534,10 @@ def create_or_update( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if parameters else None _json = None _content = None if isinstance(parameters, (IOBase, bytes)): @@ -565,7 +572,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiContract", pipeline_response.http_response) @@ -631,7 +641,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py index 00f713439649..52622e06477b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -105,14 +105,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -154,14 +154,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -205,7 +205,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -213,7 +213,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -261,14 +261,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -312,12 +312,12 @@ class GatewayCertificateAuthorityOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -329,7 +329,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.GatewayCertificateAuthorityContract"]: + ) -> ItemPaged["_models.GatewayCertificateAuthorityContract"]: """Lists the collection of Certificate Authorities for the specified Gateway entity. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -420,7 +420,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -483,7 +486,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -549,7 +555,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -723,7 +732,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -802,7 +814,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py index 57d735d69491..8fe005f27b38 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -100,14 +100,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -142,14 +142,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -191,7 +191,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -199,7 +199,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -245,14 +245,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -294,12 +294,12 @@ class GatewayHostnameConfigurationOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -311,7 +311,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.GatewayHostnameConfigurationContract"]: + ) -> ItemPaged["_models.GatewayHostnameConfigurationContract"]: """Lists the collection of hostname configurations for the specified gateway. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -404,7 +404,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -468,7 +471,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -534,7 +540,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -708,7 +717,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -781,7 +793,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py index 380339b9f74e..2efba8207100 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +52,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -99,14 +98,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -140,14 +139,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -187,7 +186,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -195,7 +194,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -233,7 +232,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -241,7 +240,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -278,14 +277,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -320,14 +319,14 @@ def build_list_keys_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listKeys", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -361,7 +360,7 @@ def build_regenerate_key_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -369,7 +368,7 @@ def build_regenerate_key_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/regenerateKey", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -405,7 +404,7 @@ def build_generate_token_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -413,7 +412,7 @@ def build_generate_token_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/generateToken", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -449,14 +448,14 @@ def build_invalidate_debug_credentials_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/invalidateDebugCredentials", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -490,7 +489,7 @@ def build_list_debug_credentials_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -498,7 +497,7 @@ def build_list_debug_credentials_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listDebugCredentials", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -534,7 +533,7 @@ def build_list_trace_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -542,7 +541,7 @@ def build_list_trace_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listTrace", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -584,12 +583,12 @@ class GatewayOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -600,7 +599,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.GatewayContract"]: + ) -> ItemPaged["_models.GatewayContract"]: """Lists a collection of gateways registered with service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -688,7 +687,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -745,7 +747,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, gateway_id if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -807,7 +812,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -966,7 +974,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1125,7 +1136,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1194,7 +1208,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1252,7 +1269,10 @@ def list_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1400,7 +1420,10 @@ def regenerate_key( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1539,7 +1562,10 @@ def generate_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("GatewayTokenContract", pipeline_response.http_response) @@ -1601,7 +1627,10 @@ def invalidate_debug_credentials( # pylint: disable=inconsistent-return-stateme if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1742,7 +1771,10 @@ def list_debug_credentials( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("GatewayDebugCredentialsContract", pipeline_response.http_response) @@ -1762,7 +1794,7 @@ def list_trace( *, content_type: str = "application/json", **kwargs: Any - ) -> Dict[str, Any]: + ) -> dict[str, Any]: """Fetches trace collected by gateway. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1793,7 +1825,7 @@ def list_trace( *, content_type: str = "application/json", **kwargs: Any - ) -> Dict[str, Any]: + ) -> dict[str, Any]: """Fetches trace collected by gateway. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1822,7 +1854,7 @@ def list_trace( gateway_id: str, parameters: Union[_models.GatewayListTraceContract, IO[bytes]], **kwargs: Any - ) -> Dict[str, Any]: + ) -> dict[str, Any]: """Fetches trace collected by gateway. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1853,7 +1885,7 @@ def list_trace( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Dict[str, Any]] = kwargs.pop("cls", None) + cls: ClsType[dict[str, Any]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1886,7 +1918,10 @@ def list_trace( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("{object}", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_global_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_global_schema_operations.py index 46f873f8efe9..00acbc05543b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_global_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_global_schema_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -56,14 +56,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -102,14 +102,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -143,14 +143,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -190,7 +190,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -198,7 +198,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -236,14 +236,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -284,12 +284,12 @@ class GlobalSchemaOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -300,7 +300,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.GlobalSchemaContract"]: + ) -> ItemPaged["_models.GlobalSchemaContract"]: """Lists a collection of schemas registered with service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -387,7 +387,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -444,7 +447,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, schema_id: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -506,7 +512,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -580,7 +589,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -815,7 +827,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_operations.py index c67287da1396..7be120c2e865 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +53,14 @@ def build_list_by_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -101,14 +100,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -143,14 +142,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -192,7 +191,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -200,7 +199,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -246,7 +245,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -254,7 +253,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -299,14 +298,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -348,12 +347,12 @@ class GraphQLApiResolverOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( @@ -365,7 +364,7 @@ def list_by_api( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ResolverContract"]: + ) -> ItemPaged["_models.ResolverContract"]: """Lists a collection of the resolvers for the specified GraphQL API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -458,7 +457,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -521,7 +523,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -587,7 +592,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -760,7 +768,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -933,7 +944,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1006,7 +1020,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_policy_operations.py index 99f13ada4457..88cc4c51b2f5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_policy_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -45,14 +45,14 @@ def build_list_by_resolver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -93,14 +93,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -144,14 +144,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -197,7 +197,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -205,7 +205,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -253,14 +253,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -303,17 +303,17 @@ class GraphQLApiResolverPolicyOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_resolver( self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any - ) -> Iterable["_models.PolicyContract"]: + ) -> ItemPaged["_models.PolicyContract"]: """Get the list of policy configuration at the GraphQL API Resolver level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -395,7 +395,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -468,7 +471,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -548,7 +554,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -731,7 +740,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -814,7 +826,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py index a7fddfd8e765..9932fcf97052 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -98,14 +98,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -139,14 +139,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -186,7 +186,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -194,7 +194,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -232,7 +232,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -240,7 +240,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -277,14 +277,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -325,12 +325,12 @@ class GroupOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -341,7 +341,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.GroupContract"]: + ) -> ItemPaged["_models.GroupContract"]: """Lists a collection of groups defined within a service instance. .. seealso:: @@ -432,7 +432,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -489,7 +492,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, group_id: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -549,7 +555,10 @@ def get(self, resource_group_name: str, service_name: str, group_id: str, **kwar if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -709,7 +718,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -869,7 +881,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -938,7 +953,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py index ad7d179b3f84..5e0ffb9b1d6a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -99,14 +99,14 @@ def build_check_entity_exists_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -141,14 +141,14 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -183,14 +183,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -231,12 +231,12 @@ class GroupUserOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -248,7 +248,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.UserContract"]: + ) -> ItemPaged["_models.UserContract"]: """Lists a collection of user entities associated with the group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -342,7 +342,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -405,7 +408,10 @@ def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -468,7 +474,10 @@ def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("UserContract", pipeline_response.http_response) @@ -534,7 +543,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py index 79eecb947139..043d72bbbe06 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -46,14 +45,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -90,14 +89,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -135,14 +134,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -182,7 +181,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -190,7 +189,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -234,7 +233,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -242,7 +241,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -285,14 +284,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -331,14 +330,14 @@ def build_list_secrets_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}/listSecrets", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -378,17 +377,17 @@ class IdentityProviderOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> Iterable["_models.IdentityProviderContract"]: + ) -> ItemPaged["_models.IdentityProviderContract"]: """Lists a collection of Identity Provider configured in the specified service instance. .. seealso:: @@ -467,7 +466,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -530,7 +532,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -597,7 +602,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -757,7 +765,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -918,7 +929,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -992,7 +1006,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1054,7 +1071,10 @@ def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py index 7d1d6dd03d2d..a75ea0197aeb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -51,14 +51,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -97,14 +97,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -146,12 +146,12 @@ class IssueOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -162,7 +162,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.IssueContract"]: + ) -> ItemPaged["_models.IssueContract"]: """Lists a collection of issues in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -252,7 +252,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -309,7 +312,10 @@ def get(self, resource_group_name: str, service_name: str, issue_id: str, **kwar if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py index a214da520a00..e0344f0929dc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -98,14 +98,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -139,14 +139,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -186,7 +186,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -194,7 +194,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -232,7 +232,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -240,7 +240,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -277,14 +277,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -325,12 +325,12 @@ class LoggerOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -341,7 +341,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.LoggerContract"]: + ) -> ItemPaged["_models.LoggerContract"]: """Lists a collection of loggers in the specified service instance. .. seealso:: @@ -432,7 +432,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -489,7 +492,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, logger_id: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -549,7 +555,10 @@ def get(self, resource_group_name: str, service_name: str, logger_id: str, **kwa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -709,7 +718,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -869,7 +881,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -938,7 +953,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py index eb409a00b08a..8b9b0886d0d2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -58,14 +57,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -108,14 +107,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -151,14 +150,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -200,7 +199,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -208,7 +207,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -254,7 +253,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -262,7 +261,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -307,14 +306,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -351,14 +350,14 @@ def build_list_value_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/listValue", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -394,14 +393,14 @@ def build_refresh_secret_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/refreshSecret", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -443,12 +442,12 @@ class NamedValueOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -460,7 +459,7 @@ def list_by_service( skip: Optional[int] = None, is_key_vault_refresh_failed: Optional[bool] = None, **kwargs: Any - ) -> Iterable["_models.NamedValueContract"]: + ) -> ItemPaged["_models.NamedValueContract"]: """Lists a collection of named values defined within a service instance. .. seealso:: @@ -554,7 +553,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -610,7 +612,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, named_valu if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -671,7 +676,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -745,7 +753,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -982,7 +993,10 @@ def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1212,7 +1226,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1269,7 +1286,10 @@ def list_value( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1324,7 +1344,10 @@ def _refresh_secret_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py index a72b56f7042a..3b21922184fc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, List, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -42,14 +42,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -82,14 +82,14 @@ def build_list_by_location_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -129,12 +129,12 @@ class NetworkStatusOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -186,7 +186,10 @@ def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("[NetworkStatusContractByLocation]", pipeline_response.http_response) @@ -250,7 +253,10 @@ def list_by_location( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("NetworkStatusContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py index 757a6e48a5e1..a0bdba6dd8eb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,14 +50,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -98,14 +98,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -145,14 +145,14 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -194,12 +194,12 @@ class NotificationOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -209,7 +209,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.NotificationContract"]: + ) -> ItemPaged["_models.NotificationContract"]: """Lists a collection of properties defined within a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -290,7 +290,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -355,7 +358,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) @@ -428,7 +434,10 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py index 15120d76b86b..4134c061f086 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -46,14 +46,14 @@ def build_list_by_notification_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -92,14 +92,14 @@ def build_check_entity_exists_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -139,14 +139,14 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -186,14 +186,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -234,12 +234,12 @@ class NotificationRecipientEmailOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_notification( @@ -299,7 +299,10 @@ def list_by_notification( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientEmailCollection", pipeline_response.http_response) @@ -371,7 +374,10 @@ def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -440,7 +446,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientEmailContract", pipeline_response.http_response) @@ -512,7 +521,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py index 2fa7b7adf011..f94d2a8d910e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -46,14 +46,14 @@ def build_list_by_notification_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -92,14 +92,14 @@ def build_check_entity_exists_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -139,14 +139,14 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -186,14 +186,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -234,12 +234,12 @@ class NotificationRecipientUserOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_notification( @@ -299,7 +299,10 @@ def list_by_notification( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientUserCollection", pipeline_response.http_response) @@ -372,7 +375,10 @@ def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -442,7 +448,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientUserContract", pipeline_response.http_response) @@ -515,7 +524,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py index 98907791365a..dba81cf0f3ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +52,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -99,14 +98,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -140,14 +139,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -187,7 +186,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -195,7 +194,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -233,7 +232,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -241,7 +240,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -278,14 +277,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -320,14 +319,14 @@ def build_list_secrets_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}/listSecrets", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -367,12 +366,12 @@ class OpenIdConnectProviderOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -383,7 +382,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.OpenidConnectProviderContract"]: + ) -> ItemPaged["_models.OpenidConnectProviderContract"]: """Lists of all the OpenId Connect Providers. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -472,7 +471,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -528,7 +530,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, opid: str, if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -589,7 +594,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -746,7 +754,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -904,7 +915,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -972,7 +986,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1029,7 +1046,10 @@ def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py index 3fed5bbfce2e..d70e4a8aacc4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_by_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -110,12 +110,12 @@ class OperationOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_tags( @@ -128,7 +128,7 @@ def list_by_tags( skip: Optional[int] = None, include_not_tagged_operations: Optional[bool] = None, **kwargs: Any - ) -> Iterable["_models.TagResourceContract"]: + ) -> ItemPaged["_models.TagResourceContract"]: """Lists a collection of operations associated with tags. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -226,7 +226,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_status_operations.py index b0c108ef528b..f1f6e0ba8435 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_status_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_status_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -40,14 +40,14 @@ def build_get_request(location: str, operation_id: str, subscription_id: str, ** _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationStatuses/{operationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -77,12 +77,12 @@ class OperationStatusOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationStatusResult: @@ -129,7 +129,10 @@ def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.Operat if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("OperationStatusResult", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operations_results_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operations_results_operations.py index b4670249ce0b..f8a28cfb6526 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operations_results_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operations_results_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -40,14 +40,14 @@ def build_get_request(location: str, operation_id: str, subscription_id: str, ** _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationResults/{operationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -77,12 +77,12 @@ class OperationsResultsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( # pylint: disable=inconsistent-return-statements @@ -132,7 +132,10 @@ def get( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py index 81aa9a6542a9..edeaed4947b3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -42,14 +42,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -88,12 +88,12 @@ class OutboundNetworkDependenciesEndpointsOperations: # pylint: disable=name-to models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -143,7 +143,10 @@ def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("OutboundEnvironmentEndpointList", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_patch.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_patch.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py index 17bb2bc490df..54cb29856592 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -47,14 +47,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -95,12 +95,12 @@ class PolicyDescriptionOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -158,7 +158,10 @@ def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PolicyDescriptionCollection", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_fragment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_fragment_operations.py index 3464e884fd4a..ac97fb1c0019 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_fragment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_fragment_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -57,14 +57,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -105,14 +105,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -152,14 +152,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -201,7 +201,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -209,7 +209,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -247,14 +247,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -296,14 +296,14 @@ def build_list_references_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -347,12 +347,12 @@ class PolicyFragmentOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -364,7 +364,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.PolicyFragmentContract"]: + ) -> ItemPaged["_models.PolicyFragmentContract"]: """Gets all policy fragments. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -456,7 +456,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -512,7 +515,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, id: str, * if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -582,7 +588,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -656,7 +665,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -887,7 +899,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -956,7 +971,10 @@ def list_references( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ResourceCollection", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py index d4531c429b18..759dbf1b9bd4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -45,14 +45,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -89,14 +89,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -136,14 +136,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -185,7 +185,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -193,7 +193,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -237,14 +237,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -285,17 +285,17 @@ class PolicyOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> Iterable["_models.PolicyContract"]: + ) -> ItemPaged["_models.PolicyContract"]: """Lists all the Global Policy definitions of the Api Management service. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -369,7 +369,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -428,7 +431,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -498,7 +504,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -655,7 +664,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -728,7 +740,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_operations.py index 6e789e40135b..8ec7963d8671 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -45,14 +45,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -85,14 +85,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -128,14 +128,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -177,7 +177,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -185,7 +185,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -231,7 +231,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -239,7 +239,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -284,14 +284,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -335,17 +335,17 @@ class PolicyRestrictionOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> Iterable["_models.PolicyRestrictionContract"]: + ) -> ItemPaged["_models.PolicyRestrictionContract"]: """Gets all policy restrictions of API Management services. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -421,7 +421,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -479,7 +482,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -540,7 +546,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -697,7 +706,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -854,7 +866,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -927,7 +942,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_validations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_validations_operations.py index d2fe70e707e0..c2265b5c0528 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_validations_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_validations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterator, Optional, TypeVar, Union, cast +from collections.abc import MutableMapping +from typing import Any, Callable, Iterator, Optional, TypeVar, Union, cast +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +29,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -46,14 +46,14 @@ def build_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/validatePolicies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -92,12 +92,12 @@ class PolicyRestrictionValidationsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _by_service_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterator[bytes]: error_map: MutableMapping = { @@ -138,7 +138,10 @@ def _by_service_initial(self, resource_group_name: str, service_name: str, **kwa except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_config_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_config_operations.py index 9e4d3f01fc8b..7da75bd8cf29 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_config_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_config_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -45,14 +45,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -85,14 +85,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -126,14 +126,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -173,7 +173,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -181,7 +181,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -224,7 +224,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -232,7 +232,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -275,17 +275,17 @@ class PortalConfigOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> Iterable["_models.PortalConfigContract"]: + ) -> ItemPaged["_models.PortalConfigContract"]: """Lists the developer portal configurations. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -360,7 +360,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -416,7 +419,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, portal_con if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -477,7 +483,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -634,7 +643,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalConfigContract", pipeline_response.http_response) @@ -788,7 +800,10 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalConfigContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py index 8a1634354116..7fb4477a0473 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -57,14 +56,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -103,14 +102,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -146,14 +145,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -189,7 +188,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -197,7 +196,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -241,7 +240,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -249,7 +248,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -294,12 +293,12 @@ class PortalRevisionOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -310,7 +309,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.PortalRevisionContract"]: + ) -> ItemPaged["_models.PortalRevisionContract"]: """Lists developer portal's revisions. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -405,7 +404,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -464,7 +466,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -526,7 +531,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -598,7 +606,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -827,7 +838,10 @@ def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py index d77a8f74f910..382d74575383 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -42,14 +42,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -88,12 +88,12 @@ class PortalSettingsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -143,7 +143,10 @@ def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalSettingsCollection", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_private_endpoint_connection_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_private_endpoint_connection_operations.py index 9f776ad2a9ce..11bc90fdb516 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_private_endpoint_connection_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_private_endpoint_connection_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -49,14 +49,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -93,14 +93,14 @@ def build_get_by_name_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -140,7 +140,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -148,7 +148,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -190,14 +190,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -233,14 +233,14 @@ def build_list_private_link_resources_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -277,14 +277,14 @@ def build_get_private_link_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -326,17 +326,17 @@ class PrivateEndpointConnectionOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> Iterable["_models.PrivateEndpointConnection"]: + ) -> ItemPaged["_models.PrivateEndpointConnection"]: """Lists all private endpoint connections of the API Management service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -412,7 +412,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -470,7 +473,10 @@ def get_by_name( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) @@ -539,7 +545,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -736,7 +745,10 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -856,7 +868,10 @@ def list_private_link_resources( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PrivateLinkResourceListResult", pipeline_response.http_response) @@ -917,7 +932,10 @@ def get_private_link_resource( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_link_operations.py index 79c6301175fb..6a5ffe923a34 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_link_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -100,14 +100,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -144,7 +144,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -152,7 +152,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -191,14 +191,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -241,12 +241,12 @@ class ProductApiLinkOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -258,7 +258,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ProductApiLinkContract"]: + ) -> ItemPaged["_models.ProductApiLinkContract"]: """Lists a collection of the API links associated with a product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -349,7 +349,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -412,7 +415,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -572,7 +578,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ProductApiLinkContract", pipeline_response.http_response) @@ -638,7 +647,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py index f6ccbd945042..70b9348238d8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -99,14 +99,14 @@ def build_check_entity_exists_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -141,14 +141,14 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -183,14 +183,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -231,12 +231,12 @@ class ProductApiOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -248,7 +248,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ApiContract"]: + ) -> ItemPaged["_models.ApiContract"]: """Lists a collection of the APIs associated with a product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -342,7 +342,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -405,7 +408,10 @@ def check_entity_exists( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -468,7 +474,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiContract", pipeline_response.http_response) @@ -534,7 +543,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_link_operations.py index 35b650f0d88b..39027fa15546 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_link_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -105,14 +105,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -154,7 +154,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -162,7 +162,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -206,14 +206,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -256,12 +256,12 @@ class ProductGroupLinkOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -273,7 +273,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ProductGroupLinkContract"]: + ) -> ItemPaged["_models.ProductGroupLinkContract"]: """Lists a collection of the group links associated with a product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -364,7 +364,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -427,7 +430,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -587,7 +593,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ProductGroupLinkContract", pipeline_response.http_response) @@ -653,7 +662,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py index ab256a384624..ad0f5cba9e41 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -99,14 +99,14 @@ def build_check_entity_exists_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -141,14 +141,14 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -183,14 +183,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -231,12 +231,12 @@ class ProductGroupOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -248,7 +248,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.GroupContract"]: + ) -> ItemPaged["_models.GroupContract"]: """Lists the collection of developer groups associated with the specified product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -338,7 +338,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -401,7 +404,10 @@ def check_entity_exists( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -464,7 +470,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("GroupContract", pipeline_response.http_response) @@ -530,7 +539,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py index 9ad1a5d404a7..c5060d386ae6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -55,14 +54,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -105,14 +104,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -146,14 +145,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -193,7 +192,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -201,7 +200,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -239,7 +238,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -247,7 +246,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -291,14 +290,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -343,14 +342,14 @@ def build_list_by_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -399,12 +398,12 @@ class ProductOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -417,7 +416,7 @@ def list_by_service( expand_groups: Optional[bool] = None, tags: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.ProductContract"]: + ) -> ItemPaged["_models.ProductContract"]: """Lists a collection of products in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -514,7 +513,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -571,7 +573,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, product_id if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -633,7 +638,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -793,7 +801,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -953,7 +964,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1032,7 +1046,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1048,7 +1065,7 @@ def list_by_tags( skip: Optional[int] = None, include_not_tagged_products: Optional[bool] = None, **kwargs: Any - ) -> Iterable["_models.TagResourceContract"]: + ) -> ItemPaged["_models.TagResourceContract"]: """Lists a collection of products associated with tags. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1141,7 +1158,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py index bca90f67145f..63bb678ad92e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -45,14 +45,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -91,14 +91,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -140,14 +140,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -191,7 +191,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -199,7 +199,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -245,14 +245,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -294,17 +294,17 @@ class ProductPolicyOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any - ) -> Iterable["_models.PolicyContract"]: + ) -> ItemPaged["_models.PolicyContract"]: """Get the policy configuration at the Product level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -382,7 +382,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -449,7 +452,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -524,7 +530,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -694,7 +703,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -772,7 +784,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py index c3dccea1f606..039eb46ca17a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -105,12 +105,12 @@ class ProductSubscriptionsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -122,7 +122,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.SubscriptionContract"]: + ) -> ItemPaged["_models.SubscriptionContract"]: """Lists the collection of subscriptions to the specified product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -220,7 +220,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wiki_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wiki_operations.py index cbd0754f7c87..dafffb0fdd30 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wiki_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wiki_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +26,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -43,14 +43,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -84,14 +84,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -131,7 +131,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -139,7 +139,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -177,7 +177,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -185,7 +185,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -222,14 +222,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -270,12 +270,12 @@ class ProductWikiOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get_entity_tag(self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any) -> bool: @@ -327,7 +327,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, product_id if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -387,7 +390,10 @@ def get(self, resource_group_name: str, service_name: str, product_id: str, **kw if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -547,7 +553,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -707,7 +716,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -776,7 +788,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wikis_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wikis_operations.py index e5f0bea53e4a..c1ea48fd82d6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wikis_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wikis_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -105,12 +105,12 @@ class ProductWikisOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -122,7 +122,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.WikiContract"]: + ) -> ItemPaged["_models.WikiContract"]: """Gets the details of the Wiki for a Product specified by its identifier. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -211,7 +211,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py index 351e720998ed..49599158728b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +26,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -43,14 +43,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -84,7 +84,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -92,7 +92,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -134,12 +134,12 @@ class QuotaByCounterKeysOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -200,7 +200,10 @@ def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("QuotaCounterCollection", pipeline_response.http_response) @@ -355,7 +358,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("QuotaCounterCollection", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py index 9bf480a9cd02..f242ccd0e83f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +26,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -48,14 +48,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -95,7 +95,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -103,7 +103,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -146,12 +146,12 @@ class QuotaByPeriodKeysOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -215,7 +215,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("QuotaCounterContract", pipeline_response.http_response) @@ -377,7 +380,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("QuotaCounterContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py index 42be5259ff8b..eb758509f725 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -44,14 +44,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -90,17 +90,17 @@ class RegionOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> Iterable["_models.RegionContract"]: + ) -> ItemPaged["_models.RegionContract"]: """Lists all azure regions in which the service exists. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -174,7 +174,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py index 811f7c768f26..ec434a1354a5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +53,14 @@ def build_list_by_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -109,14 +108,14 @@ def build_list_by_user_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -164,14 +163,14 @@ def build_list_by_operation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -219,14 +218,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -273,14 +272,14 @@ def build_list_by_geo_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -326,14 +325,14 @@ def build_list_by_subscription_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -382,14 +381,14 @@ def build_list_by_time_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -437,14 +436,14 @@ def build_list_by_request_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -488,12 +487,12 @@ class ReportsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( @@ -505,7 +504,7 @@ def list_by_api( skip: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.ReportRecordContract"]: + ) -> ItemPaged["_models.ReportRecordContract"]: """Lists report records by API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -592,7 +591,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -609,7 +611,7 @@ def list_by_user( skip: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.ReportRecordContract"]: + ) -> ItemPaged["_models.ReportRecordContract"]: """Lists report records by User. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -709,7 +711,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -726,7 +731,7 @@ def list_by_operation( skip: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.ReportRecordContract"]: + ) -> ItemPaged["_models.ReportRecordContract"]: """Lists report records by API Operations. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -826,7 +831,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -843,7 +851,7 @@ def list_by_product( skip: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.ReportRecordContract"]: + ) -> ItemPaged["_models.ReportRecordContract"]: """Lists report records by Product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -942,7 +950,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -958,7 +969,7 @@ def list_by_geo( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ReportRecordContract"]: + ) -> ItemPaged["_models.ReportRecordContract"]: """Lists report records by geography. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1054,7 +1065,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1071,7 +1085,7 @@ def list_by_subscription( skip: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.ReportRecordContract"]: + ) -> ItemPaged["_models.ReportRecordContract"]: """Lists report records by subscription. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1170,7 +1184,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1188,7 +1205,7 @@ def list_by_time( skip: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.ReportRecordContract"]: + ) -> ItemPaged["_models.ReportRecordContract"]: """Lists report records by Time. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1292,7 +1309,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1308,7 +1328,7 @@ def list_by_request( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.RequestReportRecordContract"]: + ) -> ItemPaged["_models.RequestReportRecordContract"]: """Lists report records by Request. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1397,7 +1417,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py index 66f74dad7b5b..8c23ebd3dfd8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +26,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -43,14 +43,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -81,14 +81,14 @@ def build_get_request(resource_group_name: str, service_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -121,7 +121,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -129,7 +129,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -165,7 +165,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -173,7 +173,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -216,12 +216,12 @@ class SignInSettingsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: @@ -269,7 +269,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -325,7 +328,10 @@ def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _mo if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -472,7 +478,10 @@ def update( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -612,7 +621,10 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalSigninSettings", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py index ddbbfacd812d..c40559dc5e87 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +26,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -43,14 +43,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -81,14 +81,14 @@ def build_get_request(resource_group_name: str, service_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -121,7 +121,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -129,7 +129,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -165,7 +165,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -173,7 +173,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -216,12 +216,12 @@ class SignUpSettingsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: @@ -269,7 +269,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -325,7 +328,10 @@ def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _mo if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -472,7 +478,10 @@ def update( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -612,7 +621,10 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PortalSignupSettings", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py index 082fcce0c114..eaa5e898bfff 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +52,14 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -99,14 +98,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -140,14 +139,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -189,7 +188,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -197,7 +196,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -247,7 +246,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -255,7 +254,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -296,14 +295,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -338,14 +337,14 @@ def build_regenerate_primary_key_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -379,14 +378,14 @@ def build_regenerate_secondary_key_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -420,14 +419,14 @@ def build_list_secrets_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/listSecrets", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -467,12 +466,12 @@ class SubscriptionOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -483,7 +482,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.SubscriptionContract"]: + ) -> ItemPaged["_models.SubscriptionContract"]: """Lists all subscriptions of the API Management service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -577,7 +576,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -635,7 +637,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, sid: str, if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -695,7 +700,10 @@ def get(self, resource_group_name: str, service_name: str, sid: str, **kwargs: A if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -893,7 +901,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1091,7 +1102,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1160,7 +1174,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1218,7 +1235,10 @@ def regenerate_primary_key( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1276,7 +1296,10 @@ def regenerate_secondary_key( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1334,7 +1357,10 @@ def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_api_link_operations.py index 567d57fe488b..f63b5b85ab7d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_api_link_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -100,14 +100,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -144,7 +144,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -152,7 +152,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -191,14 +191,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -241,12 +241,12 @@ class TagApiLinkOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -258,7 +258,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.TagApiLinkContract"]: + ) -> ItemPaged["_models.TagApiLinkContract"]: """Lists a collection of the API links associated with a tag. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -348,7 +348,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -411,7 +414,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -571,7 +577,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagApiLinkContract", pipeline_response.http_response) @@ -637,7 +646,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operation_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operation_link_operations.py index 41db4aefefb3..d3f1c2c9f899 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operation_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operation_link_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -105,14 +105,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -154,7 +154,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -162,7 +162,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -206,14 +206,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -256,12 +256,12 @@ class TagOperationLinkOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -273,7 +273,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.TagOperationLinkContract"]: + ) -> ItemPaged["_models.TagOperationLinkContract"]: """Lists a collection of the operation links associated with a tag. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -364,7 +364,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -427,7 +430,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -587,7 +593,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagOperationLinkContract", pipeline_response.http_response) @@ -653,7 +662,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py index 7d508bc93d80..93c3eb012b92 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -55,14 +54,14 @@ def build_list_by_operation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -109,14 +108,14 @@ def build_get_entity_state_by_operation_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -158,14 +157,14 @@ def build_get_by_operation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -207,14 +206,14 @@ def build_assign_to_operation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -256,14 +255,14 @@ def build_detach_from_operation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -307,14 +306,14 @@ def build_list_by_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -354,14 +353,14 @@ def build_get_entity_state_by_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -396,14 +395,14 @@ def build_get_by_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -438,14 +437,14 @@ def build_assign_to_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -480,14 +479,14 @@ def build_detach_from_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -530,14 +529,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -577,14 +576,14 @@ def build_get_entity_state_by_product_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -619,14 +618,14 @@ def build_get_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -661,14 +660,14 @@ def build_assign_to_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -703,14 +702,14 @@ def build_detach_from_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -753,14 +752,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -801,14 +800,14 @@ def build_get_entity_state_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -842,14 +841,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -889,7 +888,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -897,7 +896,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -935,7 +934,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -943,7 +942,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -980,14 +979,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -1028,12 +1027,12 @@ class TagOperations: # pylint: disable=too-many-public-methods models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_operation( @@ -1046,7 +1045,7 @@ def list_by_operation( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.TagContract"]: + ) -> ItemPaged["_models.TagContract"]: """Lists all Tags associated with the Operation. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1141,7 +1140,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1208,7 +1210,10 @@ def get_entity_state_by_operation( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1278,7 +1283,10 @@ def get_by_operation( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1351,7 +1359,10 @@ def assign_to_operation( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagContract", pipeline_response.http_response) @@ -1421,7 +1432,10 @@ def detach_from_operation( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1437,7 +1451,7 @@ def list_by_api( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.TagContract"]: + ) -> ItemPaged["_models.TagContract"]: """Lists all Tags associated with the API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1528,7 +1542,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1591,7 +1608,10 @@ def get_entity_state_by_api( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1657,7 +1677,10 @@ def get_by_api( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1726,7 +1749,10 @@ def assign_to_api( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1795,7 +1821,10 @@ def detach_from_api( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1811,7 +1840,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.TagContract"]: + ) -> ItemPaged["_models.TagContract"]: """Lists all Tags associated with the Product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1902,7 +1931,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1965,7 +1997,10 @@ def get_entity_state_by_product( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2031,7 +2066,10 @@ def get_by_product( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2100,7 +2138,10 @@ def assign_to_product( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagContract", pipeline_response.http_response) @@ -2166,7 +2207,10 @@ def detach_from_product( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2182,7 +2226,7 @@ def list_by_service( skip: Optional[int] = None, scope: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.TagContract"]: + ) -> ItemPaged["_models.TagContract"]: """Lists a collection of tags defined within a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -2272,7 +2316,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2329,7 +2376,10 @@ def get_entity_state(self, resource_group_name: str, service_name: str, tag_id: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2389,7 +2439,10 @@ def get(self, resource_group_name: str, service_name: str, tag_id: str, **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2549,7 +2602,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2709,7 +2765,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2778,7 +2837,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_product_link_operations.py index c73f46e9148f..01170ac7942d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_product_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_product_link_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -100,14 +100,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -144,7 +144,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -152,7 +152,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -191,14 +191,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -241,12 +241,12 @@ class TagProductLinkOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -258,7 +258,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.TagProductLinkContract"]: + ) -> ItemPaged["_models.TagProductLinkContract"]: """Lists a collection of the product links associated with a tag. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -349,7 +349,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -412,7 +415,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -572,7 +578,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagProductLinkContract", pipeline_response.http_response) @@ -638,7 +647,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py index 052f34d43ac4..68c60dc4ed40 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -51,14 +51,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -103,12 +103,12 @@ class TagResourceOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -119,7 +119,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.TagResourceContract"]: + ) -> ItemPaged["_models.TagResourceContract"]: """Lists a collection of resources associated with tags. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -216,7 +216,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py index 38814e21598e..cc7b72fa17f3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -46,14 +46,14 @@ def build_regenerate_primary_key_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -91,14 +91,14 @@ def build_regenerate_secondary_key_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -138,12 +138,12 @@ class TenantAccessGitOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def regenerate_primary_key( # pylint: disable=inconsistent-return-statements @@ -197,7 +197,10 @@ def regenerate_primary_key( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -255,7 +258,10 @@ def regenerate_secondary_key( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py index d5c40213fece..514678e44d5f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -46,14 +45,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -92,14 +91,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -137,14 +136,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -184,7 +183,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -192,7 +191,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -235,7 +234,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -243,7 +242,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -284,14 +283,14 @@ def build_regenerate_primary_key_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -329,14 +328,14 @@ def build_regenerate_secondary_key_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -374,14 +373,14 @@ def build_list_secrets_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -421,17 +420,17 @@ class TenantAccessOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, filter: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.AccessInformationContract"]: + ) -> ItemPaged["_models.AccessInformationContract"]: """Returns list of access infos - for Git and Management endpoints. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -510,7 +509,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -569,7 +571,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -631,7 +636,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -792,7 +800,10 @@ def create( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -953,7 +964,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1018,7 +1032,10 @@ def regenerate_primary_key( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1076,7 +1093,10 @@ def regenerate_secondary_key( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1134,7 +1154,10 @@ def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py index d9fa3a8e41d0..1775e42af1d9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -28,14 +30,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -51,7 +51,7 @@ def build_deploy_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -59,7 +59,7 @@ def build_deploy_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -99,7 +99,7 @@ def build_save_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -107,7 +107,7 @@ def build_save_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -147,7 +147,7 @@ def build_validate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -155,7 +155,7 @@ def build_validate_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -195,14 +195,14 @@ def build_get_sync_state_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -242,12 +242,12 @@ class TenantConfigurationOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _deploy_initial( self, @@ -308,7 +308,10 @@ def _deploy_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -537,7 +540,10 @@ def _save_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -766,7 +772,10 @@ def _validate_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -981,7 +990,10 @@ def get_sync_state( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TenantConfigurationSyncStateContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py index b8bc7c671784..74ebb4a9f25b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -44,14 +44,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -90,14 +90,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -137,17 +137,17 @@ class TenantSettingsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( self, resource_group_name: str, service_name: str, filter: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.TenantSettingsContract"]: + ) -> ItemPaged["_models.TenantSettingsContract"]: """Public settings. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -225,7 +225,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -287,7 +290,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py index 4e3daf5b39f5..263ef6598299 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -48,14 +48,14 @@ def build_send_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -97,12 +97,12 @@ class UserConfirmationPasswordOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def send( # pylint: disable=inconsistent-return-statements @@ -166,7 +166,10 @@ def send( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py index 241fc480f869..baa8436b95d0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -105,12 +105,12 @@ class UserGroupOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -122,7 +122,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.GroupContract"]: + ) -> ItemPaged["_models.GroupContract"]: """Lists all user groups. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -215,7 +215,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py index f550dafb60ea..0ff41207ddc1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -44,14 +44,14 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -91,17 +91,17 @@ class UserIdentitiesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any - ) -> Iterable["_models.UserIdentityContract"]: + ) -> ItemPaged["_models.UserIdentityContract"]: """List of all user identities. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -180,7 +180,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py index 0529a7bbefe0..abec0b433f50 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -58,14 +57,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -106,14 +105,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -147,14 +146,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -195,7 +194,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -203,7 +202,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -243,7 +242,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -251,7 +250,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -297,14 +296,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -345,14 +344,14 @@ def build_generate_sso_url_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -386,7 +385,7 @@ def build_get_shared_access_token_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -394,7 +393,7 @@ def build_get_shared_access_token_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -436,12 +435,12 @@ class UserOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -453,7 +452,7 @@ def list_by_service( skip: Optional[int] = None, expand_groups: Optional[bool] = None, **kwargs: Any - ) -> Iterable["_models.UserContract"]: + ) -> ItemPaged["_models.UserContract"]: """Lists a collection of registered users in the specified service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -547,7 +546,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -604,7 +606,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, user_id: s if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -664,7 +669,10 @@ def get(self, resource_group_name: str, service_name: str, user_id: str, **kwarg if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -834,7 +842,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -994,7 +1005,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1061,7 +1075,10 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1216,7 +1233,10 @@ def generate_sso_url( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("GenerateSsoUrlResult", pipeline_response.http_response) @@ -1360,7 +1380,10 @@ def get_shared_access_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("UserTokenResult", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py index 38c515377ea2..3bff9d09f0b9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -99,14 +99,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -147,12 +147,12 @@ class UserSubscriptionOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -164,7 +164,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.SubscriptionContract"]: + ) -> ItemPaged["_models.SubscriptionContract"]: """Lists the collection of subscriptions of the specified user. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -261,7 +261,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -324,7 +327,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_diagnostic_operations.py index 7b0c10be6b70..7250e4ac75db 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_diagnostic_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -55,14 +54,14 @@ def build_list_by_workspace_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -111,14 +110,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -164,14 +163,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -219,7 +218,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -227,7 +226,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -279,7 +278,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -287,7 +286,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -338,14 +337,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -392,12 +391,12 @@ class WorkspaceApiDiagnosticOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_workspace( @@ -410,7 +409,7 @@ def list_by_workspace( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.DiagnosticContract"]: + ) -> ItemPaged["_models.DiagnosticContract"]: """Lists all diagnostics of an API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -504,7 +503,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -577,7 +579,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -653,7 +658,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -839,7 +847,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1025,7 +1036,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1109,7 +1123,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_export_operations.py index beeeeeaa31de..c6e52e38affb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_export_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_export_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,14 +50,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -102,12 +102,12 @@ class WorkspaceApiExportOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -181,7 +181,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiExportResult", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_operations.py index 99bd7c4e0e7b..a426553ff6d5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -56,14 +55,14 @@ def build_list_by_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -114,14 +113,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -165,14 +164,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -218,7 +217,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -226,7 +225,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -276,7 +275,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -284,7 +283,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -333,14 +332,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -385,12 +384,12 @@ class WorkspaceApiOperationOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( @@ -404,7 +403,7 @@ def list_by_api( skip: Optional[int] = None, tags: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.OperationContract"]: + ) -> ItemPaged["_models.OperationContract"]: """Lists a collection of the operations for the specified API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -505,7 +504,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -578,7 +580,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -654,7 +659,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -840,7 +848,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1026,7 +1037,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1110,7 +1124,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_policy_operations.py index 4164da0e69ef..9ffe3355058b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_policy_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -51,14 +51,14 @@ def build_list_by_operation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -103,14 +103,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -158,14 +158,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -215,7 +215,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -223,7 +223,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -275,14 +275,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -328,12 +328,12 @@ class WorkspaceApiOperationPolicyOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_operation( @@ -344,7 +344,7 @@ def list_by_operation( api_id: str, operation_id: str, **kwargs: Any - ) -> Iterable["_models.PolicyContract"]: + ) -> ItemPaged["_models.PolicyContract"]: """Get the list of policy configuration at the API Operation level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -430,7 +430,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -507,7 +510,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -592,7 +598,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -788,7 +797,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -876,7 +888,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operations.py index c6b573222287..a8c04787d189 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -60,14 +59,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -113,14 +112,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -157,14 +156,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -208,7 +207,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -216,7 +215,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -264,7 +263,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -272,7 +271,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -320,14 +319,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -373,12 +372,12 @@ class WorkspaceApiOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -392,7 +391,7 @@ def list_by_service( tags: Optional[str] = None, expand_api_version_set: Optional[bool] = None, **kwargs: Any - ) -> Iterable["_models.ApiContract"]: + ) -> ItemPaged["_models.ApiContract"]: """Lists all APIs of the workspace in an API Management service instance. .. seealso:: @@ -496,7 +495,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -559,7 +561,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -625,7 +630,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -701,7 +709,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1056,7 +1067,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1139,7 +1153,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_policy_operations.py index 25916e357d45..5e3d6698354e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_policy_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -45,14 +45,14 @@ def build_list_by_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -95,14 +95,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -148,14 +148,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -203,7 +203,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -211,7 +211,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -261,14 +261,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -313,17 +313,17 @@ class WorkspaceApiPolicyOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any - ) -> Iterable["_models.PolicyContract"]: + ) -> ItemPaged["_models.PolicyContract"]: """Get the policy configuration at the API level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -405,7 +405,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -477,7 +480,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -557,7 +563,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -740,7 +749,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -823,7 +835,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_release_operations.py index 8c29bc058f63..533585f21f90 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_release_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_release_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -55,14 +54,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -111,14 +110,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -164,14 +163,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -219,7 +218,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -227,7 +226,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -279,7 +278,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -287,7 +286,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -338,14 +337,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -392,12 +391,12 @@ class WorkspaceApiReleaseOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -410,7 +409,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ApiReleaseContract"]: + ) -> ItemPaged["_models.ApiReleaseContract"]: """Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. @@ -506,7 +505,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -579,7 +581,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -655,7 +660,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -841,7 +849,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1027,7 +1038,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1111,7 +1125,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_revision_operations.py index 75d22f834ba9..969c3fe7bed5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_revision_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/revisions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -109,12 +109,12 @@ class WorkspaceApiRevisionOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -127,7 +127,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ApiRevisionContract"]: + ) -> ItemPaged["_models.ApiRevisionContract"]: """Lists all revisions of an API. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -221,7 +221,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_schema_operations.py index 9ccd41e8c3cf..49ffef730129 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_schema_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -58,14 +58,14 @@ def build_list_by_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -114,14 +114,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -165,14 +165,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -218,7 +218,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -226,7 +226,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -277,14 +277,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -331,12 +331,12 @@ class WorkspaceApiSchemaOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( @@ -349,7 +349,7 @@ def list_by_api( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.SchemaContract"]: + ) -> ItemPaged["_models.SchemaContract"]: """Get the schema configuration at the API level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -443,7 +443,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -510,7 +513,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -580,7 +586,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -658,7 +667,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -939,7 +951,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_version_set_operations.py index 226d4772ee2d..c801889b4e00 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_version_set_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_version_set_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +53,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -108,14 +107,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -159,14 +158,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -212,7 +211,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -220,7 +219,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -270,7 +269,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -278,7 +277,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -327,14 +326,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -380,12 +379,12 @@ class WorkspaceApiVersionSetOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -397,7 +396,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ApiVersionSetContract"]: + ) -> ItemPaged["_models.ApiVersionSetContract"]: """Lists a collection of API Version Sets in the specified workspace with a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -487,7 +486,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -550,7 +552,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -616,7 +621,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -789,7 +797,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -962,7 +973,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1041,7 +1055,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_backend_operations.py index fcf41f6db214..3fb32fcf2917 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_backend_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_backend_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +53,14 @@ def build_list_by_workspace_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -103,14 +102,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -147,14 +146,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -198,7 +197,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -206,7 +205,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -254,7 +253,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -262,7 +261,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -309,14 +308,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -360,12 +359,12 @@ class WorkspaceBackendOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_workspace( @@ -377,7 +376,7 @@ def list_by_workspace( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.BackendContract"]: + ) -> ItemPaged["_models.BackendContract"]: """Lists a collection of backends in the specified workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -469,7 +468,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -532,7 +534,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -598,7 +603,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -771,7 +779,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -944,7 +955,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1023,7 +1037,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_certificate_operations.py index 75d54ede0c37..a22f12115e43 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_certificate_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_certificate_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +54,14 @@ def build_list_by_workspace_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -112,14 +112,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -163,14 +163,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -216,7 +216,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -224,7 +224,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -274,14 +274,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -326,14 +326,14 @@ def build_refresh_secret_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}/refreshSecret", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -378,12 +378,12 @@ class WorkspaceCertificateOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_workspace( @@ -396,7 +396,7 @@ def list_by_workspace( skip: Optional[int] = None, is_key_vault_refresh_failed: Optional[bool] = None, **kwargs: Any - ) -> Iterable["_models.CertificateContract"]: + ) -> ItemPaged["_models.CertificateContract"]: """Lists a collection of all certificates in the specified workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -492,7 +492,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -555,7 +558,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -621,7 +627,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -807,7 +816,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -886,7 +898,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -952,7 +967,10 @@ def refresh_secret( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_diagnostic_operations.py index 123ee41d0148..1db6004dee2b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_diagnostic_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +53,14 @@ def build_list_by_workspace_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -108,14 +107,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -159,14 +158,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -212,7 +211,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -220,7 +219,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -270,7 +269,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -278,7 +277,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -327,14 +326,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -380,12 +379,12 @@ class WorkspaceDiagnosticOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_workspace( @@ -397,7 +396,7 @@ def list_by_workspace( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.DiagnosticContract"]: + ) -> ItemPaged["_models.DiagnosticContract"]: """Lists all diagnostics in the specified workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -487,7 +486,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -550,7 +552,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -616,7 +621,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -789,7 +797,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -962,7 +973,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1041,7 +1055,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_global_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_global_schema_operations.py index 2f7834aa20f9..8bd209addea3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_global_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_global_schema_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -57,14 +57,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -106,14 +106,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -150,14 +150,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -201,7 +201,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -209,7 +209,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -257,14 +257,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -308,12 +308,12 @@ class WorkspaceGlobalSchemaOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -325,7 +325,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.GlobalSchemaContract"]: + ) -> ItemPaged["_models.GlobalSchemaContract"]: """Lists a collection of schemas registered with workspace in a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -416,7 +416,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -479,7 +482,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -545,7 +551,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -621,7 +630,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -882,7 +894,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_operations.py index e510ff629e7a..09b3c8bf7f7d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +53,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -103,14 +102,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -147,14 +146,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -198,7 +197,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -206,7 +205,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -254,7 +253,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -262,7 +261,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -309,14 +308,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -360,12 +359,12 @@ class WorkspaceGroupOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -377,7 +376,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.GroupContract"]: + ) -> ItemPaged["_models.GroupContract"]: """Lists a collection of groups defined within a workspace in a service instance. .. seealso:: @@ -472,7 +471,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -535,7 +537,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -601,7 +606,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -774,7 +782,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -947,7 +958,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1026,7 +1040,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_user_operations.py index 94c74c2517f8..f6c4ce9cf347 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_user_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,14 +53,14 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -109,14 +109,14 @@ def build_check_entity_exists_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -160,14 +160,14 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -211,14 +211,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -262,12 +262,12 @@ class WorkspaceGroupUserOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -280,7 +280,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.UserContract"]: + ) -> ItemPaged["_models.UserContract"]: """Lists a collection of user entities associated with the group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -378,7 +378,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -445,7 +448,10 @@ def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -512,7 +518,10 @@ def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("UserContract", pipeline_response.http_response) @@ -582,7 +591,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_logger_operations.py index ed6248878aaf..93912403be0b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_logger_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_logger_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +53,14 @@ def build_list_by_workspace_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -103,14 +102,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -147,14 +146,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -198,7 +197,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -206,7 +205,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -254,7 +253,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -262,7 +261,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -309,14 +308,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -360,12 +359,12 @@ class WorkspaceLoggerOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_workspace( @@ -377,7 +376,7 @@ def list_by_workspace( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.LoggerContract"]: + ) -> ItemPaged["_models.LoggerContract"]: """Lists a collection of loggers in the specified workspace. .. seealso:: @@ -472,7 +471,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -535,7 +537,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -601,7 +606,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -774,7 +782,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -947,7 +958,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1026,7 +1040,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_named_value_operations.py index 4700ae6e78b2..c0a1aff2bfea 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_named_value_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_named_value_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -59,14 +58,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -117,14 +116,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -168,14 +167,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -221,7 +220,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -229,7 +228,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -279,7 +278,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -287,7 +286,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -336,14 +335,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -388,14 +387,14 @@ def build_list_value_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}/listValue", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -439,14 +438,14 @@ def build_refresh_secret_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}/refreshSecret", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -491,12 +490,12 @@ class WorkspaceNamedValueOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -509,7 +508,7 @@ def list_by_service( skip: Optional[int] = None, is_key_vault_refresh_failed: Optional[Union[str, _models.KeyVaultRefreshState]] = None, **kwargs: Any - ) -> Iterable["_models.NamedValueContract"]: + ) -> ItemPaged["_models.NamedValueContract"]: """Lists a collection of named values defined within a workspace in a service instance. .. seealso:: @@ -607,7 +606,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -669,7 +671,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -734,7 +739,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -810,7 +818,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1062,7 +1073,10 @@ def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1315,7 +1329,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1376,7 +1393,10 @@ def list_value( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1432,7 +1452,10 @@ def _refresh_secret_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_operations.py index 0f16f9629964..5638dd9b38ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,14 +27,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -51,14 +51,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -103,14 +103,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -154,14 +154,14 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -206,12 +206,12 @@ class WorkspaceNotificationOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -222,7 +222,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.NotificationContract"]: + ) -> ItemPaged["_models.NotificationContract"]: """Lists a collection of properties defined within a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -307,7 +307,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -377,7 +380,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) @@ -455,7 +461,10 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_email_operations.py index 0674591371c7..83a608e8a985 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_email_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_email_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -47,14 +47,14 @@ def build_list_by_notification_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -97,14 +97,14 @@ def build_check_entity_exists_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -148,14 +148,14 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -199,14 +199,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -250,12 +250,12 @@ class WorkspaceNotificationRecipientEmailOperations: # pylint: disable=name-too models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_notification( @@ -320,7 +320,10 @@ def list_by_notification( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientEmailCollection", pipeline_response.http_response) @@ -397,7 +400,10 @@ def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -471,7 +477,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientEmailContract", pipeline_response.http_response) @@ -548,7 +557,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_user_operations.py index 7da503069a2f..6ef4c356a599 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_user_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,14 +25,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -47,14 +47,14 @@ def build_list_by_notification_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -97,14 +97,14 @@ def build_check_entity_exists_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -148,14 +148,14 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -199,14 +199,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -250,12 +250,12 @@ class WorkspaceNotificationRecipientUserOperations: # pylint: disable=name-too- models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_notification( @@ -320,7 +320,10 @@ def list_by_notification( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientUserCollection", pipeline_response.http_response) @@ -398,7 +401,10 @@ def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -473,7 +479,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RecipientUserContract", pipeline_response.http_response) @@ -551,7 +560,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_operations.py index 25a34161b3bc..a32073739632 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -52,14 +52,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -98,14 +98,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -141,14 +141,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -190,7 +190,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -198,7 +198,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -244,7 +244,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -252,7 +252,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -297,14 +297,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -347,12 +347,12 @@ class WorkspaceOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -363,7 +363,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.WorkspaceContract"]: + ) -> ItemPaged["_models.WorkspaceContract"]: """Lists all workspaces of the API Management service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -450,7 +450,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -507,7 +510,10 @@ def get_entity_tag(self, resource_group_name: str, service_name: str, workspace_ if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -569,7 +575,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -729,7 +738,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -889,7 +901,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -958,7 +973,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_fragment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_fragment_operations.py index 3c8a5bbd2c74..b82fca6cfbf3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_fragment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_fragment_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,14 +32,12 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -59,14 +58,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -110,14 +109,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -161,14 +160,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -214,7 +213,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -222,7 +221,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -270,14 +269,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -323,14 +322,14 @@ def build_list_references_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}/listReferences", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -377,12 +376,12 @@ class WorkspacePolicyFragmentOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -395,7 +394,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.PolicyFragmentContract"]: + ) -> ItemPaged["_models.PolicyFragmentContract"]: """Gets all policy fragments defined within a workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -491,7 +490,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -553,7 +555,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -628,7 +633,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -704,7 +712,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -952,7 +963,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1026,7 +1040,10 @@ def list_references( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ResourceCollection", pipeline_response.http_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_operations.py index 42fc78587900..25b010e2fdad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -45,14 +45,14 @@ def build_list_by_api_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -93,14 +93,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -144,14 +144,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -197,7 +197,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -205,7 +205,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -253,14 +253,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -304,17 +304,17 @@ class WorkspacePolicyOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_api( self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any - ) -> Iterable["_models.PolicyContract"]: + ) -> ItemPaged["_models.PolicyContract"]: """Get the policy configuration at the workspace level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -392,7 +392,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -459,7 +462,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -534,7 +540,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -704,7 +713,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -782,7 +794,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_api_link_operations.py index 1191f83e911e..0d8f4d19906d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_api_link_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +54,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -110,14 +110,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -163,7 +163,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -171,7 +171,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -219,14 +219,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -272,12 +272,12 @@ class WorkspaceProductApiLinkOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -290,7 +290,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ProductApiLinkContract"]: + ) -> ItemPaged["_models.ProductApiLinkContract"]: """Lists a collection of the API links associated with a product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -385,7 +385,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -458,7 +461,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -631,7 +637,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ProductApiLinkContract", pipeline_response.http_response) @@ -707,7 +716,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_group_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_group_link_operations.py index 44ac1bc1fe42..b6f9feb091d1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_group_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_group_link_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +54,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -110,14 +110,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -163,7 +163,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -171,7 +171,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -219,14 +219,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -272,12 +272,12 @@ class WorkspaceProductGroupLinkOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -290,7 +290,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.ProductGroupLinkContract"]: + ) -> ItemPaged["_models.ProductGroupLinkContract"]: """Lists a collection of the group links associated with a product. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -385,7 +385,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -458,7 +461,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -631,7 +637,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ProductGroupLinkContract", pipeline_response.http_response) @@ -707,7 +716,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_operations.py index 5387ea30daed..0763d920173d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -56,14 +55,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -109,14 +108,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -153,14 +152,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -204,7 +203,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -212,7 +211,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -260,7 +259,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -268,7 +267,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -316,14 +315,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -369,12 +368,12 @@ class WorkspaceProductOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -388,7 +387,7 @@ def list_by_service( expand_groups: Optional[bool] = None, tags: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.ProductContract"]: + ) -> ItemPaged["_models.ProductContract"]: """Lists a collection of products in the specified workspace in a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -489,7 +488,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -552,7 +554,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -618,7 +623,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -791,7 +799,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -964,7 +975,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1048,7 +1062,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_policy_operations.py index 7327cf9761c8..46dc74e9bced 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_policy_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,14 +26,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -43,14 +43,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -93,14 +93,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -146,14 +146,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -201,7 +201,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -209,7 +209,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -259,14 +259,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -311,12 +311,12 @@ class WorkspaceProductPolicyOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -374,7 +374,10 @@ def list_by_product( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PolicyCollection", pipeline_response.http_response) @@ -449,7 +452,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -529,7 +535,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -712,7 +721,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -795,7 +807,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_subscription_operations.py index dc002c7316e2..09e1c8fea60a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_subscription_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +53,14 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -103,14 +102,14 @@ def build_get_entity_tag_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -147,14 +146,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -200,7 +199,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -208,7 +207,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -262,7 +261,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -270,7 +269,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -321,14 +320,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -366,14 +365,14 @@ def build_regenerate_primary_key_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/regeneratePrimaryKey", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -410,14 +409,14 @@ def build_regenerate_secondary_key_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/regenerateSecondaryKey", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -454,14 +453,14 @@ def build_list_secrets_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/listSecrets", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -504,12 +503,12 @@ class WorkspaceSubscriptionOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -521,7 +520,7 @@ def list( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.SubscriptionContract"]: + ) -> ItemPaged["_models.SubscriptionContract"]: """Lists all subscriptions of the workspace in an API Management service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -619,7 +618,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -683,7 +685,10 @@ def get_entity_tag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -749,7 +754,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -960,7 +968,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1171,7 +1182,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1244,7 +1258,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1307,7 +1324,10 @@ def regenerate_primary_key( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1370,7 +1390,10 @@ def regenerate_secondary_key( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1432,7 +1455,10 @@ def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_api_link_operations.py index cfa1cf852c7a..776ed820a6be 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_api_link_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +54,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -110,14 +110,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -163,7 +163,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -171,7 +171,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -219,14 +219,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -272,12 +272,12 @@ class WorkspaceTagApiLinkOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -290,7 +290,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.TagApiLinkContract"]: + ) -> ItemPaged["_models.TagApiLinkContract"]: """Lists a collection of the API links associated with a tag. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -384,7 +384,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -457,7 +460,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -630,7 +636,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagApiLinkContract", pipeline_response.http_response) @@ -706,7 +715,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operation_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operation_link_operations.py index 193f64137308..0afa8a09601f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operation_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operation_link_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +54,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -110,14 +110,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -163,7 +163,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -171,7 +171,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -219,14 +219,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -272,12 +272,12 @@ class WorkspaceTagOperationLinkOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -290,7 +290,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.TagOperationLinkContract"]: + ) -> ItemPaged["_models.TagOperationLinkContract"]: """Lists a collection of the operation links associated with a tag. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -385,7 +385,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -458,7 +461,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -631,7 +637,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagOperationLinkContract", pipeline_response.http_response) @@ -707,7 +716,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operations.py index ac491b9d4b86..9d06e078d263 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -55,14 +54,14 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -106,14 +105,14 @@ def build_get_entity_state_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -150,14 +149,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -201,7 +200,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -209,7 +208,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -257,7 +256,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -265,7 +264,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -312,14 +311,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -363,12 +362,12 @@ class WorkspaceTagOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -381,7 +380,7 @@ def list_by_service( skip: Optional[int] = None, scope: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.TagContract"]: + ) -> ItemPaged["_models.TagContract"]: """Lists a collection of tags defined within a workspace in a service instance. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -475,7 +474,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -538,7 +540,10 @@ def get_entity_state( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -604,7 +609,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -777,7 +785,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -950,7 +961,10 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1023,7 +1037,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_product_link_operations.py index 02b5093c97ff..f3b8bf7d0a91 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_product_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_product_link_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,14 +28,12 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import ApiManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -54,14 +54,14 @@ def build_list_by_product_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -110,14 +110,14 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -163,7 +163,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -171,7 +171,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -219,14 +219,14 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 @@ -272,12 +272,12 @@ class WorkspaceTagProductLinkOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_product( @@ -290,7 +290,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.TagProductLinkContract"]: + ) -> ItemPaged["_models.TagProductLinkContract"]: """Lists a collection of the product links associated with a tag. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -385,7 +385,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -458,7 +461,10 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -631,7 +637,10 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("TagProductLinkContract", pipeline_response.http_response) @@ -707,7 +716,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/code_report_swagger.json b/sdk/apimanagement/azure-mgmt-apimanagement/code_report_swagger.json new file mode 100644 index 000000000000..f68660c5c27e --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/code_report_swagger.json @@ -0,0 +1,138283 @@ +{ + "azure.mgmt.apimanagement": { + "class_nodes": { + "ApiManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_perform_connectivity_check_async": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "type": "ConnectivityCheckRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "api_gateway": { + "attr_type": "ApiGatewayOperations" + }, + "api_management_gateway_skus": { + "attr_type": "ApiManagementGatewaySkusOperations" + }, + "all_policies": { + "attr_type": "AllPoliciesOperations" + }, + "api": { + "attr_type": "ApiOperations" + }, + "api_revision": { + "attr_type": "ApiRevisionOperations" + }, + "api_release": { + "attr_type": "ApiReleaseOperations" + }, + "api_operation": { + "attr_type": "ApiOperationOperations" + }, + "api_operation_policy": { + "attr_type": "ApiOperationPolicyOperations" + }, + "tag": { + "attr_type": "TagOperations" + }, + "graph_ql_api_resolver": { + "attr_type": "GraphQLApiResolverOperations" + }, + "graph_ql_api_resolver_policy": { + "attr_type": "GraphQLApiResolverPolicyOperations" + }, + "api_product": { + "attr_type": "ApiProductOperations" + }, + "api_policy": { + "attr_type": "ApiPolicyOperations" + }, + "api_schema": { + "attr_type": "ApiSchemaOperations" + }, + "api_diagnostic": { + "attr_type": "ApiDiagnosticOperations" + }, + "api_issue": { + "attr_type": "ApiIssueOperations" + }, + "api_issue_comment": { + "attr_type": "ApiIssueCommentOperations" + }, + "api_issue_attachment": { + "attr_type": "ApiIssueAttachmentOperations" + }, + "api_tag_description": { + "attr_type": "ApiTagDescriptionOperations" + }, + "operation": { + "attr_type": "OperationOperations" + }, + "api_wiki": { + "attr_type": "ApiWikiOperations" + }, + "api_wikis": { + "attr_type": "ApiWikisOperations" + }, + "api_tool": { + "attr_type": "ApiToolOperations" + }, + "api_export": { + "attr_type": "ApiExportOperations" + }, + "api_version_set": { + "attr_type": "ApiVersionSetOperations" + }, + "authorization_provider": { + "attr_type": "AuthorizationProviderOperations" + }, + "authorization": { + "attr_type": "AuthorizationOperations" + }, + "authorization_login_links": { + "attr_type": "AuthorizationLoginLinksOperations" + }, + "authorization_access_policy": { + "attr_type": "AuthorizationAccessPolicyOperations" + }, + "authorization_server": { + "attr_type": "AuthorizationServerOperations" + }, + "backend": { + "attr_type": "BackendOperations" + }, + "cache": { + "attr_type": "CacheOperations" + }, + "certificate": { + "attr_type": "CertificateOperations" + }, + "client_application": { + "attr_type": "ClientApplicationOperations" + }, + "client_application_product_link": { + "attr_type": "ClientApplicationProductLinkOperations" + }, + "content_type": { + "attr_type": "ContentTypeOperations" + }, + "content_item": { + "attr_type": "ContentItemOperations" + }, + "deleted_services": { + "attr_type": "DeletedServicesOperations" + }, + "api_management_operations": { + "attr_type": "ApiManagementOperationsOperations" + }, + "api_management_service_skus": { + "attr_type": "ApiManagementServiceSkusOperations" + }, + "api_management_service": { + "attr_type": "ApiManagementServiceOperations" + }, + "diagnostic": { + "attr_type": "DiagnosticOperations" + }, + "documentation": { + "attr_type": "DocumentationOperations" + }, + "email_template": { + "attr_type": "EmailTemplateOperations" + }, + "api_gateway_config_connection": { + "attr_type": "ApiGatewayConfigConnectionOperations" + }, + "api_gateway_hostname_binding": { + "attr_type": "ApiGatewayHostnameBindingOperations" + }, + "gateway": { + "attr_type": "GatewayOperations" + }, + "gateway_hostname_configuration": { + "attr_type": "GatewayHostnameConfigurationOperations" + }, + "gateway_api": { + "attr_type": "GatewayApiOperations" + }, + "gateway_certificate_authority": { + "attr_type": "GatewayCertificateAuthorityOperations" + }, + "group": { + "attr_type": "GroupOperations" + }, + "group_user": { + "attr_type": "GroupUserOperations" + }, + "identity_provider": { + "attr_type": "IdentityProviderOperations" + }, + "issue": { + "attr_type": "IssueOperations" + }, + "logger": { + "attr_type": "LoggerOperations" + }, + "named_value": { + "attr_type": "NamedValueOperations" + }, + "network_status": { + "attr_type": "NetworkStatusOperations" + }, + "notification": { + "attr_type": "NotificationOperations" + }, + "notification_recipient_user": { + "attr_type": "NotificationRecipientUserOperations" + }, + "notification_recipient_email": { + "attr_type": "NotificationRecipientEmailOperations" + }, + "open_id_connect_provider": { + "attr_type": "OpenIdConnectProviderOperations" + }, + "outbound_network_dependencies_endpoints": { + "attr_type": "OutboundNetworkDependenciesEndpointsOperations" + }, + "policy": { + "attr_type": "PolicyOperations" + }, + "policy_description": { + "attr_type": "PolicyDescriptionOperations" + }, + "policy_fragment": { + "attr_type": "PolicyFragmentOperations" + }, + "policy_restriction": { + "attr_type": "PolicyRestrictionOperations" + }, + "policy_restriction_validations": { + "attr_type": "PolicyRestrictionValidationsOperations" + }, + "portal_config": { + "attr_type": "PortalConfigOperations" + }, + "portal_revision": { + "attr_type": "PortalRevisionOperations" + }, + "portal_settings": { + "attr_type": "PortalSettingsOperations" + }, + "sign_in_settings": { + "attr_type": "SignInSettingsOperations" + }, + "sign_up_settings": { + "attr_type": "SignUpSettingsOperations" + }, + "delegation_settings": { + "attr_type": "DelegationSettingsOperations" + }, + "private_endpoint_connection": { + "attr_type": "PrivateEndpointConnectionOperations" + }, + "product": { + "attr_type": "ProductOperations" + }, + "product_api": { + "attr_type": "ProductApiOperations" + }, + "product_group": { + "attr_type": "ProductGroupOperations" + }, + "product_subscriptions": { + "attr_type": "ProductSubscriptionsOperations" + }, + "product_policy": { + "attr_type": "ProductPolicyOperations" + }, + "product_wiki": { + "attr_type": "ProductWikiOperations" + }, + "product_wikis": { + "attr_type": "ProductWikisOperations" + }, + "product_api_link": { + "attr_type": "ProductApiLinkOperations" + }, + "product_group_link": { + "attr_type": "ProductGroupLinkOperations" + }, + "quota_by_counter_keys": { + "attr_type": "QuotaByCounterKeysOperations" + }, + "quota_by_period_keys": { + "attr_type": "QuotaByPeriodKeysOperations" + }, + "region": { + "attr_type": "RegionOperations" + }, + "reports": { + "attr_type": "ReportsOperations" + }, + "global_schema": { + "attr_type": "GlobalSchemaOperations" + }, + "tenant_settings": { + "attr_type": "TenantSettingsOperations" + }, + "api_management_skus": { + "attr_type": "ApiManagementSkusOperations" + }, + "subscription": { + "attr_type": "SubscriptionOperations" + }, + "tag_resource": { + "attr_type": "TagResourceOperations" + }, + "tag_api_link": { + "attr_type": "TagApiLinkOperations" + }, + "tag_operation_link": { + "attr_type": "TagOperationLinkOperations" + }, + "tag_product_link": { + "attr_type": "TagProductLinkOperations" + }, + "tenant_access": { + "attr_type": "TenantAccessOperations" + }, + "tenant_access_git": { + "attr_type": "TenantAccessGitOperations" + }, + "tenant_configuration": { + "attr_type": "TenantConfigurationOperations" + }, + "user": { + "attr_type": "UserOperations" + }, + "user_group": { + "attr_type": "UserGroupOperations" + }, + "user_subscription": { + "attr_type": "UserSubscriptionOperations" + }, + "user_identities": { + "attr_type": "UserIdentitiesOperations" + }, + "user_confirmation_password": { + "attr_type": "UserConfirmationPasswordOperations" + }, + "workspace_backend": { + "attr_type": "WorkspaceBackendOperations" + }, + "workspace_certificate": { + "attr_type": "WorkspaceCertificateOperations" + }, + "workspace_diagnostic": { + "attr_type": "WorkspaceDiagnosticOperations" + }, + "workspace_api_diagnostic": { + "attr_type": "WorkspaceApiDiagnosticOperations" + }, + "api_management_workspace_links": { + "attr_type": "ApiManagementWorkspaceLinksOperations" + }, + "api_management_workspace_link": { + "attr_type": "ApiManagementWorkspaceLinkOperations" + }, + "workspace_logger": { + "attr_type": "WorkspaceLoggerOperations" + }, + "workspace": { + "attr_type": "WorkspaceOperations" + }, + "workspace_policy": { + "attr_type": "WorkspacePolicyOperations" + }, + "workspace_named_value": { + "attr_type": "WorkspaceNamedValueOperations" + }, + "workspace_global_schema": { + "attr_type": "WorkspaceGlobalSchemaOperations" + }, + "workspace_notification": { + "attr_type": "WorkspaceNotificationOperations" + }, + "workspace_notification_recipient_user": { + "attr_type": "WorkspaceNotificationRecipientUserOperations" + }, + "workspace_notification_recipient_email": { + "attr_type": "WorkspaceNotificationRecipientEmailOperations" + }, + "workspace_policy_fragment": { + "attr_type": "WorkspacePolicyFragmentOperations" + }, + "workspace_group": { + "attr_type": "WorkspaceGroupOperations" + }, + "workspace_group_user": { + "attr_type": "WorkspaceGroupUserOperations" + }, + "workspace_subscription": { + "attr_type": "WorkspaceSubscriptionOperations" + }, + "workspace_api_version_set": { + "attr_type": "WorkspaceApiVersionSetOperations" + }, + "workspace_api": { + "attr_type": "WorkspaceApiOperations" + }, + "workspace_api_revision": { + "attr_type": "WorkspaceApiRevisionOperations" + }, + "workspace_api_release": { + "attr_type": "WorkspaceApiReleaseOperations" + }, + "workspace_api_operation": { + "attr_type": "WorkspaceApiOperationOperations" + }, + "workspace_api_operation_policy": { + "attr_type": "WorkspaceApiOperationPolicyOperations" + }, + "workspace_api_policy": { + "attr_type": "WorkspaceApiPolicyOperations" + }, + "workspace_api_schema": { + "attr_type": "WorkspaceApiSchemaOperations" + }, + "workspace_product": { + "attr_type": "WorkspaceProductOperations" + }, + "workspace_product_api_link": { + "attr_type": "WorkspaceProductApiLinkOperations" + }, + "workspace_product_group_link": { + "attr_type": "WorkspaceProductGroupLinkOperations" + }, + "workspace_product_policy": { + "attr_type": "WorkspaceProductPolicyOperations" + }, + "workspace_tag": { + "attr_type": "WorkspaceTagOperations" + }, + "workspace_tag_api_link": { + "attr_type": "WorkspaceTagApiLinkOperations" + }, + "workspace_tag_operation_link": { + "attr_type": "WorkspaceTagOperationLinkOperations" + }, + "workspace_tag_product_link": { + "attr_type": "WorkspaceTagProductLinkOperations" + }, + "workspace_api_export": { + "attr_type": "WorkspaceApiExportOperations" + }, + "operation_status": { + "attr_type": "OperationStatusOperations" + }, + "operations_results": { + "attr_type": "OperationsResultsOperations" + }, + "url": { + "attr_type": "format_url" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.apimanagement.aio": { + "class_nodes": { + "ApiManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_perform_connectivity_check_async": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "type": "ConnectivityCheckRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "api_gateway": { + "attr_type": "ApiGatewayOperations" + }, + "api_management_gateway_skus": { + "attr_type": "ApiManagementGatewaySkusOperations" + }, + "all_policies": { + "attr_type": "AllPoliciesOperations" + }, + "api": { + "attr_type": "ApiOperations" + }, + "api_revision": { + "attr_type": "ApiRevisionOperations" + }, + "api_release": { + "attr_type": "ApiReleaseOperations" + }, + "api_operation": { + "attr_type": "ApiOperationOperations" + }, + "api_operation_policy": { + "attr_type": "ApiOperationPolicyOperations" + }, + "tag": { + "attr_type": "TagOperations" + }, + "graph_ql_api_resolver": { + "attr_type": "GraphQLApiResolverOperations" + }, + "graph_ql_api_resolver_policy": { + "attr_type": "GraphQLApiResolverPolicyOperations" + }, + "api_product": { + "attr_type": "ApiProductOperations" + }, + "api_policy": { + "attr_type": "ApiPolicyOperations" + }, + "api_schema": { + "attr_type": "ApiSchemaOperations" + }, + "api_diagnostic": { + "attr_type": "ApiDiagnosticOperations" + }, + "api_issue": { + "attr_type": "ApiIssueOperations" + }, + "api_issue_comment": { + "attr_type": "ApiIssueCommentOperations" + }, + "api_issue_attachment": { + "attr_type": "ApiIssueAttachmentOperations" + }, + "api_tag_description": { + "attr_type": "ApiTagDescriptionOperations" + }, + "operation": { + "attr_type": "OperationOperations" + }, + "api_wiki": { + "attr_type": "ApiWikiOperations" + }, + "api_wikis": { + "attr_type": "ApiWikisOperations" + }, + "api_tool": { + "attr_type": "ApiToolOperations" + }, + "api_export": { + "attr_type": "ApiExportOperations" + }, + "api_version_set": { + "attr_type": "ApiVersionSetOperations" + }, + "authorization_provider": { + "attr_type": "AuthorizationProviderOperations" + }, + "authorization": { + "attr_type": "AuthorizationOperations" + }, + "authorization_login_links": { + "attr_type": "AuthorizationLoginLinksOperations" + }, + "authorization_access_policy": { + "attr_type": "AuthorizationAccessPolicyOperations" + }, + "authorization_server": { + "attr_type": "AuthorizationServerOperations" + }, + "backend": { + "attr_type": "BackendOperations" + }, + "cache": { + "attr_type": "CacheOperations" + }, + "certificate": { + "attr_type": "CertificateOperations" + }, + "client_application": { + "attr_type": "ClientApplicationOperations" + }, + "client_application_product_link": { + "attr_type": "ClientApplicationProductLinkOperations" + }, + "content_type": { + "attr_type": "ContentTypeOperations" + }, + "content_item": { + "attr_type": "ContentItemOperations" + }, + "deleted_services": { + "attr_type": "DeletedServicesOperations" + }, + "api_management_operations": { + "attr_type": "ApiManagementOperationsOperations" + }, + "api_management_service_skus": { + "attr_type": "ApiManagementServiceSkusOperations" + }, + "api_management_service": { + "attr_type": "ApiManagementServiceOperations" + }, + "diagnostic": { + "attr_type": "DiagnosticOperations" + }, + "documentation": { + "attr_type": "DocumentationOperations" + }, + "email_template": { + "attr_type": "EmailTemplateOperations" + }, + "api_gateway_config_connection": { + "attr_type": "ApiGatewayConfigConnectionOperations" + }, + "api_gateway_hostname_binding": { + "attr_type": "ApiGatewayHostnameBindingOperations" + }, + "gateway": { + "attr_type": "GatewayOperations" + }, + "gateway_hostname_configuration": { + "attr_type": "GatewayHostnameConfigurationOperations" + }, + "gateway_api": { + "attr_type": "GatewayApiOperations" + }, + "gateway_certificate_authority": { + "attr_type": "GatewayCertificateAuthorityOperations" + }, + "group": { + "attr_type": "GroupOperations" + }, + "group_user": { + "attr_type": "GroupUserOperations" + }, + "identity_provider": { + "attr_type": "IdentityProviderOperations" + }, + "issue": { + "attr_type": "IssueOperations" + }, + "logger": { + "attr_type": "LoggerOperations" + }, + "named_value": { + "attr_type": "NamedValueOperations" + }, + "network_status": { + "attr_type": "NetworkStatusOperations" + }, + "notification": { + "attr_type": "NotificationOperations" + }, + "notification_recipient_user": { + "attr_type": "NotificationRecipientUserOperations" + }, + "notification_recipient_email": { + "attr_type": "NotificationRecipientEmailOperations" + }, + "open_id_connect_provider": { + "attr_type": "OpenIdConnectProviderOperations" + }, + "outbound_network_dependencies_endpoints": { + "attr_type": "OutboundNetworkDependenciesEndpointsOperations" + }, + "policy": { + "attr_type": "PolicyOperations" + }, + "policy_description": { + "attr_type": "PolicyDescriptionOperations" + }, + "policy_fragment": { + "attr_type": "PolicyFragmentOperations" + }, + "policy_restriction": { + "attr_type": "PolicyRestrictionOperations" + }, + "policy_restriction_validations": { + "attr_type": "PolicyRestrictionValidationsOperations" + }, + "portal_config": { + "attr_type": "PortalConfigOperations" + }, + "portal_revision": { + "attr_type": "PortalRevisionOperations" + }, + "portal_settings": { + "attr_type": "PortalSettingsOperations" + }, + "sign_in_settings": { + "attr_type": "SignInSettingsOperations" + }, + "sign_up_settings": { + "attr_type": "SignUpSettingsOperations" + }, + "delegation_settings": { + "attr_type": "DelegationSettingsOperations" + }, + "private_endpoint_connection": { + "attr_type": "PrivateEndpointConnectionOperations" + }, + "product": { + "attr_type": "ProductOperations" + }, + "product_api": { + "attr_type": "ProductApiOperations" + }, + "product_group": { + "attr_type": "ProductGroupOperations" + }, + "product_subscriptions": { + "attr_type": "ProductSubscriptionsOperations" + }, + "product_policy": { + "attr_type": "ProductPolicyOperations" + }, + "product_wiki": { + "attr_type": "ProductWikiOperations" + }, + "product_wikis": { + "attr_type": "ProductWikisOperations" + }, + "product_api_link": { + "attr_type": "ProductApiLinkOperations" + }, + "product_group_link": { + "attr_type": "ProductGroupLinkOperations" + }, + "quota_by_counter_keys": { + "attr_type": "QuotaByCounterKeysOperations" + }, + "quota_by_period_keys": { + "attr_type": "QuotaByPeriodKeysOperations" + }, + "region": { + "attr_type": "RegionOperations" + }, + "reports": { + "attr_type": "ReportsOperations" + }, + "global_schema": { + "attr_type": "GlobalSchemaOperations" + }, + "tenant_settings": { + "attr_type": "TenantSettingsOperations" + }, + "api_management_skus": { + "attr_type": "ApiManagementSkusOperations" + }, + "subscription": { + "attr_type": "SubscriptionOperations" + }, + "tag_resource": { + "attr_type": "TagResourceOperations" + }, + "tag_api_link": { + "attr_type": "TagApiLinkOperations" + }, + "tag_operation_link": { + "attr_type": "TagOperationLinkOperations" + }, + "tag_product_link": { + "attr_type": "TagProductLinkOperations" + }, + "tenant_access": { + "attr_type": "TenantAccessOperations" + }, + "tenant_access_git": { + "attr_type": "TenantAccessGitOperations" + }, + "tenant_configuration": { + "attr_type": "TenantConfigurationOperations" + }, + "user": { + "attr_type": "UserOperations" + }, + "user_group": { + "attr_type": "UserGroupOperations" + }, + "user_subscription": { + "attr_type": "UserSubscriptionOperations" + }, + "user_identities": { + "attr_type": "UserIdentitiesOperations" + }, + "user_confirmation_password": { + "attr_type": "UserConfirmationPasswordOperations" + }, + "workspace_backend": { + "attr_type": "WorkspaceBackendOperations" + }, + "workspace_certificate": { + "attr_type": "WorkspaceCertificateOperations" + }, + "workspace_diagnostic": { + "attr_type": "WorkspaceDiagnosticOperations" + }, + "workspace_api_diagnostic": { + "attr_type": "WorkspaceApiDiagnosticOperations" + }, + "api_management_workspace_links": { + "attr_type": "ApiManagementWorkspaceLinksOperations" + }, + "api_management_workspace_link": { + "attr_type": "ApiManagementWorkspaceLinkOperations" + }, + "workspace_logger": { + "attr_type": "WorkspaceLoggerOperations" + }, + "workspace": { + "attr_type": "WorkspaceOperations" + }, + "workspace_policy": { + "attr_type": "WorkspacePolicyOperations" + }, + "workspace_named_value": { + "attr_type": "WorkspaceNamedValueOperations" + }, + "workspace_global_schema": { + "attr_type": "WorkspaceGlobalSchemaOperations" + }, + "workspace_notification": { + "attr_type": "WorkspaceNotificationOperations" + }, + "workspace_notification_recipient_user": { + "attr_type": "WorkspaceNotificationRecipientUserOperations" + }, + "workspace_notification_recipient_email": { + "attr_type": "WorkspaceNotificationRecipientEmailOperations" + }, + "workspace_policy_fragment": { + "attr_type": "WorkspacePolicyFragmentOperations" + }, + "workspace_group": { + "attr_type": "WorkspaceGroupOperations" + }, + "workspace_group_user": { + "attr_type": "WorkspaceGroupUserOperations" + }, + "workspace_subscription": { + "attr_type": "WorkspaceSubscriptionOperations" + }, + "workspace_api_version_set": { + "attr_type": "WorkspaceApiVersionSetOperations" + }, + "workspace_api": { + "attr_type": "WorkspaceApiOperations" + }, + "workspace_api_revision": { + "attr_type": "WorkspaceApiRevisionOperations" + }, + "workspace_api_release": { + "attr_type": "WorkspaceApiReleaseOperations" + }, + "workspace_api_operation": { + "attr_type": "WorkspaceApiOperationOperations" + }, + "workspace_api_operation_policy": { + "attr_type": "WorkspaceApiOperationPolicyOperations" + }, + "workspace_api_policy": { + "attr_type": "WorkspaceApiPolicyOperations" + }, + "workspace_api_schema": { + "attr_type": "WorkspaceApiSchemaOperations" + }, + "workspace_product": { + "attr_type": "WorkspaceProductOperations" + }, + "workspace_product_api_link": { + "attr_type": "WorkspaceProductApiLinkOperations" + }, + "workspace_product_group_link": { + "attr_type": "WorkspaceProductGroupLinkOperations" + }, + "workspace_product_policy": { + "attr_type": "WorkspaceProductPolicyOperations" + }, + "workspace_tag": { + "attr_type": "WorkspaceTagOperations" + }, + "workspace_tag_api_link": { + "attr_type": "WorkspaceTagApiLinkOperations" + }, + "workspace_tag_operation_link": { + "attr_type": "WorkspaceTagOperationLinkOperations" + }, + "workspace_tag_product_link": { + "attr_type": "WorkspaceTagProductLinkOperations" + }, + "workspace_api_export": { + "attr_type": "WorkspaceApiExportOperations" + }, + "operation_status": { + "attr_type": "OperationStatusOperations" + }, + "operations_results": { + "attr_type": "OperationsResultsOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.apimanagement.aio.operations": { + "class_nodes": { + "AllPoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiDiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiExportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ApiGatewayConfigConnectionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementGatewayConfigConnectionResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_gateway": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiGatewayHostnameBindingOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayHostnameBindingResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_gateway": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiGatewayOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementGatewayResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementGatewayUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiIssueAttachmentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueAttachmentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiIssueCommentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueCommentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiIssueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand_comments_attachments": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand_comments_attachments": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiManagementGatewaySkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_available_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementOperationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementServiceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_apply_network_configuration_updates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[ApiManagementServiceApplyNetworkConfigurationParameters]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_backup": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceBackupRestoreParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_migrate_to_stv2": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[MigrateToStv2Contract]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_refresh_hostnames": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_restore": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceBackupRestoreParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceCheckNameAvailabilityParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_domain_ownership_identifier": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_sso_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementServiceSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_available_service_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementWorkspaceLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementWorkspaceLinksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiOperationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiOperationPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiCreateOrUpdateParameter", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delete_revisions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand_api_version_set": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_tags": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "include_not_tagged_apis": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ApiProductOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_apis": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiReleaseOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiRevisionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "force": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiTagDescriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagDescriptionCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiToolOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ToolContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ToolContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiVersionSetOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiWikiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiWikisOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationAccessPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationAccessPolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_authorization": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationLoginLinksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "post": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationLoginRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "AuthorizationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "confirm_consent_code": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationConfirmConsentCodeRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_authorization_provider": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationProviderOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationProviderContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationServerOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationServerContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationServerUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "BackendOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "reconnect": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[BackendReconnectContract]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "CacheOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CacheContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CacheUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "CertificateOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CertificateCreateOrUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ClientApplicationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClientApplicationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ClientApplicationProductLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClientApplicationProductLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_client_applications": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ContentItemOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ContentItemContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ContentTypeOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ContentTypeContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "DelegationSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalDelegationSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalDelegationSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "DeletedServicesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_purge": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_by_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "DiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "DocumentationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DocumentationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DocumentationUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "EmailTemplateOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "EmailTemplateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "EmailTemplateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GatewayApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[AssociationContract]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GatewayCertificateAuthorityOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayCertificateAuthorityContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GatewayHostnameConfigurationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayHostnameConfigurationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GatewayOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "generate_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayTokenRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "invalidate_debug_credentials": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_debug_credentials": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayListDebugCredentialsContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "list_keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_trace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayListTraceContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "regenerate_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayKeyRegenerationRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GlobalSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GlobalSchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GraphQLApiResolverOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ResolverContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ResolverUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GraphQLApiResolverPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_resolver": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GroupUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "IdentityProviderOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IdentityProviderCreateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IdentityProviderUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "IssueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "LoggerOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "NamedValueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueCreateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_value": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "NetworkStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_location": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "NotificationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "NotificationRecipientEmailOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "NotificationRecipientUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "OpenIdConnectProviderOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OpenidConnectProviderContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OpenidConnectProviderUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "OperationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_tags": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "include_not_tagged_operations": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "OperationStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "OperationsResultsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "OutboundNetworkDependenciesEndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyDescriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyFragmentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyFragmentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_references": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyRestrictionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyRestrictionContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyRestrictionUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "PolicyRestrictionValidationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "PortalConfigOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalConfigContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalConfigContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "PortalRevisionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalRevisionContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalRevisionContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PortalSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "PrivateEndpointConnectionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "type": "PrivateEndpointConnectionRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_by_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_private_link_resource": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_sub_resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_private_link_resources": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ProductApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductGroupLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductGroupLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductGroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delete_subscriptions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand_groups": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_tags": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "include_not_tagged_products": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ProductPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductSubscriptionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductWikiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ProductWikisOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "QuotaByCounterKeysOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QuotaCounterValueUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "QuotaByPeriodKeysOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QuotaCounterValueUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "RegionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ReportsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_geo": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_time": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "interval": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_user": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "SignInSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSigninSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSigninSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "SignUpSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSignupSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSignupSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "SubscriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TagApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TagOperationLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagOperationLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TagOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "assign_to_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "assign_to_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "assign_to_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "detach_from_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "detach_from_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "detach_from_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_state_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_state_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_state_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "scope": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TagProductLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagProductLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TagResourceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TenantAccessGitOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "TenantAccessOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AccessInformationCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AccessInformationUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TenantConfigurationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_deploy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DeployConfigurationParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_save": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SaveConfigurationParameter", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_validate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DeployConfigurationParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get_sync_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "TenantSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "settings_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserConfirmationPasswordOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "send": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "UserGroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserIdentitiesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delete_subscriptions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UserCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "generate_sso_url": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_shared_access_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UserTokenParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand_groups": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UserUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "UserSubscriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiDiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiExportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiOperationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiOperationPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiCreateOrUpdateParameter", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delete_revisions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand_api_version_set": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiReleaseOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiRevisionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "force": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiVersionSetOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceBackendOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceCertificateOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CertificateCreateOrUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceDiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceGlobalSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GlobalSchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceGroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceGroupUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceLoggerOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceNamedValueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueCreateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_value": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceNotificationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceNotificationRecipientEmailOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceNotificationRecipientUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WorkspaceContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WorkspaceContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspacePolicyFragmentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyFragmentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_references": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspacePolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceProductApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceProductGroupLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductGroupLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceProductOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delete_subscriptions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand_groups": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceProductPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceSubscriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceTagApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceTagOperationLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagOperationLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceTagOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "scope": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceTagProductLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagProductLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.mgmt.apimanagement.models": { + "class_nodes": { + "AccessIdName": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCESS": "ACCESS", + "GIT_ACCESS": "GIT_ACCESS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AccessInformationCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessInformationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id_properties_id": { + "default": "none", + "param_type": "keyword_only" + }, + "principal_id": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id_properties_id": { + "attr_type": "id_properties_id" + }, + "principal_id": { + "attr_type": "principal_id" + }, + "enabled": { + "attr_type": "enabled" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessInformationCreateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_id": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "principal_id": { + "attr_type": "principal_id" + }, + "primary_key": { + "attr_type": "primary_key" + }, + "secondary_key": { + "attr_type": "secondary_key" + }, + "enabled": { + "attr_type": "enabled" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessInformationSecretsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "principal_id": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "principal_id": { + "attr_type": "principal_id" + }, + "primary_key": { + "attr_type": "primary_key" + }, + "secondary_key": { + "attr_type": "secondary_key" + }, + "enabled": { + "attr_type": "enabled" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessInformationUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enabled": { + "attr_type": "enabled" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCESS_KEY": "ACCESS_KEY", + "SYSTEM_ASSIGNED_MANAGED_IDENTITY": "SYSTEM_ASSIGNED_MANAGED_IDENTITY", + "USER_ASSIGNED_MANAGED_IDENTITY": "USER_ASSIGNED_MANAGED_IDENTITY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AdditionalLocation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "default": null, + "param_type": "keyword_only" + }, + "zones": { + "default": "none", + "param_type": "keyword_only" + }, + "public_ip_address_id": { + "default": "none", + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "nat_gateway_state": { + "default": "none", + "param_type": "keyword_only" + }, + "disable_gateway": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "location": { + "attr_type": "location" + }, + "sku": { + "attr_type": "sku" + }, + "zones": { + "attr_type": "zones" + }, + "public_ip_addresses": { + "attr_type": null + }, + "private_ip_addresses": { + "attr_type": null + }, + "public_ip_address_id": { + "attr_type": "public_ip_address_id" + }, + "virtual_network_configuration": { + "attr_type": "virtual_network_configuration" + }, + "gateway_regional_url": { + "attr_type": null + }, + "nat_gateway_state": { + "attr_type": "nat_gateway_state" + }, + "outbound_public_ip_addresses": { + "attr_type": null + }, + "disable_gateway": { + "attr_type": "disable_gateway" + }, + "platform_version": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AllPoliciesCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AllPoliciesContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reference_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "compliance_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "reference_policy_id": { + "attr_type": "reference_policy_id" + }, + "compliance_state": { + "attr_type": "compliance_state" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AlwaysLog": { + "type": "Enum", + "methods": {}, + "properties": { + "ALL_ERRORS": "ALL_ERRORS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApiCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiContactInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "url": { + "default": "none", + "param_type": "keyword_only" + }, + "email": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "url": { + "attr_type": "url" + }, + "email": { + "attr_type": "email" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "default": "none", + "param_type": "keyword_only" + }, + "api_type": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version": { + "default": "none", + "param_type": "keyword_only" + }, + "is_current": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_set_id": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "contact": { + "default": "none", + "param_type": "keyword_only" + }, + "license": { + "default": "none", + "param_type": "keyword_only" + }, + "source_api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "path": { + "default": "none", + "param_type": "keyword_only" + }, + "protocols": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_set": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "authentication_settings": { + "attr_type": "authentication_settings" + }, + "subscription_key_parameter_names": { + "attr_type": "subscription_key_parameter_names" + }, + "api_type": { + "attr_type": "api_type" + }, + "api_revision": { + "attr_type": "api_revision" + }, + "api_version": { + "attr_type": "api_version" + }, + "is_current": { + "attr_type": "is_current" + }, + "is_online": { + "attr_type": null + }, + "api_revision_description": { + "attr_type": "api_revision_description" + }, + "api_version_description": { + "attr_type": "api_version_description" + }, + "api_version_set_id": { + "attr_type": "api_version_set_id" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "terms_of_service_url": { + "attr_type": "terms_of_service_url" + }, + "contact": { + "attr_type": "contact" + }, + "license": { + "attr_type": "license" + }, + "source_api_id": { + "attr_type": "source_api_id" + }, + "display_name": { + "attr_type": "display_name" + }, + "service_url": { + "attr_type": "service_url" + }, + "path": { + "attr_type": "path" + }, + "protocols": { + "attr_type": "protocols" + }, + "api_version_set": { + "attr_type": "api_version_set" + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "path": { + "default": null, + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "default": "none", + "param_type": "keyword_only" + }, + "api_type": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version": { + "default": "none", + "param_type": "keyword_only" + }, + "is_current": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_set_id": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "contact": { + "default": "none", + "param_type": "keyword_only" + }, + "license": { + "default": "none", + "param_type": "keyword_only" + }, + "source_api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "protocols": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_set": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "source_api_id": { + "attr_type": "source_api_id" + }, + "display_name": { + "attr_type": "display_name" + }, + "service_url": { + "attr_type": "service_url" + }, + "path": { + "attr_type": "path" + }, + "protocols": { + "attr_type": "protocols" + }, + "api_version_set": { + "attr_type": "api_version_set" + }, + "provisioning_state": { + "attr_type": null + }, + "description": { + "attr_type": "description" + }, + "authentication_settings": { + "attr_type": "authentication_settings" + }, + "subscription_key_parameter_names": { + "attr_type": "subscription_key_parameter_names" + }, + "api_type": { + "attr_type": "api_type" + }, + "api_revision": { + "attr_type": "api_revision" + }, + "api_version": { + "attr_type": "api_version" + }, + "is_current": { + "attr_type": "is_current" + }, + "is_online": { + "attr_type": null + }, + "api_revision_description": { + "attr_type": "api_revision_description" + }, + "api_version_description": { + "attr_type": "api_version_description" + }, + "api_version_set_id": { + "attr_type": "api_version_set_id" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "terms_of_service_url": { + "attr_type": "terms_of_service_url" + }, + "contact": { + "attr_type": "contact" + }, + "license": { + "attr_type": "license" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiContractUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "default": "none", + "param_type": "keyword_only" + }, + "api_type": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version": { + "default": "none", + "param_type": "keyword_only" + }, + "is_current": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_set_id": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "contact": { + "default": "none", + "param_type": "keyword_only" + }, + "license": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "path": { + "default": "none", + "param_type": "keyword_only" + }, + "protocols": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "service_url": { + "attr_type": "service_url" + }, + "path": { + "attr_type": "path" + }, + "protocols": { + "attr_type": "protocols" + }, + "description": { + "attr_type": "description" + }, + "authentication_settings": { + "attr_type": "authentication_settings" + }, + "subscription_key_parameter_names": { + "attr_type": "subscription_key_parameter_names" + }, + "api_type": { + "attr_type": "api_type" + }, + "api_revision": { + "attr_type": "api_revision" + }, + "api_version": { + "attr_type": "api_version" + }, + "is_current": { + "attr_type": "is_current" + }, + "is_online": { + "attr_type": null + }, + "api_revision_description": { + "attr_type": "api_revision_description" + }, + "api_version_description": { + "attr_type": "api_version_description" + }, + "api_version_set_id": { + "attr_type": "api_version_set_id" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "terms_of_service_url": { + "attr_type": "terms_of_service_url" + }, + "contact": { + "attr_type": "contact" + }, + "license": { + "attr_type": "license" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiCreateOrUpdateParameter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "default": "none", + "param_type": "keyword_only" + }, + "api_type": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version": { + "default": "none", + "param_type": "keyword_only" + }, + "is_current": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_set_id": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "contact": { + "default": "none", + "param_type": "keyword_only" + }, + "license": { + "default": "none", + "param_type": "keyword_only" + }, + "source_api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "path": { + "default": "none", + "param_type": "keyword_only" + }, + "protocols": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_set": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "wsdl_selector": { + "default": "none", + "param_type": "keyword_only" + }, + "soap_api_type": { + "default": "none", + "param_type": "keyword_only" + }, + "translate_required_query_parameters_conduct": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "authentication_settings": { + "attr_type": "authentication_settings" + }, + "subscription_key_parameter_names": { + "attr_type": "subscription_key_parameter_names" + }, + "api_type": { + "attr_type": "api_type" + }, + "api_revision": { + "attr_type": "api_revision" + }, + "api_version": { + "attr_type": "api_version" + }, + "is_current": { + "attr_type": "is_current" + }, + "is_online": { + "attr_type": null + }, + "api_revision_description": { + "attr_type": "api_revision_description" + }, + "api_version_description": { + "attr_type": "api_version_description" + }, + "api_version_set_id": { + "attr_type": "api_version_set_id" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "terms_of_service_url": { + "attr_type": "terms_of_service_url" + }, + "contact": { + "attr_type": "contact" + }, + "license": { + "attr_type": "license" + }, + "source_api_id": { + "attr_type": "source_api_id" + }, + "display_name": { + "attr_type": "display_name" + }, + "service_url": { + "attr_type": "service_url" + }, + "path": { + "attr_type": "path" + }, + "protocols": { + "attr_type": "protocols" + }, + "api_version_set": { + "attr_type": "api_version_set" + }, + "provisioning_state": { + "attr_type": null + }, + "value": { + "attr_type": "value" + }, + "format": { + "attr_type": "format" + }, + "wsdl_selector": { + "attr_type": "wsdl_selector" + }, + "soap_api_type": { + "attr_type": "soap_api_type" + }, + "translate_required_query_parameters_conduct": { + "attr_type": "translate_required_query_parameters_conduct" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiCreateOrUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "path": { + "default": null, + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "default": "none", + "param_type": "keyword_only" + }, + "api_type": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version": { + "default": "none", + "param_type": "keyword_only" + }, + "is_current": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_set_id": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "contact": { + "default": "none", + "param_type": "keyword_only" + }, + "license": { + "default": "none", + "param_type": "keyword_only" + }, + "source_api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "protocols": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_set": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "wsdl_selector": { + "default": "none", + "param_type": "keyword_only" + }, + "soap_api_type": { + "default": "none", + "param_type": "keyword_only" + }, + "translate_required_query_parameters_conduct": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "format": { + "attr_type": "format" + }, + "wsdl_selector": { + "attr_type": "wsdl_selector" + }, + "soap_api_type": { + "attr_type": "soap_api_type" + }, + "translate_required_query_parameters_conduct": { + "attr_type": "translate_required_query_parameters_conduct" + }, + "source_api_id": { + "attr_type": "source_api_id" + }, + "display_name": { + "attr_type": "display_name" + }, + "service_url": { + "attr_type": "service_url" + }, + "path": { + "attr_type": "path" + }, + "protocols": { + "attr_type": "protocols" + }, + "api_version_set": { + "attr_type": "api_version_set" + }, + "provisioning_state": { + "attr_type": null + }, + "description": { + "attr_type": "description" + }, + "authentication_settings": { + "attr_type": "authentication_settings" + }, + "subscription_key_parameter_names": { + "attr_type": "subscription_key_parameter_names" + }, + "api_type": { + "attr_type": "api_type" + }, + "api_revision": { + "attr_type": "api_revision" + }, + "api_version": { + "attr_type": "api_version" + }, + "is_current": { + "attr_type": "is_current" + }, + "is_online": { + "attr_type": null + }, + "api_revision_description": { + "attr_type": "api_revision_description" + }, + "api_version_description": { + "attr_type": "api_version_description" + }, + "api_version_set_id": { + "attr_type": "api_version_set_id" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "terms_of_service_url": { + "attr_type": "terms_of_service_url" + }, + "contact": { + "attr_type": "contact" + }, + "license": { + "attr_type": "license" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiCreateOrUpdatePropertiesWsdlSelector": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "wsdl_service_name": { + "default": "none", + "param_type": "keyword_only" + }, + "wsdl_endpoint_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "wsdl_service_name": { + "attr_type": "wsdl_service_name" + }, + "wsdl_endpoint_name": { + "attr_type": "wsdl_endpoint_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiEntityBaseContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "default": "none", + "param_type": "keyword_only" + }, + "api_type": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version": { + "default": "none", + "param_type": "keyword_only" + }, + "is_current": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_set_id": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "contact": { + "default": "none", + "param_type": "keyword_only" + }, + "license": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "authentication_settings": { + "attr_type": "authentication_settings" + }, + "subscription_key_parameter_names": { + "attr_type": "subscription_key_parameter_names" + }, + "api_type": { + "attr_type": "api_type" + }, + "api_revision": { + "attr_type": "api_revision" + }, + "api_version": { + "attr_type": "api_version" + }, + "is_current": { + "attr_type": "is_current" + }, + "is_online": { + "attr_type": null + }, + "api_revision_description": { + "attr_type": "api_revision_description" + }, + "api_version_description": { + "attr_type": "api_version_description" + }, + "api_version_set_id": { + "attr_type": "api_version_set_id" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "terms_of_service_url": { + "attr_type": "terms_of_service_url" + }, + "contact": { + "attr_type": "contact" + }, + "license": { + "attr_type": "license" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiExportResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_result_format": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "export_result_format": { + "attr_type": "export_result_format" + }, + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiExportResultValue": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "link": { + "attr_type": "link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiGatewaySkuType": { + "type": "Enum", + "methods": {}, + "properties": { + "STANDARD": "STANDARD", + "WORKSPACE_GATEWAY_PREMIUM": "WORKSPACE_GATEWAY_PREMIUM", + "WORKSPACE_GATEWAY_STANDARD": "WORKSPACE_GATEWAY_STANDARD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApiLicenseInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "url": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "url": { + "attr_type": "url" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementGatewayBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "frontend": { + "default": "none", + "param_type": "keyword_only" + }, + "backend": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_api": { + "default": "none", + "param_type": "keyword_only" + }, + "virtual_network_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "target_provisioning_state": { + "attr_type": null + }, + "created_at_utc": { + "attr_type": null + }, + "frontend": { + "attr_type": "frontend" + }, + "backend": { + "attr_type": "backend" + }, + "configuration_api": { + "attr_type": "configuration_api" + }, + "virtual_network_type": { + "attr_type": "virtual_network_type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementGatewayConfigConnectionListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementGatewayConfigConnectionResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "source_id": { + "default": "none", + "param_type": "keyword_only" + }, + "hostnames": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "etag": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "source_id": { + "attr_type": "source_id" + }, + "default_hostname": { + "attr_type": null + }, + "hostnames": { + "attr_type": "hostnames" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementGatewayListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementGatewayProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "frontend": { + "default": "none", + "param_type": "keyword_only" + }, + "backend": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_api": { + "default": "none", + "param_type": "keyword_only" + }, + "virtual_network_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "target_provisioning_state": { + "attr_type": null + }, + "created_at_utc": { + "attr_type": null + }, + "frontend": { + "attr_type": "frontend" + }, + "backend": { + "attr_type": "backend" + }, + "configuration_api": { + "attr_type": "configuration_api" + }, + "virtual_network_type": { + "attr_type": "virtual_network_type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementGatewayResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sku": { + "default": null, + "param_type": "keyword_only" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "frontend": { + "default": "none", + "param_type": "keyword_only" + }, + "backend": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_api": { + "default": "none", + "param_type": "keyword_only" + }, + "virtual_network_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "sku": { + "attr_type": "sku" + }, + "system_data": { + "attr_type": null + }, + "location": { + "attr_type": "location" + }, + "etag": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "target_provisioning_state": { + "attr_type": null + }, + "created_at_utc": { + "attr_type": null + }, + "frontend": { + "attr_type": "frontend" + }, + "backend": { + "attr_type": "backend" + }, + "configuration_api": { + "attr_type": "configuration_api" + }, + "virtual_network_type": { + "attr_type": "virtual_network_type" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementGatewaySkuProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "capacity": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "capacity": { + "attr_type": "capacity" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementGatewaySkuPropertiesForPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "capacity": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "capacity": { + "attr_type": "capacity" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementGatewayUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "sku": { + "default": "none", + "param_type": "keyword_only" + }, + "frontend": { + "default": "none", + "param_type": "keyword_only" + }, + "backend": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_api": { + "default": "none", + "param_type": "keyword_only" + }, + "virtual_network_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "sku": { + "attr_type": "sku" + }, + "etag": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "target_provisioning_state": { + "attr_type": null + }, + "created_at_utc": { + "attr_type": null + }, + "frontend": { + "attr_type": "frontend" + }, + "backend": { + "attr_type": "backend" + }, + "configuration_api": { + "attr_type": "configuration_api" + }, + "virtual_network_type": { + "attr_type": "virtual_network_type" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementGatewayUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "frontend": { + "default": "none", + "param_type": "keyword_only" + }, + "backend": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_api": { + "default": "none", + "param_type": "keyword_only" + }, + "virtual_network_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "target_provisioning_state": { + "attr_type": null + }, + "created_at_utc": { + "attr_type": null + }, + "frontend": { + "attr_type": "frontend" + }, + "backend": { + "attr_type": "backend" + }, + "configuration_api": { + "attr_type": "configuration_api" + }, + "virtual_network_type": { + "attr_type": "virtual_network_type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceApplyNetworkConfigurationParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "location": { + "attr_type": "location" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceBackupRestoreParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account": { + "default": null, + "param_type": "keyword_only" + }, + "container_name": { + "default": null, + "param_type": "keyword_only" + }, + "backup_name": { + "default": null, + "param_type": "keyword_only" + }, + "access_type": { + "default": "str", + "param_type": "keyword_only" + }, + "access_key": { + "default": "none", + "param_type": "keyword_only" + }, + "client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "storage_account": { + "attr_type": "storage_account" + }, + "container_name": { + "attr_type": "container_name" + }, + "backup_name": { + "attr_type": "backup_name" + }, + "access_type": { + "attr_type": "access_type" + }, + "access_key": { + "attr_type": "access_key" + }, + "client_id": { + "attr_type": "client_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_sender_email": { + "default": "none", + "param_type": "keyword_only" + }, + "hostname_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "public_ip_address_id": { + "default": "none", + "param_type": "keyword_only" + }, + "public_network_access": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_api": { + "default": "none", + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "additional_locations": { + "default": "none", + "param_type": "keyword_only" + }, + "custom_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "certificates": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_client_certificate": { + "default": "bool", + "param_type": "keyword_only" + }, + "nat_gateway_state": { + "default": "none", + "param_type": "keyword_only" + }, + "disable_gateway": { + "default": "bool", + "param_type": "keyword_only" + }, + "virtual_network_type": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_constraint": { + "default": "none", + "param_type": "keyword_only" + }, + "restore": { + "default": "bool", + "param_type": "keyword_only" + }, + "private_endpoint_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "legacy_portal_status": { + "default": "str", + "param_type": "keyword_only" + }, + "developer_portal_status": { + "default": "str", + "param_type": "keyword_only" + }, + "release_channel": { + "default": "none", + "param_type": "keyword_only" + }, + "zone_redundant": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "notification_sender_email": { + "attr_type": "notification_sender_email" + }, + "provisioning_state": { + "attr_type": null + }, + "target_provisioning_state": { + "attr_type": null + }, + "created_at_utc": { + "attr_type": null + }, + "gateway_url": { + "attr_type": null + }, + "gateway_regional_url": { + "attr_type": null + }, + "portal_url": { + "attr_type": null + }, + "management_api_url": { + "attr_type": null + }, + "scm_url": { + "attr_type": null + }, + "developer_portal_url": { + "attr_type": null + }, + "hostname_configurations": { + "attr_type": "hostname_configurations" + }, + "public_ip_addresses": { + "attr_type": null + }, + "private_ip_addresses": { + "attr_type": null + }, + "public_ip_address_id": { + "attr_type": "public_ip_address_id" + }, + "public_network_access": { + "attr_type": "public_network_access" + }, + "configuration_api": { + "attr_type": "configuration_api" + }, + "virtual_network_configuration": { + "attr_type": "virtual_network_configuration" + }, + "additional_locations": { + "attr_type": "additional_locations" + }, + "custom_properties": { + "attr_type": "custom_properties" + }, + "certificates": { + "attr_type": "certificates" + }, + "enable_client_certificate": { + "attr_type": "enable_client_certificate" + }, + "nat_gateway_state": { + "attr_type": "nat_gateway_state" + }, + "outbound_public_ip_addresses": { + "attr_type": null + }, + "disable_gateway": { + "attr_type": "disable_gateway" + }, + "virtual_network_type": { + "attr_type": "virtual_network_type" + }, + "api_version_constraint": { + "attr_type": "api_version_constraint" + }, + "restore": { + "attr_type": "restore" + }, + "private_endpoint_connections": { + "attr_type": "private_endpoint_connections" + }, + "platform_version": { + "attr_type": null + }, + "legacy_portal_status": { + "attr_type": "legacy_portal_status" + }, + "developer_portal_status": { + "attr_type": "developer_portal_status" + }, + "release_channel": { + "attr_type": "release_channel" + }, + "zone_redundant": { + "attr_type": "zone_redundant" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceCheckNameAvailabilityParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceGetDomainOwnershipIdentifierResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "domain_ownership_identifier": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceGetSsoTokenResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "redirect_uri": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "redirect_uri": { + "attr_type": "redirect_uri" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identities": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "principal_id": { + "attr_type": null + }, + "tenant_id": { + "attr_type": null + }, + "user_assigned_identities": { + "attr_type": "user_assigned_identities" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceNameAvailabilityResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reason": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name_available": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "reason": { + "attr_type": "reason" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "publisher_email": { + "default": null, + "param_type": "keyword_only" + }, + "publisher_name": { + "default": null, + "param_type": "keyword_only" + }, + "notification_sender_email": { + "default": "none", + "param_type": "keyword_only" + }, + "hostname_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "public_ip_address_id": { + "default": "none", + "param_type": "keyword_only" + }, + "public_network_access": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_api": { + "default": "none", + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "additional_locations": { + "default": "none", + "param_type": "keyword_only" + }, + "custom_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "certificates": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_client_certificate": { + "default": "bool", + "param_type": "keyword_only" + }, + "nat_gateway_state": { + "default": "none", + "param_type": "keyword_only" + }, + "disable_gateway": { + "default": "bool", + "param_type": "keyword_only" + }, + "virtual_network_type": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_constraint": { + "default": "none", + "param_type": "keyword_only" + }, + "restore": { + "default": "bool", + "param_type": "keyword_only" + }, + "private_endpoint_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "legacy_portal_status": { + "default": "str", + "param_type": "keyword_only" + }, + "developer_portal_status": { + "default": "str", + "param_type": "keyword_only" + }, + "release_channel": { + "default": "none", + "param_type": "keyword_only" + }, + "zone_redundant": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "publisher_email": { + "attr_type": "publisher_email" + }, + "publisher_name": { + "attr_type": "publisher_name" + }, + "notification_sender_email": { + "attr_type": "notification_sender_email" + }, + "provisioning_state": { + "attr_type": null + }, + "target_provisioning_state": { + "attr_type": null + }, + "created_at_utc": { + "attr_type": null + }, + "gateway_url": { + "attr_type": null + }, + "gateway_regional_url": { + "attr_type": null + }, + "portal_url": { + "attr_type": null + }, + "management_api_url": { + "attr_type": null + }, + "scm_url": { + "attr_type": null + }, + "developer_portal_url": { + "attr_type": null + }, + "hostname_configurations": { + "attr_type": "hostname_configurations" + }, + "public_ip_addresses": { + "attr_type": null + }, + "private_ip_addresses": { + "attr_type": null + }, + "public_ip_address_id": { + "attr_type": "public_ip_address_id" + }, + "public_network_access": { + "attr_type": "public_network_access" + }, + "configuration_api": { + "attr_type": "configuration_api" + }, + "virtual_network_configuration": { + "attr_type": "virtual_network_configuration" + }, + "additional_locations": { + "attr_type": "additional_locations" + }, + "custom_properties": { + "attr_type": "custom_properties" + }, + "certificates": { + "attr_type": "certificates" + }, + "enable_client_certificate": { + "attr_type": "enable_client_certificate" + }, + "nat_gateway_state": { + "attr_type": "nat_gateway_state" + }, + "outbound_public_ip_addresses": { + "attr_type": null + }, + "disable_gateway": { + "attr_type": "disable_gateway" + }, + "virtual_network_type": { + "attr_type": "virtual_network_type" + }, + "api_version_constraint": { + "attr_type": "api_version_constraint" + }, + "restore": { + "attr_type": "restore" + }, + "private_endpoint_connections": { + "attr_type": "private_endpoint_connections" + }, + "platform_version": { + "attr_type": null + }, + "legacy_portal_status": { + "attr_type": "legacy_portal_status" + }, + "developer_portal_status": { + "attr_type": "developer_portal_status" + }, + "release_channel": { + "attr_type": "release_channel" + }, + "zone_redundant": { + "attr_type": "zone_redundant" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sku": { + "default": null, + "param_type": "keyword_only" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "publisher_email": { + "default": null, + "param_type": "keyword_only" + }, + "publisher_name": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "zones": { + "default": "none", + "param_type": "keyword_only" + }, + "notification_sender_email": { + "default": "none", + "param_type": "keyword_only" + }, + "hostname_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "public_ip_address_id": { + "default": "none", + "param_type": "keyword_only" + }, + "public_network_access": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_api": { + "default": "none", + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "additional_locations": { + "default": "none", + "param_type": "keyword_only" + }, + "custom_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "certificates": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_client_certificate": { + "default": "bool", + "param_type": "keyword_only" + }, + "nat_gateway_state": { + "default": "none", + "param_type": "keyword_only" + }, + "disable_gateway": { + "default": "bool", + "param_type": "keyword_only" + }, + "virtual_network_type": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_constraint": { + "default": "none", + "param_type": "keyword_only" + }, + "restore": { + "default": "bool", + "param_type": "keyword_only" + }, + "private_endpoint_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "legacy_portal_status": { + "default": "str", + "param_type": "keyword_only" + }, + "developer_portal_status": { + "default": "str", + "param_type": "keyword_only" + }, + "release_channel": { + "default": "none", + "param_type": "keyword_only" + }, + "zone_redundant": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "sku": { + "attr_type": "sku" + }, + "identity": { + "attr_type": "identity" + }, + "system_data": { + "attr_type": null + }, + "location": { + "attr_type": "location" + }, + "etag": { + "attr_type": null + }, + "zones": { + "attr_type": "zones" + }, + "notification_sender_email": { + "attr_type": "notification_sender_email" + }, + "provisioning_state": { + "attr_type": null + }, + "target_provisioning_state": { + "attr_type": null + }, + "created_at_utc": { + "attr_type": null + }, + "gateway_url": { + "attr_type": null + }, + "gateway_regional_url": { + "attr_type": null + }, + "portal_url": { + "attr_type": null + }, + "management_api_url": { + "attr_type": null + }, + "scm_url": { + "attr_type": null + }, + "developer_portal_url": { + "attr_type": null + }, + "hostname_configurations": { + "attr_type": "hostname_configurations" + }, + "public_ip_addresses": { + "attr_type": null + }, + "private_ip_addresses": { + "attr_type": null + }, + "public_ip_address_id": { + "attr_type": "public_ip_address_id" + }, + "public_network_access": { + "attr_type": "public_network_access" + }, + "configuration_api": { + "attr_type": "configuration_api" + }, + "virtual_network_configuration": { + "attr_type": "virtual_network_configuration" + }, + "additional_locations": { + "attr_type": "additional_locations" + }, + "custom_properties": { + "attr_type": "custom_properties" + }, + "certificates": { + "attr_type": "certificates" + }, + "enable_client_certificate": { + "attr_type": "enable_client_certificate" + }, + "nat_gateway_state": { + "attr_type": "nat_gateway_state" + }, + "outbound_public_ip_addresses": { + "attr_type": null + }, + "disable_gateway": { + "attr_type": "disable_gateway" + }, + "virtual_network_type": { + "attr_type": "virtual_network_type" + }, + "api_version_constraint": { + "attr_type": "api_version_constraint" + }, + "restore": { + "attr_type": "restore" + }, + "private_endpoint_connections": { + "attr_type": "private_endpoint_connections" + }, + "platform_version": { + "attr_type": null + }, + "legacy_portal_status": { + "attr_type": "legacy_portal_status" + }, + "developer_portal_status": { + "attr_type": "developer_portal_status" + }, + "release_channel": { + "attr_type": "release_channel" + }, + "zone_redundant": { + "attr_type": "zone_redundant" + }, + "publisher_email": { + "attr_type": "publisher_email" + }, + "publisher_name": { + "attr_type": "publisher_name" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceSkuProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "capacity": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "capacity": { + "attr_type": "capacity" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "sku": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "zones": { + "default": "none", + "param_type": "keyword_only" + }, + "notification_sender_email": { + "default": "none", + "param_type": "keyword_only" + }, + "hostname_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "public_ip_address_id": { + "default": "none", + "param_type": "keyword_only" + }, + "public_network_access": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_api": { + "default": "none", + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "additional_locations": { + "default": "none", + "param_type": "keyword_only" + }, + "custom_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "certificates": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_client_certificate": { + "default": "bool", + "param_type": "keyword_only" + }, + "nat_gateway_state": { + "default": "none", + "param_type": "keyword_only" + }, + "disable_gateway": { + "default": "bool", + "param_type": "keyword_only" + }, + "virtual_network_type": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_constraint": { + "default": "none", + "param_type": "keyword_only" + }, + "restore": { + "default": "bool", + "param_type": "keyword_only" + }, + "private_endpoint_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "legacy_portal_status": { + "default": "str", + "param_type": "keyword_only" + }, + "developer_portal_status": { + "default": "str", + "param_type": "keyword_only" + }, + "release_channel": { + "default": "none", + "param_type": "keyword_only" + }, + "zone_redundant": { + "default": "bool", + "param_type": "keyword_only" + }, + "publisher_email": { + "default": "none", + "param_type": "keyword_only" + }, + "publisher_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "sku": { + "attr_type": "sku" + }, + "identity": { + "attr_type": "identity" + }, + "etag": { + "attr_type": null + }, + "zones": { + "attr_type": "zones" + }, + "notification_sender_email": { + "attr_type": "notification_sender_email" + }, + "provisioning_state": { + "attr_type": null + }, + "target_provisioning_state": { + "attr_type": null + }, + "created_at_utc": { + "attr_type": null + }, + "gateway_url": { + "attr_type": null + }, + "gateway_regional_url": { + "attr_type": null + }, + "portal_url": { + "attr_type": null + }, + "management_api_url": { + "attr_type": null + }, + "scm_url": { + "attr_type": null + }, + "developer_portal_url": { + "attr_type": null + }, + "hostname_configurations": { + "attr_type": "hostname_configurations" + }, + "public_ip_addresses": { + "attr_type": null + }, + "private_ip_addresses": { + "attr_type": null + }, + "public_ip_address_id": { + "attr_type": "public_ip_address_id" + }, + "public_network_access": { + "attr_type": "public_network_access" + }, + "configuration_api": { + "attr_type": "configuration_api" + }, + "virtual_network_configuration": { + "attr_type": "virtual_network_configuration" + }, + "additional_locations": { + "attr_type": "additional_locations" + }, + "custom_properties": { + "attr_type": "custom_properties" + }, + "certificates": { + "attr_type": "certificates" + }, + "enable_client_certificate": { + "attr_type": "enable_client_certificate" + }, + "nat_gateway_state": { + "attr_type": "nat_gateway_state" + }, + "outbound_public_ip_addresses": { + "attr_type": null + }, + "disable_gateway": { + "attr_type": "disable_gateway" + }, + "virtual_network_type": { + "attr_type": "virtual_network_type" + }, + "api_version_constraint": { + "attr_type": "api_version_constraint" + }, + "restore": { + "attr_type": "restore" + }, + "private_endpoint_connections": { + "attr_type": "private_endpoint_connections" + }, + "platform_version": { + "attr_type": null + }, + "legacy_portal_status": { + "attr_type": "legacy_portal_status" + }, + "developer_portal_status": { + "attr_type": "developer_portal_status" + }, + "release_channel": { + "attr_type": "release_channel" + }, + "zone_redundant": { + "attr_type": "zone_redundant" + }, + "publisher_email": { + "attr_type": "publisher_email" + }, + "publisher_name": { + "attr_type": "publisher_name" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementServiceUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_sender_email": { + "default": "none", + "param_type": "keyword_only" + }, + "hostname_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "public_ip_address_id": { + "default": "none", + "param_type": "keyword_only" + }, + "public_network_access": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_api": { + "default": "none", + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "additional_locations": { + "default": "none", + "param_type": "keyword_only" + }, + "custom_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "certificates": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_client_certificate": { + "default": "bool", + "param_type": "keyword_only" + }, + "nat_gateway_state": { + "default": "none", + "param_type": "keyword_only" + }, + "disable_gateway": { + "default": "bool", + "param_type": "keyword_only" + }, + "virtual_network_type": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_constraint": { + "default": "none", + "param_type": "keyword_only" + }, + "restore": { + "default": "bool", + "param_type": "keyword_only" + }, + "private_endpoint_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "legacy_portal_status": { + "default": "str", + "param_type": "keyword_only" + }, + "developer_portal_status": { + "default": "str", + "param_type": "keyword_only" + }, + "release_channel": { + "default": "none", + "param_type": "keyword_only" + }, + "zone_redundant": { + "default": "bool", + "param_type": "keyword_only" + }, + "publisher_email": { + "default": "none", + "param_type": "keyword_only" + }, + "publisher_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "publisher_email": { + "attr_type": "publisher_email" + }, + "publisher_name": { + "attr_type": "publisher_name" + }, + "notification_sender_email": { + "attr_type": "notification_sender_email" + }, + "provisioning_state": { + "attr_type": null + }, + "target_provisioning_state": { + "attr_type": null + }, + "created_at_utc": { + "attr_type": null + }, + "gateway_url": { + "attr_type": null + }, + "gateway_regional_url": { + "attr_type": null + }, + "portal_url": { + "attr_type": null + }, + "management_api_url": { + "attr_type": null + }, + "scm_url": { + "attr_type": null + }, + "developer_portal_url": { + "attr_type": null + }, + "hostname_configurations": { + "attr_type": "hostname_configurations" + }, + "public_ip_addresses": { + "attr_type": null + }, + "private_ip_addresses": { + "attr_type": null + }, + "public_ip_address_id": { + "attr_type": "public_ip_address_id" + }, + "public_network_access": { + "attr_type": "public_network_access" + }, + "configuration_api": { + "attr_type": "configuration_api" + }, + "virtual_network_configuration": { + "attr_type": "virtual_network_configuration" + }, + "additional_locations": { + "attr_type": "additional_locations" + }, + "custom_properties": { + "attr_type": "custom_properties" + }, + "certificates": { + "attr_type": "certificates" + }, + "enable_client_certificate": { + "attr_type": "enable_client_certificate" + }, + "nat_gateway_state": { + "attr_type": "nat_gateway_state" + }, + "outbound_public_ip_addresses": { + "attr_type": null + }, + "disable_gateway": { + "attr_type": "disable_gateway" + }, + "virtual_network_type": { + "attr_type": "virtual_network_type" + }, + "api_version_constraint": { + "attr_type": "api_version_constraint" + }, + "restore": { + "attr_type": "restore" + }, + "private_endpoint_connections": { + "attr_type": "private_endpoint_connections" + }, + "platform_version": { + "attr_type": null + }, + "legacy_portal_status": { + "attr_type": "legacy_portal_status" + }, + "developer_portal_status": { + "attr_type": "developer_portal_status" + }, + "release_channel": { + "attr_type": "release_channel" + }, + "zone_redundant": { + "attr_type": "zone_redundant" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementSku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "resource_type": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "tier": { + "attr_type": null + }, + "size": { + "attr_type": null + }, + "family": { + "attr_type": null + }, + "kind": { + "attr_type": null + }, + "capacity": { + "attr_type": null + }, + "locations": { + "attr_type": null + }, + "location_info": { + "attr_type": null + }, + "api_versions": { + "attr_type": null + }, + "costs": { + "attr_type": null + }, + "capabilities": { + "attr_type": null + }, + "restrictions": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementSkuCapabilities": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "value": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementSkuCapacity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "minimum": { + "attr_type": null + }, + "maximum": { + "attr_type": null + }, + "default": { + "attr_type": null + }, + "scale_type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementSkuCapacityScaleType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTOMATIC": "AUTOMATIC", + "MANUAL": "MANUAL", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApiManagementSkuCosts": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "meter_id": { + "attr_type": null + }, + "quantity": { + "attr_type": null + }, + "extended_unit": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementSkuLocationInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "location": { + "attr_type": null + }, + "zones": { + "attr_type": null + }, + "zone_details": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementSkuRestrictionInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "locations": { + "attr_type": null + }, + "zones": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementSkuRestrictions": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "values": { + "attr_type": null + }, + "restriction_info": { + "attr_type": null + }, + "reason_code": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementSkuRestrictionsReasonCode": { + "type": "Enum", + "methods": {}, + "properties": { + "NOT_AVAILABLE_FOR_SUBSCRIPTION": "NOT_AVAILABLE_FOR_SUBSCRIPTION", + "QUOTA_ID": "QUOTA_ID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApiManagementSkuRestrictionsType": { + "type": "Enum", + "methods": {}, + "properties": { + "LOCATION": "LOCATION", + "ZONE": "ZONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApiManagementSkuZoneDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "capabilities": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementSkusResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementWorkspaceLinksListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementWorkspaceLinksProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": "none", + "param_type": "keyword_only" + }, + "gateways": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "workspace_id": { + "attr_type": "workspace_id" + }, + "gateways": { + "attr_type": "gateways" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiManagementWorkspaceLinksResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": "none", + "param_type": "keyword_only" + }, + "gateways": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "etag": { + "attr_type": null + }, + "workspace_id": { + "attr_type": "workspace_id" + }, + "gateways": { + "attr_type": "gateways" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiReleaseCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiReleaseContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "notes": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "api_id": { + "attr_type": "api_id" + }, + "created_date_time": { + "attr_type": null + }, + "updated_date_time": { + "attr_type": null + }, + "notes": { + "attr_type": "notes" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiRevisionCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiRevisionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "api_id": { + "attr_type": null + }, + "api_revision": { + "attr_type": null + }, + "created_date_time": { + "attr_type": null + }, + "updated_date_time": { + "attr_type": null + }, + "description": { + "attr_type": null + }, + "private_url": { + "attr_type": null + }, + "is_online": { + "attr_type": null + }, + "is_current": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiRevisionInfoContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "source_api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_name": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_set": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "source_api_id": { + "attr_type": "source_api_id" + }, + "api_version_name": { + "attr_type": "api_version_name" + }, + "api_revision_description": { + "attr_type": "api_revision_description" + }, + "api_version_set": { + "attr_type": "api_version_set" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiTagResourceContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "default": "none", + "param_type": "keyword_only" + }, + "api_type": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version": { + "default": "none", + "param_type": "keyword_only" + }, + "is_current": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_set_id": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "contact": { + "default": "none", + "param_type": "keyword_only" + }, + "license": { + "default": "none", + "param_type": "keyword_only" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "path": { + "default": "none", + "param_type": "keyword_only" + }, + "protocols": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "name": { + "attr_type": "name" + }, + "service_url": { + "attr_type": "service_url" + }, + "path": { + "attr_type": "path" + }, + "protocols": { + "attr_type": "protocols" + }, + "description": { + "attr_type": "description" + }, + "authentication_settings": { + "attr_type": "authentication_settings" + }, + "subscription_key_parameter_names": { + "attr_type": "subscription_key_parameter_names" + }, + "api_type": { + "attr_type": "api_type" + }, + "api_revision": { + "attr_type": "api_revision" + }, + "api_version": { + "attr_type": "api_version" + }, + "is_current": { + "attr_type": "is_current" + }, + "is_online": { + "attr_type": null + }, + "api_revision_description": { + "attr_type": "api_revision_description" + }, + "api_version_description": { + "attr_type": "api_version_description" + }, + "api_version_set_id": { + "attr_type": "api_version_set_id" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "terms_of_service_url": { + "attr_type": "terms_of_service_url" + }, + "contact": { + "attr_type": "contact" + }, + "license": { + "attr_type": "license" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiType": { + "type": "Enum", + "methods": {}, + "properties": { + "GRAPHQL": "GRAPHQL", + "GRPC": "GRPC", + "HTTP": "HTTP", + "ODATA": "ODATA", + "SOAP": "SOAP", + "WEBSOCKET": "WEBSOCKET", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApiUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "default": "none", + "param_type": "keyword_only" + }, + "api_type": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version": { + "default": "none", + "param_type": "keyword_only" + }, + "is_current": { + "default": "none", + "param_type": "keyword_only" + }, + "api_revision_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_description": { + "default": "none", + "param_type": "keyword_only" + }, + "api_version_set_id": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "contact": { + "default": "none", + "param_type": "keyword_only" + }, + "license": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "service_url": { + "default": "none", + "param_type": "keyword_only" + }, + "path": { + "default": "none", + "param_type": "keyword_only" + }, + "protocols": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "authentication_settings": { + "attr_type": "authentication_settings" + }, + "subscription_key_parameter_names": { + "attr_type": "subscription_key_parameter_names" + }, + "api_type": { + "attr_type": "api_type" + }, + "api_revision": { + "attr_type": "api_revision" + }, + "api_version": { + "attr_type": "api_version" + }, + "is_current": { + "attr_type": "is_current" + }, + "is_online": { + "attr_type": null + }, + "api_revision_description": { + "attr_type": "api_revision_description" + }, + "api_version_description": { + "attr_type": "api_version_description" + }, + "api_version_set_id": { + "attr_type": "api_version_set_id" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "terms_of_service_url": { + "attr_type": "terms_of_service_url" + }, + "contact": { + "attr_type": "contact" + }, + "license": { + "attr_type": "license" + }, + "display_name": { + "attr_type": "display_name" + }, + "service_url": { + "attr_type": "service_url" + }, + "path": { + "attr_type": "path" + }, + "protocols": { + "attr_type": "protocols" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiVersionConstraint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "min_api_version": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "min_api_version": { + "attr_type": "min_api_version" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiVersionSetCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiVersionSetContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "version_query_name": { + "default": "none", + "param_type": "keyword_only" + }, + "version_header_name": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "versioning_scheme": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "version_query_name": { + "attr_type": "version_query_name" + }, + "version_header_name": { + "attr_type": "version_header_name" + }, + "display_name": { + "attr_type": "display_name" + }, + "versioning_scheme": { + "attr_type": "versioning_scheme" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiVersionSetContractDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "versioning_scheme": { + "default": "none", + "param_type": "keyword_only" + }, + "version_query_name": { + "default": "none", + "param_type": "keyword_only" + }, + "version_header_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "name": { + "attr_type": "name" + }, + "description": { + "attr_type": "description" + }, + "versioning_scheme": { + "attr_type": "versioning_scheme" + }, + "version_query_name": { + "attr_type": "version_query_name" + }, + "version_header_name": { + "attr_type": "version_header_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiVersionSetContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": null, + "param_type": "keyword_only" + }, + "versioning_scheme": { + "default": null, + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "version_query_name": { + "default": "none", + "param_type": "keyword_only" + }, + "version_header_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "versioning_scheme": { + "attr_type": "versioning_scheme" + }, + "description": { + "attr_type": "description" + }, + "version_query_name": { + "attr_type": "version_query_name" + }, + "version_header_name": { + "attr_type": "version_header_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiVersionSetEntityBase": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "version_query_name": { + "default": "none", + "param_type": "keyword_only" + }, + "version_header_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "version_query_name": { + "attr_type": "version_query_name" + }, + "version_header_name": { + "attr_type": "version_header_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiVersionSetUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "version_query_name": { + "default": "none", + "param_type": "keyword_only" + }, + "version_header_name": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "versioning_scheme": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "version_query_name": { + "attr_type": "version_query_name" + }, + "version_header_name": { + "attr_type": "version_header_name" + }, + "display_name": { + "attr_type": "display_name" + }, + "versioning_scheme": { + "attr_type": "versioning_scheme" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApiVersionSetUpdateParametersProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "version_query_name": { + "default": "none", + "param_type": "keyword_only" + }, + "version_header_name": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "versioning_scheme": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "versioning_scheme": { + "attr_type": "versioning_scheme" + }, + "description": { + "attr_type": "description" + }, + "version_query_name": { + "attr_type": "version_query_name" + }, + "version_header_name": { + "attr_type": "version_header_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ApimIdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "SYSTEM_ASSIGNED_USER_ASSIGNED": "SYSTEM_ASSIGNED_USER_ASSIGNED", + "USER_ASSIGNED": "USER_ASSIGNED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApimResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AppType": { + "type": "Enum", + "methods": {}, + "properties": { + "DEVELOPER_PORTAL": "DEVELOPER_PORTAL", + "PORTAL": "PORTAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ArmIdWrapper": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AssociationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "provisioning_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": "provisioning_state" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AsyncOperationStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "FAILED": "FAILED", + "IN_PROGRESS": "IN_PROGRESS", + "STARTED": "STARTED", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AsyncResolverStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "FAILED": "FAILED", + "IN_PROGRESS": "IN_PROGRESS", + "STARTED": "STARTED", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AuthenticationSettingsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "o_auth2": { + "default": "none", + "param_type": "keyword_only" + }, + "openid": { + "default": "none", + "param_type": "keyword_only" + }, + "o_auth2_authentication_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "openid_authentication_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "o_auth2": { + "attr_type": "o_auth2" + }, + "openid": { + "attr_type": "openid" + }, + "o_auth2_authentication_settings": { + "attr_type": "o_auth2_authentication_settings" + }, + "openid_authentication_settings": { + "attr_type": "openid_authentication_settings" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationAccessPolicyCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationAccessPolicyContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "app_ids": { + "default": "none", + "param_type": "keyword_only" + }, + "tenant_id": { + "default": "none", + "param_type": "keyword_only" + }, + "object_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "app_ids": { + "attr_type": "app_ids" + }, + "tenant_id": { + "attr_type": "tenant_id" + }, + "object_id": { + "attr_type": "object_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationConfirmConsentCodeRequestContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "consent_code": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "consent_code": { + "attr_type": "consent_code" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_type": { + "default": "none", + "param_type": "keyword_only" + }, + "o_auth2_grant_type": { + "default": "none", + "param_type": "keyword_only" + }, + "parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "authorization_type": { + "attr_type": "authorization_type" + }, + "o_auth2_grant_type": { + "attr_type": "o_auth2_grant_type" + }, + "parameters": { + "attr_type": "parameters" + }, + "error": { + "attr_type": "error" + }, + "status": { + "attr_type": "status" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationError": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "code": { + "default": "none", + "param_type": "keyword_only" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": "code" + }, + "message": { + "attr_type": "message" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationLoginRequestContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "post_login_redirect_url": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "post_login_redirect_url": { + "attr_type": "post_login_redirect_url" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationLoginResponseContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "login_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "login_link": { + "attr_type": "login_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationMethod": { + "type": "Enum", + "methods": {}, + "properties": { + "DELETE": "DELETE", + "GET": "GET", + "HEAD": "HEAD", + "OPTIONS": "OPTIONS", + "PATCH": "PATCH", + "POST": "POST", + "PUT": "PUT", + "TRACE": "TRACE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AuthorizationProviderCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationProviderContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "identity_provider": { + "default": "none", + "param_type": "keyword_only" + }, + "oauth2": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "identity_provider": { + "attr_type": "identity_provider" + }, + "oauth2": { + "attr_type": "oauth2" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationProviderKeyVaultContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_identifier": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "updated": { + "attr_type": null + }, + "last_status": { + "attr_type": null + }, + "secret_identifier": { + "attr_type": "secret_identifier" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationProviderKeyVaultCreateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_identifier": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "secret_identifier": { + "attr_type": "secret_identifier" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationProviderOAuth2GrantTypes": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_code": { + "default": "none", + "param_type": "keyword_only" + }, + "client_credentials": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "authorization_code": { + "attr_type": "authorization_code" + }, + "client_credentials": { + "attr_type": "client_credentials" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationProviderOAuth2Settings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "redirect_url": { + "default": "none", + "param_type": "keyword_only" + }, + "grant_types": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "redirect_url": { + "attr_type": "redirect_url" + }, + "grant_types": { + "attr_type": "grant_types" + }, + "key_vault": { + "attr_type": "key_vault" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationServerCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationServerContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "authorization_methods": { + "default": "none", + "param_type": "keyword_only" + }, + "client_authentication_method": { + "default": "none", + "param_type": "keyword_only" + }, + "token_body_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "token_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "support_state": { + "default": "none", + "param_type": "keyword_only" + }, + "default_scope": { + "default": "none", + "param_type": "keyword_only" + }, + "bearer_token_sending_methods": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_owner_username": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_owner_password": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "use_in_test_console": { + "default": "none", + "param_type": "keyword_only" + }, + "use_in_api_documentation": { + "default": "none", + "param_type": "keyword_only" + }, + "client_registration_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "authorization_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "grant_types": { + "default": "none", + "param_type": "keyword_only" + }, + "client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "authorization_methods": { + "attr_type": "authorization_methods" + }, + "client_authentication_method": { + "attr_type": "client_authentication_method" + }, + "token_body_parameters": { + "attr_type": "token_body_parameters" + }, + "token_endpoint": { + "attr_type": "token_endpoint" + }, + "support_state": { + "attr_type": "support_state" + }, + "default_scope": { + "attr_type": "default_scope" + }, + "bearer_token_sending_methods": { + "attr_type": "bearer_token_sending_methods" + }, + "resource_owner_username": { + "attr_type": "resource_owner_username" + }, + "resource_owner_password": { + "attr_type": "resource_owner_password" + }, + "display_name": { + "attr_type": "display_name" + }, + "use_in_test_console": { + "attr_type": "use_in_test_console" + }, + "use_in_api_documentation": { + "attr_type": "use_in_api_documentation" + }, + "client_registration_endpoint": { + "attr_type": "client_registration_endpoint" + }, + "authorization_endpoint": { + "attr_type": "authorization_endpoint" + }, + "grant_types": { + "attr_type": "grant_types" + }, + "client_id": { + "attr_type": "client_id" + }, + "client_secret": { + "attr_type": "client_secret" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationServerContractBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "authorization_methods": { + "default": "none", + "param_type": "keyword_only" + }, + "client_authentication_method": { + "default": "none", + "param_type": "keyword_only" + }, + "token_body_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "token_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "support_state": { + "default": "none", + "param_type": "keyword_only" + }, + "default_scope": { + "default": "none", + "param_type": "keyword_only" + }, + "bearer_token_sending_methods": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_owner_username": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_owner_password": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "authorization_methods": { + "attr_type": "authorization_methods" + }, + "client_authentication_method": { + "attr_type": "client_authentication_method" + }, + "token_body_parameters": { + "attr_type": "token_body_parameters" + }, + "token_endpoint": { + "attr_type": "token_endpoint" + }, + "support_state": { + "attr_type": "support_state" + }, + "default_scope": { + "attr_type": "default_scope" + }, + "bearer_token_sending_methods": { + "attr_type": "bearer_token_sending_methods" + }, + "resource_owner_username": { + "attr_type": "resource_owner_username" + }, + "resource_owner_password": { + "attr_type": "resource_owner_password" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationServerContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": null, + "param_type": "keyword_only" + }, + "client_registration_endpoint": { + "default": null, + "param_type": "keyword_only" + }, + "authorization_endpoint": { + "default": null, + "param_type": "keyword_only" + }, + "grant_types": { + "default": null, + "param_type": "keyword_only" + }, + "client_id": { + "default": null, + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "authorization_methods": { + "default": "none", + "param_type": "keyword_only" + }, + "client_authentication_method": { + "default": "none", + "param_type": "keyword_only" + }, + "token_body_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "token_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "support_state": { + "default": "none", + "param_type": "keyword_only" + }, + "default_scope": { + "default": "none", + "param_type": "keyword_only" + }, + "bearer_token_sending_methods": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_owner_username": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_owner_password": { + "default": "none", + "param_type": "keyword_only" + }, + "use_in_test_console": { + "default": "none", + "param_type": "keyword_only" + }, + "use_in_api_documentation": { + "default": "none", + "param_type": "keyword_only" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "use_in_test_console": { + "attr_type": "use_in_test_console" + }, + "use_in_api_documentation": { + "attr_type": "use_in_api_documentation" + }, + "client_registration_endpoint": { + "attr_type": "client_registration_endpoint" + }, + "authorization_endpoint": { + "attr_type": "authorization_endpoint" + }, + "grant_types": { + "attr_type": "grant_types" + }, + "client_id": { + "attr_type": "client_id" + }, + "client_secret": { + "attr_type": "client_secret" + }, + "description": { + "attr_type": "description" + }, + "authorization_methods": { + "attr_type": "authorization_methods" + }, + "client_authentication_method": { + "attr_type": "client_authentication_method" + }, + "token_body_parameters": { + "attr_type": "token_body_parameters" + }, + "token_endpoint": { + "attr_type": "token_endpoint" + }, + "support_state": { + "attr_type": "support_state" + }, + "default_scope": { + "attr_type": "default_scope" + }, + "bearer_token_sending_methods": { + "attr_type": "bearer_token_sending_methods" + }, + "resource_owner_username": { + "attr_type": "resource_owner_username" + }, + "resource_owner_password": { + "attr_type": "resource_owner_password" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationServerSecretsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_owner_username": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_owner_password": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_secret": { + "attr_type": "client_secret" + }, + "resource_owner_username": { + "attr_type": "resource_owner_username" + }, + "resource_owner_password": { + "attr_type": "resource_owner_password" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationServerUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "authorization_methods": { + "default": "none", + "param_type": "keyword_only" + }, + "client_authentication_method": { + "default": "none", + "param_type": "keyword_only" + }, + "token_body_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "token_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "support_state": { + "default": "none", + "param_type": "keyword_only" + }, + "default_scope": { + "default": "none", + "param_type": "keyword_only" + }, + "bearer_token_sending_methods": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_owner_username": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_owner_password": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "use_in_test_console": { + "default": "none", + "param_type": "keyword_only" + }, + "use_in_api_documentation": { + "default": "none", + "param_type": "keyword_only" + }, + "client_registration_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "authorization_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "grant_types": { + "default": "none", + "param_type": "keyword_only" + }, + "client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "authorization_methods": { + "attr_type": "authorization_methods" + }, + "client_authentication_method": { + "attr_type": "client_authentication_method" + }, + "token_body_parameters": { + "attr_type": "token_body_parameters" + }, + "token_endpoint": { + "attr_type": "token_endpoint" + }, + "support_state": { + "attr_type": "support_state" + }, + "default_scope": { + "attr_type": "default_scope" + }, + "bearer_token_sending_methods": { + "attr_type": "bearer_token_sending_methods" + }, + "resource_owner_username": { + "attr_type": "resource_owner_username" + }, + "resource_owner_password": { + "attr_type": "resource_owner_password" + }, + "display_name": { + "attr_type": "display_name" + }, + "use_in_test_console": { + "attr_type": "use_in_test_console" + }, + "use_in_api_documentation": { + "attr_type": "use_in_api_documentation" + }, + "client_registration_endpoint": { + "attr_type": "client_registration_endpoint" + }, + "authorization_endpoint": { + "attr_type": "authorization_endpoint" + }, + "grant_types": { + "attr_type": "grant_types" + }, + "client_id": { + "attr_type": "client_id" + }, + "client_secret": { + "attr_type": "client_secret" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationServerUpdateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "authorization_methods": { + "default": "none", + "param_type": "keyword_only" + }, + "client_authentication_method": { + "default": "none", + "param_type": "keyword_only" + }, + "token_body_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "token_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "support_state": { + "default": "none", + "param_type": "keyword_only" + }, + "default_scope": { + "default": "none", + "param_type": "keyword_only" + }, + "bearer_token_sending_methods": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_owner_username": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_owner_password": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "use_in_test_console": { + "default": "none", + "param_type": "keyword_only" + }, + "use_in_api_documentation": { + "default": "none", + "param_type": "keyword_only" + }, + "client_registration_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "authorization_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "grant_types": { + "default": "none", + "param_type": "keyword_only" + }, + "client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "use_in_test_console": { + "attr_type": "use_in_test_console" + }, + "use_in_api_documentation": { + "attr_type": "use_in_api_documentation" + }, + "client_registration_endpoint": { + "attr_type": "client_registration_endpoint" + }, + "authorization_endpoint": { + "attr_type": "authorization_endpoint" + }, + "grant_types": { + "attr_type": "grant_types" + }, + "client_id": { + "attr_type": "client_id" + }, + "client_secret": { + "attr_type": "client_secret" + }, + "description": { + "attr_type": "description" + }, + "authorization_methods": { + "attr_type": "authorization_methods" + }, + "client_authentication_method": { + "attr_type": "client_authentication_method" + }, + "token_body_parameters": { + "attr_type": "token_body_parameters" + }, + "token_endpoint": { + "attr_type": "token_endpoint" + }, + "support_state": { + "attr_type": "support_state" + }, + "default_scope": { + "attr_type": "default_scope" + }, + "bearer_token_sending_methods": { + "attr_type": "bearer_token_sending_methods" + }, + "resource_owner_username": { + "attr_type": "resource_owner_username" + }, + "resource_owner_password": { + "attr_type": "resource_owner_password" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthorizationType": { + "type": "Enum", + "methods": {}, + "properties": { + "O_AUTH2": "O_AUTH2", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BackendAuthorizationHeaderCredentials": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scheme": { + "default": null, + "param_type": "keyword_only" + }, + "parameter": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "scheme": { + "attr_type": "scheme" + }, + "parameter": { + "attr_type": "parameter" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendBaseParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "credentials": { + "default": "none", + "param_type": "keyword_only" + }, + "proxy": { + "default": "none", + "param_type": "keyword_only" + }, + "tls": { + "default": "none", + "param_type": "keyword_only" + }, + "circuit_breaker": { + "default": "none", + "param_type": "keyword_only" + }, + "azure_region": { + "default": "none", + "param_type": "keyword_only" + }, + "pool": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": { + "attr_type": "title" + }, + "description": { + "attr_type": "description" + }, + "resource_id": { + "attr_type": "resource_id" + }, + "properties": { + "attr_type": "properties" + }, + "credentials": { + "attr_type": "credentials" + }, + "proxy": { + "attr_type": "proxy" + }, + "tls": { + "attr_type": "tls" + }, + "circuit_breaker": { + "attr_type": "circuit_breaker" + }, + "azure_region": { + "attr_type": "azure_region" + }, + "pool": { + "attr_type": "pool" + }, + "type": { + "attr_type": "type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendBaseParametersPool": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "services": { + "default": "none", + "param_type": "keyword_only" + }, + "failure_response": { + "default": "none", + "param_type": "keyword_only" + }, + "session_affinity": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "services": { + "attr_type": "services" + }, + "failure_response": { + "attr_type": "failure_response" + }, + "session_affinity": { + "attr_type": "session_affinity" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendCircuitBreaker": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rules": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "rules": { + "attr_type": "rules" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subnet": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subnet": { + "attr_type": "subnet" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "credentials": { + "default": "none", + "param_type": "keyword_only" + }, + "proxy": { + "default": "none", + "param_type": "keyword_only" + }, + "tls": { + "default": "none", + "param_type": "keyword_only" + }, + "circuit_breaker": { + "default": "none", + "param_type": "keyword_only" + }, + "azure_region": { + "default": "none", + "param_type": "keyword_only" + }, + "pool": { + "default": "none", + "param_type": "keyword_only" + }, + "type_properties_type": { + "default": "none", + "param_type": "keyword_only" + }, + "url": { + "default": "none", + "param_type": "keyword_only" + }, + "protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": { + "attr_type": "title" + }, + "description": { + "attr_type": "description" + }, + "resource_id": { + "attr_type": "resource_id" + }, + "properties": { + "attr_type": "properties" + }, + "credentials": { + "attr_type": "credentials" + }, + "proxy": { + "attr_type": "proxy" + }, + "tls": { + "attr_type": "tls" + }, + "circuit_breaker": { + "attr_type": "circuit_breaker" + }, + "azure_region": { + "attr_type": "azure_region" + }, + "pool": { + "attr_type": "pool" + }, + "type_properties_type": { + "attr_type": "type_properties_type" + }, + "url": { + "attr_type": "url" + }, + "protocol": { + "attr_type": "protocol" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "credentials": { + "default": "none", + "param_type": "keyword_only" + }, + "proxy": { + "default": "none", + "param_type": "keyword_only" + }, + "tls": { + "default": "none", + "param_type": "keyword_only" + }, + "circuit_breaker": { + "default": "none", + "param_type": "keyword_only" + }, + "azure_region": { + "default": "none", + "param_type": "keyword_only" + }, + "pool": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "url": { + "default": "none", + "param_type": "keyword_only" + }, + "protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "url": { + "attr_type": "url" + }, + "protocol": { + "attr_type": "protocol" + }, + "title": { + "attr_type": "title" + }, + "description": { + "attr_type": "description" + }, + "resource_id": { + "attr_type": "resource_id" + }, + "properties": { + "attr_type": "properties" + }, + "credentials": { + "attr_type": "credentials" + }, + "proxy": { + "attr_type": "proxy" + }, + "tls": { + "attr_type": "tls" + }, + "circuit_breaker": { + "attr_type": "circuit_breaker" + }, + "azure_region": { + "attr_type": "azure_region" + }, + "pool": { + "attr_type": "pool" + }, + "type": { + "attr_type": "type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendCredentialsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_ids": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate": { + "default": "none", + "param_type": "keyword_only" + }, + "query": { + "default": "none", + "param_type": "keyword_only" + }, + "header": { + "default": "none", + "param_type": "keyword_only" + }, + "authorization": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "certificate_ids": { + "attr_type": "certificate_ids" + }, + "certificate": { + "attr_type": "certificate" + }, + "query": { + "attr_type": "query" + }, + "header": { + "attr_type": "header" + }, + "authorization": { + "attr_type": "authorization" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendFailureResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "status_code": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "status_code": { + "attr_type": "status_code" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendPool": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "services": { + "default": "none", + "param_type": "keyword_only" + }, + "failure_response": { + "default": "none", + "param_type": "keyword_only" + }, + "session_affinity": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "services": { + "attr_type": "services" + }, + "failure_response": { + "attr_type": "failure_response" + }, + "session_affinity": { + "attr_type": "session_affinity" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendPoolItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "keyword_only" + }, + "weight": { + "default": "none", + "param_type": "keyword_only" + }, + "priority": { + "default": "none", + "param_type": "keyword_only" + }, + "preferred_carbon_emission": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "weight": { + "attr_type": "weight" + }, + "priority": { + "attr_type": "priority" + }, + "preferred_carbon_emission": { + "attr_type": "preferred_carbon_emission" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_fabric_cluster": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "service_fabric_cluster": { + "attr_type": "service_fabric_cluster" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "SOAP": "SOAP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BackendProxyContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "url": { + "default": null, + "param_type": "keyword_only" + }, + "username": { + "default": "none", + "param_type": "keyword_only" + }, + "password": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "url": { + "attr_type": "url" + }, + "username": { + "attr_type": "username" + }, + "password": { + "attr_type": "password" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendReconnectContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "after": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "after": { + "attr_type": "after" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendServiceFabricClusterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "management_endpoints": { + "default": null, + "param_type": "keyword_only" + }, + "client_certificate_id": { + "default": "none", + "param_type": "keyword_only" + }, + "client_certificatethumbprint": { + "default": "none", + "param_type": "keyword_only" + }, + "max_partition_resolution_retries": { + "default": "none", + "param_type": "keyword_only" + }, + "server_certificate_thumbprints": { + "default": "none", + "param_type": "keyword_only" + }, + "server_x509_names": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_certificate_id": { + "attr_type": "client_certificate_id" + }, + "client_certificatethumbprint": { + "attr_type": "client_certificatethumbprint" + }, + "max_partition_resolution_retries": { + "attr_type": "max_partition_resolution_retries" + }, + "management_endpoints": { + "attr_type": "management_endpoints" + }, + "server_certificate_thumbprints": { + "attr_type": "server_certificate_thumbprints" + }, + "server_x509_names": { + "attr_type": "server_x509_names" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendSessionAffinity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "session_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "session_id": { + "attr_type": "session_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendSessionId": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "source": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "source": { + "attr_type": "source" + }, + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendSessionIdSource": { + "type": "Enum", + "methods": {}, + "properties": { + "COOKIE": "COOKIE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BackendSubnetConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendTlsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_certificate_chain": { + "default": "bool", + "param_type": "keyword_only" + }, + "validate_certificate_name": { + "default": "bool", + "param_type": "keyword_only" + }, + "server_certificate_thumbprints": { + "default": "none", + "param_type": "keyword_only" + }, + "server_x509_names": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "validate_certificate_chain": { + "attr_type": "validate_certificate_chain" + }, + "validate_certificate_name": { + "attr_type": "validate_certificate_name" + }, + "server_certificate_thumbprints": { + "attr_type": "server_certificate_thumbprints" + }, + "server_x509_names": { + "attr_type": "server_x509_names" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendType": { + "type": "Enum", + "methods": {}, + "properties": { + "POOL": "POOL", + "SINGLE": "SINGLE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BackendUpdateParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "credentials": { + "default": "none", + "param_type": "keyword_only" + }, + "proxy": { + "default": "none", + "param_type": "keyword_only" + }, + "tls": { + "default": "none", + "param_type": "keyword_only" + }, + "circuit_breaker": { + "default": "none", + "param_type": "keyword_only" + }, + "azure_region": { + "default": "none", + "param_type": "keyword_only" + }, + "pool": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "url": { + "default": "none", + "param_type": "keyword_only" + }, + "protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "url": { + "attr_type": "url" + }, + "protocol": { + "attr_type": "protocol" + }, + "title": { + "attr_type": "title" + }, + "description": { + "attr_type": "description" + }, + "resource_id": { + "attr_type": "resource_id" + }, + "properties": { + "attr_type": "properties" + }, + "credentials": { + "attr_type": "credentials" + }, + "proxy": { + "attr_type": "proxy" + }, + "tls": { + "attr_type": "tls" + }, + "circuit_breaker": { + "attr_type": "circuit_breaker" + }, + "azure_region": { + "attr_type": "azure_region" + }, + "pool": { + "attr_type": "pool" + }, + "type": { + "attr_type": "type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BackendUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "credentials": { + "default": "none", + "param_type": "keyword_only" + }, + "proxy": { + "default": "none", + "param_type": "keyword_only" + }, + "tls": { + "default": "none", + "param_type": "keyword_only" + }, + "circuit_breaker": { + "default": "none", + "param_type": "keyword_only" + }, + "azure_region": { + "default": "none", + "param_type": "keyword_only" + }, + "pool": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "url": { + "default": "none", + "param_type": "keyword_only" + }, + "protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": { + "attr_type": "title" + }, + "description": { + "attr_type": "description" + }, + "resource_id": { + "attr_type": "resource_id" + }, + "properties": { + "attr_type": "properties" + }, + "credentials": { + "attr_type": "credentials" + }, + "proxy": { + "attr_type": "proxy" + }, + "tls": { + "attr_type": "tls" + }, + "circuit_breaker": { + "attr_type": "circuit_breaker" + }, + "azure_region": { + "attr_type": "azure_region" + }, + "pool": { + "attr_type": "pool" + }, + "type": { + "attr_type": "type" + }, + "url": { + "attr_type": "url" + }, + "protocol": { + "attr_type": "protocol" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BearerTokenSendingMethod": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTHORIZATION_HEADER": "AUTHORIZATION_HEADER", + "QUERY": "QUERY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BearerTokenSendingMethods": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTHORIZATION_HEADER": "AUTHORIZATION_HEADER", + "QUERY": "QUERY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BodyDiagnosticSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "bytes": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "bytes": { + "attr_type": "bytes" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CacheCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CacheContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "connection_string": { + "default": "none", + "param_type": "keyword_only" + }, + "use_from_location": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "connection_string": { + "attr_type": "connection_string" + }, + "use_from_location": { + "attr_type": "use_from_location" + }, + "resource_id": { + "attr_type": "resource_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CacheUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "connection_string": { + "default": "none", + "param_type": "keyword_only" + }, + "use_from_location": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "connection_string": { + "attr_type": "connection_string" + }, + "use_from_location": { + "attr_type": "use_from_location" + }, + "resource_id": { + "attr_type": "resource_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CarbonEmissionCategory": { + "type": "Enum", + "methods": {}, + "properties": { + "HIGH": "HIGH", + "LOW": "LOW", + "MEDIUM": "MEDIUM", + "VERY_HIGH": "VERY_HIGH", + "VERY_LOW": "VERY_LOW", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CertificateCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CertificateConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "store_name": { + "default": null, + "param_type": "keyword_only" + }, + "encoded_certificate": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate_password": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "encoded_certificate": { + "attr_type": "encoded_certificate" + }, + "certificate_password": { + "attr_type": "certificate_password" + }, + "store_name": { + "attr_type": "store_name" + }, + "certificate": { + "attr_type": "certificate" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CertificateConfigurationStoreName": { + "type": "Enum", + "methods": {}, + "properties": { + "CERTIFICATE_AUTHORITY": "CERTIFICATE_AUTHORITY", + "ROOT": "ROOT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CertificateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subject": { + "default": "none", + "param_type": "keyword_only" + }, + "thumbprint": { + "default": "none", + "param_type": "keyword_only" + }, + "expiration_date": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subject": { + "attr_type": "subject" + }, + "thumbprint": { + "attr_type": "thumbprint" + }, + "expiration_date": { + "attr_type": "expiration_date" + }, + "key_vault": { + "attr_type": "key_vault" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CertificateCreateOrUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data": { + "default": "none", + "param_type": "keyword_only" + }, + "password": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "data": { + "attr_type": "data" + }, + "password": { + "attr_type": "password" + }, + "key_vault": { + "attr_type": "key_vault" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CertificateInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expiry": { + "default": null, + "param_type": "keyword_only" + }, + "thumbprint": { + "default": null, + "param_type": "keyword_only" + }, + "subject": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "expiry": { + "attr_type": "expiry" + }, + "thumbprint": { + "attr_type": "thumbprint" + }, + "subject": { + "attr_type": "subject" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CertificateSource": { + "type": "Enum", + "methods": {}, + "properties": { + "BUILT_IN": "BUILT_IN", + "CUSTOM": "CUSTOM", + "KEY_VAULT": "KEY_VAULT", + "MANAGED": "MANAGED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CertificateStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETED": "COMPLETED", + "FAILED": "FAILED", + "IN_PROGRESS": "IN_PROGRESS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CircuitBreakerFailureCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "percentage": { + "default": "none", + "param_type": "keyword_only" + }, + "interval": { + "default": "none", + "param_type": "keyword_only" + }, + "status_code_ranges": { + "default": "none", + "param_type": "keyword_only" + }, + "error_reasons": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "count": { + "attr_type": "count" + }, + "percentage": { + "attr_type": "percentage" + }, + "interval": { + "attr_type": "interval" + }, + "status_code_ranges": { + "attr_type": "status_code_ranges" + }, + "error_reasons": { + "attr_type": "error_reasons" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CircuitBreakerRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "failure_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "trip_duration": { + "default": "none", + "param_type": "keyword_only" + }, + "accept_retry_after": { + "default": "none", + "param_type": "keyword_only" + }, + "failure_response": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "failure_condition": { + "attr_type": "failure_condition" + }, + "trip_duration": { + "attr_type": "trip_duration" + }, + "accept_retry_after": { + "attr_type": "accept_retry_after" + }, + "failure_response": { + "attr_type": "failure_response" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClientApplicationCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClientApplicationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "owner_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "description": { + "attr_type": "description" + }, + "owner_id": { + "attr_type": "owner_id" + }, + "entra_application_id": { + "attr_type": null + }, + "entra_tenant_id": { + "attr_type": null + }, + "state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClientApplicationProductLinkCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClientApplicationProductLinkContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "product_id": { + "attr_type": "product_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClientApplicationSecretsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "entra": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "entra": { + "attr_type": "entra" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClientApplicationSecretsContractEntra": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_secret": { + "attr_type": "client_secret" + }, + "expires_at": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClientApplicationState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "APPROVED": "APPROVED", + "PENDING": "PENDING", + "REJECTED": "REJECTED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ClientAuthenticationMethod": { + "type": "Enum", + "methods": {}, + "properties": { + "BASIC": "BASIC", + "BODY": "BODY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ClientSecretContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_secret": { + "attr_type": "client_secret" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ConfigurationApi": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "legacy_api": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "legacy_api": { + "attr_type": "legacy_api" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ConfigurationIdName": { + "type": "Enum", + "methods": {}, + "properties": { + "CONFIGURATION": "CONFIGURATION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Confirmation": { + "type": "Enum", + "methods": {}, + "properties": { + "INVITE": "INVITE", + "SIGNUP": "SIGNUP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ConnectionStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "CONNECTED": "CONNECTED", + "DEGRADED": "DEGRADED", + "DISCONNECTED": "DISCONNECTED", + "UNKNOWN": "UNKNOWN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ConnectivityCheckProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "HTTPS": "HTTPS", + "TCP": "TCP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ConnectivityCheckRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "source": { + "default": null, + "param_type": "keyword_only" + }, + "destination": { + "default": null, + "param_type": "keyword_only" + }, + "preferred_ip_version": { + "default": "none", + "param_type": "keyword_only" + }, + "protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "protocol_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "source": { + "attr_type": "source" + }, + "destination": { + "attr_type": "destination" + }, + "preferred_ip_version": { + "attr_type": "preferred_ip_version" + }, + "protocol": { + "attr_type": "protocol" + }, + "protocol_configuration": { + "attr_type": "protocol_configuration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ConnectivityCheckRequestDestination": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "address": { + "default": null, + "param_type": "keyword_only" + }, + "port": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "address": { + "attr_type": "address" + }, + "port": { + "attr_type": "port" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ConnectivityCheckRequestProtocolConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "http_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "http_configuration": { + "attr_type": "http_configuration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "method": { + "default": "none", + "param_type": "keyword_only" + }, + "valid_status_codes": { + "default": "none", + "param_type": "keyword_only" + }, + "headers": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "method": { + "attr_type": "method" + }, + "valid_status_codes": { + "attr_type": "valid_status_codes" + }, + "headers": { + "attr_type": "headers" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ConnectivityCheckRequestSource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "region": { + "default": null, + "param_type": "keyword_only" + }, + "instance": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "region": { + "attr_type": "region" + }, + "instance": { + "attr_type": "instance" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ConnectivityCheckResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "hops": { + "attr_type": null + }, + "connection_status": { + "attr_type": null + }, + "avg_latency_in_ms": { + "attr_type": null + }, + "min_latency_in_ms": { + "attr_type": null + }, + "max_latency_in_ms": { + "attr_type": null + }, + "probes_sent": { + "attr_type": null + }, + "probes_failed": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ConnectivityHop": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "address": { + "attr_type": null + }, + "resource_id": { + "attr_type": null + }, + "next_hop_ids": { + "attr_type": null + }, + "issues": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ConnectivityIssue": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "origin": { + "attr_type": null + }, + "severity": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "context": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ConnectivityStatusContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "status": { + "default": null, + "param_type": "keyword_only" + }, + "last_updated": { + "default": null, + "param_type": "keyword_only" + }, + "last_status_change": { + "default": null, + "param_type": "keyword_only" + }, + "resource_type": { + "default": null, + "param_type": "keyword_only" + }, + "is_optional": { + "default": null, + "param_type": "keyword_only" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "status": { + "attr_type": "status" + }, + "error": { + "attr_type": "error" + }, + "last_updated": { + "attr_type": "last_updated" + }, + "last_status_change": { + "attr_type": "last_status_change" + }, + "resource_type": { + "attr_type": "resource_type" + }, + "is_optional": { + "attr_type": "is_optional" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ConnectivityStatusType": { + "type": "Enum", + "methods": {}, + "properties": { + "FAILURE": "FAILURE", + "INITIALIZING": "INITIALIZING", + "SUCCESS": "SUCCESS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ContentFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "GRAPHQL_LINK": "GRAPHQL_LINK", + "GRPC": "GRPC", + "GRPC_LINK": "GRPC_LINK", + "ODATA": "ODATA", + "ODATA_LINK": "ODATA_LINK", + "OPENAPI": "OPENAPI", + "OPENAPI_JSON": "OPENAPI_JSON", + "OPENAPI_JSON_LINK": "OPENAPI_JSON_LINK", + "OPENAPI_LINK": "OPENAPI_LINK", + "SWAGGER_JSON": "SWAGGER_JSON", + "SWAGGER_LINK_JSON": "SWAGGER_LINK_JSON", + "WADL_LINK_JSON": "WADL_LINK_JSON", + "WADL_XML": "WADL_XML", + "WSDL": "WSDL", + "WSDL_LINK": "WSDL_LINK", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ContentItemCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ContentItemContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": { + "attr_type": "properties" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ContentTypeCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ContentTypeContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id_properties_id": { + "default": "none", + "param_type": "keyword_only" + }, + "name_properties_name": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "schema": { + "default": "none", + "param_type": "keyword_only" + }, + "version": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id_properties_id": { + "attr_type": "id_properties_id" + }, + "name_properties_name": { + "attr_type": "name_properties_name" + }, + "description": { + "attr_type": "description" + }, + "schema": { + "attr_type": "schema" + }, + "version": { + "attr_type": "version" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CreatedByType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION": "APPLICATION", + "KEY": "KEY", + "MANAGED_IDENTITY": "MANAGED_IDENTITY", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DataMasking": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "query_params": { + "default": "none", + "param_type": "keyword_only" + }, + "headers": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "query_params": { + "attr_type": "query_params" + }, + "headers": { + "attr_type": "headers" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DataMaskingEntity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "mode": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "mode": { + "attr_type": "mode" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DataMaskingMode": { + "type": "Enum", + "methods": {}, + "properties": { + "HIDE": "HIDE", + "MASK": "MASK", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeletedServiceContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_id": { + "default": "none", + "param_type": "keyword_only" + }, + "scheduled_purge_date": { + "default": "none", + "param_type": "keyword_only" + }, + "deletion_date": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "location": { + "attr_type": null + }, + "service_id": { + "attr_type": "service_id" + }, + "scheduled_purge_date": { + "attr_type": "scheduled_purge_date" + }, + "deletion_date": { + "attr_type": "deletion_date" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeletedServicesCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeployConfigurationParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "branch": { + "default": "none", + "param_type": "keyword_only" + }, + "force": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "branch": { + "attr_type": "branch" + }, + "force": { + "attr_type": "force" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeveloperPortalStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DiagnosticCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DiagnosticContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "always_log": { + "default": "none", + "param_type": "keyword_only" + }, + "logger_id": { + "default": "none", + "param_type": "keyword_only" + }, + "sampling": { + "default": "none", + "param_type": "keyword_only" + }, + "frontend": { + "default": "none", + "param_type": "keyword_only" + }, + "backend": { + "default": "none", + "param_type": "keyword_only" + }, + "large_language_model": { + "default": "none", + "param_type": "keyword_only" + }, + "log_client_ip": { + "default": "none", + "param_type": "keyword_only" + }, + "http_correlation_protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "verbosity": { + "default": "none", + "param_type": "keyword_only" + }, + "operation_name_format": { + "default": "none", + "param_type": "keyword_only" + }, + "metrics": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "always_log": { + "attr_type": "always_log" + }, + "logger_id": { + "attr_type": "logger_id" + }, + "sampling": { + "attr_type": "sampling" + }, + "frontend": { + "attr_type": "frontend" + }, + "backend": { + "attr_type": "backend" + }, + "large_language_model": { + "attr_type": "large_language_model" + }, + "log_client_ip": { + "attr_type": "log_client_ip" + }, + "http_correlation_protocol": { + "attr_type": "http_correlation_protocol" + }, + "verbosity": { + "attr_type": "verbosity" + }, + "operation_name_format": { + "attr_type": "operation_name_format" + }, + "metrics": { + "attr_type": "metrics" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DiagnosticUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "always_log": { + "default": "none", + "param_type": "keyword_only" + }, + "logger_id": { + "default": "none", + "param_type": "keyword_only" + }, + "sampling": { + "default": "none", + "param_type": "keyword_only" + }, + "frontend": { + "default": "none", + "param_type": "keyword_only" + }, + "backend": { + "default": "none", + "param_type": "keyword_only" + }, + "log_client_ip": { + "default": "none", + "param_type": "keyword_only" + }, + "http_correlation_protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "verbosity": { + "default": "none", + "param_type": "keyword_only" + }, + "operation_name_format": { + "default": "none", + "param_type": "keyword_only" + }, + "metrics": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "always_log": { + "attr_type": "always_log" + }, + "logger_id": { + "attr_type": "logger_id" + }, + "sampling": { + "attr_type": "sampling" + }, + "frontend": { + "attr_type": "frontend" + }, + "backend": { + "attr_type": "backend" + }, + "log_client_ip": { + "attr_type": "log_client_ip" + }, + "http_correlation_protocol": { + "attr_type": "http_correlation_protocol" + }, + "verbosity": { + "attr_type": "verbosity" + }, + "operation_name_format": { + "attr_type": "operation_name_format" + }, + "metrics": { + "attr_type": "metrics" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DocumentationCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DocumentationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "content": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": { + "attr_type": "title" + }, + "content": { + "attr_type": "content" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DocumentationUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "content": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": { + "attr_type": "title" + }, + "content": { + "attr_type": "content" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EmailTemplateCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EmailTemplateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subject": { + "default": "none", + "param_type": "keyword_only" + }, + "body": { + "default": "none", + "param_type": "keyword_only" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subject": { + "attr_type": "subject" + }, + "body": { + "attr_type": "body" + }, + "title": { + "attr_type": "title" + }, + "description": { + "attr_type": "description" + }, + "is_default": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EmailTemplateParametersContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "title": { + "attr_type": "title" + }, + "description": { + "attr_type": "description" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EmailTemplateUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subject": { + "default": "none", + "param_type": "keyword_only" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "body": { + "default": "none", + "param_type": "keyword_only" + }, + "parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subject": { + "attr_type": "subject" + }, + "title": { + "attr_type": "title" + }, + "description": { + "attr_type": "description" + }, + "body": { + "attr_type": "body" + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EndpointDependency": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "domain_name": { + "default": "none", + "param_type": "keyword_only" + }, + "endpoint_details": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "domain_name": { + "attr_type": "domain_name" + }, + "endpoint_details": { + "attr_type": "endpoint_details" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EndpointDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "port": { + "default": "none", + "param_type": "keyword_only" + }, + "region": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "port": { + "attr_type": "port" + }, + "region": { + "attr_type": "region" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorAdditionalInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "info": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "target": { + "attr_type": null + }, + "details": { + "attr_type": null + }, + "additional_info": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorFieldContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "code": { + "default": "none", + "param_type": "keyword_only" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "target": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": "code" + }, + "message": { + "attr_type": "message" + }, + "target": { + "attr_type": "target" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorResponseBody": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "code": { + "default": "none", + "param_type": "keyword_only" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "details": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": "code" + }, + "message": { + "attr_type": "message" + }, + "details": { + "attr_type": "details" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportApi": { + "type": "Enum", + "methods": {}, + "properties": { + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ExportFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "OPENAPI": "OPENAPI", + "OPENAPI_JSON": "OPENAPI_JSON", + "SWAGGER": "SWAGGER", + "WADL": "WADL", + "WSDL": "WSDL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ExportResultFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "OPEN_API": "OPEN_API", + "SWAGGER": "SWAGGER", + "WADL": "WADL", + "WSDL": "WSDL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FailureStatusCodeRange": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "min": { + "default": "none", + "param_type": "keyword_only" + }, + "max": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "min": { + "attr_type": "min" + }, + "max": { + "attr_type": "max" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "FrontendConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "default_hostname": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayCertificateAuthorityCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayCertificateAuthorityContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "is_trusted": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "is_trusted": { + "attr_type": "is_trusted" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayConfigurationApi": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "hostname": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "location_data": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "identity": { + "attr_type": "identity" + }, + "location_data": { + "attr_type": "location_data" + }, + "description": { + "attr_type": "description" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayDebugCredentialsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "token": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "token": { + "attr_type": "token" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayHostnameBindingCertificate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "thumbprint": { + "attr_type": null + }, + "subject": { + "attr_type": null + }, + "expiry": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayHostnameBindingKeyVault": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_id": { + "default": null, + "param_type": "keyword_only" + }, + "identity_client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "last_status": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "secret_id": { + "attr_type": "secret_id" + }, + "identity_client_id": { + "attr_type": "identity_client_id" + }, + "last_status": { + "attr_type": "last_status" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayHostnameBindingKeyVaultLastStatus": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": null + }, + "time_stamp_utc": { + "attr_type": null + }, + "last_success_time_stamp_utc": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayHostnameBindingListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayHostnameBindingResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname": { + "default": null, + "param_type": "keyword_only" + }, + "key_vault": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "etag": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "hostname": { + "attr_type": "hostname" + }, + "key_vault": { + "attr_type": "key_vault" + }, + "certificate": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayHostnameConfigurationCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayHostnameConfigurationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate_id": { + "default": "none", + "param_type": "keyword_only" + }, + "negotiate_client_certificate": { + "default": "none", + "param_type": "keyword_only" + }, + "tls10_enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "tls11_enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "http2_enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "hostname": { + "attr_type": "hostname" + }, + "certificate_id": { + "attr_type": "certificate_id" + }, + "negotiate_client_certificate": { + "attr_type": "negotiate_client_certificate" + }, + "tls10_enabled": { + "attr_type": "tls10_enabled" + }, + "tls11_enabled": { + "attr_type": "tls11_enabled" + }, + "http2_enabled": { + "attr_type": "http2_enabled" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayKeyRegenerationRequestContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_type": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key_type": { + "attr_type": "key_type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayKeysContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "primary": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "primary": { + "attr_type": "primary" + }, + "secondary": { + "attr_type": "secondary" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayListDebugCredentialsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "purposes": { + "default": null, + "param_type": "keyword_only" + }, + "api_id": { + "default": null, + "param_type": "keyword_only" + }, + "credentials_expire_after": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "credentials_expire_after": { + "attr_type": "credentials_expire_after" + }, + "purposes": { + "attr_type": "purposes" + }, + "api_id": { + "attr_type": "api_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayListDebugCredentialsContractPurpose": { + "type": "Enum", + "methods": {}, + "properties": { + "TRACING": "TRACING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GatewayListTraceContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "trace_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "trace_id": { + "attr_type": "trace_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayResourceSkuResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "resource_type": { + "attr_type": null + }, + "sku": { + "attr_type": null + }, + "capacity": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayResourceSkuResults": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewaySku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewaySkuCapacity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "minimum": { + "attr_type": null + }, + "maximum": { + "attr_type": null + }, + "default": { + "attr_type": null + }, + "scale_type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewaySkuCapacityScaleType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTOMATIC": "AUTOMATIC", + "MANUAL": "MANUAL", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GatewayTokenContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GatewayTokenRequestContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_type": { + "default": null, + "param_type": "keyword_only" + }, + "expiry": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key_type": { + "attr_type": "key_type" + }, + "expiry": { + "attr_type": "expiry" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GenerateSsoUrlResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GlobalSchemaCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GlobalSchemaContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_type": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "document": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "schema_type": { + "attr_type": "schema_type" + }, + "description": { + "attr_type": "description" + }, + "value": { + "attr_type": "value" + }, + "document": { + "attr_type": "document" + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GrantType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTHORIZATION_CODE": "AUTHORIZATION_CODE", + "CLIENT_CREDENTIALS": "CLIENT_CREDENTIALS", + "IMPLICIT": "IMPLICIT", + "RESOURCE_OWNER_PASSWORD": "RESOURCE_OWNER_PASSWORD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GroupCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GroupContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "type_properties_type": { + "default": "none", + "param_type": "keyword_only" + }, + "external_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "description": { + "attr_type": "description" + }, + "built_in": { + "attr_type": null + }, + "type_properties_type": { + "attr_type": "type_properties_type" + }, + "external_id": { + "attr_type": "external_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GroupContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": null, + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "external_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "description": { + "attr_type": "description" + }, + "built_in": { + "attr_type": null + }, + "type": { + "attr_type": "type" + }, + "external_id": { + "attr_type": "external_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GroupCreateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "external_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "description": { + "attr_type": "description" + }, + "type": { + "attr_type": "type" + }, + "external_id": { + "attr_type": "external_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GroupType": { + "type": "Enum", + "methods": {}, + "properties": { + "CUSTOM": "CUSTOM", + "EXTERNAL": "EXTERNAL", + "SYSTEM": "SYSTEM", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GroupUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "external_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "description": { + "attr_type": "description" + }, + "type": { + "attr_type": "type" + }, + "external_id": { + "attr_type": "external_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "HTTPHeader": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "value": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "HostnameConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "host_name": { + "default": null, + "param_type": "keyword_only" + }, + "key_vault_id": { + "default": "none", + "param_type": "keyword_only" + }, + "identity_client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "encoded_certificate": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate_password": { + "default": "none", + "param_type": "keyword_only" + }, + "default_ssl_binding": { + "default": "bool", + "param_type": "keyword_only" + }, + "negotiate_client_certificate": { + "default": "bool", + "param_type": "keyword_only" + }, + "certificate": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate_source": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate_status": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "host_name": { + "attr_type": "host_name" + }, + "key_vault_id": { + "attr_type": "key_vault_id" + }, + "identity_client_id": { + "attr_type": "identity_client_id" + }, + "encoded_certificate": { + "attr_type": "encoded_certificate" + }, + "certificate_password": { + "attr_type": "certificate_password" + }, + "default_ssl_binding": { + "attr_type": "default_ssl_binding" + }, + "negotiate_client_certificate": { + "attr_type": "negotiate_client_certificate" + }, + "certificate": { + "attr_type": "certificate" + }, + "certificate_source": { + "attr_type": "certificate_source" + }, + "certificate_status": { + "attr_type": "certificate_status" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "HostnameType": { + "type": "Enum", + "methods": {}, + "properties": { + "CONFIGURATION_API": "CONFIGURATION_API", + "DEVELOPER_PORTAL": "DEVELOPER_PORTAL", + "MANAGEMENT": "MANAGEMENT", + "PORTAL": "PORTAL", + "PROXY": "PROXY", + "SCM": "SCM", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HttpCorrelationProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "LEGACY": "LEGACY", + "NONE": "NONE", + "W3_C": "W3_C", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HttpMessageDiagnostic": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "headers": { + "default": "none", + "param_type": "keyword_only" + }, + "body": { + "default": "none", + "param_type": "keyword_only" + }, + "data_masking": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "headers": { + "attr_type": "headers" + }, + "body": { + "attr_type": "body" + }, + "data_masking": { + "attr_type": "data_masking" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IdentityProviderBaseParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_tenant": { + "default": "none", + "param_type": "keyword_only" + }, + "allowed_tenants": { + "default": "none", + "param_type": "keyword_only" + }, + "authority": { + "default": "none", + "param_type": "keyword_only" + }, + "signup_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "client_library": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "signin_tenant": { + "attr_type": "signin_tenant" + }, + "allowed_tenants": { + "attr_type": "allowed_tenants" + }, + "authority": { + "attr_type": "authority" + }, + "signup_policy_name": { + "attr_type": "signup_policy_name" + }, + "signin_policy_name": { + "attr_type": "signin_policy_name" + }, + "profile_editing_policy_name": { + "attr_type": "profile_editing_policy_name" + }, + "password_reset_policy_name": { + "attr_type": "password_reset_policy_name" + }, + "client_library": { + "attr_type": "client_library" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IdentityProviderContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type_properties_type": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_tenant": { + "default": "none", + "param_type": "keyword_only" + }, + "allowed_tenants": { + "default": "none", + "param_type": "keyword_only" + }, + "authority": { + "default": "none", + "param_type": "keyword_only" + }, + "signup_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "client_library": { + "default": "none", + "param_type": "keyword_only" + }, + "client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type_properties_type": { + "attr_type": "type_properties_type" + }, + "signin_tenant": { + "attr_type": "signin_tenant" + }, + "allowed_tenants": { + "attr_type": "allowed_tenants" + }, + "authority": { + "attr_type": "authority" + }, + "signup_policy_name": { + "attr_type": "signup_policy_name" + }, + "signin_policy_name": { + "attr_type": "signin_policy_name" + }, + "profile_editing_policy_name": { + "attr_type": "profile_editing_policy_name" + }, + "password_reset_policy_name": { + "attr_type": "password_reset_policy_name" + }, + "client_library": { + "attr_type": "client_library" + }, + "client_id": { + "attr_type": "client_id" + }, + "client_secret": { + "attr_type": "client_secret" + }, + "certificate_id": { + "attr_type": "certificate_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IdentityProviderContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_id": { + "default": null, + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_tenant": { + "default": "none", + "param_type": "keyword_only" + }, + "allowed_tenants": { + "default": "none", + "param_type": "keyword_only" + }, + "authority": { + "default": "none", + "param_type": "keyword_only" + }, + "signup_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "client_library": { + "default": "none", + "param_type": "keyword_only" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_id": { + "attr_type": "client_id" + }, + "client_secret": { + "attr_type": "client_secret" + }, + "certificate_id": { + "attr_type": "certificate_id" + }, + "type": { + "attr_type": "type" + }, + "signin_tenant": { + "attr_type": "signin_tenant" + }, + "allowed_tenants": { + "attr_type": "allowed_tenants" + }, + "authority": { + "attr_type": "authority" + }, + "signup_policy_name": { + "attr_type": "signup_policy_name" + }, + "signin_policy_name": { + "attr_type": "signin_policy_name" + }, + "profile_editing_policy_name": { + "attr_type": "profile_editing_policy_name" + }, + "password_reset_policy_name": { + "attr_type": "password_reset_policy_name" + }, + "client_library": { + "attr_type": "client_library" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IdentityProviderCreateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type_properties_type": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_tenant": { + "default": "none", + "param_type": "keyword_only" + }, + "allowed_tenants": { + "default": "none", + "param_type": "keyword_only" + }, + "authority": { + "default": "none", + "param_type": "keyword_only" + }, + "signup_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "client_library": { + "default": "none", + "param_type": "keyword_only" + }, + "client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type_properties_type": { + "attr_type": "type_properties_type" + }, + "signin_tenant": { + "attr_type": "signin_tenant" + }, + "allowed_tenants": { + "attr_type": "allowed_tenants" + }, + "authority": { + "attr_type": "authority" + }, + "signup_policy_name": { + "attr_type": "signup_policy_name" + }, + "signin_policy_name": { + "attr_type": "signin_policy_name" + }, + "profile_editing_policy_name": { + "attr_type": "profile_editing_policy_name" + }, + "password_reset_policy_name": { + "attr_type": "password_reset_policy_name" + }, + "client_library": { + "attr_type": "client_library" + }, + "client_id": { + "attr_type": "client_id" + }, + "client_secret": { + "attr_type": "client_secret" + }, + "certificate_id": { + "attr_type": "certificate_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IdentityProviderCreateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_id": { + "default": null, + "param_type": "keyword_only" + }, + "client_secret": { + "default": null, + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_tenant": { + "default": "none", + "param_type": "keyword_only" + }, + "allowed_tenants": { + "default": "none", + "param_type": "keyword_only" + }, + "authority": { + "default": "none", + "param_type": "keyword_only" + }, + "signup_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "client_library": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_id": { + "attr_type": "client_id" + }, + "client_secret": { + "attr_type": "client_secret" + }, + "certificate_id": { + "attr_type": "certificate_id" + }, + "type": { + "attr_type": "type" + }, + "signin_tenant": { + "attr_type": "signin_tenant" + }, + "allowed_tenants": { + "attr_type": "allowed_tenants" + }, + "authority": { + "attr_type": "authority" + }, + "signup_policy_name": { + "attr_type": "signup_policy_name" + }, + "signin_policy_name": { + "attr_type": "signin_policy_name" + }, + "profile_editing_policy_name": { + "attr_type": "profile_editing_policy_name" + }, + "password_reset_policy_name": { + "attr_type": "password_reset_policy_name" + }, + "client_library": { + "attr_type": "client_library" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IdentityProviderList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IdentityProviderType": { + "type": "Enum", + "methods": {}, + "properties": { + "AAD": "AAD", + "AAD_B2_C": "AAD_B2_C", + "FACEBOOK": "FACEBOOK", + "GOOGLE": "GOOGLE", + "MICROSOFT": "MICROSOFT", + "TWITTER": "TWITTER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IdentityProviderUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_tenant": { + "default": "none", + "param_type": "keyword_only" + }, + "allowed_tenants": { + "default": "none", + "param_type": "keyword_only" + }, + "authority": { + "default": "none", + "param_type": "keyword_only" + }, + "signup_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "client_library": { + "default": "none", + "param_type": "keyword_only" + }, + "client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "signin_tenant": { + "attr_type": "signin_tenant" + }, + "allowed_tenants": { + "attr_type": "allowed_tenants" + }, + "authority": { + "attr_type": "authority" + }, + "signup_policy_name": { + "attr_type": "signup_policy_name" + }, + "signin_policy_name": { + "attr_type": "signin_policy_name" + }, + "profile_editing_policy_name": { + "attr_type": "profile_editing_policy_name" + }, + "password_reset_policy_name": { + "attr_type": "password_reset_policy_name" + }, + "client_library": { + "attr_type": "client_library" + }, + "client_id": { + "attr_type": "client_id" + }, + "client_secret": { + "attr_type": "client_secret" + }, + "certificate_id": { + "attr_type": "certificate_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IdentityProviderUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_tenant": { + "default": "none", + "param_type": "keyword_only" + }, + "allowed_tenants": { + "default": "none", + "param_type": "keyword_only" + }, + "authority": { + "default": "none", + "param_type": "keyword_only" + }, + "signup_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "signin_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "client_library": { + "default": "none", + "param_type": "keyword_only" + }, + "client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_id": { + "attr_type": "client_id" + }, + "client_secret": { + "attr_type": "client_secret" + }, + "certificate_id": { + "attr_type": "certificate_id" + }, + "type": { + "attr_type": "type" + }, + "signin_tenant": { + "attr_type": "signin_tenant" + }, + "allowed_tenants": { + "attr_type": "allowed_tenants" + }, + "authority": { + "attr_type": "authority" + }, + "signup_policy_name": { + "attr_type": "signup_policy_name" + }, + "signin_policy_name": { + "attr_type": "signin_policy_name" + }, + "profile_editing_policy_name": { + "attr_type": "profile_editing_policy_name" + }, + "password_reset_policy_name": { + "attr_type": "password_reset_policy_name" + }, + "client_library": { + "attr_type": "client_library" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IssueAttachmentCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IssueAttachmentContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "content_format": { + "default": "none", + "param_type": "keyword_only" + }, + "content": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": { + "attr_type": "title" + }, + "content_format": { + "attr_type": "content_format" + }, + "content": { + "attr_type": "content" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IssueCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IssueCommentCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IssueCommentContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "text": { + "default": "none", + "param_type": "keyword_only" + }, + "created_date": { + "default": "none", + "param_type": "keyword_only" + }, + "user_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "text": { + "attr_type": "text" + }, + "created_date": { + "attr_type": "created_date" + }, + "user_id": { + "attr_type": "user_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IssueContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "created_date": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "user_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "created_date": { + "attr_type": "created_date" + }, + "state": { + "attr_type": "state" + }, + "api_id": { + "attr_type": "api_id" + }, + "title": { + "attr_type": "title" + }, + "description": { + "attr_type": "description" + }, + "user_id": { + "attr_type": "user_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IssueContractBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "created_date": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "created_date": { + "attr_type": "created_date" + }, + "state": { + "attr_type": "state" + }, + "api_id": { + "attr_type": "api_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IssueContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "default": null, + "param_type": "keyword_only" + }, + "description": { + "default": null, + "param_type": "keyword_only" + }, + "user_id": { + "default": null, + "param_type": "keyword_only" + }, + "created_date": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": { + "attr_type": "title" + }, + "description": { + "attr_type": "description" + }, + "user_id": { + "attr_type": "user_id" + }, + "created_date": { + "attr_type": "created_date" + }, + "state": { + "attr_type": "state" + }, + "api_id": { + "attr_type": "api_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IssueType": { + "type": "Enum", + "methods": {}, + "properties": { + "AGENT_STOPPED": "AGENT_STOPPED", + "DNS_RESOLUTION": "DNS_RESOLUTION", + "GUEST_FIREWALL": "GUEST_FIREWALL", + "NETWORK_SECURITY_RULE": "NETWORK_SECURITY_RULE", + "PLATFORM": "PLATFORM", + "PORT_THROTTLED": "PORT_THROTTLED", + "SOCKET_BIND": "SOCKET_BIND", + "UNKNOWN": "UNKNOWN", + "USER_DEFINED_ROUTE": "USER_DEFINED_ROUTE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IssueUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "created_date": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "user_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "created_date": { + "attr_type": "created_date" + }, + "state": { + "attr_type": "state" + }, + "api_id": { + "attr_type": "api_id" + }, + "title": { + "attr_type": "title" + }, + "description": { + "attr_type": "description" + }, + "user_id": { + "attr_type": "user_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IssueUpdateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "created_date": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "user_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": { + "attr_type": "title" + }, + "description": { + "attr_type": "description" + }, + "user_id": { + "attr_type": "user_id" + }, + "created_date": { + "attr_type": "created_date" + }, + "state": { + "attr_type": "state" + }, + "api_id": { + "attr_type": "api_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "KeyType": { + "type": "Enum", + "methods": {}, + "properties": { + "PRIMARY": "PRIMARY", + "SECONDARY": "SECONDARY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "KeyVaultContractCreateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_identifier": { + "default": "none", + "param_type": "keyword_only" + }, + "identity_client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "secret_identifier": { + "attr_type": "secret_identifier" + }, + "identity_client_id": { + "attr_type": "identity_client_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "KeyVaultContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_identifier": { + "default": "none", + "param_type": "keyword_only" + }, + "identity_client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "last_status": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "last_status": { + "attr_type": "last_status" + }, + "secret_identifier": { + "attr_type": "secret_identifier" + }, + "identity_client_id": { + "attr_type": "identity_client_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "KeyVaultFetchCode": { + "type": "Enum", + "methods": {}, + "properties": { + "FAILED": "FAILED", + "SUCCESS": "SUCCESS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "KeyVaultLastAccessStatusContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "code": { + "default": "none", + "param_type": "keyword_only" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "time_stamp_utc": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": "code" + }, + "message": { + "attr_type": "message" + }, + "time_stamp_utc": { + "attr_type": "time_stamp_utc" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "KeyVaultRefreshState": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LLMDiagnosticSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logs": { + "default": "none", + "param_type": "keyword_only" + }, + "requests": { + "default": "none", + "param_type": "keyword_only" + }, + "responses": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "logs": { + "attr_type": "logs" + }, + "requests": { + "attr_type": "requests" + }, + "responses": { + "attr_type": "responses" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "LLMMessageDiagnosticSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "messages": { + "default": "none", + "param_type": "keyword_only" + }, + "max_size_in_bytes": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "messages": { + "attr_type": "messages" + }, + "max_size_in_bytes": { + "attr_type": "max_size_in_bytes" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "LegacyApiState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LegacyPortalStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LlmDiagnosticSettings": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LlmMessageLogTypes": { + "type": "Enum", + "methods": {}, + "properties": { + "ALL": "ALL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LoggerCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "LoggerContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_type": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "credentials": { + "default": "none", + "param_type": "keyword_only" + }, + "is_buffered": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "logger_type": { + "attr_type": "logger_type" + }, + "description": { + "attr_type": "description" + }, + "credentials": { + "attr_type": "credentials" + }, + "is_buffered": { + "attr_type": "is_buffered" + }, + "resource_id": { + "attr_type": "resource_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "LoggerType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION_INSIGHTS": "APPLICATION_INSIGHTS", + "AZURE_EVENT_HUB": "AZURE_EVENT_HUB", + "AZURE_MONITOR": "AZURE_MONITOR", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LoggerUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_type": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "credentials": { + "default": "none", + "param_type": "keyword_only" + }, + "is_buffered": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "logger_type": { + "attr_type": "logger_type" + }, + "description": { + "attr_type": "description" + }, + "credentials": { + "attr_type": "credentials" + }, + "is_buffered": { + "attr_type": "is_buffered" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedServiceIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identities": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "principal_id": { + "attr_type": null + }, + "tenant_id": { + "attr_type": null + }, + "type": { + "attr_type": "type" + }, + "user_assigned_identities": { + "attr_type": "user_assigned_identities" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedServiceIdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "SYSTEM_ASSIGNED_USER_ASSIGNED": "SYSTEM_ASSIGNED_USER_ASSIGNED", + "USER_ASSIGNED": "USER_ASSIGNED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Method": { + "type": "Enum", + "methods": {}, + "properties": { + "GET": "GET", + "POST": "POST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MigrateToStv2Contract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "mode": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "mode": { + "attr_type": "mode" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MigrateToStv2Mode": { + "type": "Enum", + "methods": {}, + "properties": { + "NEW_IP": "NEW_IP", + "PRESERVE_IP": "PRESERVE_IP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NameAvailabilityReason": { + "type": "Enum", + "methods": {}, + "properties": { + "ALREADY_EXISTS": "ALREADY_EXISTS", + "INVALID": "INVALID", + "VALID": "VALID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NamedValueCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NamedValueContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "secret": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "secret": { + "attr_type": "secret" + }, + "display_name": { + "attr_type": "display_name" + }, + "value": { + "attr_type": "value" + }, + "key_vault": { + "attr_type": "key_vault" + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NamedValueContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "secret": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "value": { + "attr_type": "value" + }, + "key_vault": { + "attr_type": "key_vault" + }, + "provisioning_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "secret": { + "attr_type": "secret" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NamedValueCreateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "secret": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "secret": { + "attr_type": "secret" + }, + "display_name": { + "attr_type": "display_name" + }, + "value": { + "attr_type": "value" + }, + "key_vault": { + "attr_type": "key_vault" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NamedValueCreateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "secret": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "value": { + "attr_type": "value" + }, + "key_vault": { + "attr_type": "key_vault" + }, + "tags": { + "attr_type": "tags" + }, + "secret": { + "attr_type": "secret" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NamedValueEntityBaseParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "secret": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "secret": { + "attr_type": "secret" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NamedValueSecretContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NamedValueUpdateParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "secret": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "value": { + "attr_type": "value" + }, + "key_vault": { + "attr_type": "key_vault" + }, + "tags": { + "attr_type": "tags" + }, + "secret": { + "attr_type": "secret" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NamedValueUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "secret": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "secret": { + "attr_type": "secret" + }, + "display_name": { + "attr_type": "display_name" + }, + "value": { + "attr_type": "value" + }, + "key_vault": { + "attr_type": "key_vault" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NatGatewayState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkStatusContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "dns_servers": { + "default": null, + "param_type": "keyword_only" + }, + "connectivity_status": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "dns_servers": { + "attr_type": "dns_servers" + }, + "connectivity_status": { + "attr_type": "connectivity_status" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkStatusContractByLocation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "network_status": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "location": { + "attr_type": "location" + }, + "network_status": { + "attr_type": "network_status" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NotificationCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NotificationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "recipients": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": { + "attr_type": "title" + }, + "description": { + "attr_type": "description" + }, + "recipients": { + "attr_type": "recipients" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NotificationName": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCOUNT_CLOSED_PUBLISHER": "ACCOUNT_CLOSED_PUBLISHER", + "BCC": "BCC", + "NEW_APPLICATION_NOTIFICATION_MESSAGE": "NEW_APPLICATION_NOTIFICATION_MESSAGE", + "NEW_ISSUE_PUBLISHER_NOTIFICATION_MESSAGE": "NEW_ISSUE_PUBLISHER_NOTIFICATION_MESSAGE", + "PURCHASE_PUBLISHER_NOTIFICATION_MESSAGE": "PURCHASE_PUBLISHER_NOTIFICATION_MESSAGE", + "QUOTA_LIMIT_APPROACHING_PUBLISHER_NOTIFICATION_MESSAGE": "QUOTA_LIMIT_APPROACHING_PUBLISHER_NOTIFICATION_MESSAGE", + "REQUEST_PUBLISHER_NOTIFICATION_MESSAGE": "REQUEST_PUBLISHER_NOTIFICATION_MESSAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OAuth2AuthenticationSettingsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_server_id": { + "default": "none", + "param_type": "keyword_only" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "authorization_server_id": { + "attr_type": "authorization_server_id" + }, + "scope": { + "attr_type": "scope" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OAuth2GrantType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTHORIZATION_CODE": "AUTHORIZATION_CODE", + "CLIENT_CREDENTIALS": "CLIENT_CREDENTIALS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OpenIdAuthenticationSettingsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "openid_provider_id": { + "default": "none", + "param_type": "keyword_only" + }, + "bearer_token_sending_methods": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "openid_provider_id": { + "attr_type": "openid_provider_id" + }, + "bearer_token_sending_methods": { + "attr_type": "bearer_token_sending_methods" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OpenIdConnectProviderCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OpenidConnectProviderContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "metadata_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "use_in_test_console": { + "default": "none", + "param_type": "keyword_only" + }, + "use_in_api_documentation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "description": { + "attr_type": "description" + }, + "metadata_endpoint": { + "attr_type": "metadata_endpoint" + }, + "client_id": { + "attr_type": "client_id" + }, + "client_secret": { + "attr_type": "client_secret" + }, + "use_in_test_console": { + "attr_type": "use_in_test_console" + }, + "use_in_api_documentation": { + "attr_type": "use_in_api_documentation" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OpenidConnectProviderUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "metadata_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "client_secret": { + "default": "none", + "param_type": "keyword_only" + }, + "use_in_test_console": { + "default": "none", + "param_type": "keyword_only" + }, + "use_in_api_documentation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "description": { + "attr_type": "description" + }, + "metadata_endpoint": { + "attr_type": "metadata_endpoint" + }, + "client_id": { + "attr_type": "client_id" + }, + "client_secret": { + "attr_type": "client_secret" + }, + "use_in_test_console": { + "attr_type": "use_in_test_console" + }, + "use_in_api_documentation": { + "attr_type": "use_in_api_documentation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Operation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "display": { + "default": "none", + "param_type": "keyword_only" + }, + "origin": { + "default": "none", + "param_type": "keyword_only" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "display": { + "attr_type": "display" + }, + "origin": { + "attr_type": "origin" + }, + "properties": { + "attr_type": "properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "request": { + "default": "none", + "param_type": "keyword_only" + }, + "responses": { + "default": "none", + "param_type": "keyword_only" + }, + "policies": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "method": { + "default": "none", + "param_type": "keyword_only" + }, + "url_template": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "template_parameters": { + "attr_type": "template_parameters" + }, + "description": { + "attr_type": "description" + }, + "request": { + "attr_type": "request" + }, + "responses": { + "attr_type": "responses" + }, + "policies": { + "attr_type": "policies" + }, + "display_name": { + "attr_type": "display_name" + }, + "method": { + "attr_type": "method" + }, + "url_template": { + "attr_type": "url_template" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": null, + "param_type": "keyword_only" + }, + "method": { + "default": null, + "param_type": "keyword_only" + }, + "url_template": { + "default": null, + "param_type": "keyword_only" + }, + "template_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "request": { + "default": "none", + "param_type": "keyword_only" + }, + "responses": { + "default": "none", + "param_type": "keyword_only" + }, + "policies": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "method": { + "attr_type": "method" + }, + "url_template": { + "attr_type": "url_template" + }, + "template_parameters": { + "attr_type": "template_parameters" + }, + "description": { + "attr_type": "description" + }, + "request": { + "attr_type": "request" + }, + "responses": { + "attr_type": "responses" + }, + "policies": { + "attr_type": "policies" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationDisplay": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "provider": { + "default": "none", + "param_type": "keyword_only" + }, + "operation": { + "default": "none", + "param_type": "keyword_only" + }, + "resource": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provider": { + "attr_type": "provider" + }, + "operation": { + "attr_type": "operation" + }, + "resource": { + "attr_type": "resource" + }, + "description": { + "attr_type": "description" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationEntityBaseContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "request": { + "default": "none", + "param_type": "keyword_only" + }, + "responses": { + "default": "none", + "param_type": "keyword_only" + }, + "policies": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "template_parameters": { + "attr_type": "template_parameters" + }, + "description": { + "attr_type": "description" + }, + "request": { + "attr_type": "request" + }, + "responses": { + "attr_type": "responses" + }, + "policies": { + "attr_type": "policies" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationNameFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "NAME": "NAME", + "URL": "URL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OperationResultContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id_properties_id": { + "default": "none", + "param_type": "keyword_only" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "started": { + "default": "none", + "param_type": "keyword_only" + }, + "updated": { + "default": "none", + "param_type": "keyword_only" + }, + "result_info": { + "default": "none", + "param_type": "keyword_only" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id_properties_id": { + "attr_type": "id_properties_id" + }, + "status": { + "attr_type": "status" + }, + "started": { + "attr_type": "started" + }, + "updated": { + "attr_type": "updated" + }, + "result_info": { + "attr_type": "result_info" + }, + "error": { + "attr_type": "error" + }, + "action_log": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationResultLogItemContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "object_type": { + "default": "none", + "param_type": "keyword_only" + }, + "action": { + "default": "none", + "param_type": "keyword_only" + }, + "object_key": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "object_type": { + "attr_type": "object_type" + }, + "action": { + "attr_type": "action" + }, + "object_key": { + "attr_type": "object_key" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationStatusResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "default": null, + "param_type": "keyword_only" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "percent_complete": { + "default": "none", + "param_type": "keyword_only" + }, + "start_time": { + "default": "none", + "param_type": "keyword_only" + }, + "end_time": { + "default": "none", + "param_type": "keyword_only" + }, + "operations": { + "default": "none", + "param_type": "keyword_only" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "resource_id": { + "attr_type": null + }, + "name": { + "attr_type": "name" + }, + "status": { + "attr_type": "status" + }, + "percent_complete": { + "attr_type": "percent_complete" + }, + "start_time": { + "attr_type": "start_time" + }, + "end_time": { + "attr_type": "end_time" + }, + "operations": { + "attr_type": "operations" + }, + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationTagResourceContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "name": { + "attr_type": null + }, + "api_name": { + "attr_type": null + }, + "api_revision": { + "attr_type": null + }, + "api_version": { + "attr_type": null + }, + "description": { + "attr_type": null + }, + "method": { + "attr_type": null + }, + "url_template": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "request": { + "default": "none", + "param_type": "keyword_only" + }, + "responses": { + "default": "none", + "param_type": "keyword_only" + }, + "policies": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "method": { + "default": "none", + "param_type": "keyword_only" + }, + "url_template": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "template_parameters": { + "attr_type": "template_parameters" + }, + "description": { + "attr_type": "description" + }, + "request": { + "attr_type": "request" + }, + "responses": { + "attr_type": "responses" + }, + "policies": { + "attr_type": "policies" + }, + "display_name": { + "attr_type": "display_name" + }, + "method": { + "attr_type": "method" + }, + "url_template": { + "attr_type": "url_template" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationUpdateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "request": { + "default": "none", + "param_type": "keyword_only" + }, + "responses": { + "default": "none", + "param_type": "keyword_only" + }, + "policies": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "method": { + "default": "none", + "param_type": "keyword_only" + }, + "url_template": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "method": { + "attr_type": "method" + }, + "url_template": { + "attr_type": "url_template" + }, + "template_parameters": { + "attr_type": "template_parameters" + }, + "description": { + "attr_type": "description" + }, + "request": { + "attr_type": "request" + }, + "responses": { + "attr_type": "responses" + }, + "policies": { + "attr_type": "policies" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Origin": { + "type": "Enum", + "methods": {}, + "properties": { + "INBOUND": "INBOUND", + "LOCAL": "LOCAL", + "OUTBOUND": "OUTBOUND", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OutboundEnvironmentEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "category": { + "default": "none", + "param_type": "keyword_only" + }, + "endpoints": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "category": { + "attr_type": "category" + }, + "endpoints": { + "attr_type": "endpoints" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OutboundEnvironmentEndpointList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ParameterContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "default_value": { + "default": "none", + "param_type": "keyword_only" + }, + "required": { + "default": "none", + "param_type": "keyword_only" + }, + "values": { + "default": "none", + "param_type": "keyword_only" + }, + "schema_id": { + "default": "none", + "param_type": "keyword_only" + }, + "type_name": { + "default": "none", + "param_type": "keyword_only" + }, + "examples": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "description": { + "attr_type": "description" + }, + "type": { + "attr_type": "type" + }, + "default_value": { + "attr_type": "default_value" + }, + "required": { + "attr_type": "required" + }, + "values": { + "attr_type": "values" + }, + "schema_id": { + "attr_type": "schema_id" + }, + "type_name": { + "attr_type": "type_name" + }, + "examples": { + "attr_type": "examples" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ParameterExampleContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "summary": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "external_value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "summary": { + "attr_type": "summary" + }, + "description": { + "attr_type": "description" + }, + "value": { + "attr_type": "value" + }, + "external_value": { + "attr_type": "external_value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PipelineDiagnosticSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": "none", + "param_type": "keyword_only" + }, + "response": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "request": { + "attr_type": "request" + }, + "response": { + "attr_type": "response" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PlatformVersion": { + "type": "Enum", + "methods": {}, + "properties": { + "MTV1": "MTV1", + "STV1": "STV1", + "STV2": "STV2", + "STV2_1": "STV2_1", + "UNDETERMINED": "UNDETERMINED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PolicyComplianceState": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLIANT": "COMPLIANT", + "NON_COMPLIANT": "NON_COMPLIANT", + "PENDING": "PENDING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyContentFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "RAWXML": "RAWXML", + "RAWXML_LINK": "RAWXML_LINK", + "XML": "XML", + "XML_LINK": "XML_LINK", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "format": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "format": { + "attr_type": "format" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PolicyDescriptionCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PolicyDescriptionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": null + }, + "scope": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PolicyExportFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "RAWXML": "RAWXML", + "XML": "XML", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyFragmentCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PolicyFragmentContentFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "RAWXML": "RAWXML", + "XML": "XML", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyFragmentContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "description": { + "attr_type": "description" + }, + "format": { + "attr_type": "format" + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PolicyIdName": { + "type": "Enum", + "methods": {}, + "properties": { + "POLICY": "POLICY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyRestrictionCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PolicyRestrictionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "require_base": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "scope": { + "attr_type": "scope" + }, + "require_base": { + "attr_type": "require_base" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PolicyRestrictionRequireBase": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyRestrictionUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "require_base": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "scope": { + "attr_type": "scope" + }, + "require_base": { + "attr_type": "require_base" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PolicyScopeContract": { + "type": "Enum", + "methods": {}, + "properties": { + "ALL": "ALL", + "API": "API", + "OPERATION": "OPERATION", + "PRODUCT": "PRODUCT", + "TENANT": "TENANT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyWithComplianceCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PolicyWithComplianceContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reference_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "compliance_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "reference_policy_id": { + "attr_type": "reference_policy_id" + }, + "compliance_state": { + "attr_type": "compliance_state" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalConfigCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalConfigContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "enable_basic_auth": { + "default": "bool", + "param_type": "keyword_only" + }, + "signin": { + "default": "none", + "param_type": "keyword_only" + }, + "signup": { + "default": "none", + "param_type": "keyword_only" + }, + "delegation": { + "default": "none", + "param_type": "keyword_only" + }, + "cors": { + "default": "none", + "param_type": "keyword_only" + }, + "csp": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enable_basic_auth": { + "attr_type": "enable_basic_auth" + }, + "signin": { + "attr_type": "signin" + }, + "signup": { + "attr_type": "signup" + }, + "delegation": { + "attr_type": "delegation" + }, + "cors": { + "attr_type": "cors" + }, + "csp": { + "attr_type": "csp" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalConfigCorsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "allowed_origins": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "allowed_origins": { + "attr_type": "allowed_origins" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalConfigCspProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "mode": { + "default": "str", + "param_type": "keyword_only" + }, + "report_uri": { + "default": "none", + "param_type": "keyword_only" + }, + "allowed_sources": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "mode": { + "attr_type": "mode" + }, + "report_uri": { + "attr_type": "report_uri" + }, + "allowed_sources": { + "attr_type": "allowed_sources" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalConfigDelegationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delegate_registration": { + "default": "bool", + "param_type": "keyword_only" + }, + "delegate_subscription": { + "default": "bool", + "param_type": "keyword_only" + }, + "delegation_url": { + "default": "none", + "param_type": "keyword_only" + }, + "validation_key": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "delegate_registration": { + "attr_type": "delegate_registration" + }, + "delegate_subscription": { + "attr_type": "delegate_subscription" + }, + "delegation_url": { + "attr_type": "delegation_url" + }, + "validation_key": { + "attr_type": "validation_key" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalConfigPropertiesSignin": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "require": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "require": { + "attr_type": "require" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalConfigPropertiesSignup": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "terms_of_service": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "terms_of_service": { + "attr_type": "terms_of_service" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalConfigTermsOfServiceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "text": { + "default": "none", + "param_type": "keyword_only" + }, + "require_consent": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "text": { + "attr_type": "text" + }, + "require_consent": { + "attr_type": "require_consent" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalDelegationSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "url": { + "default": "none", + "param_type": "keyword_only" + }, + "validation_key": { + "default": "none", + "param_type": "keyword_only" + }, + "subscriptions": { + "default": "none", + "param_type": "keyword_only" + }, + "user_registration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "url": { + "attr_type": "url" + }, + "validation_key": { + "attr_type": "validation_key" + }, + "subscriptions": { + "attr_type": "subscriptions" + }, + "user_registration": { + "attr_type": "user_registration" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalRevisionCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalRevisionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "is_current": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "status_details": { + "attr_type": null + }, + "status": { + "attr_type": null + }, + "is_current": { + "attr_type": "is_current" + }, + "created_date_time": { + "attr_type": null + }, + "updated_date_time": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalRevisionStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETED": "COMPLETED", + "FAILED": "FAILED", + "PENDING": "PENDING", + "PUBLISHING": "PUBLISHING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PortalSettingValidationKeyContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "validation_key": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "validation_key": { + "attr_type": "validation_key" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalSettingsCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalSettingsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "url": { + "default": "none", + "param_type": "keyword_only" + }, + "validation_key": { + "default": "none", + "param_type": "keyword_only" + }, + "subscriptions": { + "default": "none", + "param_type": "keyword_only" + }, + "user_registration": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "terms_of_service": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "url": { + "attr_type": "url" + }, + "validation_key": { + "attr_type": "validation_key" + }, + "subscriptions": { + "attr_type": "subscriptions" + }, + "user_registration": { + "attr_type": "user_registration" + }, + "enabled": { + "attr_type": "enabled" + }, + "terms_of_service": { + "attr_type": "terms_of_service" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalSettingsCspMode": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "REPORT_ONLY": "REPORT_ONLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PortalSigninSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enabled": { + "attr_type": "enabled" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortalSignupSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "terms_of_service": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enabled": { + "attr_type": "enabled" + }, + "terms_of_service": { + "attr_type": "terms_of_service" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PreferredIPVersion": { + "type": "Enum", + "methods": {}, + "properties": { + "I_PV4": "I_PV4", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrivateEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateEndpointConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_service_connection_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "private_endpoint": { + "attr_type": "private_endpoint" + }, + "private_link_service_connection_state": { + "attr_type": "private_link_service_connection_state" + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateEndpointConnectionListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateEndpointConnectionProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrivateEndpointConnectionRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "properties": { + "attr_type": "properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateEndpointConnectionRequestProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_service_connection_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "private_link_service_connection_state": { + "attr_type": "private_link_service_connection_state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateEndpointServiceConnectionStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "APPROVED": "APPROVED", + "PENDING": "PENDING", + "REJECTED": "REJECTED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrivateLinkResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "required_zone_names": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "group_id": { + "attr_type": null + }, + "required_members": { + "attr_type": null + }, + "required_zone_names": { + "attr_type": "required_zone_names" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateLinkResourceListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateLinkServiceConnectionState": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "actions_required": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "status": { + "attr_type": "status" + }, + "description": { + "attr_type": "description" + }, + "actions_required": { + "attr_type": "actions_required" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductApiLinkCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductApiLinkContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "api_id": { + "attr_type": "api_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductApplicationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "entra": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "entra": { + "attr_type": "entra" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductApplicationContractEntra": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "application_id": { + "default": "none", + "param_type": "keyword_only" + }, + "audience": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "application_id": { + "attr_type": "application_id" + }, + "audience": { + "attr_type": "audience" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductAuthType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION_TOKEN": "APPLICATION_TOKEN", + "SUBSCRIPTION_KEY": "SUBSCRIPTION_KEY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProductCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "terms": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "approval_required": { + "default": "none", + "param_type": "keyword_only" + }, + "subscriptions_limit": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "application": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "terms": { + "attr_type": "terms" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "approval_required": { + "attr_type": "approval_required" + }, + "subscriptions_limit": { + "attr_type": "subscriptions_limit" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "application": { + "attr_type": "application" + }, + "state": { + "attr_type": "state" + }, + "display_name": { + "attr_type": "display_name" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": null, + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "terms": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "approval_required": { + "default": "none", + "param_type": "keyword_only" + }, + "subscriptions_limit": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "application": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "description": { + "attr_type": "description" + }, + "terms": { + "attr_type": "terms" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "approval_required": { + "attr_type": "approval_required" + }, + "subscriptions_limit": { + "attr_type": "subscriptions_limit" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "application": { + "attr_type": "application" + }, + "state": { + "attr_type": "state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductEntityBaseParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "terms": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "approval_required": { + "default": "none", + "param_type": "keyword_only" + }, + "subscriptions_limit": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "application": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "terms": { + "attr_type": "terms" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "approval_required": { + "attr_type": "approval_required" + }, + "subscriptions_limit": { + "attr_type": "subscriptions_limit" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "application": { + "attr_type": "application" + }, + "state": { + "attr_type": "state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductEntityBaseParametersApplication": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "entra": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "entra": { + "attr_type": "entra" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductGroupLinkCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductGroupLinkContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "group_id": { + "attr_type": "group_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductState": { + "type": "Enum", + "methods": {}, + "properties": { + "NOT_PUBLISHED": "NOT_PUBLISHED", + "PUBLISHED": "PUBLISHED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProductTagResourceContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "terms": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "approval_required": { + "default": "none", + "param_type": "keyword_only" + }, + "subscriptions_limit": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "application": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "name": { + "attr_type": "name" + }, + "description": { + "attr_type": "description" + }, + "terms": { + "attr_type": "terms" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "approval_required": { + "attr_type": "approval_required" + }, + "subscriptions_limit": { + "attr_type": "subscriptions_limit" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "application": { + "attr_type": "application" + }, + "state": { + "attr_type": "state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "terms": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "approval_required": { + "default": "none", + "param_type": "keyword_only" + }, + "subscriptions_limit": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "application": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "terms": { + "attr_type": "terms" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "approval_required": { + "attr_type": "approval_required" + }, + "subscriptions_limit": { + "attr_type": "subscriptions_limit" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "application": { + "attr_type": "application" + }, + "state": { + "attr_type": "state" + }, + "display_name": { + "attr_type": "display_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProductUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "terms": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_required": { + "default": "none", + "param_type": "keyword_only" + }, + "approval_required": { + "default": "none", + "param_type": "keyword_only" + }, + "subscriptions_limit": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "application": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "description": { + "attr_type": "description" + }, + "terms": { + "attr_type": "terms" + }, + "subscription_required": { + "attr_type": "subscription_required" + }, + "approval_required": { + "attr_type": "approval_required" + }, + "subscriptions_limit": { + "attr_type": "subscriptions_limit" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "application": { + "attr_type": "application" + }, + "state": { + "attr_type": "state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Protocol": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "HTTPS": "HTTPS", + "WS": "WS", + "WSS": "WSS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PublicNetworkAccess": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "QuotaCounterCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QuotaCounterContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "counter_key": { + "default": null, + "param_type": "keyword_only" + }, + "period_key": { + "default": null, + "param_type": "keyword_only" + }, + "period_start_time": { + "default": null, + "param_type": "keyword_only" + }, + "period_end_time": { + "default": null, + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "counter_key": { + "attr_type": "counter_key" + }, + "period_key": { + "attr_type": "period_key" + }, + "period_start_time": { + "attr_type": "period_start_time" + }, + "period_end_time": { + "attr_type": "period_end_time" + }, + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QuotaCounterValueContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "calls_count": { + "default": "none", + "param_type": "keyword_only" + }, + "kb_transferred": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "calls_count": { + "attr_type": "calls_count" + }, + "kb_transferred": { + "attr_type": "kb_transferred" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QuotaCounterValueContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "calls_count": { + "default": "none", + "param_type": "keyword_only" + }, + "kb_transferred": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "calls_count": { + "attr_type": "calls_count" + }, + "kb_transferred": { + "attr_type": "kb_transferred" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QuotaCounterValueUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "calls_count": { + "default": "none", + "param_type": "keyword_only" + }, + "kb_transferred": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "calls_count": { + "attr_type": "calls_count" + }, + "kb_transferred": { + "attr_type": "kb_transferred" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RecipientEmailCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RecipientEmailContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "email": { + "attr_type": "email" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RecipientUserCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RecipientUserContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "user_id": { + "attr_type": "user_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RecipientsContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "emails": { + "default": "none", + "param_type": "keyword_only" + }, + "users": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "emails": { + "attr_type": "emails" + }, + "users": { + "attr_type": "users" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RegionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "is_master_region": { + "default": "none", + "param_type": "keyword_only" + }, + "is_deleted": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "is_master_region": { + "attr_type": "is_master_region" + }, + "is_deleted": { + "attr_type": "is_deleted" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RegionListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RegistrationDelegationSettingsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enabled": { + "attr_type": "enabled" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ReleaseChannel": { + "type": "Enum", + "methods": {}, + "properties": { + "DEFAULT": "DEFAULT", + "PREVIEW": "PREVIEW", + "STABLE": "STABLE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RemotePrivateEndpointConnectionWrapper": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "private_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_service_connection_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "name": { + "attr_type": "name" + }, + "type": { + "attr_type": "type" + }, + "private_endpoint": { + "attr_type": "private_endpoint" + }, + "private_link_service_connection_state": { + "attr_type": "private_link_service_connection_state" + }, + "provisioning_state": { + "attr_type": null + }, + "group_ids": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ReportCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ReportRecordContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "timestamp": { + "default": "none", + "param_type": "keyword_only" + }, + "interval": { + "default": "none", + "param_type": "keyword_only" + }, + "country": { + "default": "none", + "param_type": "keyword_only" + }, + "region": { + "default": "none", + "param_type": "keyword_only" + }, + "zip": { + "default": "none", + "param_type": "keyword_only" + }, + "api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "operation_id": { + "default": "none", + "param_type": "keyword_only" + }, + "api_region": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_id": { + "default": "none", + "param_type": "keyword_only" + }, + "call_count_success": { + "default": "none", + "param_type": "keyword_only" + }, + "call_count_blocked": { + "default": "none", + "param_type": "keyword_only" + }, + "call_count_failed": { + "default": "none", + "param_type": "keyword_only" + }, + "call_count_other": { + "default": "none", + "param_type": "keyword_only" + }, + "call_count_total": { + "default": "none", + "param_type": "keyword_only" + }, + "bandwidth": { + "default": "none", + "param_type": "keyword_only" + }, + "cache_hit_count": { + "default": "none", + "param_type": "keyword_only" + }, + "cache_miss_count": { + "default": "none", + "param_type": "keyword_only" + }, + "api_time_avg": { + "default": "none", + "param_type": "keyword_only" + }, + "api_time_min": { + "default": "none", + "param_type": "keyword_only" + }, + "api_time_max": { + "default": "none", + "param_type": "keyword_only" + }, + "service_time_avg": { + "default": "none", + "param_type": "keyword_only" + }, + "service_time_min": { + "default": "none", + "param_type": "keyword_only" + }, + "service_time_max": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "timestamp": { + "attr_type": "timestamp" + }, + "interval": { + "attr_type": "interval" + }, + "country": { + "attr_type": "country" + }, + "region": { + "attr_type": "region" + }, + "zip": { + "attr_type": "zip" + }, + "user_id": { + "attr_type": null + }, + "product_id": { + "attr_type": null + }, + "api_id": { + "attr_type": "api_id" + }, + "operation_id": { + "attr_type": "operation_id" + }, + "api_region": { + "attr_type": "api_region" + }, + "subscription_id": { + "attr_type": "subscription_id" + }, + "call_count_success": { + "attr_type": "call_count_success" + }, + "call_count_blocked": { + "attr_type": "call_count_blocked" + }, + "call_count_failed": { + "attr_type": "call_count_failed" + }, + "call_count_other": { + "attr_type": "call_count_other" + }, + "call_count_total": { + "attr_type": "call_count_total" + }, + "bandwidth": { + "attr_type": "bandwidth" + }, + "cache_hit_count": { + "attr_type": "cache_hit_count" + }, + "cache_miss_count": { + "attr_type": "cache_miss_count" + }, + "api_time_avg": { + "attr_type": "api_time_avg" + }, + "api_time_min": { + "attr_type": "api_time_min" + }, + "api_time_max": { + "attr_type": "api_time_max" + }, + "service_time_avg": { + "attr_type": "service_time_avg" + }, + "service_time_min": { + "attr_type": "service_time_min" + }, + "service_time_max": { + "attr_type": "service_time_max" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RepresentationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": null, + "param_type": "keyword_only" + }, + "schema_id": { + "default": "none", + "param_type": "keyword_only" + }, + "type_name": { + "default": "none", + "param_type": "keyword_only" + }, + "form_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "examples": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "content_type": { + "attr_type": "content_type" + }, + "schema_id": { + "attr_type": "schema_id" + }, + "type_name": { + "attr_type": "type_name" + }, + "form_parameters": { + "attr_type": "form_parameters" + }, + "examples": { + "attr_type": "examples" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RequestContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "query_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "headers": { + "default": "none", + "param_type": "keyword_only" + }, + "representations": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "query_parameters": { + "attr_type": "query_parameters" + }, + "headers": { + "attr_type": "headers" + }, + "representations": { + "attr_type": "representations" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RequestReportCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RequestReportRecordContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "operation_id": { + "default": "none", + "param_type": "keyword_only" + }, + "method": { + "default": "none", + "param_type": "keyword_only" + }, + "url": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_address": { + "default": "none", + "param_type": "keyword_only" + }, + "backend_response_code": { + "default": "none", + "param_type": "keyword_only" + }, + "response_code": { + "default": "none", + "param_type": "keyword_only" + }, + "response_size": { + "default": "none", + "param_type": "keyword_only" + }, + "timestamp": { + "default": "none", + "param_type": "keyword_only" + }, + "cache": { + "default": "none", + "param_type": "keyword_only" + }, + "api_time": { + "default": "none", + "param_type": "keyword_only" + }, + "service_time": { + "default": "none", + "param_type": "keyword_only" + }, + "api_region": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_id": { + "default": "none", + "param_type": "keyword_only" + }, + "request_id": { + "default": "none", + "param_type": "keyword_only" + }, + "request_size": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "api_id": { + "attr_type": "api_id" + }, + "operation_id": { + "attr_type": "operation_id" + }, + "product_id": { + "attr_type": null + }, + "user_id": { + "attr_type": null + }, + "method": { + "attr_type": "method" + }, + "url": { + "attr_type": "url" + }, + "ip_address": { + "attr_type": "ip_address" + }, + "backend_response_code": { + "attr_type": "backend_response_code" + }, + "response_code": { + "attr_type": "response_code" + }, + "response_size": { + "attr_type": "response_size" + }, + "timestamp": { + "attr_type": "timestamp" + }, + "cache": { + "attr_type": "cache" + }, + "api_time": { + "attr_type": "api_time" + }, + "service_time": { + "attr_type": "service_time" + }, + "api_region": { + "attr_type": "api_region" + }, + "subscription_id": { + "attr_type": "subscription_id" + }, + "request_id": { + "attr_type": "request_id" + }, + "request_size": { + "attr_type": "request_size" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResolverCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResolverContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "path": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "path": { + "attr_type": "path" + }, + "description": { + "attr_type": "description" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResolverResultContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id_properties_id": { + "default": "none", + "param_type": "keyword_only" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "started": { + "default": "none", + "param_type": "keyword_only" + }, + "updated": { + "default": "none", + "param_type": "keyword_only" + }, + "result_info": { + "default": "none", + "param_type": "keyword_only" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id_properties_id": { + "attr_type": "id_properties_id" + }, + "status": { + "attr_type": "status" + }, + "started": { + "attr_type": "started" + }, + "updated": { + "attr_type": "updated" + }, + "result_info": { + "attr_type": "result_info" + }, + "error": { + "attr_type": "error" + }, + "action_log": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResolverResultLogItemContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "object_type": { + "default": "none", + "param_type": "keyword_only" + }, + "action": { + "default": "none", + "param_type": "keyword_only" + }, + "object_key": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "object_type": { + "attr_type": "object_type" + }, + "action": { + "attr_type": "action" + }, + "object_key": { + "attr_type": "object_key" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResolverUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "path": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "path": { + "attr_type": "path" + }, + "description": { + "attr_type": "description" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Resource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceCollectionValueItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceLocationDataContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "city": { + "default": "none", + "param_type": "keyword_only" + }, + "district": { + "default": "none", + "param_type": "keyword_only" + }, + "country_or_region": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "city": { + "attr_type": "city" + }, + "district": { + "attr_type": "district" + }, + "country_or_region": { + "attr_type": "country_or_region" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceSku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceSkuCapacity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "minimum": { + "attr_type": null + }, + "maximum": { + "attr_type": null + }, + "default": { + "attr_type": null + }, + "scale_type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceSkuCapacityScaleType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTOMATIC": "AUTOMATIC", + "MANUAL": "MANUAL", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ResourceSkuResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "resource_type": { + "attr_type": null + }, + "sku": { + "attr_type": null + }, + "capacity": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceSkuResults": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResponseContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "status_code": { + "default": null, + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "representations": { + "default": "none", + "param_type": "keyword_only" + }, + "headers": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "status_code": { + "attr_type": "status_code" + }, + "description": { + "attr_type": "description" + }, + "representations": { + "attr_type": "representations" + }, + "headers": { + "attr_type": "headers" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SamplingSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sampling_type": { + "default": "none", + "param_type": "keyword_only" + }, + "percentage": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "sampling_type": { + "attr_type": "sampling_type" + }, + "percentage": { + "attr_type": "percentage" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SamplingType": { + "type": "Enum", + "methods": {}, + "properties": { + "FIXED": "FIXED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SaveConfigurationParameter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "branch": { + "default": "none", + "param_type": "keyword_only" + }, + "force": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "branch": { + "attr_type": "branch" + }, + "force": { + "attr_type": "force" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SchemaCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SchemaContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "definitions": { + "default": "none", + "param_type": "keyword_only" + }, + "components": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "content_type": { + "attr_type": "content_type" + }, + "provisioning_state": { + "attr_type": null + }, + "value": { + "attr_type": "value" + }, + "definitions": { + "attr_type": "definitions" + }, + "components": { + "attr_type": "components" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SchemaType": { + "type": "Enum", + "methods": {}, + "properties": { + "JSON": "JSON", + "XML": "XML", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SettingsTypeName": { + "type": "Enum", + "methods": {}, + "properties": { + "PUBLIC": "PUBLIC", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Severity": { + "type": "Enum", + "methods": {}, + "properties": { + "ERROR": "ERROR", + "WARNING": "WARNING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SkuType": { + "type": "Enum", + "methods": {}, + "properties": { + "BASIC": "BASIC", + "BASIC_V2": "BASIC_V2", + "CONSUMPTION": "CONSUMPTION", + "DEVELOPER": "DEVELOPER", + "ISOLATED": "ISOLATED", + "PREMIUM": "PREMIUM", + "PREMIUM_V2": "PREMIUM_V2", + "STANDARD": "STANDARD", + "STANDARD_V2": "STANDARD_V2", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SoapApiType": { + "type": "Enum", + "methods": {}, + "properties": { + "GRAPH_QL": "GRAPH_QL", + "G_RPC": "G_RPC", + "O_DATA": "O_DATA", + "SOAP_PASS_THROUGH": "SOAP_PASS_THROUGH", + "SOAP_TO_REST": "SOAP_TO_REST", + "WEB_SOCKET": "WEB_SOCKET", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "State": { + "type": "Enum", + "methods": {}, + "properties": { + "CLOSED": "CLOSED", + "OPEN": "OPEN", + "PROPOSED": "PROPOSED", + "REMOVED": "REMOVED", + "RESOLVED": "RESOLVED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SubscriptionCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SubscriptionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "owner_id": { + "default": "none", + "param_type": "keyword_only" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "start_date": { + "default": "none", + "param_type": "keyword_only" + }, + "expiration_date": { + "default": "none", + "param_type": "keyword_only" + }, + "end_date": { + "default": "none", + "param_type": "keyword_only" + }, + "notification_date": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "state_comment": { + "default": "none", + "param_type": "keyword_only" + }, + "allow_tracing": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "owner_id": { + "attr_type": "owner_id" + }, + "scope": { + "attr_type": "scope" + }, + "display_name": { + "attr_type": "display_name" + }, + "state": { + "attr_type": "state" + }, + "created_date": { + "attr_type": null + }, + "start_date": { + "attr_type": "start_date" + }, + "expiration_date": { + "attr_type": "expiration_date" + }, + "end_date": { + "attr_type": "end_date" + }, + "notification_date": { + "attr_type": "notification_date" + }, + "primary_key": { + "attr_type": "primary_key" + }, + "secondary_key": { + "attr_type": "secondary_key" + }, + "state_comment": { + "attr_type": "state_comment" + }, + "allow_tracing": { + "attr_type": "allow_tracing" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SubscriptionCreateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "owner_id": { + "default": "none", + "param_type": "keyword_only" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "allow_tracing": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "owner_id": { + "attr_type": "owner_id" + }, + "scope": { + "attr_type": "scope" + }, + "display_name": { + "attr_type": "display_name" + }, + "primary_key": { + "attr_type": "primary_key" + }, + "secondary_key": { + "attr_type": "secondary_key" + }, + "state": { + "attr_type": "state" + }, + "allow_tracing": { + "attr_type": "allow_tracing" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SubscriptionKeyParameterNamesContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "header": { + "default": "none", + "param_type": "keyword_only" + }, + "query": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "header": { + "attr_type": "header" + }, + "query": { + "attr_type": "query" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SubscriptionKeysContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "primary_key": { + "attr_type": "primary_key" + }, + "secondary_key": { + "attr_type": "secondary_key" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SubscriptionState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "CANCELLED": "CANCELLED", + "EXPIRED": "EXPIRED", + "REJECTED": "REJECTED", + "SUBMITTED": "SUBMITTED", + "SUSPENDED": "SUSPENDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SubscriptionUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "owner_id": { + "default": "none", + "param_type": "keyword_only" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "expiration_date": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "state_comment": { + "default": "none", + "param_type": "keyword_only" + }, + "allow_tracing": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "owner_id": { + "attr_type": "owner_id" + }, + "scope": { + "attr_type": "scope" + }, + "expiration_date": { + "attr_type": "expiration_date" + }, + "display_name": { + "attr_type": "display_name" + }, + "primary_key": { + "attr_type": "primary_key" + }, + "secondary_key": { + "attr_type": "secondary_key" + }, + "state": { + "attr_type": "state" + }, + "state_comment": { + "attr_type": "state_comment" + }, + "allow_tracing": { + "attr_type": "allow_tracing" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SubscriptionsDelegationSettingsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enabled": { + "attr_type": "enabled" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SystemData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "created_by": { + "default": "none", + "param_type": "keyword_only" + }, + "created_by_type": { + "default": "none", + "param_type": "keyword_only" + }, + "created_at": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_by": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_by_type": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_at": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "created_by": { + "attr_type": "created_by" + }, + "created_by_type": { + "attr_type": "created_by_type" + }, + "created_at": { + "attr_type": "created_at" + }, + "last_modified_by": { + "attr_type": "last_modified_by" + }, + "last_modified_by_type": { + "attr_type": "last_modified_by_type" + }, + "last_modified_at": { + "attr_type": "last_modified_at" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagApiLinkCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagApiLinkContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "api_id": { + "attr_type": "api_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagCreateUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagDescriptionBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "external_docs_url": { + "default": "none", + "param_type": "keyword_only" + }, + "external_docs_description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "external_docs_url": { + "attr_type": "external_docs_url" + }, + "external_docs_description": { + "attr_type": "external_docs_description" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagDescriptionCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagDescriptionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "external_docs_url": { + "default": "none", + "param_type": "keyword_only" + }, + "external_docs_description": { + "default": "none", + "param_type": "keyword_only" + }, + "tag_id": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "external_docs_url": { + "attr_type": "external_docs_url" + }, + "external_docs_description": { + "attr_type": "external_docs_description" + }, + "tag_id": { + "attr_type": "tag_id" + }, + "display_name": { + "attr_type": "display_name" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagDescriptionContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "external_docs_url": { + "default": "none", + "param_type": "keyword_only" + }, + "external_docs_description": { + "default": "none", + "param_type": "keyword_only" + }, + "tag_id": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tag_id": { + "attr_type": "tag_id" + }, + "display_name": { + "attr_type": "display_name" + }, + "description": { + "attr_type": "description" + }, + "external_docs_url": { + "attr_type": "external_docs_url" + }, + "external_docs_description": { + "attr_type": "external_docs_description" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagDescriptionCreateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "external_docs_url": { + "default": "none", + "param_type": "keyword_only" + }, + "external_docs_description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "external_docs_url": { + "attr_type": "external_docs_url" + }, + "external_docs_description": { + "attr_type": "external_docs_description" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagOperationLinkCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagOperationLinkContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "operation_id": { + "attr_type": "operation_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagProductLinkCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagProductLinkContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "product_id": { + "attr_type": "product_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagResourceCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagResourceContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag": { + "default": null, + "param_type": "keyword_only" + }, + "api": { + "default": "none", + "param_type": "keyword_only" + }, + "operation": { + "default": "none", + "param_type": "keyword_only" + }, + "product": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tag": { + "attr_type": "tag" + }, + "api": { + "attr_type": "api" + }, + "operation": { + "attr_type": "operation" + }, + "product": { + "attr_type": "product" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagResourceContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TemplateName": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCOUNT_CLOSED_DEVELOPER": "ACCOUNT_CLOSED_DEVELOPER", + "APPLICATION_APPROVED_NOTIFICATION_MESSAGE": "APPLICATION_APPROVED_NOTIFICATION_MESSAGE", + "CONFIRM_SIGN_UP_IDENTITY_DEFAULT": "CONFIRM_SIGN_UP_IDENTITY_DEFAULT", + "EMAIL_CHANGE_IDENTITY_DEFAULT": "EMAIL_CHANGE_IDENTITY_DEFAULT", + "INVITE_USER_NOTIFICATION_MESSAGE": "INVITE_USER_NOTIFICATION_MESSAGE", + "NEW_COMMENT_NOTIFICATION_MESSAGE": "NEW_COMMENT_NOTIFICATION_MESSAGE", + "NEW_DEVELOPER_NOTIFICATION_MESSAGE": "NEW_DEVELOPER_NOTIFICATION_MESSAGE", + "NEW_ISSUE_NOTIFICATION_MESSAGE": "NEW_ISSUE_NOTIFICATION_MESSAGE", + "PASSWORD_RESET_BY_ADMIN_NOTIFICATION_MESSAGE": "PASSWORD_RESET_BY_ADMIN_NOTIFICATION_MESSAGE", + "PASSWORD_RESET_IDENTITY_DEFAULT": "PASSWORD_RESET_IDENTITY_DEFAULT", + "PURCHASE_DEVELOPER_NOTIFICATION_MESSAGE": "PURCHASE_DEVELOPER_NOTIFICATION_MESSAGE", + "QUOTA_LIMIT_APPROACHING_DEVELOPER_NOTIFICATION_MESSAGE": "QUOTA_LIMIT_APPROACHING_DEVELOPER_NOTIFICATION_MESSAGE", + "REJECT_DEVELOPER_NOTIFICATION_MESSAGE": "REJECT_DEVELOPER_NOTIFICATION_MESSAGE", + "REQUEST_DEVELOPER_NOTIFICATION_MESSAGE": "REQUEST_DEVELOPER_NOTIFICATION_MESSAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "TenantConfigurationSyncStateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "branch": { + "default": "none", + "param_type": "keyword_only" + }, + "commit_id": { + "default": "none", + "param_type": "keyword_only" + }, + "is_export": { + "default": "none", + "param_type": "keyword_only" + }, + "is_synced": { + "default": "none", + "param_type": "keyword_only" + }, + "is_git_enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "sync_date": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_change_date": { + "default": "none", + "param_type": "keyword_only" + }, + "last_operation_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "branch": { + "attr_type": "branch" + }, + "commit_id": { + "attr_type": "commit_id" + }, + "is_export": { + "attr_type": "is_export" + }, + "is_synced": { + "attr_type": "is_synced" + }, + "is_git_enabled": { + "attr_type": "is_git_enabled" + }, + "sync_date": { + "attr_type": "sync_date" + }, + "configuration_change_date": { + "attr_type": "configuration_change_date" + }, + "last_operation_id": { + "attr_type": "last_operation_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TenantSettingsCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TenantSettingsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "settings": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "settings": { + "attr_type": "settings" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TermsOfServiceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "text": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "consent_required": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "text": { + "attr_type": "text" + }, + "enabled": { + "attr_type": "enabled" + }, + "consent_required": { + "attr_type": "consent_required" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TokenBodyParameterContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "value": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ToolCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ToolContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "operation_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "description": { + "attr_type": "description" + }, + "operation_id": { + "attr_type": "operation_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TranslateRequiredQueryParametersConduct": { + "type": "Enum", + "methods": {}, + "properties": { + "QUERY": "QUERY", + "TEMPLATE": "TEMPLATE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UserAssignedIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "principal_id": { + "attr_type": null + }, + "client_id": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "default": "str", + "param_type": "keyword_only" + }, + "note": { + "default": "none", + "param_type": "keyword_only" + }, + "identities": { + "default": "none", + "param_type": "keyword_only" + }, + "first_name": { + "default": "none", + "param_type": "keyword_only" + }, + "last_name": { + "default": "none", + "param_type": "keyword_only" + }, + "email": { + "default": "none", + "param_type": "keyword_only" + }, + "registration_date": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "state": { + "attr_type": "state" + }, + "note": { + "attr_type": "note" + }, + "identities": { + "attr_type": "identities" + }, + "first_name": { + "attr_type": "first_name" + }, + "last_name": { + "attr_type": "last_name" + }, + "email": { + "attr_type": "email" + }, + "registration_date": { + "attr_type": "registration_date" + }, + "groups": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "default": "str", + "param_type": "keyword_only" + }, + "note": { + "default": "none", + "param_type": "keyword_only" + }, + "identities": { + "default": "none", + "param_type": "keyword_only" + }, + "first_name": { + "default": "none", + "param_type": "keyword_only" + }, + "last_name": { + "default": "none", + "param_type": "keyword_only" + }, + "email": { + "default": "none", + "param_type": "keyword_only" + }, + "registration_date": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "first_name": { + "attr_type": "first_name" + }, + "last_name": { + "attr_type": "last_name" + }, + "email": { + "attr_type": "email" + }, + "registration_date": { + "attr_type": "registration_date" + }, + "groups": { + "attr_type": null + }, + "state": { + "attr_type": "state" + }, + "note": { + "attr_type": "note" + }, + "identities": { + "attr_type": "identities" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserCreateParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "keyword_only" + }, + "first_name": { + "default": null, + "param_type": "keyword_only" + }, + "last_name": { + "default": null, + "param_type": "keyword_only" + }, + "state": { + "default": "str", + "param_type": "keyword_only" + }, + "note": { + "default": "none", + "param_type": "keyword_only" + }, + "identities": { + "default": "none", + "param_type": "keyword_only" + }, + "password": { + "default": "none", + "param_type": "keyword_only" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "confirmation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "email": { + "attr_type": "email" + }, + "first_name": { + "attr_type": "first_name" + }, + "last_name": { + "attr_type": "last_name" + }, + "password": { + "attr_type": "password" + }, + "app_type": { + "attr_type": "app_type" + }, + "confirmation": { + "attr_type": "confirmation" + }, + "state": { + "attr_type": "state" + }, + "note": { + "attr_type": "note" + }, + "identities": { + "attr_type": "identities" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserCreateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "default": "str", + "param_type": "keyword_only" + }, + "note": { + "default": "none", + "param_type": "keyword_only" + }, + "identities": { + "default": "none", + "param_type": "keyword_only" + }, + "email": { + "default": "none", + "param_type": "keyword_only" + }, + "first_name": { + "default": "none", + "param_type": "keyword_only" + }, + "last_name": { + "default": "none", + "param_type": "keyword_only" + }, + "password": { + "default": "none", + "param_type": "keyword_only" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "confirmation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "state": { + "attr_type": "state" + }, + "note": { + "attr_type": "note" + }, + "identities": { + "attr_type": "identities" + }, + "email": { + "attr_type": "email" + }, + "first_name": { + "attr_type": "first_name" + }, + "last_name": { + "attr_type": "last_name" + }, + "password": { + "attr_type": "password" + }, + "app_type": { + "attr_type": "app_type" + }, + "confirmation": { + "attr_type": "confirmation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserEntityBaseParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "default": "str", + "param_type": "keyword_only" + }, + "note": { + "default": "none", + "param_type": "keyword_only" + }, + "identities": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "state": { + "attr_type": "state" + }, + "note": { + "attr_type": "note" + }, + "identities": { + "attr_type": "identities" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserIdentityCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserIdentityContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "provider": { + "default": "none", + "param_type": "keyword_only" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provider": { + "attr_type": "provider" + }, + "id": { + "attr_type": "id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserIdentityProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_id": { + "default": "none", + "param_type": "keyword_only" + }, + "client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "principal_id": { + "attr_type": "principal_id" + }, + "client_id": { + "attr_type": "client_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "BLOCKED": "BLOCKED", + "DELETED": "DELETED", + "PENDING": "PENDING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UserTokenParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_type": { + "default": "none", + "param_type": "keyword_only" + }, + "expiry": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key_type": { + "attr_type": "key_type" + }, + "expiry": { + "attr_type": "expiry" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserTokenResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "default": "str", + "param_type": "keyword_only" + }, + "note": { + "default": "none", + "param_type": "keyword_only" + }, + "identities": { + "default": "none", + "param_type": "keyword_only" + }, + "email": { + "default": "none", + "param_type": "keyword_only" + }, + "password": { + "default": "none", + "param_type": "keyword_only" + }, + "first_name": { + "default": "none", + "param_type": "keyword_only" + }, + "last_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "state": { + "attr_type": "state" + }, + "note": { + "attr_type": "note" + }, + "identities": { + "attr_type": "identities" + }, + "email": { + "attr_type": "email" + }, + "password": { + "attr_type": "password" + }, + "first_name": { + "attr_type": "first_name" + }, + "last_name": { + "attr_type": "last_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserUpdateParametersProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "default": "str", + "param_type": "keyword_only" + }, + "note": { + "default": "none", + "param_type": "keyword_only" + }, + "identities": { + "default": "none", + "param_type": "keyword_only" + }, + "email": { + "default": "none", + "param_type": "keyword_only" + }, + "password": { + "default": "none", + "param_type": "keyword_only" + }, + "first_name": { + "default": "none", + "param_type": "keyword_only" + }, + "last_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "email": { + "attr_type": "email" + }, + "password": { + "attr_type": "password" + }, + "first_name": { + "attr_type": "first_name" + }, + "last_name": { + "attr_type": "last_name" + }, + "state": { + "attr_type": "state" + }, + "note": { + "attr_type": "note" + }, + "identities": { + "attr_type": "identities" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Verbosity": { + "type": "Enum", + "methods": {}, + "properties": { + "ERROR": "ERROR", + "INFORMATION": "INFORMATION", + "VERBOSE": "VERBOSE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "VersioningScheme": { + "type": "Enum", + "methods": {}, + "properties": { + "HEADER": "HEADER", + "QUERY": "QUERY", + "SEGMENT": "SEGMENT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "VirtualNetworkConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subnet_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "vnetid": { + "attr_type": null + }, + "subnetname": { + "attr_type": null + }, + "subnet_resource_id": { + "attr_type": "subnet_resource_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "VirtualNetworkType": { + "type": "Enum", + "methods": {}, + "properties": { + "EXTERNAL": "EXTERNAL", + "INTERNAL": "INTERNAL", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WikiCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WikiContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documents": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "documents": { + "attr_type": "documents" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WikiDocumentationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "documentation_id": { + "attr_type": "documentation_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WikiUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documents": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "documents": { + "attr_type": "documents" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WorkspaceCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "count": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "count": { + "attr_type": "count" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WorkspaceContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "description": { + "attr_type": "description" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WorkspaceLinksBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": "none", + "param_type": "keyword_only" + }, + "gateways": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "workspace_id": { + "attr_type": "workspace_id" + }, + "gateways": { + "attr_type": "gateways" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WorkspaceLinksGateway": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "X509CertificateName": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "issuer_certificate_thumbprint": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "issuer_certificate_thumbprint": { + "attr_type": "issuer_certificate_thumbprint" + }, + "additional_properties": { + "attr_type": null + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.apimanagement.operations": { + "class_nodes": { + "AllPoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiDiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiExportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiGatewayConfigConnectionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementGatewayConfigConnectionResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_gateway": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiGatewayHostnameBindingOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayHostnameBindingResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_gateway": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiGatewayOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementGatewayResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementGatewayUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiIssueAttachmentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueAttachmentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiIssueCommentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueCommentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiIssueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand_comments_attachments": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand_comments_attachments": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiManagementGatewaySkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_available_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementOperationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementServiceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_apply_network_configuration_updates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[ApiManagementServiceApplyNetworkConfigurationParameters]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_backup": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceBackupRestoreParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_migrate_to_stv2": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[MigrateToStv2Contract]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_refresh_hostnames": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_restore": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceBackupRestoreParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceCheckNameAvailabilityParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_domain_ownership_identifier": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_sso_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementServiceSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_available_service_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementWorkspaceLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementWorkspaceLinksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiOperationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiOperationPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiCreateOrUpdateParameter", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delete_revisions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand_api_version_set": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_tags": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "include_not_tagged_apis": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiProductOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_apis": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiReleaseOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiRevisionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "force": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiTagDescriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagDescriptionCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiToolOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ToolContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ToolContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiVersionSetOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiWikiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiWikisOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationAccessPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationAccessPolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_authorization": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationLoginLinksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "post": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationLoginRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "AuthorizationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "confirm_consent_code": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationConfirmConsentCodeRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_authorization_provider": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationProviderOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationProviderContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationServerOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationServerContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationServerUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "BackendOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "reconnect": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[BackendReconnectContract]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "CacheOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CacheContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CacheUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "CertificateOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CertificateCreateOrUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ClientApplicationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClientApplicationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ClientApplicationProductLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClientApplicationProductLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_client_applications": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ContentItemOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ContentItemContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ContentTypeOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ContentTypeContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "DelegationSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalDelegationSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalDelegationSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "DeletedServicesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_purge": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_by_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "DiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "DocumentationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DocumentationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DocumentationUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "EmailTemplateOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "EmailTemplateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "EmailTemplateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GatewayApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[AssociationContract]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GatewayCertificateAuthorityOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayCertificateAuthorityContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GatewayHostnameConfigurationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayHostnameConfigurationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GatewayOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "generate_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayTokenRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "invalidate_debug_credentials": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_debug_credentials": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayListDebugCredentialsContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "list_keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_trace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayListTraceContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "regenerate_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayKeyRegenerationRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GlobalSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GlobalSchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GraphQLApiResolverOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ResolverContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ResolverUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GraphQLApiResolverPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_resolver": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GroupUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "IdentityProviderOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IdentityProviderCreateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IdentityProviderUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "IssueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "LoggerOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "NamedValueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueCreateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_value": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "NetworkStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_location": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "NotificationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "NotificationRecipientEmailOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "NotificationRecipientUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "OpenIdConnectProviderOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OpenidConnectProviderContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OpenidConnectProviderUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "OperationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_tags": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "include_not_tagged_operations": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "OperationStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "OperationsResultsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "OutboundNetworkDependenciesEndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyDescriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyFragmentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyFragmentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_references": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyRestrictionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyRestrictionContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyRestrictionUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "PolicyRestrictionValidationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PortalConfigOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalConfigContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalConfigContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "PortalRevisionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalRevisionContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalRevisionContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PortalSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PrivateEndpointConnectionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "type": "PrivateEndpointConnectionRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_by_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_private_link_resource": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_sub_resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_private_link_resources": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductGroupLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductGroupLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductGroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delete_subscriptions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand_groups": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_tags": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "include_not_tagged_products": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ProductPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductSubscriptionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductWikiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ProductWikisOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "QuotaByCounterKeysOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QuotaCounterValueUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "QuotaByPeriodKeysOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QuotaCounterValueUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "RegionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ReportsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_geo": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_time": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "interval": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_user": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "SignInSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSigninSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSigninSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "SignUpSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSignupSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSignupSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "SubscriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TagApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TagOperationLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagOperationLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TagOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "assign_to_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "assign_to_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "assign_to_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "detach_from_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "detach_from_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "detach_from_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_state_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_state_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_state_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "scope": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TagProductLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagProductLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TagResourceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TenantAccessGitOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TenantAccessOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AccessInformationCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AccessInformationUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TenantConfigurationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_deploy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DeployConfigurationParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_save": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SaveConfigurationParameter", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_validate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DeployConfigurationParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get_sync_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TenantSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "settings_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserConfirmationPasswordOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "send": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserGroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserIdentitiesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delete_subscriptions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UserCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "generate_sso_url": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_shared_access_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UserTokenParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand_groups": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UserUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "UserSubscriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiDiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiExportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiOperationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiOperationPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiCreateOrUpdateParameter", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delete_revisions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand_api_version_set": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiReleaseOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiRevisionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "force": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiVersionSetOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceBackendOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceCertificateOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CertificateCreateOrUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceDiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceGlobalSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GlobalSchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceGroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceGroupUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceLoggerOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceNamedValueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueCreateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_value": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceNotificationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceNotificationRecipientEmailOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceNotificationRecipientUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WorkspaceContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WorkspaceContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspacePolicyFragmentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyFragmentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_references": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspacePolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceProductApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceProductGroupLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductGroupLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceProductOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delete_subscriptions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand_groups": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceProductPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceSubscriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceTagApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceTagOperationLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagOperationLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceTagOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "scope": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceTagProductLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagProductLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skip": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_managament_create_backend_with_custom_assigned_certificate_thumbprints.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_managament_create_backend_with_custom_assigned_certificate_thumbprints.py new file mode 100644 index 000000000000..70ca2973f47c --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_managament_create_backend_with_custom_assigned_certificate_thumbprints.py @@ -0,0 +1,56 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_managament_create_backend_with_custom_assigned_certificate_thumbprints.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.backend.create_or_update( + resource_group_name="rg1", + service_name="apimService1", + backend_id="cabackend", + parameters={ + "properties": { + "description": "Custom Assigned certificate Example", + "protocol": "http", + "tls": { + "serverCertificateThumbprints": ["1365083bae61ee876fc26850b825d05d3eb2e503"], + "validateCertificateChain": True, + "validateCertificateName": True, + }, + "url": "https://self-signed.badssl.com/", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagamentCreateBackendWithCustomAssignedCertificate_Thumbprints.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_all_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_all_policies.py index 033c74a77c66..e901f10fdfb6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_all_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_all_policies.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAllPolicies.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementAllPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_apply_network_configuration_updates.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_apply_network_configuration_updates.py index 9b6135810c18..474f8cd7d235 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_apply_network_configuration_updates.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_apply_network_configuration_updates.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementApplyNetworkConfigurationUpdates.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_approve_or_reject_private_endpoint_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_approve_or_reject_private_endpoint_connection.py index 5e9fc6dfc9b2..e33f8014fd6d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_approve_or_reject_private_endpoint_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_approve_or_reject_private_endpoint_connection.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_authorization_server_list_secrets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_authorization_server_list_secrets.py index 392ad36b1731..926943ce2238 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_authorization_server_list_secrets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_authorization_server_list_secrets.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAuthorizationServerListSecrets.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementAuthorizationServerListSecrets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backend_reconnect.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backend_reconnect.py index 2bc4c744df38..1e1e238a8aa0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backend_reconnect.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backend_reconnect.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackendReconnect.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementBackendReconnect.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_access_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_access_key.py index bee93ac62c44..a75e8b022afc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_access_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_access_key.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithAccessKey.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementBackupWithAccessKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_system_managed_identity.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_system_managed_identity.py index 00aa476a46dc..5d5520a13c09 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_system_managed_identity.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_system_managed_identity.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithSystemManagedIdentity.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementBackupWithSystemManagedIdentity.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_user_assigned_managed_identity.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_user_assigned_managed_identity.py index 4f87208f52fc..00a100a504a6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_user_assigned_managed_identity.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_user_assigned_managed_identity.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_ai_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_ai_logger.py index 1141c3476622..54b06a0bbdfe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_ai_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_ai_logger.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAILogger.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAILogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api.py index 879ca378fc14..233da8564a26 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -51,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_clone.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_clone.py index 70e02aafb016..88b0bab9f6f9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_clone.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_clone.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -50,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiClone.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiClone.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_diagnostic.py index e2c5e3e5d003..4d02ac5dfdd3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -54,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue.py index 9d1a8e05408b..2a83457f2b1e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -48,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiIssue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_attachment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_attachment.py index 2fb1cc451a86..ffe42a85aab3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_attachment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_attachment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueAttachment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiIssueAttachment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_comment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_comment.py index 312e185e7b42..f4b9a8bda010 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_comment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_comment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueComment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiIssueComment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_new_version_using_existing_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_new_version_using_existing_api.py index 14298ca1e578..ab7b6fbaf003 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_new_version_using_existing_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_new_version_using_existing_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -52,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation.py index f2e95599ec05..7315b9985f21 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -64,6 +65,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_policy.py index d05267db3875..596f4d137f6e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_tag.py index 5d24308f2ae1..aaef0dd11326 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiOperationTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy.py index 54f665f32bce..8f5634b3e02a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy_non_xml_encoded.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy_non_xml_encoded.py index 23eb752ce8f7..1d6d41956e68 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy_non_xml_encoded.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy_non_xml_encoded.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_release.py index b247db36b4c2..9ee5c38e4b81 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_release.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiRelease.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_revision_from_existing_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_revision_from_existing_api.py index 50c3fd908986..009b8fedae07 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_revision_from_existing_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_revision_from_existing_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiRevisionFromExistingApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_schema.py index efa5b67e4b59..0889dcd8fa67 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag.py index 8f52c92f715d..eca34f0233fe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag_description.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag_description.py index 87936793f115..676aba24f33a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag_description.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag_description.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTagDescription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiTagDescription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tool.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tool.py new file mode 100644 index 000000000000..4af25a27306c --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tool.py @@ -0,0 +1,52 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_create_api_tool.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.api_tool.create_or_update( + resource_group_name="rg1", + service_name="apimService1", + api_id="github-mcp-api", + tool_id="createIssue", + parameters={ + "properties": { + "description": "This is a MCP tool to create an issue in a github repository", + "displayName": "createIssue", + "operationId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/github-rest-api/operations/createIssue", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiTool.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_import_override_service_url.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_import_override_service_url.py index 5a19d2f1e3bf..c44fd7a687e2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_import_override_service_url.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_import_override_service_url.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import.py index 79a71c0d6fb0..2675de390e04 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingOai3Import.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiUsingOai3Import.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import_with_translate_required_query_parameters_conduct.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import_with_translate_required_query_parameters_conduct.py index c2617c3a8671..db1dfc7995f3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import_with_translate_required_query_parameters_conduct.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import_with_translate_required_query_parameters_conduct.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_swagger_import.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_swagger_import.py index fd02411643ce..4317aacd3d40 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_swagger_import.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_swagger_import.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingSwaggerImport.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiUsingSwaggerImport.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_wadl_import.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_wadl_import.py index 18449d15a84b..6c6ae6874632 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_wadl_import.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_wadl_import.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingWadlImport.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiUsingWadlImport.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_version_set.py index fdc6e92bee26..4129ddae85b9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_version_set.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiVersionSet.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_wiki.py index f53c42e48aa3..375e52d2ee1a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_wiki.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWiki.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_auth_servers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_auth_servers.py index 83553762043e..1522dc5cc79f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_auth_servers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_auth_servers.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -54,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithMultipleAuthServers.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiWithMultipleAuthServers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_open_id_connect_providers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_open_id_connect_providers.py index 033d2db4e013..77e93ceb3be2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_open_id_connect_providers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_open_id_connect_providers.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -60,6 +61,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_open_id_connect.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_open_id_connect.py index b18f1e73a63c..7807480e285b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_open_id_connect.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_open_id_connect.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -51,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithOpenIdConnect.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiWithOpenIdConnect.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_auth_code.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_auth_code.py index 8ffa644b78a2..15507e68eeae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_auth_code.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_auth_code.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationAADAuthCode.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_client_cred.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_client_cred.py index 5f0ae5b596a9..0cb7c70c18be 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_client_cred.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_client_cred.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADClientCred.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationAADClientCred.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_access_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_access_policy.py index a58fdd8e3f70..8e8037ab18a3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_access_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_access_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationAccessPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code.py index 6070cb05f3b3..84e5cd8c8a45 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -55,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code_with_key_vault.py new file mode 100644 index 000000000000..4517e169d955 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code_with_key_vault.py @@ -0,0 +1,61 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_create_authorization_provider_aad_auth_code_with_key_vault.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.authorization_provider.create_or_update( + resource_group_name="rg1", + service_name="apimService1", + authorization_provider_id="aadwithkeyvault", + parameters={ + "properties": { + "displayName": "Azure AD with Key Vault", + "identityProvider": "aad", + "oauth2": { + "grantTypes": { + "authorizationCode": { + "clientId": "53790825-fdd3-4b80-bc7a-4c3aaf25801d", + "resourceUri": "https://graph.microsoft.com", + "scopes": "User.Read.All Group.Read.All", + } + }, + "keyVault": {"secretIdentifier": "https://my.vault.azure.net/secrets/clientSecret"}, + "redirectUrl": "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + } + }, + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationProviderAADAuthCodeWithKeyVault.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_client_cred.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_client_cred.py index ca5b2e2e63a4..c35fce765307 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_client_cred.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_client_cred.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -53,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_generic_oauth2.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_generic_oauth2.py index e52d01dc0539..0d0e29c427ab 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_generic_oauth2.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_generic_oauth2.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -57,6 +58,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_oob_google.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_oob_google.py index af0612f49cfc..94d2b5060e18 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_oob_google.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_oob_google.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -54,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_server.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_server.py index 751947b50d4e..f16ea1923fa0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_server.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_server.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -58,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationServer.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationServer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_proxy_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_proxy_backend.py index 213f41988c58..9e9b7abf9f61 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_proxy_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_proxy_backend.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -52,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateBackendProxyBackend.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendProxyBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_service_fabric.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_service_fabric.py index 871c19276f99..eb80d618b0fd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_service_fabric.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_service_fabric.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -55,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateBackendServiceFabric.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendServiceFabric.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_azure_region.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_azure_region.py new file mode 100644 index 000000000000..c31ca630526b --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_azure_region.py @@ -0,0 +1,47 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_create_backend_with_azure_region.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.backend.create_or_update( + resource_group_name="rg1", + service_name="apimService1", + backend_id="azurebackend", + parameters={ + "properties": {"azureRegion": "northeurope", "protocol": "http", "url": "https://backendname2644/"} + }, + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendWithAzureRegion.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_carbon_aware_load_balancer.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_carbon_aware_load_balancer.py new file mode 100644 index 000000000000..4962c8433197 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_carbon_aware_load_balancer.py @@ -0,0 +1,64 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_create_backend_with_carbon_aware_load_balancer.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.backend.create_or_update( + resource_group_name="rg1", + service_name="apimService1", + backend_id="carbonawareloadbalancerbackend", + parameters={ + "properties": { + "pool": { + "services": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sustainable-backend-europe-north", + "preferredCarbonEmission": "Medium", + "priority": 1, + "weight": 1, + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend", + "priority": 1, + "weight": 1, + }, + ] + }, + "type": "Pool", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendWithCarbonAwareLoadBalancer.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_custom_assigned_certificate_x509_names.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_custom_assigned_certificate_x509_names.py new file mode 100644 index 000000000000..76ef93878fc6 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_custom_assigned_certificate_x509_names.py @@ -0,0 +1,56 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_create_backend_with_custom_assigned_certificate_x509_names.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.backend.create_or_update( + resource_group_name="rg1", + service_name="apimService1", + backend_id="cabackend", + parameters={ + "properties": { + "description": "Custom Assigned certificate Example", + "protocol": "http", + "tls": { + "serverX509Names": [{"issuerCertificateThumbprint": None, "name": "*.badssl.com"}], + "validateCertificateChain": True, + "validateCertificateName": True, + }, + "url": "https://self-signed.badssl.com/", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendWithCustomAssignedCertificate_X509Names.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_priority_based_load_balancer.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_priority_based_load_balancer.py new file mode 100644 index 000000000000..872a5f39e3fc --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_priority_based_load_balancer.py @@ -0,0 +1,69 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_create_backend_with_priority_based_load_balancer.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.backend.create_or_update( + resource_group_name="rg1", + service_name="apimService1", + backend_id="priority-based-load-balancer", + parameters={ + "properties": { + "pool": { + "services": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-1", + "priority": 1, + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-2", + "priority": 1, + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-3", + "priority": 2, + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-4", + "priority": 2, + }, + ] + }, + "type": "Pool", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendWithPriorityBasedLoadBalancer.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_simple_load_balancer.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_simple_load_balancer.py new file mode 100644 index 000000000000..779dea0214d1 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_simple_load_balancer.py @@ -0,0 +1,59 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_create_backend_with_simple_load_balancer.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.backend.create_or_update( + resource_group_name="rg1", + service_name="apimService1", + backend_id="simple-load-balancer", + parameters={ + "properties": { + "pool": { + "services": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-1" + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-2" + }, + ] + }, + "type": "Pool", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendWithSimpleLoadBalancer.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_weighted_load_balancer.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_weighted_load_balancer.py new file mode 100644 index 000000000000..996fb2e9a767 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_weighted_load_balancer.py @@ -0,0 +1,61 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_create_backend_with_weighted_load_balancer.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.backend.create_or_update( + resource_group_name="rg1", + service_name="apimService1", + backend_id="weighted-load-balancer", + parameters={ + "properties": { + "pool": { + "services": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-1", + "weight": 75, + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-2", + "weight": 25, + }, + ] + }, + "type": "Pool", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendWithWeightedLoadBalancer.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_cache.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_cache.py index 9787b9f42c3b..c8251bb3a432 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_cache.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_cache.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCache.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateCache.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate.py index 4e1445e51542..47836f30524a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate_with_key_vault.py index 4b43656f3395..b05f8beea92b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate_with_key_vault.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificateWithKeyVault.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateCertificateWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application.py new file mode 100644 index 000000000000..63ddcd38ef6d --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application.py @@ -0,0 +1,51 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_create_client_application.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.client_application.create_or_update( + resource_group_name="rg1", + service_name="apimService1", + client_application_id="testAppId", + parameters={ + "properties": { + "description": "This is just an example application", + "displayName": "Test Application", + "ownerId": "/users/userId", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateClientApplication.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application_product_link.py new file mode 100644 index 000000000000..5e2585462264 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application_product_link.py @@ -0,0 +1,50 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_create_client_application_product_link.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.client_application_product_link.create( + resource_group_name="rg1", + service_name="apimService1", + client_application_id="testAppId", + client_application_product_link_id="link1", + parameters={ + "properties": { + "productId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/starter" + } + }, + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateClientApplicationProductLink.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type.py index 93cc8b9df6a1..e04a11223c60 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -86,6 +87,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentType.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateContentType.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type_content_item.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type_content_item.py index 3f69429b0e64..4c3ce0943589 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type_content_item.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type_content_item.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -50,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentTypeContentItem.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateContentTypeContentItem.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_diagnostic.py index d068912bdcc6..71e44cc8b6c7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -53,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_documentation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_documentation.py index d32e5e55c667..5976dc45ab6e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_documentation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_documentation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDocumentation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateDocumentation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_eh_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_eh_logger.py index 7ef137ca787e..0b3087927d9c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_eh_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_eh_logger.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -48,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateEHLogger.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateEHLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway.py index 12ddcc273f19..f09571416af3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGateway.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_api.py index 7a99eb9ffbc4..45104649e9d8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGatewayApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_certificate_authority.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_certificate_authority.py index 05504611a9da..2c797c767dec 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_certificate_authority.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_certificate_authority.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayCertificateAuthority.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGatewayCertificateAuthority.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_config_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_config_connection.py index dd10d4f5d6e9..a057fa1e448a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_config_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_config_connection.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayConfigConnection.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGatewayConfigConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_binding.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_binding.py new file mode 100644 index 000000000000..2f920d02cad1 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_binding.py @@ -0,0 +1,53 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_create_gateway_hostname_binding.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.api_gateway_hostname_binding.begin_create_or_update( + resource_group_name="rg1", + gateway_name="apimGateway1", + hostname_binding_name="hb-1", + parameters={ + "properties": { + "hostname": "primary.cotoso.com", + "keyVault": { + "identityClientId": "00000000-0000-0000-0000-000000000000", + "secretId": "https://myvault.keyvault.azure.net/secrets/contosoprimarycert", + }, + } + }, + ).result() + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGatewayHostnameBinding.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_configuration.py index 4b84172e52d8..ba19ffb896c0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_configuration.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGatewayHostnameConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema1.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema1.py index 96130eaeab0b..d90292376d7f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema1.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema1.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema1.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGlobalSchema1.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema2.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema2.py index c5dd032b20cb..89f72080239c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema2.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema2.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -59,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema2.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGlobalSchema2.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api.py index e2d7ea6e8069..c10f716066af 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -48,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGraphQLApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver.py index e05978296b63..3602f635110f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolver.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGraphQLApiResolver.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver_policy.py index 63a705cba5eb..1496b3ef04cb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGraphQLApiResolverPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group.py index 516119841f9d..ce45c7167532 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_external.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_external.py index 53bccc9a1943..23956e1b24ce 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_external.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_external.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroupExternal.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGroupExternal.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_user.py index dac2ad36aa41..cb45128ab0c9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroupUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGroupUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_grpc_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_grpc_api.py index 1918ef9e4d5e..e7bf3fe08f3a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_grpc_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_grpc_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -50,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGrpcApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGrpcApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_identity_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_identity_provider.py index 075e26066de9..f02e4a9a7f2d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_identity_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_identity_provider.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateIdentityProvider.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateIdentityProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_multi_region_service_with_custom_hostname.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_multi_region_service_with_custom_hostname.py index d4f9157c5bd1..e5ac36f21154 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_multi_region_service_with_custom_hostname.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_multi_region_service_with_custom_hostname.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -78,6 +79,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value.py index c616eb2e6fc5..4d66176f6275 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNamedValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value_with_key_vault.py index 0322999ffd44..87eb5735e381 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value_with_key_vault.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNamedValueWithKeyVault.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateNamedValueWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification.py index c6d1aa864cfc..658a837bc23c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotification.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateNotification.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_email.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_email.py index 1ab43aacf012..cb0e72f780cd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_email.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_email.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientEmail.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateNotificationRecipientEmail.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_user.py index 58c283e43e72..e0b50effff67 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateNotificationRecipientUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_odata_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_odata_api.py index 9a5d86a41555..465fcc695775 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_odata_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_odata_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -50,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateODataApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateODataApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_open_id_connect_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_open_id_connect_provider.py index eab1f72140a9..2713a8179e7e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_open_id_connect_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_open_id_connect_provider.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -48,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateOpenIdConnectProvider.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateOpenIdConnectProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy.py index 77a81c6dab3e..897a11e6333f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreatePolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_fragment.py index be20f5536312..acf5622f3098 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_fragment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyFragment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreatePolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_restriction.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_restriction.py index 71ffd78b5925..668bc46f4196 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_restriction.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_restriction.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyRestriction.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreatePolicyRestriction.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_config.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_config.py index e5428e7012bb..02fc9674bcf0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_config.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_config.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -60,6 +61,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalConfig.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreatePortalConfig.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_revision.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_revision.py index bbcc7ab08f1b..ccee595915dc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_revision.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_revision.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalRevision.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreatePortalRevision.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product.py index 4f72e1e0f3b9..5550de62deac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProduct.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api.py index fb54e4655029..06edb7b221af 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api_link.py index d7226ae56e8d..2f6623fff5e8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApiLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group.py index 95f89384adb3..224ba662915b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group_link.py index 483b3b71ef1e..3e217a70c092 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroupLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductGroupLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_policy.py index 80d3f60ab7e5..8a022ca274ea 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_tag.py index 366d226fb01d..ab44a7023f02 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_wiki.py index e872c463a38c..d4556f0b5acb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_wiki.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductWiki.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service.py index 26c8c26266de..7f306a8ee61d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateService.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateService.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_having_msi.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_having_msi.py index c7815204470f..3b445c9548bc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_having_msi.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_having_msi.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceHavingMsi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceHavingMsi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_vnet_with_public_ip.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_vnet_with_public_ip.py index 2d6f48d25b59..70732f1d7ab8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_vnet_with_public_ip.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_vnet_with_public_ip.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -52,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceInVnetWithPublicIP.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_zones.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_zones.py index e1777fbb411f..7902c0b379d0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_zones.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_zones.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceInZones.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceInZones.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_skuv2_service.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_skuv2_service.py index 95922fc1fbe6..924061eeb7fa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_skuv2_service.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_skuv2_service.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceSkuv2Service.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceSkuv2Service.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_custom_hostname_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_custom_hostname_key_vault.py index 4e85bed70daf..c2ad1e3ef2c2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_custom_hostname_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_custom_hostname_key_vault.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -81,6 +82,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_developer_portal.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_developer_portal.py index 04cac4cce0c8..aca374a9f74c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_developer_portal.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_developer_portal.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithDeveloperPortal.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceWithDeveloperPortal.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_nat_gateway_enabled.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_nat_gateway_enabled.py index 0e34091d37af..66a70a9c0386 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_nat_gateway_enabled.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_nat_gateway_enabled.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_system_certificates.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_system_certificates.py index ce1c72dec94c..ff168dd232aa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_system_certificates.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_system_certificates.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -53,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithSystemCertificates.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceWithSystemCertificates.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_user_assigned_identity.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_user_assigned_identity.py index 51edd7547697..2d117446bc93 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_user_assigned_identity.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_user_assigned_identity.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_without_legacy_configuration_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_without_legacy_configuration_api.py index 2c6b47351e53..13a954ed62b3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_without_legacy_configuration_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_without_legacy_configuration_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithoutLegacyConfigurationApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceWithoutLegacyConfigurationApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_pass_through_api_using_wsdl_import.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_pass_through_api_using_wsdl_import.py index ba26c35ed24f..654cb3f9a060 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_pass_through_api_using_wsdl_import.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_pass_through_api_using_wsdl_import.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_to_rest_api_using_wsdl_import.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_to_rest_api_using_wsdl_import.py index da28731be040..d17bacf6c29c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_to_rest_api_using_wsdl_import.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_to_rest_api_using_wsdl_import.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_standard_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_standard_gateway.py index 8f965b15d763..e95cec23886a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_standard_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_standard_gateway.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateStandardGateway.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateStandardGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_subscription.py index fc5f33e91617..652b11b2f26c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag.py index 9a865e77b5ae..5468070a1432 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_api_link.py index c896471546b9..d5681110de6b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_api_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagApiLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateTagApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_operation_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_operation_link.py index 3880b947e644..4255a321d12c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_operation_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_operation_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagOperationLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateTagOperationLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_product_link.py index 1e435b2ccba3..3294566cc3b2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_product_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagProductLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateTagProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_template.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_template.py index 33c545046898..e8897bc17a01 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_template.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_template.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTemplate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateTemplate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tenant_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tenant_access.py index effeb10c9ef5..30c6adcac054 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tenant_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tenant_access.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTenantAccess.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateTenantAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_user.py index 23b89f15b34e..232a7494e507 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_websocket_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_websocket_api.py index 0faebd3fa563..f44de3b393ad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_websocket_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_websocket_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -48,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWebsocketApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWebsocketApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace.py index 8000797ddca7..cc950e49d248 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspace.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspace.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_ai_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_ai_logger.py index 474cdf1f515c..c4a0e30fd0dd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_ai_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_ai_logger.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceAILogger.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceAILogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api.py index 8a48652f213a..42c87299316e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -52,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_diagnostic.py index 692301a29810..54ec0c567984 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -55,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation.py index 8f9f42c6383d..582339386bf2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -65,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation_policy.py index 1c7ee5d34cc8..fee33afbd76f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperationPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_policy.py index ccaabd4e9f86..fcc8d10322d2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_release.py index 97ad4900620c..76e27e2cf4c8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_release.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiRelease.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_schema.py index 215cf27b3060..3f772f266975 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -48,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_version_set.py index dd6b462ebc10..e8497d37c918 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_version_set.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiVersionSet.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_proxy_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_proxy_backend.py index 0d53d43ef18f..4ec13674cb0a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_proxy_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_proxy_backend.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -53,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceBackendProxyBackend.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceBackendProxyBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_service_fabric.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_service_fabric.py index 6cae8dd1e2ad..2325be3a7ec7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_service_fabric.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_service_fabric.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -56,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceBackendServiceFabric.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceBackendServiceFabric.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate.py index 46312c118f2d..0f7f8b7c47a2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate_with_key_vault.py index d01afe1e7d49..e91b7cbafb68 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate_with_key_vault.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificateWithKeyVault.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceCertificateWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_diagnostic.py index 2185a50707d3..cebe431164a5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -54,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_eh_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_eh_logger.py index be6d5429f5b0..18eb182deacb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_eh_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_eh_logger.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceEHLogger.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceEHLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group.py index d7aa30de200a..e87aa82b37e4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_external.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_external.py index 4116fe48f1e8..48027a821d15 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_external.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_external.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroupExternal.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceGroupExternal.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_user.py index 7a4d1ea7f888..f9dcca2c5339 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroupUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceGroupUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value.py index dfa36a7ffcc6..c6782620ae21 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -42,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNamedValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value_with_key_vault.py index db83334848fc..375443d47cdd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value_with_key_vault.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -50,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNamedValueWithKeyVault.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceNamedValueWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification.py index 2e9087d63a03..8f2fd5ee7f81 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotification.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceNotification.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_email.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_email.py index 0e389212f0f5..145a2951157c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_email.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_email.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientEmail.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceNotificationRecipientEmail.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_user.py index 1d82a67db137..6ca5e6b40ece 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceNotificationRecipientUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy.py index f3e487c738fb..4a43c76c4d3e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspacePolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_fragment.py index 15d9a2a203c2..d6b83c879fdc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_fragment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyFragment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspacePolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_non_xml_encoded.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_non_xml_encoded.py index 3cc89fa5c1fb..6fe64656fc25 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_non_xml_encoded.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_non_xml_encoded.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_premium_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_premium_gateway.py index 8d23a80db094..39d286e6b6a8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_premium_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_premium_gateway.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -50,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePremiumGateway.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspacePremiumGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product.py index d6efef583b0a..4852c29f8aa4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProduct.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_api_link.py index 0d004ae8d0b3..94c1f922dccd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_api_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductApiLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceProductApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_group_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_group_link.py index 8eb41acdb54e..819fca3d43d6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_group_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_group_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductGroupLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceProductGroupLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_policy.py index b02dbe42b4ce..f43bd0ab9fe8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_schema.py index 013320f4f6fd..5b61b5464791 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_subscription.py index f331f2ffd9c6..369f75115bdc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag.py index 16c3c0729965..2c26a8a00690 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_api_link.py index 8e124cad9d78..2b078a2f7de7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_api_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagApiLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceTagApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_operation_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_operation_link.py index a875a60101b7..6b434acb6be5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_operation_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_operation_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagOperationLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceTagOperationLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_product_link.py index 1e7495b3f1e9..ece3ad858426 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_product_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagProductLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceTagProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api.py index 3a5a44eeb66b..601e1939ea70 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_diagnostic.py index 0bc9f8897041..d01a69046626 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue.py index ea57eb405683..84505cb92252 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiIssue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_attachment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_attachment.py index 689a28fe21f6..ca721d0a9bf8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_attachment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_attachment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueAttachment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiIssueAttachment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_comment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_comment.py index 3bd0a3195bcb..ee1ca5b60cda 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_comment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_comment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueComment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiIssueComment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation.py index e975ff58f218..9e8081590529 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_policy.py index d3b201ceadc5..e169c3054182 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_tag.py index a86fb30fd36c..02e56ce788df 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiOperationTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_policy.py index c265dfcbb7a7..5fbc7d155997 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_release.py index b297cbedae33..94aab43f1e1d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_release.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiRelease.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_schema.py index 5087b7ed414b..e9962e7efacf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag.py index ae0b6d05ba1d..9ef3ca2b5bf3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag_description.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag_description.py index 97d8b5a3b4d9..8d6bb4cfbbea 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag_description.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag_description.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTagDescription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiTagDescription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tool.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tool.py new file mode 100644 index 000000000000..b865856756a7 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tool.py @@ -0,0 +1,44 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_delete_api_tool.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + client.api_tool.delete( + resource_group_name="rg1", + service_name="apimService1", + api_id="57d2ef278aa04f0888cba3f3", + tool_id="57d2ef278aa04f0ad01d6cdc", + ) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiTool.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_version_set.py index b077e0fd8492..a377df708b0f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_version_set.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiVersionSet.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_wiki.py index 7e39c4aa4942..e92faf965d6e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_wiki.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiWiki.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization.py index 880c14619d43..ec339a73a179 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorization.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteAuthorization.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_access_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_access_policy.py index 521323266f09..23a27d5f7bde 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_access_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_access_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteAuthorizationAccessPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_provider.py index e711686aa504..a31620d346be 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_provider.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationProvider.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteAuthorizationProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_server.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_server.py index 64548ddad616..9dbc86760a91 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_server.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_server.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationServer.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteAuthorizationServer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_backend.py index 691f4d0bd22c..70658774da62 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_backend.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteBackend.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_cache.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_cache.py index 96f025bbca51..fa005b61af80 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_cache.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_cache.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCache.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteCache.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_certificate.py index 6ff5b5d2d7c3..42c90dcac848 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_certificate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCertificate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application.py new file mode 100644 index 000000000000..cb397467c859 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application.py @@ -0,0 +1,43 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_delete_client_application.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + client.client_application.delete( + resource_group_name="rg1", + service_name="apimService1", + client_application_id="testAppId", + ) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteClientApplication.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application_product_link.py new file mode 100644 index 000000000000..7c75d029d051 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application_product_link.py @@ -0,0 +1,44 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_delete_client_application_product_link.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + client.client_application_product_link.delete( + resource_group_name="rg1", + service_name="apimService1", + client_application_id="testAppId", + client_application_product_link_id="link1", + ) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteClientApplicationProductLink.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type.py index 3dcaa0ea2471..4558e65c360c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentType.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteContentType.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type_content_item.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type_content_item.py index 4c7fba274191..e8370c0cb08f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type_content_item.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type_content_item.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentTypeContentItem.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteContentTypeContentItem.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_diagnostic.py index 0eca0bd561a3..7bb871aa9f12 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_documentation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_documentation.py new file mode 100644 index 000000000000..427ee5e22a39 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_documentation.py @@ -0,0 +1,44 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_delete_documentation.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + client.documentation.delete( + resource_group_name="rg1", + service_name="apimService1", + documentation_id="57d1f7558aa04f15146d9d8a", + if_match="str", + ) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteDocumentation.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway.py index 8e79173fab80..130f4e96d721 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGateway.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_api.py index 73ae0347b23d..857058cd05b7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGatewayApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_certificate_authority.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_certificate_authority.py index d136aea8eba5..df332133bb6a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_certificate_authority.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_certificate_authority.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGatewayCertificateAuthority.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_config_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_config_connection.py index 576c884e175b..9a180a07ccc6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_config_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_config_connection.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayConfigConnection.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGatewayConfigConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_binding.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_binding.py new file mode 100644 index 000000000000..0e53281ff68e --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_binding.py @@ -0,0 +1,44 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_delete_gateway_hostname_binding.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + client.api_gateway_hostname_binding.begin_delete( + resource_group_name="rg1", + gateway_name="standard-gw-01", + hostname_binding_name="gcc-01", + if_match="*", + ).result() + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGatewayHostnameBinding.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_configuration.py index 2eedd898a948..ffcd9dd4d2e3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_configuration.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGatewayHostnameConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_global_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_global_schema.py index 5df7cb57c336..d2dbe26136b3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_global_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_global_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGlobalSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGlobalSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver.py index 508ad0d2bc36..f5ee136449d1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolver.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGraphQLApiResolver.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver_policy.py index a65046a4660d..0597265ec904 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group.py index 66f8a2aee421..862f9a7f8425 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group_user.py index 21b726533a8f..ef6598d60b3b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroupUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGroupUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_identity_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_identity_provider.py index b669c4f8bda6..58f2e6811268 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_identity_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_identity_provider.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteIdentityProvider.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteIdentityProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_logger.py index 13f0de73cd92..116c8ba0a95b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_logger.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteLogger.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_named_value.py index 041c2424f34b..36c8d84878d8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_named_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNamedValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_email.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_email.py index 223a5594dc14..a086b45d2a54 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_email.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_email.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientEmail.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteNotificationRecipientEmail.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_user.py index c25c57e09207..294c0430e76c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteNotificationRecipientUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_open_id_connect_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_open_id_connect_provider.py index cda9d2b3ba6a..73877e8db254 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_open_id_connect_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_open_id_connect_provider.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteOpenIdConnectProvider.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteOpenIdConnectProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy.py index 17aaf81c6816..7a6b1bca480d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeletePolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_fragment.py index 33010af4b274..4c21c4b100d9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_fragment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyFragment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeletePolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_restriction.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_restriction.py index e22f5f543f12..d4ab94a95786 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_restriction.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_restriction.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyRestriction.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeletePolicyRestriction.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_private_endpoint_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_private_endpoint_connection.py index f85c5a7dee58..a312c8a7bb43 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_private_endpoint_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_private_endpoint_connection.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePrivateEndpointConnection.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeletePrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product.py index b5b68d97ef72..48be9fe3d035 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProduct.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api.py index 9b962b9d32b8..420e920ad065 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api_link.py index 1c4d5e58a93a..8ef40bfee787 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApiLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group.py index 206cdf94fc6b..c5c5acba19d8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group_link.py index 34421decc0ae..092ee23df58c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroupLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductGroupLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_policy.py index 0dad49ed4618..7f9cfd403d16 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_tag.py index aa25afc8a548..1ef11320fa50 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_wiki.py index 8e82b065a69b..cb5298522b33 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_wiki.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductWiki.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_subscription.py index a69e1b2bdd1c..98a82604a5cf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteSubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag.py index bc7c22c751ab..c770f449e88b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_api_link.py index e91a8eaac8ae..a4be7abe43ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_api_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagApiLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteTagApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_operation_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_operation_link.py index 898177d88fd9..c84bad2663cc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_operation_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_operation_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagOperationLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteTagOperationLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_product_link.py index 7f370962f71f..39144d2738c6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_product_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagProductLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteTagProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_template.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_template.py index 2fc626ffbf2a..f12c6846b184 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_template.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_template.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTemplate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteTemplate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_user.py index b4bf043d5deb..03bb800c42f0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace.py index c5c033b98cef..4aad03a8f255 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspace.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspace.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api.py index b34094444532..27968d874d12 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_diagnostic.py index 6af7ef6d0461..e16178cc9092 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation.py index 8e435c5f1ef1..6cf30d63a874 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation_policy.py index dbc273ecc342..9f4109cfb1f2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperationPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_policy.py index 8d6760ad5588..9e97901ee80e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_release.py index c47f641a14f8..38da48cbb2ae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_release.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiRelease.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_schema.py index e596d47627ee..973a601debc9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_version_set.py index 4cf451d97b74..374e1ed9b449 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_version_set.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiVersionSet.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_backend.py index 4ed86bfdd590..113604e7bb2c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_backend.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceBackend.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_certificate.py index f71fa7c33d5e..134739ba6a22 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_certificate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceCertificate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_diagnostic.py index 2acff84d3976..379a31e14926 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group.py index bec6fac2b203..d218e6f3cacb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group_user.py index ff195eafe25e..eef3ac129f2a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroupUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceGroupUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_logger.py index 48d5054d637f..ecc6d0a67927 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_logger.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceLogger.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_named_value.py index 8f896cf2399d..03b1d53457ab 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_named_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNamedValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_email.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_email.py index 199f21b0a5de..de9a0308f36a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_email.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_email.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_user.py index ceda0f4b9bd6..f21dd8951c5b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceNotificationRecipientUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy.py index e7449a72d326..31e64eaeab8f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspacePolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy_fragment.py index 4723f50c9ec4..8b29ca3e5d88 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy_fragment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicyFragment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspacePolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product.py index 69886b55df0f..ae54fdf76840 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProduct.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_api_link.py index 6c66f87f871f..4dfa956e2242 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_api_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductApiLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceProductApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_group_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_group_link.py index 01979ce605cc..0bad0eef405f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_group_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_group_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductGroupLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceProductGroupLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_policy.py index 32fa610bc02f..a0f8120635fd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_schema.py index ff1b8ea83fab..7652e80b889b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_subscription.py index 7b7ed91df621..b011ee3144fc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag.py index 2ebea9256cbe..5401ba64f4ee 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_api_link.py index 22403a2634a7..fa1bee11ea80 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_api_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagApiLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceTagApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_operation_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_operation_link.py index 3603fdee4a07..2965f59a4c4c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_operation_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_operation_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagOperationLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceTagOperationLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_product_link.py index e03fd829e7a2..fc66136ab31b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_product_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagProductLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceTagProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_list_by_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_list_by_subscription.py index eee69589bbc7..7bbcceaca947 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_list_by_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_list_by_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -35,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesListBySubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeletedServicesListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_purge.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_purge.py index 40c0c0f74f92..b46cc81ac1e9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_purge.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_purge.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesPurge.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeletedServicesPurge.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_delete_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_delete_gateway.py index de6af7d15176..5ffc1a976e8e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_delete_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_delete_gateway.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayDeleteGateway.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayDeleteGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_generate_token.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_generate_token.py index 470413d31ffd..2d4eeebb1a34 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_generate_token.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_generate_token.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGenerateToken.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayGenerateToken.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_get_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_get_gateway.py index 90924c4841bb..4590d0ca85ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_get_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_get_gateway.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGetGateway.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayGetGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_invalidate_debug_credentials.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_invalidate_debug_credentials.py index cbfeaa1423e6..9557c2f662f5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_invalidate_debug_credentials.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_invalidate_debug_credentials.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayInvalidateDebugCredentials.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayInvalidateDebugCredentials.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_debug_credentials.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_debug_credentials.py index b7bf5b436553..723d7ac04f98 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_debug_credentials.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_debug_credentials.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListDebugCredentials.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayListDebugCredentials.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_keys.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_keys.py index 9c971118af79..52cfc5ae7136 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_keys.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_keys.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListKeys.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayListKeys.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_trace.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_trace.py index 14b96473b917..4084579b055a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_trace.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_trace.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListTrace.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayListTrace.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_regenerate_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_regenerate_key.py index 479db1037122..9352ad179712 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_regenerate_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_regenerate_key.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayRegenerateKey.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayRegenerateKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_contract.py index 692b9b7d7eee..54cdfc1190a9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_contract.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_contract.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiContract.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiContract.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_diagnostic.py index 6b79048f601b..9b0078de8474 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api2dot0.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api2dot0.py index bd03489276dd..b38595fcbc57 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api2dot0.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api2dot0.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiExportInOpenApi2dot0.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiExportInOpenApi2dot0.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api3dot0.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api3dot0.py index 5daa4b79b251..1e9e2a84137c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api3dot0.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api3dot0.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiExportInOpenApi3dot0.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiExportInOpenApi3dot0.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue.py index 5598ed0e87e5..d790bb9cb304 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiIssue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_attachment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_attachment.py index 510292e3042f..d187a2cd9825 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_attachment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_attachment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueAttachment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiIssueAttachment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_comment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_comment.py index 03c8e719df86..01a9ec363dc1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_comment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_comment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueComment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiIssueComment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation.py index 87388764806e..d4281441e0e7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_pet_store.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_pet_store.py index 3bb415c614d5..6bda10210bcb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_pet_store.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_pet_store.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPetStore.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiOperationPetStore.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_policy.py index 2b8ebbadea8c..e08121d1b843 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_tag.py index 0b9b4bd3a49b..5eef094bf47c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiOperationTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_policy.py index 93e637270856..f5ded1fc9acc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_release.py index cbc5fd6f7011..239b7f2bcda3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_release.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRelease.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_revision.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_revision.py index 0d79fd3615b1..7085ef95df54 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_revision.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_revision.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRevision.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiRevision.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_schema.py index 429d3d16df02..9424c2443e75 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag.py index 1d410768acd8..69e7b546b20c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag_description.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag_description.py index 1274752c1d30..9c8d290cd4af 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag_description.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag_description.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTagDescription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiTagDescription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tool.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tool.py new file mode 100644 index 000000000000..0a7d6147a42b --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tool.py @@ -0,0 +1,45 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_get_api_tool.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.api_tool.get( + resource_group_name="rg1", + service_name="apimService1", + api_id="github-mcp-api", + tool_id="findRepositories", + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiTool.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_version_set.py index 991df92ab3e7..4e4bd98c591c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_version_set.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiVersionSet.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_wiki.py index 1b1ad325b541..30d09ef101b5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_wiki.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiWiki.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization.py index b078b880eb59..1add975c79c4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorization.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetAuthorization.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_access_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_access_policy.py index ef4d94eb1910..d0df08408698 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_access_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_access_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationAccessPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetAuthorizationAccessPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_login_request.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_login_request.py index 0c9440cc2f83..99fa1659c23d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_login_request.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_login_request.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationLoginRequest.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetAuthorizationLoginRequest.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_provider.py index 3c8032ede062..1f9f86aedbbf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_provider.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationProvider.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetAuthorizationProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_server.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_server.py index 48e1a8489767..a9fbc57b20e7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_server.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_server.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationServer.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetAuthorizationServer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_backend.py index 98bbf00a0b0c..8bad8515d946 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_backend.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetBackend.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_cache.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_cache.py index affb48c497dd..0ea95669c3b5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_cache.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_cache.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCache.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetCache.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate.py index 90a4ea832ed3..d8da997c2a21 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate_with_key_vault.py index 92f7e10466c5..3e922e0859ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate_with_key_vault.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificateWithKeyVault.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetCertificateWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application.py new file mode 100644 index 000000000000..765149572d89 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application.py @@ -0,0 +1,44 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_get_client_application.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.client_application.get( + resource_group_name="rg1", + service_name="apimService1", + client_application_id="testAppId", + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetClientApplication.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application_product_link.py new file mode 100644 index 000000000000..dc9656afac8e --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application_product_link.py @@ -0,0 +1,45 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_get_client_application_product_link.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.client_application_product_link.get( + resource_group_name="rg1", + service_name="apimService1", + client_application_id="testAppId", + client_application_product_link_id="link1", + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetClientApplicationProductLink.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type.py index b38a024ae902..715f6b8203c3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentType.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetContentType.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type_content_item.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type_content_item.py index b2b6b372386e..ddd6f6e63c1d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type_content_item.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type_content_item.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentTypeContentItem.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetContentTypeContentItem.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_deleted_service_by_name.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_deleted_service_by_name.py index 45f585d7545d..2da709903f80 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_deleted_service_by_name.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_deleted_service_by_name.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDeletedServiceByName.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetDeletedServiceByName.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_diagnostic.py index 2e19b8817174..34df9837386c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_documentation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_documentation.py index 8c2b9819fe35..36c5d7f1212f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_documentation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_documentation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDocumentation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetDocumentation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway.py index 5daba9fc109b..154335f539ad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGateway.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_certificate_authority.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_certificate_authority.py index 8b390996fc29..96f8b50208a3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_certificate_authority.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_certificate_authority.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayCertificateAuthority.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGatewayCertificateAuthority.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_config_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_config_connection.py index ca5d594f741a..01cfcdefcf6d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_config_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_config_connection.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayConfigConnection.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGatewayConfigConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_binding.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_binding.py new file mode 100644 index 000000000000..f5f08e28b8be --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_binding.py @@ -0,0 +1,44 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_get_gateway_hostname_binding.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.api_gateway_hostname_binding.get( + resource_group_name="rg1", + gateway_name="standard-gw-1", + hostname_binding_name="hb-1", + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGatewayHostnameBinding.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_configuration.py index 99ef8a9c8af0..bfc7f7db31dd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_configuration.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayHostnameConfiguration.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGatewayHostnameConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema1.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema1.py index 3c55c6c927fa..5a2b10f07418 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema1.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema1.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema1.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGlobalSchema1.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema2.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema2.py index 0ab6dc4143ff..fc4009cad014 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema2.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema2.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema2.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGlobalSchema2.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver.py index aa9d927086b5..5cd9222598b4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolver.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGraphQLApiResolver.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver_policy.py index 8af42fc394c8..821c42ee89f4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGraphQLApiResolverPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_group.py index 2da99f6ebce0..2170255efe45 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_identity_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_identity_provider.py index d4be337d8e83..9088d179f49c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_identity_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_identity_provider.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIdentityProvider.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetIdentityProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_issue.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_issue.py index 74cc14942041..613965db23e6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_issue.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_issue.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIssue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetIssue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_logger.py index fbe56ce72fb4..a2d391da4a7c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_logger.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetLogger.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value.py index e69946de487a..daed17cbf215 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value_with_key_vault.py index 63fab92ad053..c53327afe7a3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value_with_key_vault.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValueWithKeyVault.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetNamedValueWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_notification.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_notification.py index b4e7240eca02..2a1465650bcc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_notification.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_notification.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNotification.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetNotification.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_open_id_connect_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_open_id_connect_provider.py index c685f5103997..aaa7f371a57b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_open_id_connect_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_open_id_connect_provider.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOpenIdConnectProvider.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetOpenIdConnectProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_result.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_result.py index c3d14e210481..a8cd01294efb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_result.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_result.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -36,6 +37,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOperationResult.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetOperationResult.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_status.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_status.py index 849b0e26a5ff..5330445f3aae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_status.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_status.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOperationStatus.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy.py index ff669e06c854..d0457cce474b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_format.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_format.py index 2eb0d5001b4a..7bc5d7653c09 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_format.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_format.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFormat.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPolicyFormat.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment.py index d9325382e18f..be9e437a5145 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment_format.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment_format.py index 840fec84e1db..72af061438dc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment_format.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment_format.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragmentFormat.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPolicyFragmentFormat.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_restriction.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_restriction.py index b4950b3e20c6..2937d0c0bb40 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_restriction.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_restriction.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyRestriction.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPolicyRestriction.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_portal_revision.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_portal_revision.py index 0c345a665f4e..d5e0e337596f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_portal_revision.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_portal_revision.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPortalRevision.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPortalRevision.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_endpoint_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_endpoint_connection.py index 720a4b63f682..9fcda812eed9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_endpoint_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_endpoint_connection.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateEndpointConnection.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_link_group_resource.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_link_group_resource.py index ca96dd8c847b..60cf089e04df 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_link_group_resource.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_link_group_resource.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateLinkGroupResource.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPrivateLinkGroupResource.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product.py index f4f5f556f1b8..9605376fe669 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProduct.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_api_link.py index 613378fd8c32..f14771e8e93c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_api_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductApiLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetProductApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_group_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_group_link.py index e97e862deb6c..67397fb4124d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_group_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_group_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductGroupLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetProductGroupLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_policy.py index e2df36ad1a40..d2c23129c491 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_tag.py index a65b75f821db..e8b57d5daccc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetProductTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_wiki.py index f36774f9e47f..11762a444bd5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_wiki.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductWiki.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetProductWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys.py index 568af90c2cda..139c81231ec7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeys.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetQuotaCounterKeys.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys_by_quota_period.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys_by_quota_period.py index 13f5bf9a5f41..5289483658ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys_by_quota_period.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys_by_quota_period.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_api.py index b93e4b6f8151..a250877a6146 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_geo.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_geo.py index c4ef74d1e396..81f621645910 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_geo.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_geo.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByGeo.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByGeo.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_operation.py index b6e7f33da2d8..e94fe1de051a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_operation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByOperation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_product.py index 49fbc8f56a87..15d4b2118877 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_product.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByProduct.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_request.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_request.py index 9aae23174eaa..f276ef3d4d95 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_request.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_request.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByRequest.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByRequest.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_subscription.py index e2521a5c41a1..3b3f5437e74d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsBySubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_time.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_time.py index 89899cd11560..8f70071c28b8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_time.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_time.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -42,6 +43,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByTime.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByTime.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_user.py index 2fd6bf9055a2..ec338a35ea78 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_subscription.py index 2e6a15f58ff4..5f62505230d8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetSubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag.py index eacfe0c0517b..82c1dec40b4d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_api_link.py index 622faa1602da..e1a38c12d211 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_api_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagApiLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTagApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_operation_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_operation_link.py index 29c1658ba196..2d583be63e26 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_operation_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_operation_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagOperationLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTagOperationLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_product_link.py index b2b541d54ffc..a35b0797852c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_product_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagProductLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTagProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_template.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_template.py index 0f224da89b24..b88ef3ca7889 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_template.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_template.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTemplate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTemplate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_access.py index babb5a8de6f0..b80b0d2add73 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_access.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantAccess.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTenantAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_git_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_git_access.py index 682f840cd9ce..c29cd3b747e7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_git_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_git_access.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantGitAccess.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTenantGitAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_settings.py index 0e221e414435..68104298ee97 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_settings.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_settings.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantSettings.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTenantSettings.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user.py index d590836464a7..69eb90c6256e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user_subscription.py index 0e4dda8a72d6..290237ae51ca 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUserSubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetUserSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace.py index 2850b2ed10ec..bdee9e6c6d28 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspace.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspace.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_contract.py index bca31c5cedbd..dfec42502d7c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_contract.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_contract.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiContract.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiContract.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_diagnostic.py index 2437b2f7884e..a5f705a3ee00 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api2dot0.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api2dot0.py index 88cafc0032ef..4890fcfe8cfb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api2dot0.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api2dot0.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api3dot0.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api3dot0.py index 4fef7a6717cf..4602e5998f11 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api3dot0.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api3dot0.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiExportInOpenApi3dot0.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiExportInOpenApi3dot0.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation.py index 95de42ce84bf..b902ae452fbe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation_policy.py index 733566f1e4fa..bd8f6c9be441 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperationPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_policy.py index e4e0bf4ed10f..1002a462a110 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_release.py index 2bb0b36e15ed..defc619c3ca0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_release.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRelease.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_revision.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_revision.py index f3a11d322f05..58e6a9da7805 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_revision.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_revision.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRevision.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiRevision.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_schema.py index 4253dcca83cd..0c236e8b44f0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_version_set.py index 7a27aa04411a..cdb1b33bf8b7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_version_set.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiVersionSet.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_backend.py index 9f842723c48b..5c8b31a8b372 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_backend.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceBackend.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate.py index fbe9dc6e8583..e520205ac7e8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate_with_key_vault.py index ae1ef4ee3fe1..794565885223 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate_with_key_vault.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificateWithKeyVault.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceCertificateWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_diagnostic.py index 3f0c9d65ea2a..2797038aa3bd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_group.py index 7f22494b7f6c..1af1796cbc5b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_link.py index e51bfe1dbef9..7f49b7e7265b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_logger.py index 1180953e4b91..b5265d251f8c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_logger.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLogger.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value.py index eb1623b38c01..5202427acedb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value_with_key_vault.py index 79d3fd02bfa4..55fcbd7e4eb4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value_with_key_vault.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_notification.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_notification.py index f53b015c0bb6..918af64d78f4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_notification.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_notification.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNotification.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceNotification.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy.py index 5bc50123fdd3..34f53082dd55 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspacePolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment.py index ef523879e941..b3cff912c9e2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspacePolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment_format.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment_format.py index 5c4af586cd30..ebf0816ffebb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment_format.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment_format.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product.py index 94f13fbc78ee..cdaa99efdd8e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProduct.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_api_link.py index 94e642bbdf28..7137c4d66fa3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_api_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductApiLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceProductApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_group_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_group_link.py index 69a6a6c0f51b..a6abb7de2d63 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_group_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_group_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductGroupLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceProductGroupLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_policy.py index 8e643f0fb5d0..b6fcb70dd7e0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_schema.py index b07daf12c5d4..c465de68704c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_subscription.py index f09fb39f238d..8fa9061836de 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag.py index 941ed5695f84..215a844efa98 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_api_link.py index a5a0c56e4bb0..a271101f8b7d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_api_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagApiLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceTagApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_operation_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_operation_link.py index 3698736a630f..01a268f1c81c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_operation_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_operation_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagOperationLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceTagOperationLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_product_link.py index 96fc64ff5c80..0510bbf73e6b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_product_link.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagProductLink.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceTagProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api.py index eb2d2d634c2f..9c9515e302f3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_diagnostic.py index 55120f9718ce..ce44ba3cb036 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue.py index 4e935ad978b5..6522dac82a29 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiIssue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_attachment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_attachment.py index e3f9161016b9..238d9c04823a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_attachment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_attachment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueAttachment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiIssueAttachment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_comment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_comment.py index 63a050bf3fa8..ad69c768d95f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_comment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_comment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueComment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiIssueComment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation.py index 3eda1f3f83c6..45c7b6b21395 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_policy.py index 44c153ff81c9..465a07966f48 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_tag.py index ac88b6098415..2d0f1f89a960 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiOperationTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_policy.py index ea66db7df49d..bb6721ede50f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_release.py index 144963a5db13..ecf0a5bcfb0f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_release.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiRelease.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_schema.py index 1d41d4b8be23..7bcfd3e4998f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag.py index c988a99f0543..833474452c8f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag_description.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag_description.py index 2cab3d4c19bd..e5e7f03511fa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag_description.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag_description.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTagDescription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiTagDescription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tool.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tool.py new file mode 100644 index 000000000000..869380911762 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tool.py @@ -0,0 +1,45 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_head_api_tool.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.api_tool.get_entity_tag( + resource_group_name="rg1", + service_name="apimService1", + api_id="57d2ef278aa04f0888cba3f3", + tool_id="57d2ef278aa04f0ad01d6cdc", + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiTool.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_version_set.py index 79495bfdcd42..0da95c50c870 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_version_set.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiVersionSet.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_wiki.py index 23fccb0b2d45..2ca870f37b4d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_wiki.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiWiki.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_authorization_server.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_authorization_server.py index db776675290e..c12ffc50a648 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_authorization_server.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_authorization_server.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadAuthorizationServer.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadAuthorizationServer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_backend.py index 5b77fc1c400e..49844d5bb1fc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_backend.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadBackend.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_cache.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_cache.py index a8a0d8e44b7d..3c3332adb3da 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_cache.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_cache.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCache.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadCache.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_certificate.py index 8036349c7ede..64228c74ddef 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_certificate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCertificate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_client_application.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_client_application.py new file mode 100644 index 000000000000..a8b2ecbbe2cf --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_client_application.py @@ -0,0 +1,44 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_head_client_application.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.client_application.get_entity_tag( + resource_group_name="rg1", + service_name="apimService1", + client_application_id="testAppId", + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadClientApplication.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_content_type_content_item.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_content_type_content_item.py index 2fbc9644a6f3..d459e5528545 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_content_type_content_item.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_content_type_content_item.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadContentTypeContentItem.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadContentTypeContentItem.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_delegation_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_delegation_settings.py index e6583287aa6d..8fe387c3e2b9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_delegation_settings.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_delegation_settings.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDelegationSettings.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadDelegationSettings.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_diagnostic.py index 9cc989fd6947..6ab8b242aa3c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_documentation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_documentation.py index daabec137745..9b919980f781 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_documentation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_documentation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDocumentation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadDocumentation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_email_template.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_email_template.py index a84a7402d8ed..f9af6523743a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_email_template.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_email_template.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadEmailTemplate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadEmailTemplate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway.py index 127626f467bb..3e5798867f46 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGateway.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_api.py index 3724996b134b..48243b29dfb1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGatewayApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_certificate_authority.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_certificate_authority.py index 9ed13643eac2..c93c49ca9365 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_certificate_authority.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_certificate_authority.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayCertificateAuthority.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGatewayCertificateAuthority.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_hostname_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_hostname_configuration.py index d2b4e308de43..12b2ce73b57c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_hostname_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_hostname_configuration.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGatewayHostnameConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_global_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_global_schema.py index 0d14157e9d37..ec4b7580c263 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_global_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_global_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGlobalSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGlobalSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver.py index e7256f5fe26d..a58e2ffa77f8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolver.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGraphQLApiResolver.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver_policy.py index f6ea20b8cfc5..4859df9fc7b5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolverPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGraphQLApiResolverPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group.py index 15f6ac66f805..ba4e1482725a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group_user.py index 9c17f10749fd..5b28c08d431f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroupUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGroupUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_identity_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_identity_provider.py index f4f8726e228b..c14774a1212d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_identity_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_identity_provider.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadIdentityProvider.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadIdentityProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_logger.py index 80f12b4d4649..fad594bc4e1e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_logger.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadLogger.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_named_value.py index 903ebb8e86e0..04e54d32bd0f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_named_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNamedValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_email.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_email.py index b022b4fdc198..bf5490a9c6c1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_email.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_email.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientEmail.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadNotificationRecipientEmail.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_user.py index 3bca7f82c327..27b2771631e3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadNotificationRecipientUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_open_id_connect_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_open_id_connect_provider.py index 540cff22a46d..fcdbe3e79013 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_open_id_connect_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_open_id_connect_provider.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadOpenIdConnectProvider.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadOpenIdConnectProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy.py index d70c908a3502..396e7dce7d0e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_fragment.py index f74002749e87..e190c310df43 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_fragment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyFragment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadPolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_restriction.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_restriction.py index ef4a16a86ea9..57d529c91791 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_restriction.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_restriction.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyRestriction.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadPolicyRestriction.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_config.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_config.py index 4071c8da8d3f..0ecedf36f066 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_config.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_config.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalConfig.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadPortalConfig.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_revision.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_revision.py index 2cd86bb0518e..72873e0b6baf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_revision.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_revision.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalRevision.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadPortalRevision.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product.py index 82092d23fb6b..33ef84f1aef2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProduct.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_api.py index e65037116177..94c0cb813f78 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadProductApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_group.py index a4113b654adc..f65f4a518867 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadProductGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_policy.py index 6c2ef3627d70..b47eacab5f1e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_tag.py index b18ee5fe2319..1cd2399a5422 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadProductTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_wiki.py index 024bb20ba810..57df766181f1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_wiki.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductWiki.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadProductWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_in_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_in_settings.py index 97ac903918c1..d7d8474ad307 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_in_settings.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_in_settings.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignInSettings.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadSignInSettings.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_up_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_up_settings.py index e40d437165c4..9ba9b9ce17ab 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_up_settings.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_up_settings.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignUpSettings.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadSignUpSettings.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_subscription.py index e0067114d334..7e1a2909474b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tag.py index d96e1ff58579..563e98fb04d9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tenant_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tenant_access.py index 7defedaa2fbf..e1a17a8423ad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tenant_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tenant_access.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTenantAccess.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadTenantAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_user.py index fbb3fd1dd422..48adad507cbf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace.py index a4bc32bc6da6..a3cf4cb24d30 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspace.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspace.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api.py index cbfc1dc08729..3b4cf5465832 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_diagnostic.py index 82b641e100d8..a8fc98f24d77 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation.py index 2b6dba1fe82d..34a58be58d08 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation_policy.py index 7b55c1b3b3fa..e3acf150bd2d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperationPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_policy.py index fa806165a882..04f01ec48628 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_release.py index f6cfdd196c50..f30cc0be8b58 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_release.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiRelease.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_schema.py index cd54c298f989..408cf4765a9c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_version_set.py index 4e7dfeeb428f..5c424ee37a47 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_version_set.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiVersionSet.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_backend.py index 1c7ad9f6211f..31ac3c7179e9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_backend.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceBackend.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_certificate.py index efc3c738d5d0..0fd7e4072979 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_certificate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceCertificate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_diagnostic.py index 531acbb2df26..af4dd52d8da3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group.py index 5a4e0dd63f93..d0a0aefc3f50 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group_user.py index bcbd51adf27d..ece8b5d5d120 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroupUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceGroupUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_logger.py index 54ac1b465f66..e32ad5391f39 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_logger.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceLogger.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_named_value.py index 4006cb035fca..f87af790eab5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_named_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNamedValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_email.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_email.py index e4cb4fb6edc1..6076e2bddae3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_email.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_email.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientEmail.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceNotificationRecipientEmail.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_user.py index 2fcfefe34baa..97e8ef8e3bca 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceNotificationRecipientUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy.py index a4ec37b93067..72925144431f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspacePolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy_fragment.py index 33cc865f5833..6b17ae876f60 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy_fragment.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicyFragment.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspacePolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product.py index b37d07eee94b..a538e8d8ea79 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProduct.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product_policy.py index 780ae0079302..a210cc16a41b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product_policy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProductPolicy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_schema.py index cee7ea9ca4fa..743d599af28f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_schema.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSchema.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_subscription.py index 89d2bb1c2e53..4579dcc43722 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_tag.py index 43e81d77664b..257960ba4354 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_identity_provider_list_secrets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_identity_provider_list_secrets.py index 74dee0a955fa..744ba705fd38 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_identity_provider_list_secrets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_identity_provider_list_secrets.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementIdentityProviderListSecrets.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementIdentityProviderListSecrets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_diagnostics.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_diagnostics.py index 1bc7f79f2a26..fe0e68a61dc1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_diagnostics.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_diagnostics.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiDiagnostics.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiDiagnostics.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_attachments.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_attachments.py index cdf4bcd1399a..0b31301837d2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_attachments.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_attachments.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueAttachments.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiIssueAttachments.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_comments.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_comments.py index a2e49f7e2b85..37097bca9bd0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_comments.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_comments.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueComments.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiIssueComments.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issues.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issues.py index 7345eb9f0b7c..981b045959e3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issues.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issues.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssues.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiIssues.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_policies.py index 98cb24054c52..676cc113f3b6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_policies.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationPolicies.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiOperationPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_tags.py index 15dcc60f128e..c02bc7dac458 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_tags.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationTags.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiOperationTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations.py index 16cc13dcf60f..c5170555884f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperations.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiOperations.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations_by_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations_by_tags.py index ddf0c40dd81e..d30405b32276 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations_by_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations_by_tags.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationsByTags.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiOperationsByTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_policies.py index 5b47cd10271e..aabad67b1908 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_policies.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiPolicies.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_products.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_products.py index d5fa0df204e5..3c320f295193 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_products.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_products.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiProducts.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiProducts.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_releases.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_releases.py index 48859d76f3be..b2ff06f2bc5f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_releases.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_releases.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiReleases.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiReleases.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_revisions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_revisions.py index c5199adcc454..97c4dbaabaef 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_revisions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_revisions.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiRevisions.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiRevisions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_schemas.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_schemas.py index c92262f9d957..11f49b90e077 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_schemas.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_schemas.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiSchemas.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiSchemas.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tag_descriptions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tag_descriptions.py index 13d50423f329..01e636399e14 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tag_descriptions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tag_descriptions.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTagDescriptions.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiTagDescriptions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tags.py index 94a63a14acbe..90ab1fef9f7a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tags.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTags.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tools.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tools.py new file mode 100644 index 000000000000..1ff073b1141c --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tools.py @@ -0,0 +1,45 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_list_api_tools.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.api_tool.list_by_api( + resource_group_name="rg1", + service_name="apimService1", + api_id="github-mcp-api", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiTools.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_version_sets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_version_sets.py index d3256092b390..05a843661da8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_version_sets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_version_sets.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiVersionSets.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiVersionSets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_wikis.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_wikis.py index 5570905479fa..3dc7812dcfe0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_wikis.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_wikis.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiWikis.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiWikis.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis.py index 1ece65c7aaaf..d98ec4796bc3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApis.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApis.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis_by_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis_by_tags.py index 9be1806a23ac..f6faa082c784 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis_by_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis_by_tags.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApisByTags.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApisByTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_access_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_access_policies.py index a8cca433c688..fb7dc99da1e0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_access_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_access_policies.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationAccessPolicies.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListAuthorizationAccessPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_providers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_providers.py index 72f6366df591..16d42893abfc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_providers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_providers.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationProviders.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListAuthorizationProviders.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_servers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_servers.py index 61906ea9873e..822c85673d1c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_servers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_servers.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationServers.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListAuthorizationServers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_auth_code.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_auth_code.py index 941b1c769588..1c7157e25b76 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_auth_code.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_auth_code.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationsAuthCode.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListAuthorizationsAuthCode.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_client_cred.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_client_cred.py index 60431aef8ca6..dfa28658f71d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_client_cred.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_client_cred.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationsClientCred.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListAuthorizationsClientCred.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_backends.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_backends.py index 9b3f80e018bb..898c97ce17c9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_backends.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_backends.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListBackends.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListBackends.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_caches.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_caches.py index e38689b9f0bd..e87ab71a8aa6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_caches.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_caches.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCaches.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListCaches.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_certificates.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_certificates.py index ed20bcfb3ad9..52a6fed523ce 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_certificates.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_certificates.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCertificates.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListCertificates.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_product_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_product_links.py new file mode 100644 index 000000000000..270111246670 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_product_links.py @@ -0,0 +1,45 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_list_client_application_product_links.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.client_application_product_link.list_by_client_applications( + resource_group_name="rg1", + service_name="apimService1", + client_application_id="testAppId", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListClientApplicationProductLinks.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_secrets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_secrets.py new file mode 100644 index 000000000000..a4c5ac8e5e53 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_secrets.py @@ -0,0 +1,44 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_list_client_application_secrets.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.client_application.list_secrets( + resource_group_name="rg1", + service_name="apimService1", + client_application_id="testAppId", + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListClientApplicationSecrets.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_applications.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_applications.py new file mode 100644 index 000000000000..458adc657ec9 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_applications.py @@ -0,0 +1,44 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_list_client_applications.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.client_application.list_by_service( + resource_group_name="rg1", + service_name="apimService1", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListClientApplications.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_type_content_items.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_type_content_items.py index d07774df5954..42662ae61ba1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_type_content_items.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_type_content_items.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypeContentItems.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListContentTypeContentItems.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_types.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_types.py index 82970f701cad..b10ca0f552bd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_types.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_types.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypes.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListContentTypes.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_diagnostics.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_diagnostics.py index 09f9b82479cb..e0df0da9f16e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_diagnostics.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_diagnostics.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDiagnostics.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListDiagnostics.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_documentations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_documentations.py index 8cd044bd2743..52f4525321de 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_documentations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_documentations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDocumentations.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListDocumentations.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_apis.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_apis.py index 0a26f474e01b..19bebf6248f1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_apis.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_apis.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayApis.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewayApis.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_certificate_authorities.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_certificate_authorities.py index 58316e92c490..0007d7352620 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_certificate_authorities.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_certificate_authorities.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayCertificateAuthorities.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewayCertificateAuthorities.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_config_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_config_connection.py index a940dacccd47..b585ae014b91 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_config_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_config_connection.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayConfigConnection.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewayConfigConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_bindings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_bindings.py new file mode 100644 index 000000000000..581be5442734 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_bindings.py @@ -0,0 +1,44 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_list_gateway_hostname_bindings.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.api_gateway_hostname_binding.list_by_gateway( + resource_group_name="rg1", + gateway_name="standard-gw-1", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewayHostnameBindings.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_configurations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_configurations.py index 3f8d90f29544..c57b39b8d1f7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_configurations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_configurations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayHostnameConfigurations.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewayHostnameConfigurations.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways.py index f9090083e3cc..8236e2b3f5d2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGateways.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGateways.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription.py index b01447ab6fea..d4316a8051fc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -35,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewaysBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription_and_resource_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription_and_resource_group.py index 6f7206f5ae05..9dfbc0ee9b52 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription_and_resource_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription_and_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_global_schemas.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_global_schemas.py index e4b113597e1b..90608befd1aa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_global_schemas.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_global_schemas.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGlobalSchemas.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGlobalSchemas.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolver_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolver_policies.py index 5e98df9c77d7..7bc68d8c8104 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolver_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolver_policies.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolverPolicies.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGraphQLApiResolverPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolvers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolvers.py index 20402a60fa0c..15b0d5a4bc51 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolvers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolvers.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolvers.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGraphQLApiResolvers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_group_users.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_group_users.py index ff871ea27caa..945578b874b6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_group_users.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_group_users.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroupUsers.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGroupUsers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_groups.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_groups.py index 4e98ac2248fa..35bfde608224 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_groups.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_groups.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroups.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGroups.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_identity_providers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_identity_providers.py index 922d5bc40ae3..1e70ebb6f1b7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_identity_providers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_identity_providers.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIdentityProviders.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListIdentityProviders.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_issues.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_issues.py index 823062fcf433..dfd217a92e6e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_issues.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_issues.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIssues.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListIssues.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_loggers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_loggers.py index d0216cee9c03..4439238783d2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_loggers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_loggers.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListLoggers.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListLoggers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_named_values.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_named_values.py index 7dd9f48daa72..58ed439dc4db 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_named_values.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_named_values.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNamedValues.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListNamedValues.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_emails.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_emails.py index 5b9d032efdf5..6a1d6eabce19 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_emails.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_emails.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientEmails.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListNotificationRecipientEmails.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_users.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_users.py index 8a888f6a9ed1..a935b7924883 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_users.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_users.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientUsers.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListNotificationRecipientUsers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notifications.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notifications.py index 55ac80544c62..f58eccdb1477 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notifications.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notifications.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotifications.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListNotifications.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_open_id_connect_providers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_open_id_connect_providers.py index deff2e477f0c..5eef0d8bfbf8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_open_id_connect_providers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_open_id_connect_providers.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListOpenIdConnectProviders.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListOpenIdConnectProviders.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_operations.py index a0a9414dcc39..7cc000e11f9b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -35,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListOperations.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListOperations.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policies.py index a8479961c8db..45817cd7aad6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policies.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicies.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_descriptions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_descriptions.py index f476ef03ce07..04d9c4692edb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_descriptions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_descriptions.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyDescriptions.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPolicyDescriptions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragment_references.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragment_references.py index 62dbd57b02ac..e9a3d9d833f2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragment_references.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragment_references.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragmentReferences.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPolicyFragmentReferences.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragments.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragments.py index 438b961fec24..1a5cbcc9de5c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragments.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragments.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragments.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPolicyFragments.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_restrictions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_restrictions.py index 2754e7a30e15..a3dd9ed61310 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_restrictions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_restrictions.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyRestrictions.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPolicyRestrictions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_config.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_config.py index 43c39151ce59..b418a38692be 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_config.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_config.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalConfig.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPortalConfig.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_revisions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_revisions.py index 1480f7fb0083..2510a21c9229 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_revisions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_revisions.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalRevisions.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPortalRevisions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_settings.py index e43afc274db1..083fe409ea3b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_settings.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_settings.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalSettings.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPortalSettings.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_endpoint_connections.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_endpoint_connections.py index 80574ac11196..d33418cef03e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_endpoint_connections.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_endpoint_connections.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateEndpointConnections.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPrivateEndpointConnections.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_link_group_resources.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_link_group_resources.py index 303328ca9b06..c49e93caf8bd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_link_group_resources.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_link_group_resources.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateLinkGroupResources.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPrivateLinkGroupResources.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_api_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_api_links.py index 6027777df414..de69af1dca47 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_api_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_api_links.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApiLinks.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductApiLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_apis.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_apis.py index 033d38196a40..b5a20e410880 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_apis.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_apis.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApis.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductApis.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_group_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_group_links.py index d795d13d09e8..e2dee92fd8b8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_group_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_group_links.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroupLinks.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductGroupLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_groups.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_groups.py index 8d5041e0efed..21a8c4000e3c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_groups.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_groups.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroups.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductGroups.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_policies.py index 5e77250be15d..166c20b95b27 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_policies.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductPolicies.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_subscriptions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_subscriptions.py index 4391ea9f7005..dc3c1cdb8eaa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_subscriptions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_subscriptions.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductSubscriptions.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductSubscriptions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_tags.py index 788ea4e95efd..80442570c5d9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_tags.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductTags.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_wikis.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_wikis.py index b41fabedb3da..a77889565248 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_wikis.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_wikis.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductWikis.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductWikis.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products.py index 31e7f842cad3..45d4eb8ab36d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProducts.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProducts.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products_by_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products_by_tags.py index 5893c40802e4..1cc7977d3839 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products_by_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products_by_tags.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductsByTags.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductsByTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_regions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_regions.py index efcd275cd818..d31ac639892f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_regions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_regions.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListRegions.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListRegions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_portal_settings_validation_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_portal_settings_validation_key.py index 072414c7b4b2..e6bb361c5ef9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_portal_settings_validation_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_portal_settings_validation_key.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSecretsPortalSettingsValidationKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_tenant_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_tenant_access.py index b4660acfb5d9..2dc2ad760b43 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_tenant_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_tenant_access.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsTenantAccess.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSecretsTenantAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription.py index 35672c29caf8..f6a069fc15e8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -35,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListServiceBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription_and_resource_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription_and_resource_group.py index 9d4ccb4c5755..dfd274fdb4be 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription_and_resource_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription_and_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_consumption.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_consumption.py index ac75367e8943..32049f5c025a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_consumption.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_consumption.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Consumption.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSKUs-Consumption.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_dedicated.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_dedicated.py index 465a6616acba..1f39fa2856b5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_dedicated.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_dedicated.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Dedicated.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSKUs-Dedicated.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_gateways.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_gateways.py index efba98329522..25db7fdf6549 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_gateways.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_gateways.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Gateways.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSKUs-Gateways.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sku.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sku.py index e46499257b6e..924cb5b83aa0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sku.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sku.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -35,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSku.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSku.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_subscriptions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_subscriptions.py index 5833523ca09c..abbc44fd196f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_subscriptions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_subscriptions.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSubscriptions.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSubscriptions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_api_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_api_links.py index 049f41c61486..e987183df292 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_api_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_api_links.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagApiLinks.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTagApiLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_operation_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_operation_links.py index 634087b00da4..008d3e064dfa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_operation_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_operation_links.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagOperationLinks.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTagOperationLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_product_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_product_links.py index 083b3728e805..f0e528162d30 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_product_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_product_links.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagProductLinks.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTagProductLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_resources.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_resources.py index 4fecad49069c..aa42275c5d17 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_resources.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_resources.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagResources.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTagResources.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tags.py index f9d330913d56..0fb89df3056c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tags.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTags.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_templates.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_templates.py index ff2eba7a8bdf..28a2434075e2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_templates.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_templates.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTemplates.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTemplates.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_access.py index db796472e5a4..103e57c1ff8e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_access.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantAccess.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTenantAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_settings.py index f412fc344eb0..66998d79dac1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_settings.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_settings.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantSettings.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTenantSettings.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_groups.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_groups.py index 68774912d04a..39bf210fd5bf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_groups.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_groups.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserGroups.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListUserGroups.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_identities.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_identities.py index b3965fb09b59..17a5061b8eff 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_identities.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_identities.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserIdentities.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListUserIdentities.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_subscriptions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_subscriptions.py index 292e17a9be19..ef3480bda330 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_subscriptions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_subscriptions.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserSubscriptions.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListUserSubscriptions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_users.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_users.py index 7ecf7677206f..214f9ca98273 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_users.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_users.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUsers.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListUsers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_diagnostics.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_diagnostics.py index c5b8f5df4c06..44c9b1c2135a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_diagnostics.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_diagnostics.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiDiagnostics.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiDiagnostics.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operation_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operation_policies.py index 47c341e0f052..458ac45cc4ae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operation_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operation_policies.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperationPolicies.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiOperationPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operations.py index fa580f08debe..f869508a3206 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperations.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiOperations.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_policies.py index 6521358e3fb7..74ed69b4c14d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_policies.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiPolicies.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_releases.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_releases.py index ee75b1fc0430..6d90931909c6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_releases.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_releases.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiReleases.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiReleases.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_revisions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_revisions.py index a50252ad0929..53659bcbbe62 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_revisions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_revisions.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiRevisions.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiRevisions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_schemas.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_schemas.py index 99bbebe42666..a8eed1374a2d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_schemas.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_schemas.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiSchemas.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiSchemas.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_version_sets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_version_sets.py index 0e28ebddb3ad..417565d14ca7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_version_sets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_version_sets.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiVersionSets.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiVersionSets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_apis.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_apis.py index f4308cd39974..2e016c9084a2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_apis.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_apis.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApis.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApis.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_backends.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_backends.py index 578a53e642df..275bd0b501b6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_backends.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_backends.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceBackends.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceBackends.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_certificates.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_certificates.py index fc745fc81695..63e0baa61581 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_certificates.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_certificates.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceCertificates.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceCertificates.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_diagnostics.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_diagnostics.py index af415e7811a1..7ffde7255344 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_diagnostics.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_diagnostics.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceDiagnostics.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceDiagnostics.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_group_users.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_group_users.py index c98c01ca1215..6215063a2d5e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_group_users.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_group_users.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroupUsers.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceGroupUsers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_groups.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_groups.py index f5fe77f25253..3ba7ed7189c7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_groups.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_groups.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroups.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceGroups.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_links.py index e618cdead36b..20e9e2769071 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_links.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLinks.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_loggers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_loggers.py index 3c5781f62892..b4cea054141b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_loggers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_loggers.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLoggers.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceLoggers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_named_values.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_named_values.py index e548d051cf26..f123a2c8c74b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_named_values.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_named_values.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNamedValues.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceNamedValues.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_emails.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_emails.py index cb2568ef93ae..88ae500e3978 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_emails.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_emails.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientEmails.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceNotificationRecipientEmails.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_users.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_users.py index 904ef95eb224..57207b26b1e1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_users.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_users.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientUsers.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceNotificationRecipientUsers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notifications.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notifications.py index 6ee0acbf736a..246bad0134a4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notifications.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notifications.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotifications.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceNotifications.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policies.py index 2a28911ecf32..5d6a57ea2011 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policies.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicies.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspacePolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragment_references.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragment_references.py index 627e3b9ae2b3..dbc1c4db5e4e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragment_references.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragment_references.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragmentReferences.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspacePolicyFragmentReferences.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragments.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragments.py index 0dcd04a40cb5..3395e38dca52 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragments.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragments.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragments.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspacePolicyFragments.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_api_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_api_links.py index 1a4c5164182b..0fdb9988f41b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_api_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_api_links.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductApiLinks.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceProductApiLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_group_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_group_links.py index 4e1378cc681a..eb9a5c721767 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_group_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_group_links.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductGroupLinks.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceProductGroupLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_policies.py index 72c833cfa096..28775367fefe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_policies.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductPolicies.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceProductPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_products.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_products.py index 8628a4e47d3a..e27c30beb919 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_products.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_products.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProducts.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceProducts.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_schemas.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_schemas.py index 14e31a23a940..6ba784b1785e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_schemas.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_schemas.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSchemas.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceSchemas.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_subscriptions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_subscriptions.py index 04a9a7189242..af83528dd851 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_subscriptions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_subscriptions.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSubscriptions.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceSubscriptions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_api_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_api_links.py index 9e401400bad8..bd45ce54a990 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_api_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_api_links.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagApiLinks.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceTagApiLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_operation_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_operation_links.py index 7b9a41e2da3b..3aecbb4413d7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_operation_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_operation_links.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagOperationLinks.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceTagOperationLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_product_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_product_links.py index 9a87ef29b998..3cf4ffa99c20 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_product_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_product_links.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagProductLinks.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceTagProductLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tags.py index e58664dd6f37..fd204f5044c0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tags.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTags.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspaces.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspaces.py index ca27ae9a6f95..4a133c0ced16 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspaces.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspaces.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaces.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaces.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_named_value_list_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_named_value_list_value.py index 0a43de129634..efde26abf994 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_named_value_list_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_named_value_list_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementNamedValueListValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementNamedValueListValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_openid_connect_provider_list_secrets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_openid_connect_provider_list_secrets.py index bf22335f527f..ed0fd7dd9839 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_openid_connect_provider_list_secrets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_openid_connect_provider_list_secrets.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementOpenidConnectProviderListSecrets.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementOpenidConnectProviderListSecrets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check.py index 9fdd1bca6699..5ccd635bf9ab 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -42,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPerformConnectivityCheck.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPerformConnectivityCheck.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check_http_connect.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check_http_connect.py index 03034b958b2f..20cf62542fc5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check_http_connect.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check_http_connect.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPerformConnectivityCheckHttpConnect.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_config.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_config.py index 48f21f3ca1de..465d70204b8d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_config.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_config.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalConfig.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalConfig.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_delegation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_delegation.py index fdb22a8c4305..31e1dabfb62b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_delegation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_delegation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetDelegation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsGetDelegation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_in.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_in.py index 732e77fc24df..8b0dbf6937cb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_in.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_in.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignIn.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsGetSignIn.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_up.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_up.py index bb1d43e72548..ad9e8c143d45 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_up.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_up.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignUp.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsGetSignUp.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_delegation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_delegation.py index f5e902c37e7b..24d325ad1a85 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_delegation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_delegation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutDelegation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsPutDelegation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_in.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_in.py index 2a36752a5d7c..0ec0ae676379 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_in.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_in.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignIn.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsPutSignIn.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_up.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_up.py index c0eec1b0a473..54e6d9f0ac9f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_up.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_up.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignUp.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsPutSignUp.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_delegation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_delegation.py index 64f82253828f..3e164bc5e9d7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_delegation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_delegation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateDelegation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsUpdateDelegation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_in.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_in.py index a8aca5145bb5..322f3b0d9be5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_in.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_in.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignIn.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsUpdateSignIn.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_up.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_up.py index 61be778e5b22..0b10a68fc574 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_up.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_up.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,6 +44,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignUp.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsUpdateSignUp.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_post_authorization_confirm_consent_code_request.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_post_authorization_confirm_consent_code_request.py index e668c3518bbf..a98ad7d7e41d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_post_authorization_confirm_consent_code_request.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_post_authorization_confirm_consent_code_request.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_authorization_provider_secret.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_authorization_provider_secret.py new file mode 100644 index 000000000000..6c091f11d367 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_authorization_provider_secret.py @@ -0,0 +1,44 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_refresh_authorization_provider_secret.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.authorization_provider.refresh_secret( + resource_group_name="rg1", + service_name="apimService1", + authorization_provider_id="aadwithkeyvault", + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRefreshAuthorizationProviderSecret.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_certificate.py index 31bd02d26501..98daeb55f521 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_certificate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshCertificate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRefreshCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_gateway_hostname_binding_secret.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_gateway_hostname_binding_secret.py new file mode 100644 index 000000000000..32c92457e54a --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_gateway_hostname_binding_secret.py @@ -0,0 +1,43 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_refresh_gateway_hostname_binding_secret.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + client.api_gateway_hostname_binding.begin_refresh_secret( + resource_group_name="rg1", + gateway_name="standard-gw-01", + hostname_binding_name="gcc-01", + ).result() + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRefreshGatewayHostnameBindingSecret.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_named_value.py index ab36b75520c3..12e7be30bed1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_named_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshNamedValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRefreshNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_certificate.py index 6f9c945b9cfe..31aca5ad5098 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_certificate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceCertificate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRefreshWorkspaceCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_named_value.py index 27f3bb6eb13b..ff2a27c34b74 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_named_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceNamedValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRefreshWorkspaceNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_restore_with_access_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_restore_with_access_key.py index 6145b7271b7a..607c04c89b07 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_restore_with_access_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_restore_with_access_key.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRestoreWithAccessKey.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRestoreWithAccessKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_check_name_availability.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_check_name_availability.py index a22c821f2905..c4bb2cf73362 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_check_name_availability.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_check_name_availability.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -36,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceCheckNameAvailability.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_delete_service.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_delete_service.py index 083ea88a5af3..688d1a561c87 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_delete_service.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_delete_service.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceDeleteService.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceDeleteService.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_domain_ownership_identifier.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_domain_ownership_identifier.py index 51f159ec4a13..e43d622b8888 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_domain_ownership_identifier.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_domain_ownership_identifier.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -34,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_multi_region_internal_vnet.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_multi_region_internal_vnet.py index e536111d0efb..0f7e2453915d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_multi_region_internal_vnet.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_multi_region_internal_vnet.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetMultiRegionInternalVnet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status.py index d6619d7e979d..93734fabe1cd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatus.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetNetworkStatus.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status_by_location.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status_by_location.py index c5c8d1e3cc6b..8d6205f6df11 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status_by_location.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status_by_location.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetNetworkStatusByLocation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_outbound_network_dependencies_endpoints.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_outbound_network_dependencies_endpoints.py index 78efdfd4f276..74d901eb9b75 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_outbound_network_dependencies_endpoints.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_outbound_network_dependencies_endpoints.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service.py index b7839f099301..a58d280d5840 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetService.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetService.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service_having_msi.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service_having_msi.py index edf08e244cdf..2c38d8737696 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service_having_msi.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service_having_msi.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetServiceHavingMsi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetServiceHavingMsi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_sso_token.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_sso_token.py index 9d60e547ecec..d796924aca06 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_sso_token.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_sso_token.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetSsoToken.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetSsoToken.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_migrate_to_stv2.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_migrate_to_stv2.py index f72ddd915e23..ae9216618220 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_migrate_to_stv2.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_migrate_to_stv2.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceMigrateToStv2.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceMigrateToStv2.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_refresh_key_vault_hostnames.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_refresh_key_vault_hostnames.py new file mode 100644 index 000000000000..ab352e2ab021 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_refresh_key_vault_hostnames.py @@ -0,0 +1,43 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_service_refresh_key_vault_hostnames.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.api_management_service.begin_refresh_hostnames( + resource_group_name="rg1", + service_name="apimService1", + ).result() + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceRefreshKeyVaultHostnames.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_list_secrets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_list_secrets.py index 7f9cba814e95..f85c5859d72e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_list_secrets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_list_secrets.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionListSecrets.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementSubscriptionListSecrets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_primary_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_primary_key.py index 12fb2614d057..b206424eca0e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_primary_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_primary_key.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_secondary_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_secondary_key.py index 6de103197540..f90482d269e9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_secondary_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_secondary_key.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_key.py index 432eea8fac60..1a4d1bd7be7e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_key.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -30,13 +31,13 @@ def main(): subscription_id="00000000-0000-0000-0000-000000000000", ) - client.tenant_access_git.regenerate_secondary_key( + client.tenant_access.regenerate_primary_key( resource_group_name="rg1", service_name="apimService1", access_name="access", ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementTenantAccessRegenerateKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_sync_state.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_sync_state.py index 1bdc2c279791..f8aad0f1ac9b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_sync_state.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_sync_state.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessSyncState.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementTenantAccessSyncState.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_deploy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_deploy.py index 6d065df3b7ff..670d9de5bb11 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_deploy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_deploy.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationDeploy.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementTenantConfigurationDeploy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_save.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_save.py index ba9587bf21d9..fb15f00ad349 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_save.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_save.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationSave.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementTenantConfigurationSave.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_validate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_validate.py index af2ba6d5b365..c26e9018e181 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_validate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_validate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationValidate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementTenantConfigurationValidate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_undelete.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_undelete.py index 06d7b6ed1382..e624980aa322 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_undelete.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_undelete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -42,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUndelete.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUndelete.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api.py index e793d8fb7857..52dc4933173a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_diagnostic.py index b74c593773b2..0fdcea8dcf7c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -55,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_issue.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_issue.py index dff69c4aea03..019fc3f4c20e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_issue.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_issue.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiIssue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiIssue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_operation.py index 1ba1fcbf1f21..40fb9903b694 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_operation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -64,6 +65,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiOperation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_release.py index 73bc9b7fe125..b7e4189c0a6c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_release.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiRelease.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_tool.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_tool.py new file mode 100644 index 000000000000..ebe480a50679 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_tool.py @@ -0,0 +1,46 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_update_api_tool.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.api_tool.update( + resource_group_name="rg1", + service_name="apimService1", + api_id="github-mcp-api", + tool_id="createIssue", + parameters={"properties": {"description": "This is updated description", "displayName": "createIssue"}}, + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiTool.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_version_set.py index bd07a5fc195b..6f2a23b47bce 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_version_set.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiVersionSet.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_wiki.py index 51e63f0a82b1..18ad320c5725 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_wiki.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiWiki.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_authorization_server.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_authorization_server.py index 0893711b9acd..ce7b90d19b53 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_authorization_server.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_authorization_server.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateAuthorizationServer.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateAuthorizationServer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_backend.py index 62337dc6ff9f..fb75db3202a8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_backend.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateBackend.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_cache.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_cache.py index e65071336eaf..65abb55d85ef 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_cache.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_cache.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateCache.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateCache.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_diagnostic.py index d1116154dc2c..9e6d23a37d4f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -54,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_documentation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_documentation.py new file mode 100644 index 000000000000..deaf930c5601 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_documentation.py @@ -0,0 +1,46 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_update_documentation.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.documentation.update( + resource_group_name="rg1", + service_name="apimService1", + documentation_id="57d1f7558aa04f15146d9d8a", + if_match="str", + parameters={"properties": {"content": "content updated", "title": "Title updated"}}, + ) + print(response) + + +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateDocumentation.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_gateway.py index 7e705802f2c6..adfaedb2258a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_gateway.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGateway.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_graph_ql_api_resolver.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_graph_ql_api_resolver.py index b03491b63901..9e92c46f7580 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_graph_ql_api_resolver.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_graph_ql_api_resolver.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGraphQLApiResolver.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateGraphQLApiResolver.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_group.py index 9bf0b126680b..6eea99a67b2e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_identity_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_identity_provider.py index d4f165e61d41..b4a6176a3ca4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_identity_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_identity_provider.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateIdentityProvider.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateIdentityProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_logger.py index 9b7c14b1655e..c51fadaefc1a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_logger.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateLogger.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_named_value.py index ef2dc4f644fa..ba97a0209b3c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_named_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -42,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateNamedValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_open_id_connect_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_open_id_connect_provider.py index e69f303cdb4e..aad9408ec7d0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_open_id_connect_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_open_id_connect_provider.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -42,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateOpenIdConnectProvider.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateOpenIdConnectProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_policy_restriction.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_policy_restriction.py index 9957d99e2551..f0e4032cd988 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_policy_restriction.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_policy_restriction.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePolicyRestriction.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdatePolicyRestriction.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_config.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_config.py index 61d0745964d6..c87e2e6f52a5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_config.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_config.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -60,6 +61,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalConfig.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdatePortalConfig.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_revision.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_revision.py index 3280a77445b8..f4c19d4a9ef0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_revision.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_revision.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalRevision.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdatePortalRevision.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product.py index a0705344cc38..3eefaec4cd15 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProduct.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product_wiki.py index 8990576f6c99..a0eb95e06b62 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product_wiki.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProductWiki.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateProductWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key.py index d03e7ea35cf2..4ad8f2e0f6d0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKey.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateQuotaCounterKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key_by_quota_period.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key_by_quota_period.py index 9b7c56fe4eeb..260e62aa0a8e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key_by_quota_period.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key_by_quota_period.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_disable_tls10.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_disable_tls10.py index 7ebfbbe12918..e9deff5038c3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_disable_tls10.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_disable_tls10.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -42,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServiceDisableTls10.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateServiceDisableTls10.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_publisher_details.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_publisher_details.py index 683ce5b32a75..a7a141ddd1be 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_publisher_details.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_publisher_details.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServicePublisherDetails.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateServicePublisherDetails.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_to_new_vnet_and_azs.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_to_new_vnet_and_azs.py index eca6717e6b30..97d952fb4cec 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_to_new_vnet_and_azs.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_to_new_vnet_and_azs.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -59,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_standard_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_standard_gateway.py index 6b0fd87ee6f7..5674fe6bfda6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_standard_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_standard_gateway.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -42,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateStandardGateway.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateStandardGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_subscription.py index 7e9aba9e5525..3c99b390688e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateSubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tag.py index b414d8edb7d5..65627a92d59b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_template.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_template.py index 91cec71e7ca0..19c33a594558 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_template.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_template.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTemplate.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateTemplate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tenant_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tenant_access.py index 9ec3669c5f7c..6b73fbda2a67 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tenant_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tenant_access.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTenantAccess.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateTenantAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_user.py index 672b49904923..40a3fb76ca0c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateUser.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace.py index dc8aa7ffaf55..da207c23f6b5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspace.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspace.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api.py index efd2146cc478..cec84ae30563 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApi.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_diagnostic.py index 655cdea20f70..652b48aa9a35 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -56,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_operation.py index 6ee61e8eeabb..d6538ef1fb73 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_operation.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -65,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiOperation.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_release.py index 6a55a471c272..d5861be18c7a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_release.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiRelease.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_version_set.py index 704d2ae112ac..9cf275194f63 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_version_set.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiVersionSet.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_backend.py index c04c502cd605..8805699d7789 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_backend.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceBackend.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_diagnostic.py index b066819f9469..ec29833617e2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_diagnostic.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -55,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceDiagnostic.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_group.py index b2548a244283..e0601a516b55 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceGroup.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_logger.py index 471bb0eb4414..adebe189b12c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_logger.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceLogger.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_named_value.py index 85c9d4fd7e72..0a1dd9de9bf2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_named_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceNamedValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_product.py index 91968f891e98..442b8a3508f9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_product.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceProduct.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_subscription.py index d87fd27c06c7..1c826ae061e9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceSubscription.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_tag.py index 4282fc70a655..79c277a88a18 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_tag.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceTag.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_confirmation_password_send.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_confirmation_password_send.py index 6ceb41846e0d..de8a4523f7dd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_confirmation_password_send.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_confirmation_password_send.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserConfirmationPasswordSend.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUserConfirmationPasswordSend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_generate_sso_url.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_generate_sso_url.py index bcc471c154b0..8f6b0c37ef3c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_generate_sso_url.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_generate_sso_url.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserGenerateSsoUrl.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUserGenerateSsoUrl.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_token.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_token.py index 59b2e6711965..1dd542be0cdd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_token.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_token.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserToken.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUserToken.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_validate_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_validate_policies.py index b8b340093d8d..4daec198e0e7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_validate_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_validate_policies.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementValidatePolicies.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementValidatePolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_named_value_list_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_named_value_list_value.py index 5971cd2f900f..648875cdf8b7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_named_value_list_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_named_value_list_value.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceNamedValueListValue.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementWorkspaceNamedValueListValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_list_secrets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_list_secrets.py index cc3be71c89d8..e71988b7cd40 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_list_secrets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_list_secrets.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionListSecrets.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementWorkspaceSubscriptionListSecrets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_primary_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_primary_key.py index 75e9c81ab0da..f7220ec3e26e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_primary_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_primary_key.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_secondary_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_secondary_key.py index d1cf021c7808..287e2a80b208 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_secondary_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_secondary_key.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json +# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management.py index 9d82ec2a1913..18951606829f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management.py @@ -37,7 +37,7 @@ def test_begin_perform_connectivity_check_async(self, resource_group): } }, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations.py index 9d1695daba05..1fc6d412e13f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations.py @@ -24,7 +24,7 @@ def test_all_policies_list_by_service(self, resource_group): response = self.client.all_policies.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations_async.py index ad88e4d712cf..08670b9c6063 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations_async.py @@ -25,7 +25,7 @@ async def test_all_policies_list_by_service(self, resource_group): response = self.client.all_policies.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations.py index ff57acef6f2c..cfcc8c235aaf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations.py @@ -25,7 +25,7 @@ def test_api_diagnostic_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_api_diagnostic_get_entity_tag(self, resource_group): service_name="str", api_id="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_api_diagnostic_get(self, resource_group): service_name="str", api_id="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -107,6 +107,11 @@ def test_api_diagnostic_create_or_update(self, resource_group): }, "httpCorrelationProtocol": "str", "id": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, "logClientIp": bool, "loggerId": "str", "metrics": bool, @@ -116,7 +121,7 @@ def test_api_diagnostic_create_or_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -171,6 +176,11 @@ def test_api_diagnostic_update(self, resource_group): }, "httpCorrelationProtocol": "str", "id": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, "logClientIp": bool, "loggerId": "str", "metrics": bool, @@ -180,7 +190,7 @@ def test_api_diagnostic_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -195,7 +205,7 @@ def test_api_diagnostic_delete(self, resource_group): api_id="str", diagnostic_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations_async.py index 2afb0bd780eb..c603802d1b3a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations_async.py @@ -26,7 +26,7 @@ async def test_api_diagnostic_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_api_diagnostic_get_entity_tag(self, resource_group): service_name="str", api_id="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_api_diagnostic_get(self, resource_group): service_name="str", api_id="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -108,6 +108,11 @@ async def test_api_diagnostic_create_or_update(self, resource_group): }, "httpCorrelationProtocol": "str", "id": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, "logClientIp": bool, "loggerId": "str", "metrics": bool, @@ -117,7 +122,7 @@ async def test_api_diagnostic_create_or_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -172,6 +177,11 @@ async def test_api_diagnostic_update(self, resource_group): }, "httpCorrelationProtocol": "str", "id": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, "logClientIp": bool, "loggerId": "str", "metrics": bool, @@ -181,7 +191,7 @@ async def test_api_diagnostic_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -196,7 +206,7 @@ async def test_api_diagnostic_delete(self, resource_group): api_id="str", diagnostic_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations.py index 65922fc0a140..2ef3f0718f2a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations.py @@ -27,7 +27,7 @@ def test_api_export_get(self, resource_group): api_id="str", format="str", export="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations_async.py index d51805f4f5ad..c4af50087b52 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations_async.py @@ -28,7 +28,7 @@ async def test_api_export_get(self, resource_group): api_id="str", format="str", export="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations.py index 4189d0e498b3..db8c3b343854 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations.py @@ -24,7 +24,7 @@ def test_api_gateway_config_connection_list_by_gateway(self, resource_group): response = self.client.api_gateway_config_connection.list_by_gateway( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_api_gateway_config_connection_get(self, resource_group): resource_group_name=resource_group.name, gateway_name="str", config_connection_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -60,7 +60,7 @@ def test_api_gateway_config_connection_begin_create_or_update(self, resource_gro "sourceId": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -74,7 +74,7 @@ def test_api_gateway_config_connection_begin_delete(self, resource_group): gateway_name="str", config_connection_name="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations_async.py index b97de5e20ee9..0a514ec2ef20 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations_async.py @@ -25,7 +25,7 @@ async def test_api_gateway_config_connection_list_by_gateway(self, resource_grou response = self.client.api_gateway_config_connection.list_by_gateway( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_api_gateway_config_connection_get(self, resource_group): resource_group_name=resource_group.name, gateway_name="str", config_connection_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -62,7 +62,7 @@ async def test_api_gateway_config_connection_begin_create_or_update(self, resour "sourceId": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -78,7 +78,7 @@ async def test_api_gateway_config_connection_begin_delete(self, resource_group): gateway_name="str", config_connection_name="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations.py new file mode 100644 index 000000000000..8212d14ebdce --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.apimanagement import ApiManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestApiManagementApiGatewayHostnameBindingOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ApiManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_gateway_hostname_binding_list_by_gateway(self, resource_group): + response = self.client.api_gateway_hostname_binding.list_by_gateway( + resource_group_name=resource_group.name, + gateway_name="str", + api_version="2025-03-01-preview", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_gateway_hostname_binding_get(self, resource_group): + response = self.client.api_gateway_hostname_binding.get( + resource_group_name=resource_group.name, + gateway_name="str", + hostname_binding_name="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_gateway_hostname_binding_begin_create_or_update(self, resource_group): + response = self.client.api_gateway_hostname_binding.begin_create_or_update( + resource_group_name=resource_group.name, + gateway_name="str", + hostname_binding_name="str", + parameters={ + "hostname": "str", + "keyVault": { + "secretId": "str", + "identityClientId": "str", + "lastStatus": { + "code": "str", + "lastSuccessTimeStampUtc": "2020-02-20 00:00:00", + "timeStampUtc": "2020-02-20 00:00:00", + }, + }, + "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, + "etag": "str", + "id": "str", + "name": "str", + "provisioningState": "str", + "type": "str", + }, + api_version="2025-03-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_gateway_hostname_binding_begin_delete(self, resource_group): + response = self.client.api_gateway_hostname_binding.begin_delete( + resource_group_name=resource_group.name, + gateway_name="str", + hostname_binding_name="str", + if_match="str", + api_version="2025-03-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_gateway_hostname_binding_begin_refresh_secret(self, resource_group): + response = self.client.api_gateway_hostname_binding.begin_refresh_secret( + resource_group_name=resource_group.name, + gateway_name="str", + hostname_binding_name="str", + api_version="2025-03-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations_async.py new file mode 100644 index 000000000000..6e46356ba304 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations_async.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.apimanagement.aio import ApiManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestApiManagementApiGatewayHostnameBindingOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ApiManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_gateway_hostname_binding_list_by_gateway(self, resource_group): + response = self.client.api_gateway_hostname_binding.list_by_gateway( + resource_group_name=resource_group.name, + gateway_name="str", + api_version="2025-03-01-preview", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_gateway_hostname_binding_get(self, resource_group): + response = await self.client.api_gateway_hostname_binding.get( + resource_group_name=resource_group.name, + gateway_name="str", + hostname_binding_name="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_gateway_hostname_binding_begin_create_or_update(self, resource_group): + response = await ( + await self.client.api_gateway_hostname_binding.begin_create_or_update( + resource_group_name=resource_group.name, + gateway_name="str", + hostname_binding_name="str", + parameters={ + "hostname": "str", + "keyVault": { + "secretId": "str", + "identityClientId": "str", + "lastStatus": { + "code": "str", + "lastSuccessTimeStampUtc": "2020-02-20 00:00:00", + "timeStampUtc": "2020-02-20 00:00:00", + }, + }, + "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, + "etag": "str", + "id": "str", + "name": "str", + "provisioningState": "str", + "type": "str", + }, + api_version="2025-03-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_gateway_hostname_binding_begin_delete(self, resource_group): + response = await ( + await self.client.api_gateway_hostname_binding.begin_delete( + resource_group_name=resource_group.name, + gateway_name="str", + hostname_binding_name="str", + if_match="str", + api_version="2025-03-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_gateway_hostname_binding_begin_refresh_secret(self, resource_group): + response = await ( + await self.client.api_gateway_hostname_binding.begin_refresh_secret( + resource_group_name=resource_group.name, + gateway_name="str", + hostname_binding_name="str", + api_version="2025-03-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations.py index 4ceab583068f..9a7824b5badc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations.py @@ -48,7 +48,7 @@ def test_api_gateway_begin_create_or_update(self, resource_group): "type": "str", "virtualNetworkType": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -75,7 +75,7 @@ def test_api_gateway_begin_update(self, resource_group): "type": "str", "virtualNetworkType": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -87,7 +87,7 @@ def test_api_gateway_get(self, resource_group): response = self.client.api_gateway.get( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -99,7 +99,7 @@ def test_api_gateway_begin_delete(self, resource_group): response = self.client.api_gateway.begin_delete( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -110,7 +110,7 @@ def test_api_gateway_begin_delete(self, resource_group): def test_api_gateway_list_by_resource_group(self, resource_group): response = self.client.api_gateway.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -120,7 +120,7 @@ def test_api_gateway_list_by_resource_group(self, resource_group): @recorded_by_proxy def test_api_gateway_list(self, resource_group): response = self.client.api_gateway.list( - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations_async.py index d65861fa6604..90b08a27066e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations_async.py @@ -50,7 +50,7 @@ async def test_api_gateway_begin_create_or_update(self, resource_group): "type": "str", "virtualNetworkType": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -79,7 +79,7 @@ async def test_api_gateway_begin_update(self, resource_group): "type": "str", "virtualNetworkType": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -92,7 +92,7 @@ async def test_api_gateway_get(self, resource_group): response = await self.client.api_gateway.get( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -105,7 +105,7 @@ async def test_api_gateway_begin_delete(self, resource_group): await self.client.api_gateway.begin_delete( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -117,7 +117,7 @@ async def test_api_gateway_begin_delete(self, resource_group): async def test_api_gateway_list_by_resource_group(self, resource_group): response = self.client.api_gateway.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -127,7 +127,7 @@ async def test_api_gateway_list_by_resource_group(self, resource_group): @recorded_by_proxy_async async def test_api_gateway_list(self, resource_group): response = self.client.api_gateway.list( - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations.py index d2fa3cb95656..c015d28b8660 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations.py @@ -26,7 +26,7 @@ def test_api_issue_attachment_list_by_service(self, resource_group): service_name="str", api_id="str", issue_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_api_issue_attachment_get_entity_tag(self, resource_group): api_id="str", issue_id="str", attachment_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_api_issue_attachment_get(self, resource_group): api_id="str", issue_id="str", attachment_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ def test_api_issue_attachment_create_or_update(self, resource_group): "title": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -95,7 +95,7 @@ def test_api_issue_attachment_delete(self, resource_group): issue_id="str", attachment_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations_async.py index 5ef24d6cd936..3ac6f36ebc11 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations_async.py @@ -27,7 +27,7 @@ async def test_api_issue_attachment_list_by_service(self, resource_group): service_name="str", api_id="str", issue_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_api_issue_attachment_get_entity_tag(self, resource_group): api_id="str", issue_id="str", attachment_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_api_issue_attachment_get(self, resource_group): api_id="str", issue_id="str", attachment_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,7 +80,7 @@ async def test_api_issue_attachment_create_or_update(self, resource_group): "title": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -96,7 +96,7 @@ async def test_api_issue_attachment_delete(self, resource_group): issue_id="str", attachment_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations.py index b47d46e4e27f..8dc9bf72cfa3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations.py @@ -26,7 +26,7 @@ def test_api_issue_comment_list_by_service(self, resource_group): service_name="str", api_id="str", issue_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_api_issue_comment_get_entity_tag(self, resource_group): api_id="str", issue_id="str", comment_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_api_issue_comment_get(self, resource_group): api_id="str", issue_id="str", comment_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ def test_api_issue_comment_create_or_update(self, resource_group): "type": "str", "userId": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -95,7 +95,7 @@ def test_api_issue_comment_delete(self, resource_group): issue_id="str", comment_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations_async.py index 86e810e48e7c..fe299bf050e0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations_async.py @@ -27,7 +27,7 @@ async def test_api_issue_comment_list_by_service(self, resource_group): service_name="str", api_id="str", issue_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_api_issue_comment_get_entity_tag(self, resource_group): api_id="str", issue_id="str", comment_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_api_issue_comment_get(self, resource_group): api_id="str", issue_id="str", comment_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,7 +80,7 @@ async def test_api_issue_comment_create_or_update(self, resource_group): "type": "str", "userId": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -96,7 +96,7 @@ async def test_api_issue_comment_delete(self, resource_group): issue_id="str", comment_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations.py index 030361ebc0a2..c6c7613e4994 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations.py @@ -25,7 +25,7 @@ def test_api_issue_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_api_issue_get_entity_tag(self, resource_group): service_name="str", api_id="str", issue_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_api_issue_get(self, resource_group): service_name="str", api_id="str", issue_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -78,7 +78,7 @@ def test_api_issue_create_or_update(self, resource_group): "type": "str", "userId": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -101,7 +101,7 @@ def test_api_issue_update(self, resource_group): "title": "str", "userId": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -116,7 +116,7 @@ def test_api_issue_delete(self, resource_group): api_id="str", issue_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations_async.py index 421785f1c6ce..e124709cad5d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations_async.py @@ -26,7 +26,7 @@ async def test_api_issue_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_api_issue_get_entity_tag(self, resource_group): service_name="str", api_id="str", issue_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_api_issue_get(self, resource_group): service_name="str", api_id="str", issue_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ async def test_api_issue_create_or_update(self, resource_group): "type": "str", "userId": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -102,7 +102,7 @@ async def test_api_issue_update(self, resource_group): "title": "str", "userId": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -117,7 +117,7 @@ async def test_api_issue_delete(self, resource_group): api_id="str", issue_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations.py index 59e8ff045bbd..dc85b23295f3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations.py @@ -24,7 +24,7 @@ def test_api_management_gateway_skus_list_available_skus(self, resource_group): response = self.client.api_management_gateway_skus.list_available_skus( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations_async.py index 7dd08286ae3c..115bab16357c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations_async.py @@ -25,7 +25,7 @@ async def test_api_management_gateway_skus_list_available_skus(self, resource_gr response = self.client.api_management_gateway_skus.list_available_skus( resource_group_name=resource_group.name, gateway_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations.py index 5132e75f5469..778113bc4eae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations.py @@ -22,7 +22,7 @@ def setup_method(self, method): @recorded_by_proxy def test_api_management_operations_list(self, resource_group): response = self.client.api_management_operations.list( - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations_async.py index 7bc366aca259..6bb3fd48f13b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations_async.py @@ -23,7 +23,7 @@ def setup_method(self, method): @recorded_by_proxy_async async def test_api_management_operations_list(self, resource_group): response = self.client.api_management_operations.list( - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations.py index cf6ef3928e0d..1e5adc1a47d0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations.py @@ -32,7 +32,7 @@ def test_api_management_service_begin_restore(self, resource_group): "accessType": "AccessKey", "clientId": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -52,7 +52,7 @@ def test_api_management_service_begin_backup(self, resource_group): "accessType": "AccessKey", "clientId": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -158,6 +158,7 @@ def test_api_management_service_begin_create_or_update(self, resource_group): "publicIPAddresses": ["str"], "publicIpAddressId": "str", "publicNetworkAccess": "str", + "releaseChannel": "str", "restore": False, "scmUrl": "str", "systemData": { @@ -173,9 +174,10 @@ def test_api_management_service_begin_create_or_update(self, resource_group): "type": "str", "virtualNetworkConfiguration": {"subnetResourceId": "str", "subnetname": "str", "vnetid": "str"}, "virtualNetworkType": "str", + "zoneRedundant": False, "zones": ["str"], }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -279,6 +281,7 @@ def test_api_management_service_begin_update(self, resource_group): "publicNetworkAccess": "str", "publisherEmail": "str", "publisherName": "str", + "releaseChannel": "str", "restore": False, "scmUrl": "str", "sku": {"capacity": 0, "name": "str"}, @@ -287,9 +290,10 @@ def test_api_management_service_begin_update(self, resource_group): "type": "str", "virtualNetworkConfiguration": {"subnetResourceId": "str", "subnetname": "str", "vnetid": "str"}, "virtualNetworkType": "str", + "zoneRedundant": False, "zones": ["str"], }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -301,7 +305,7 @@ def test_api_management_service_get(self, resource_group): response = self.client.api_management_service.get( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -313,7 +317,7 @@ def test_api_management_service_begin_delete(self, resource_group): response = self.client.api_management_service.begin_delete( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -325,7 +329,7 @@ def test_api_management_service_begin_migrate_to_stv2(self, resource_group): response = self.client.api_management_service.begin_migrate_to_stv2( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -336,7 +340,7 @@ def test_api_management_service_begin_migrate_to_stv2(self, resource_group): def test_api_management_service_list_by_resource_group(self, resource_group): response = self.client.api_management_service.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -346,7 +350,7 @@ def test_api_management_service_list_by_resource_group(self, resource_group): @recorded_by_proxy def test_api_management_service_list(self, resource_group): response = self.client.api_management_service.list( - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -358,7 +362,7 @@ def test_api_management_service_get_sso_token(self, resource_group): response = self.client.api_management_service.get_sso_token( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -369,7 +373,7 @@ def test_api_management_service_get_sso_token(self, resource_group): def test_api_management_service_check_name_availability(self, resource_group): response = self.client.api_management_service.check_name_availability( parameters={"name": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -379,7 +383,7 @@ def test_api_management_service_check_name_availability(self, resource_group): @recorded_by_proxy def test_api_management_service_get_domain_ownership_identifier(self, resource_group): response = self.client.api_management_service.get_domain_ownership_identifier( - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -391,7 +395,19 @@ def test_api_management_service_begin_apply_network_configuration_updates(self, response = self.client.api_management_service.begin_apply_network_configuration_updates( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_management_service_begin_refresh_hostnames(self, resource_group): + response = self.client.api_management_service.begin_refresh_hostnames( + resource_group_name=resource_group.name, + service_name="str", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations_async.py index a21ea2202196..8001a039ffb5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations_async.py @@ -34,7 +34,7 @@ async def test_api_management_service_begin_restore(self, resource_group): "accessType": "AccessKey", "clientId": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -56,7 +56,7 @@ async def test_api_management_service_begin_backup(self, resource_group): "accessType": "AccessKey", "clientId": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -164,6 +164,7 @@ async def test_api_management_service_begin_create_or_update(self, resource_grou "publicIPAddresses": ["str"], "publicIpAddressId": "str", "publicNetworkAccess": "str", + "releaseChannel": "str", "restore": False, "scmUrl": "str", "systemData": { @@ -179,9 +180,10 @@ async def test_api_management_service_begin_create_or_update(self, resource_grou "type": "str", "virtualNetworkConfiguration": {"subnetResourceId": "str", "subnetname": "str", "vnetid": "str"}, "virtualNetworkType": "str", + "zoneRedundant": False, "zones": ["str"], }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -287,6 +289,7 @@ async def test_api_management_service_begin_update(self, resource_group): "publicNetworkAccess": "str", "publisherEmail": "str", "publisherName": "str", + "releaseChannel": "str", "restore": False, "scmUrl": "str", "sku": {"capacity": 0, "name": "str"}, @@ -295,9 +298,10 @@ async def test_api_management_service_begin_update(self, resource_group): "type": "str", "virtualNetworkConfiguration": {"subnetResourceId": "str", "subnetname": "str", "vnetid": "str"}, "virtualNetworkType": "str", + "zoneRedundant": False, "zones": ["str"], }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -310,7 +314,7 @@ async def test_api_management_service_get(self, resource_group): response = await self.client.api_management_service.get( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -323,7 +327,7 @@ async def test_api_management_service_begin_delete(self, resource_group): await self.client.api_management_service.begin_delete( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -337,7 +341,7 @@ async def test_api_management_service_begin_migrate_to_stv2(self, resource_group await self.client.api_management_service.begin_migrate_to_stv2( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -349,7 +353,7 @@ async def test_api_management_service_begin_migrate_to_stv2(self, resource_group async def test_api_management_service_list_by_resource_group(self, resource_group): response = self.client.api_management_service.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -359,7 +363,7 @@ async def test_api_management_service_list_by_resource_group(self, resource_grou @recorded_by_proxy_async async def test_api_management_service_list(self, resource_group): response = self.client.api_management_service.list( - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -371,7 +375,7 @@ async def test_api_management_service_get_sso_token(self, resource_group): response = await self.client.api_management_service.get_sso_token( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -382,7 +386,7 @@ async def test_api_management_service_get_sso_token(self, resource_group): async def test_api_management_service_check_name_availability(self, resource_group): response = await self.client.api_management_service.check_name_availability( parameters={"name": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -392,7 +396,7 @@ async def test_api_management_service_check_name_availability(self, resource_gro @recorded_by_proxy_async async def test_api_management_service_get_domain_ownership_identifier(self, resource_group): response = await self.client.api_management_service.get_domain_ownership_identifier( - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -405,7 +409,21 @@ async def test_api_management_service_begin_apply_network_configuration_updates( await self.client.api_management_service.begin_apply_network_configuration_updates( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_management_service_begin_refresh_hostnames(self, resource_group): + response = await ( + await self.client.api_management_service.begin_refresh_hostnames( + resource_group_name=resource_group.name, + service_name="str", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations.py index 891469875297..f99ebc98caad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations.py @@ -24,7 +24,7 @@ def test_api_management_service_skus_list_available_service_skus(self, resource_ response = self.client.api_management_service_skus.list_available_service_skus( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations_async.py index e183a49dc3a1..c9a91c8d7386 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations_async.py @@ -25,7 +25,7 @@ async def test_api_management_service_skus_list_available_service_skus(self, res response = self.client.api_management_service_skus.list_available_service_skus( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations.py index 04ebf496b394..a73cefd8fcd7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations.py @@ -22,7 +22,7 @@ def setup_method(self, method): @recorded_by_proxy def test_api_management_skus_list(self, resource_group): response = self.client.api_management_skus.list( - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations_async.py index 37bb3a1d6b2a..eb748831c23c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations_async.py @@ -23,7 +23,7 @@ def setup_method(self, method): @recorded_by_proxy_async async def test_api_management_skus_list(self, resource_group): response = self.client.api_management_skus.list( - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations.py index 6239d5e109bd..e28f8bd1e307 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations.py @@ -25,7 +25,7 @@ def test_api_management_workspace_link_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations_async.py index 6664a0989dd7..aad93181e943 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations_async.py @@ -26,7 +26,7 @@ async def test_api_management_workspace_link_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations.py index 5b5cbe81af50..ae2aa7a186c8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations.py @@ -24,7 +24,7 @@ def test_api_management_workspace_links_list_by_service(self, resource_group): response = self.client.api_management_workspace_links.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations_async.py index 6cb4bd3cab21..5bae4ab16a2a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations_async.py @@ -25,7 +25,7 @@ async def test_api_management_workspace_links_list_by_service(self, resource_gro response = self.client.api_management_workspace_links.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations.py index f4222651a3cc..1a3a446e70da 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations.py @@ -25,7 +25,7 @@ def test_api_operation_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_api_operation_get_entity_tag(self, resource_group): service_name="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_api_operation_get(self, resource_group): service_name="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -206,7 +206,7 @@ def test_api_operation_create_or_update(self, resource_group): "type": "str", "urlTemplate": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -357,7 +357,7 @@ def test_api_operation_update(self, resource_group): ], "urlTemplate": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -372,7 +372,7 @@ def test_api_operation_delete(self, resource_group): api_id="str", operation_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations_async.py index 7b9939618409..0d2763b6794e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations_async.py @@ -26,7 +26,7 @@ async def test_api_operation_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_api_operation_get_entity_tag(self, resource_group): service_name="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_api_operation_get(self, resource_group): service_name="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -207,7 +207,7 @@ async def test_api_operation_create_or_update(self, resource_group): "type": "str", "urlTemplate": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -358,7 +358,7 @@ async def test_api_operation_update(self, resource_group): ], "urlTemplate": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -373,7 +373,7 @@ async def test_api_operation_delete(self, resource_group): api_id="str", operation_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations.py index 37a61ac16fa9..eed7b8a9cc6b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations.py @@ -26,7 +26,7 @@ def test_api_operation_policy_list_by_operation(self, resource_group): service_name="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_api_operation_policy_get_entity_tag(self, resource_group): api_id="str", operation_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_api_operation_policy_get(self, resource_group): api_id="str", operation_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_api_operation_policy_create_or_update(self, resource_group): operation_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -88,7 +88,7 @@ def test_api_operation_policy_delete(self, resource_group): operation_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations_async.py index 884e299d3c35..e5787a8d690b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations_async.py @@ -27,7 +27,7 @@ async def test_api_operation_policy_list_by_operation(self, resource_group): service_name="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_api_operation_policy_get_entity_tag(self, resource_group): api_id="str", operation_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_api_operation_policy_get(self, resource_group): api_id="str", operation_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_api_operation_policy_create_or_update(self, resource_group): operation_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -89,7 +89,7 @@ async def test_api_operation_policy_delete(self, resource_group): operation_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations.py index 61aa0159f690..858dffc8de05 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations.py @@ -24,7 +24,7 @@ def test_api_list_by_service(self, resource_group): response = self.client.api.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_api_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_api_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -104,7 +104,7 @@ def test_api_begin_create_or_update(self, resource_group): "value": "str", "wsdlSelector": {"wsdlEndpointName": "str", "wsdlServiceName": "str"}, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -144,7 +144,7 @@ def test_api_update(self, resource_group): "termsOfServiceUrl": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -158,7 +158,7 @@ def test_api_begin_delete(self, resource_group): service_name="str", api_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -170,7 +170,7 @@ def test_api_list_by_tags(self, resource_group): response = self.client.api.list_by_tags( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations_async.py index f7c38649d260..e57742c6f8f1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations_async.py @@ -25,7 +25,7 @@ async def test_api_list_by_service(self, resource_group): response = self.client.api.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_api_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_api_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -108,7 +108,7 @@ async def test_api_begin_create_or_update(self, resource_group): "value": "str", "wsdlSelector": {"wsdlEndpointName": "str", "wsdlServiceName": "str"}, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -149,7 +149,7 @@ async def test_api_update(self, resource_group): "termsOfServiceUrl": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -164,7 +164,7 @@ async def test_api_begin_delete(self, resource_group): service_name="str", api_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -177,7 +177,7 @@ async def test_api_list_by_tags(self, resource_group): response = self.client.api.list_by_tags( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations.py index c047fc4aa653..73175a4c0398 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations.py @@ -25,7 +25,7 @@ def test_api_policy_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_api_policy_get_entity_tag(self, resource_group): service_name="str", api_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_api_policy_get(self, resource_group): service_name="str", api_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_api_policy_create_or_update(self, resource_group): api_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -83,7 +83,7 @@ def test_api_policy_delete(self, resource_group): api_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations_async.py index ba7e5847c070..4fe0743f86ad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations_async.py @@ -26,7 +26,7 @@ async def test_api_policy_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_api_policy_get_entity_tag(self, resource_group): service_name="str", api_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_api_policy_get(self, resource_group): service_name="str", api_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_api_policy_create_or_update(self, resource_group): api_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -84,7 +84,7 @@ async def test_api_policy_delete(self, resource_group): api_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations.py index a96d6d6e4dfa..4733ca3d8526 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations.py @@ -25,7 +25,7 @@ def test_api_product_list_by_apis(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations_async.py index 56a7f0515bf4..da8c6abab202 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations_async.py @@ -26,7 +26,7 @@ async def test_api_product_list_by_apis(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations.py index 071c1ccdd6b4..1c2eac03cf7a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations.py @@ -25,7 +25,7 @@ def test_api_release_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_api_release_get_entity_tag(self, resource_group): service_name="str", api_id="str", release_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_api_release_get(self, resource_group): service_name="str", api_id="str", release_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -76,7 +76,7 @@ def test_api_release_create_or_update(self, resource_group): "type": "str", "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -100,7 +100,7 @@ def test_api_release_update(self, resource_group): "type": "str", "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -115,7 +115,7 @@ def test_api_release_delete(self, resource_group): api_id="str", release_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations_async.py index bda79ff8870d..94d9802f1001 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations_async.py @@ -26,7 +26,7 @@ async def test_api_release_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_api_release_get_entity_tag(self, resource_group): service_name="str", api_id="str", release_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_api_release_get(self, resource_group): service_name="str", api_id="str", release_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ async def test_api_release_create_or_update(self, resource_group): "type": "str", "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -101,7 +101,7 @@ async def test_api_release_update(self, resource_group): "type": "str", "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -116,7 +116,7 @@ async def test_api_release_delete(self, resource_group): api_id="str", release_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations.py index affb193bd59e..b91a86cc05c4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations.py @@ -25,7 +25,7 @@ def test_api_revision_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations_async.py index a11f28cdd786..d15e86c4b645 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations_async.py @@ -26,7 +26,7 @@ async def test_api_revision_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations.py index 4a44a4c40193..4ea6178ad4fa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations.py @@ -25,7 +25,7 @@ def test_api_schema_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_api_schema_get_entity_tag(self, resource_group): service_name="str", api_id="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_api_schema_get(self, resource_group): service_name="str", api_id="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ def test_api_schema_begin_create_or_update(self, resource_group): "type": "str", "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -92,7 +92,7 @@ def test_api_schema_delete(self, resource_group): api_id="str", schema_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations_async.py index d638d5b93116..dfcc64cc5c87 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations_async.py @@ -26,7 +26,7 @@ async def test_api_schema_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_api_schema_get_entity_tag(self, resource_group): service_name="str", api_id="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_api_schema_get(self, resource_group): service_name="str", api_id="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ async def test_api_schema_begin_create_or_update(self, resource_group): "type": "str", "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -95,7 +95,7 @@ async def test_api_schema_delete(self, resource_group): api_id="str", schema_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations.py index 63011e1f6529..0eb45453c43b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations.py @@ -25,7 +25,7 @@ def test_api_tag_description_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_api_tag_description_get_entity_tag(self, resource_group): service_name="str", api_id="str", tag_description_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_api_tag_description_get(self, resource_group): service_name="str", api_id="str", tag_description_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_api_tag_description_create_or_update(self, resource_group): api_id="str", tag_description_id="str", parameters={"description": "str", "externalDocsDescription": "str", "externalDocsUrl": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -83,7 +83,7 @@ def test_api_tag_description_delete(self, resource_group): api_id="str", tag_description_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations_async.py index 68758367a92f..a165eb3a13b7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations_async.py @@ -26,7 +26,7 @@ async def test_api_tag_description_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_api_tag_description_get_entity_tag(self, resource_group): service_name="str", api_id="str", tag_description_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_api_tag_description_get(self, resource_group): service_name="str", api_id="str", tag_description_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_api_tag_description_create_or_update(self, resource_group): api_id="str", tag_description_id="str", parameters={"description": "str", "externalDocsDescription": "str", "externalDocsUrl": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -84,7 +84,7 @@ async def test_api_tag_description_delete(self, resource_group): api_id="str", tag_description_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations.py new file mode 100644 index 000000000000..523b5b7639ca --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.apimanagement import ApiManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestApiManagementApiToolOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ApiManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_tool_list_by_api(self, resource_group): + response = self.client.api_tool.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + api_version="2025-03-01-preview", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_tool_get_entity_tag(self, resource_group): + response = self.client.api_tool.get_entity_tag( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + tool_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_tool_get(self, resource_group): + response = self.client.api_tool.get( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + tool_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_tool_create_or_update(self, resource_group): + response = self.client.api_tool.create_or_update( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + tool_id="str", + parameters={ + "description": "str", + "displayName": "str", + "id": "str", + "name": "str", + "operationId": "str", + "type": "str", + }, + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_tool_update(self, resource_group): + response = self.client.api_tool.update( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + tool_id="str", + parameters={ + "description": "str", + "displayName": "str", + "id": "str", + "name": "str", + "operationId": "str", + "type": "str", + }, + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_tool_delete(self, resource_group): + response = self.client.api_tool.delete( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + tool_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations_async.py new file mode 100644 index 000000000000..44deb567f69e --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations_async.py @@ -0,0 +1,119 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.apimanagement.aio import ApiManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestApiManagementApiToolOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ApiManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_tool_list_by_api(self, resource_group): + response = self.client.api_tool.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + api_version="2025-03-01-preview", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_tool_get_entity_tag(self, resource_group): + response = await self.client.api_tool.get_entity_tag( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + tool_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_tool_get(self, resource_group): + response = await self.client.api_tool.get( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + tool_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_tool_create_or_update(self, resource_group): + response = await self.client.api_tool.create_or_update( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + tool_id="str", + parameters={ + "description": "str", + "displayName": "str", + "id": "str", + "name": "str", + "operationId": "str", + "type": "str", + }, + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_tool_update(self, resource_group): + response = await self.client.api_tool.update( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + tool_id="str", + parameters={ + "description": "str", + "displayName": "str", + "id": "str", + "name": "str", + "operationId": "str", + "type": "str", + }, + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_tool_delete(self, resource_group): + response = await self.client.api_tool.delete( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + tool_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations.py index be5512d9849f..040a7433f67a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations.py @@ -24,7 +24,7 @@ def test_api_version_set_list_by_service(self, resource_group): response = self.client.api_version_set.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_api_version_set_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", version_set_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_api_version_set_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", version_set_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ def test_api_version_set_create_or_update(self, resource_group): "versionQueryName": "str", "versioningScheme": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -94,7 +94,7 @@ def test_api_version_set_update(self, resource_group): "versionQueryName": "str", "versioningScheme": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -108,7 +108,7 @@ def test_api_version_set_delete(self, resource_group): service_name="str", version_set_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations_async.py index ab7b1eb7bdec..466599699eb1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations_async.py @@ -25,7 +25,7 @@ async def test_api_version_set_list_by_service(self, resource_group): response = self.client.api_version_set.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_api_version_set_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", version_set_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_api_version_set_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", version_set_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -74,7 +74,7 @@ async def test_api_version_set_create_or_update(self, resource_group): "versionQueryName": "str", "versioningScheme": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -95,7 +95,7 @@ async def test_api_version_set_update(self, resource_group): "versionQueryName": "str", "versioningScheme": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -109,7 +109,7 @@ async def test_api_version_set_delete(self, resource_group): service_name="str", version_set_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations.py index 05e241ed09ba..d24ecc5aa2ae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations.py @@ -25,7 +25,7 @@ def test_api_wiki_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -38,7 +38,7 @@ def test_api_wiki_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -52,7 +52,7 @@ def test_api_wiki_create_or_update(self, resource_group): service_name="str", api_id="str", parameters={"documents": [{"documentationId": "str"}], "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +67,7 @@ def test_api_wiki_update(self, resource_group): api_id="str", if_match="str", parameters={"documents": [{"documentationId": "str"}]}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -81,7 +81,7 @@ def test_api_wiki_delete(self, resource_group): service_name="str", api_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations_async.py index 88a8e0acfecf..bebb87ed10e4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations_async.py @@ -26,7 +26,7 @@ async def test_api_wiki_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -39,7 +39,7 @@ async def test_api_wiki_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ async def test_api_wiki_create_or_update(self, resource_group): service_name="str", api_id="str", parameters={"documents": [{"documentationId": "str"}], "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ async def test_api_wiki_update(self, resource_group): api_id="str", if_match="str", parameters={"documents": [{"documentationId": "str"}]}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -82,7 +82,7 @@ async def test_api_wiki_delete(self, resource_group): service_name="str", api_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations.py index abad6f100ddc..218acd4b3621 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations.py @@ -25,7 +25,7 @@ def test_api_wikis_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations_async.py index a28454b2d1b9..bac8419a56ae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations_async.py @@ -26,7 +26,7 @@ async def test_api_wikis_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_async.py index 505643c9f8bf..81f381166196 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_async.py @@ -39,7 +39,7 @@ async def test_begin_perform_connectivity_check_async(self, resource_group): } }, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations.py index b82eec07af03..5cde8745c5a0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations.py @@ -26,7 +26,7 @@ def test_authorization_access_policy_list_by_authorization(self, resource_group) service_name="str", authorization_provider_id="str", authorization_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_authorization_access_policy_get(self, resource_group): authorization_provider_id="str", authorization_id="str", authorization_access_policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,7 +64,7 @@ def test_authorization_access_policy_create_or_update(self, resource_group): "tenantId": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,7 +80,7 @@ def test_authorization_access_policy_delete(self, resource_group): authorization_id="str", authorization_access_policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations_async.py index c885ad376933..aeee0412fd32 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations_async.py @@ -27,7 +27,7 @@ async def test_authorization_access_policy_list_by_authorization(self, resource_ service_name="str", authorization_provider_id="str", authorization_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_authorization_access_policy_get(self, resource_group): authorization_provider_id="str", authorization_id="str", authorization_access_policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,7 +65,7 @@ async def test_authorization_access_policy_create_or_update(self, resource_group "tenantId": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -81,7 +81,7 @@ async def test_authorization_access_policy_delete(self, resource_group): authorization_id="str", authorization_access_policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations.py index 4422ddad8a4c..177600cac731 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations.py @@ -27,7 +27,7 @@ def test_authorization_login_links_post(self, resource_group): authorization_provider_id="str", authorization_id="str", parameters={"postLoginRedirectUrl": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations_async.py index c8a16647634e..26019a5005df 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations_async.py @@ -28,7 +28,7 @@ async def test_authorization_login_links_post(self, resource_group): authorization_provider_id="str", authorization_id="str", parameters={"postLoginRedirectUrl": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations.py index 0e7b08fcd8b4..aa702a01878a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations.py @@ -25,7 +25,7 @@ def test_authorization_list_by_authorization_provider(self, resource_group): resource_group_name=resource_group.name, service_name="str", authorization_provider_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_authorization_get(self, resource_group): service_name="str", authorization_provider_id="str", authorization_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -63,7 +63,7 @@ def test_authorization_create_or_update(self, resource_group): "status": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -78,7 +78,7 @@ def test_authorization_delete(self, resource_group): authorization_provider_id="str", authorization_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -93,7 +93,7 @@ def test_authorization_confirm_consent_code(self, resource_group): authorization_provider_id="str", authorization_id="str", parameters={"consentCode": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations_async.py index 152f105e8183..1a81fbeeb193 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations_async.py @@ -26,7 +26,7 @@ async def test_authorization_list_by_authorization_provider(self, resource_group resource_group_name=resource_group.name, service_name="str", authorization_provider_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_authorization_get(self, resource_group): service_name="str", authorization_provider_id="str", authorization_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,7 +64,7 @@ async def test_authorization_create_or_update(self, resource_group): "status": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ async def test_authorization_delete(self, resource_group): authorization_provider_id="str", authorization_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -94,7 +94,7 @@ async def test_authorization_confirm_consent_code(self, resource_group): authorization_provider_id="str", authorization_id="str", parameters={"consentCode": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations.py index bffd95aeaef3..4f1bd6b51cbc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations.py @@ -24,7 +24,7 @@ def test_authorization_provider_list_by_service(self, resource_group): response = self.client.authorization_provider.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_authorization_provider_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", authorization_provider_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,11 +57,16 @@ def test_authorization_provider_create_or_update(self, resource_group): "name": "str", "oauth2": { "grantTypes": {"authorizationCode": {"str": "str"}, "clientCredentials": {"str": "str"}}, + "keyVault": { + "lastStatus": {"code": "str", "message": "str", "timeStampUtc": "2020-02-20 00:00:00"}, + "secretIdentifier": "str", + "updated": "2020-02-20 00:00:00", + }, "redirectUrl": "str", }, "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -75,7 +80,20 @@ def test_authorization_provider_delete(self, resource_group): service_name="str", authorization_provider_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_authorization_provider_refresh_secret(self, resource_group): + response = self.client.authorization_provider.refresh_secret( + resource_group_name=resource_group.name, + service_name="str", + authorization_provider_id="str", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations_async.py index 791020a0ce9b..7ffa066ca9d1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations_async.py @@ -25,7 +25,7 @@ async def test_authorization_provider_list_by_service(self, resource_group): response = self.client.authorization_provider.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_authorization_provider_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", authorization_provider_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -58,11 +58,16 @@ async def test_authorization_provider_create_or_update(self, resource_group): "name": "str", "oauth2": { "grantTypes": {"authorizationCode": {"str": "str"}, "clientCredentials": {"str": "str"}}, + "keyVault": { + "lastStatus": {"code": "str", "message": "str", "timeStampUtc": "2020-02-20 00:00:00"}, + "secretIdentifier": "str", + "updated": "2020-02-20 00:00:00", + }, "redirectUrl": "str", }, "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -76,7 +81,20 @@ async def test_authorization_provider_delete(self, resource_group): service_name="str", authorization_provider_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_authorization_provider_refresh_secret(self, resource_group): + response = await self.client.authorization_provider.refresh_secret( + resource_group_name=resource_group.name, + service_name="str", + authorization_provider_id="str", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations.py index 4d75af7a55f6..13b1f7a09fe3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations.py @@ -24,7 +24,7 @@ def test_authorization_server_list_by_service(self, resource_group): response = self.client.authorization_server.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_authorization_server_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", authsid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_authorization_server_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", authsid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -86,7 +86,7 @@ def test_authorization_server_create_or_update(self, resource_group): "useInApiDocumentation": bool, "useInTestConsole": bool, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -123,7 +123,7 @@ def test_authorization_server_update(self, resource_group): "useInApiDocumentation": bool, "useInTestConsole": bool, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -137,7 +137,7 @@ def test_authorization_server_delete(self, resource_group): service_name="str", authsid="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -150,7 +150,7 @@ def test_authorization_server_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", authsid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations_async.py index 04fe00c4bf41..545660aeb63f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations_async.py @@ -25,7 +25,7 @@ async def test_authorization_server_list_by_service(self, resource_group): response = self.client.authorization_server.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_authorization_server_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", authsid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_authorization_server_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", authsid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -87,7 +87,7 @@ async def test_authorization_server_create_or_update(self, resource_group): "useInApiDocumentation": bool, "useInTestConsole": bool, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -124,7 +124,7 @@ async def test_authorization_server_update(self, resource_group): "useInApiDocumentation": bool, "useInTestConsole": bool, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -138,7 +138,7 @@ async def test_authorization_server_delete(self, resource_group): service_name="str", authsid="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -151,7 +151,7 @@ async def test_authorization_server_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", authsid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations.py index 36a5258d4163..c188b0e83572 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations.py @@ -24,7 +24,7 @@ def test_backend_list_by_service(self, resource_group): response = self.client.backend.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_backend_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", backend_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_backend_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", backend_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,6 +64,7 @@ def test_backend_create_or_update(self, resource_group): service_name="str", backend_id="str", parameters={ + "azureRegion": "str", "circuitBreaker": { "rules": [ { @@ -75,6 +76,7 @@ def test_backend_create_or_update(self, resource_group): "percentage": 0, "statusCodeRanges": [{"max": 0, "min": 0}], }, + "failureResponse": {"statusCode": 0}, "name": "str", "tripDuration": "1 day, 0:00:00", } @@ -90,7 +92,11 @@ def test_backend_create_or_update(self, resource_group): "description": "str", "id": "str", "name": "str", - "pool": {"services": [{"id": "str", "priority": 0, "weight": 0}]}, + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, "properties": { "serviceFabricCluster": { "managementEndpoints": ["str"], @@ -105,11 +111,16 @@ def test_backend_create_or_update(self, resource_group): "proxy": {"url": "str", "password": "str", "username": "str"}, "resourceId": "str", "title": "str", - "tls": {"validateCertificateChain": True, "validateCertificateName": True}, + "tls": { + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + "validateCertificateChain": True, + "validateCertificateName": True, + }, "type": "str", "url": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -124,6 +135,7 @@ def test_backend_update(self, resource_group): backend_id="str", if_match="str", parameters={ + "azureRegion": "str", "circuitBreaker": { "rules": [ { @@ -135,6 +147,7 @@ def test_backend_update(self, resource_group): "percentage": 0, "statusCodeRanges": [{"max": 0, "min": 0}], }, + "failureResponse": {"statusCode": 0}, "name": "str", "tripDuration": "1 day, 0:00:00", } @@ -148,7 +161,11 @@ def test_backend_update(self, resource_group): "query": {"str": ["str"]}, }, "description": "str", - "pool": {"services": [{"id": "str", "priority": 0, "weight": 0}]}, + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, "properties": { "serviceFabricCluster": { "managementEndpoints": ["str"], @@ -163,11 +180,16 @@ def test_backend_update(self, resource_group): "proxy": {"url": "str", "password": "str", "username": "str"}, "resourceId": "str", "title": "str", - "tls": {"validateCertificateChain": True, "validateCertificateName": True}, + "tls": { + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + "validateCertificateChain": True, + "validateCertificateName": True, + }, "type": "str", "url": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -181,7 +203,7 @@ def test_backend_delete(self, resource_group): service_name="str", backend_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -194,7 +216,7 @@ def test_backend_reconnect(self, resource_group): resource_group_name=resource_group.name, service_name="str", backend_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations_async.py index 2dc9442159bd..2526fb42f4fa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations_async.py @@ -25,7 +25,7 @@ async def test_backend_list_by_service(self, resource_group): response = self.client.backend.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_backend_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", backend_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_backend_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", backend_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,6 +65,7 @@ async def test_backend_create_or_update(self, resource_group): service_name="str", backend_id="str", parameters={ + "azureRegion": "str", "circuitBreaker": { "rules": [ { @@ -76,6 +77,7 @@ async def test_backend_create_or_update(self, resource_group): "percentage": 0, "statusCodeRanges": [{"max": 0, "min": 0}], }, + "failureResponse": {"statusCode": 0}, "name": "str", "tripDuration": "1 day, 0:00:00", } @@ -91,7 +93,11 @@ async def test_backend_create_or_update(self, resource_group): "description": "str", "id": "str", "name": "str", - "pool": {"services": [{"id": "str", "priority": 0, "weight": 0}]}, + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, "properties": { "serviceFabricCluster": { "managementEndpoints": ["str"], @@ -106,11 +112,16 @@ async def test_backend_create_or_update(self, resource_group): "proxy": {"url": "str", "password": "str", "username": "str"}, "resourceId": "str", "title": "str", - "tls": {"validateCertificateChain": True, "validateCertificateName": True}, + "tls": { + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + "validateCertificateChain": True, + "validateCertificateName": True, + }, "type": "str", "url": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -125,6 +136,7 @@ async def test_backend_update(self, resource_group): backend_id="str", if_match="str", parameters={ + "azureRegion": "str", "circuitBreaker": { "rules": [ { @@ -136,6 +148,7 @@ async def test_backend_update(self, resource_group): "percentage": 0, "statusCodeRanges": [{"max": 0, "min": 0}], }, + "failureResponse": {"statusCode": 0}, "name": "str", "tripDuration": "1 day, 0:00:00", } @@ -149,7 +162,11 @@ async def test_backend_update(self, resource_group): "query": {"str": ["str"]}, }, "description": "str", - "pool": {"services": [{"id": "str", "priority": 0, "weight": 0}]}, + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, "properties": { "serviceFabricCluster": { "managementEndpoints": ["str"], @@ -164,11 +181,16 @@ async def test_backend_update(self, resource_group): "proxy": {"url": "str", "password": "str", "username": "str"}, "resourceId": "str", "title": "str", - "tls": {"validateCertificateChain": True, "validateCertificateName": True}, + "tls": { + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + "validateCertificateChain": True, + "validateCertificateName": True, + }, "type": "str", "url": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -182,7 +204,7 @@ async def test_backend_delete(self, resource_group): service_name="str", backend_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -195,7 +217,7 @@ async def test_backend_reconnect(self, resource_group): resource_group_name=resource_group.name, service_name="str", backend_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations.py index b89a0542714c..097108ed9c2a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations.py @@ -24,7 +24,7 @@ def test_cache_list_by_service(self, resource_group): response = self.client.cache.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_cache_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", cache_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_cache_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", cache_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_cache_create_or_update(self, resource_group): "type": "str", "useFromLocation": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -87,7 +87,7 @@ def test_cache_update(self, resource_group): cache_id="str", if_match="str", parameters={"connectionString": "str", "description": "str", "resourceId": "str", "useFromLocation": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -101,7 +101,7 @@ def test_cache_delete(self, resource_group): service_name="str", cache_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations_async.py index 66922aa1090c..86b614e7be70 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations_async.py @@ -25,7 +25,7 @@ async def test_cache_list_by_service(self, resource_group): response = self.client.cache.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_cache_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", cache_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_cache_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", cache_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_cache_create_or_update(self, resource_group): "type": "str", "useFromLocation": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -88,7 +88,7 @@ async def test_cache_update(self, resource_group): cache_id="str", if_match="str", parameters={"connectionString": "str", "description": "str", "resourceId": "str", "useFromLocation": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -102,7 +102,7 @@ async def test_cache_delete(self, resource_group): service_name="str", cache_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations.py index 18199986b08e..2b127ff89313 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations.py @@ -24,7 +24,7 @@ def test_certificate_list_by_service(self, resource_group): response = self.client.certificate.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_certificate_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_certificate_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_certificate_create_or_update(self, resource_group): "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, "password": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -82,7 +82,7 @@ def test_certificate_delete(self, resource_group): service_name="str", certificate_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -95,7 +95,7 @@ def test_certificate_refresh_secret(self, resource_group): resource_group_name=resource_group.name, service_name="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations_async.py index 5463a2036327..3a3ff9a47711 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations_async.py @@ -25,7 +25,7 @@ async def test_certificate_list_by_service(self, resource_group): response = self.client.certificate.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_certificate_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_certificate_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_certificate_create_or_update(self, resource_group): "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, "password": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -83,7 +83,7 @@ async def test_certificate_delete(self, resource_group): service_name="str", certificate_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -96,7 +96,7 @@ async def test_certificate_refresh_secret(self, resource_group): resource_group_name=resource_group.name, service_name="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations.py new file mode 100644 index 000000000000..ec71ade1b364 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.apimanagement import ApiManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestApiManagementClientApplicationOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ApiManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_client_application_list_by_service(self, resource_group): + response = self.client.client_application.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + api_version="2025-03-01-preview", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_client_application_get_entity_tag(self, resource_group): + response = self.client.client_application.get_entity_tag( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_client_application_get(self, resource_group): + response = self.client.client_application.get( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_client_application_create_or_update(self, resource_group): + response = self.client.client_application.create_or_update( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + parameters={ + "description": "str", + "displayName": "str", + "entraApplicationId": "str", + "entraTenantId": "str", + "id": "str", + "name": "str", + "ownerId": "str", + "state": "str", + "type": "str", + }, + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_client_application_delete(self, resource_group): + response = self.client.client_application.delete( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_client_application_list_secrets(self, resource_group): + response = self.client.client_application.list_secrets( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations_async.py new file mode 100644 index 000000000000..c7ed9f573d25 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations_async.py @@ -0,0 +1,108 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.apimanagement.aio import ApiManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestApiManagementClientApplicationOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ApiManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_client_application_list_by_service(self, resource_group): + response = self.client.client_application.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + api_version="2025-03-01-preview", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_client_application_get_entity_tag(self, resource_group): + response = await self.client.client_application.get_entity_tag( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_client_application_get(self, resource_group): + response = await self.client.client_application.get( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_client_application_create_or_update(self, resource_group): + response = await self.client.client_application.create_or_update( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + parameters={ + "description": "str", + "displayName": "str", + "entraApplicationId": "str", + "entraTenantId": "str", + "id": "str", + "name": "str", + "ownerId": "str", + "state": "str", + "type": "str", + }, + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_client_application_delete(self, resource_group): + response = await self.client.client_application.delete( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_client_application_list_secrets(self, resource_group): + response = await self.client.client_application.list_secrets( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations.py new file mode 100644 index 000000000000..a6794c929542 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.apimanagement import ApiManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestApiManagementClientApplicationProductLinkOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ApiManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_client_application_product_link_list_by_client_applications(self, resource_group): + response = self.client.client_application_product_link.list_by_client_applications( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + api_version="2025-03-01-preview", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_client_application_product_link_get(self, resource_group): + response = self.client.client_application_product_link.get( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + client_application_product_link_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_client_application_product_link_create(self, resource_group): + response = self.client.client_application_product_link.create( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + client_application_product_link_id="str", + parameters={"id": "str", "name": "str", "productId": "str", "type": "str"}, + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_client_application_product_link_delete(self, resource_group): + response = self.client.client_application_product_link.delete( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + client_application_product_link_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations_async.py new file mode 100644 index 000000000000..b9208b26a3d0 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations_async.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.apimanagement.aio import ApiManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestApiManagementClientApplicationProductLinkOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ApiManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_client_application_product_link_list_by_client_applications(self, resource_group): + response = self.client.client_application_product_link.list_by_client_applications( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + api_version="2025-03-01-preview", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_client_application_product_link_get(self, resource_group): + response = await self.client.client_application_product_link.get( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + client_application_product_link_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_client_application_product_link_create(self, resource_group): + response = await self.client.client_application_product_link.create( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + client_application_product_link_id="str", + parameters={"id": "str", "name": "str", "productId": "str", "type": "str"}, + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_client_application_product_link_delete(self, resource_group): + response = await self.client.client_application_product_link.delete( + resource_group_name=resource_group.name, + service_name="str", + client_application_id="str", + client_application_product_link_id="str", + api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations.py index 5c9e97c02def..2bfb0cac3025 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations.py @@ -25,7 +25,7 @@ def test_content_item_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", content_type_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_content_item_get_entity_tag(self, resource_group): service_name="str", content_type_id="str", content_item_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_content_item_get(self, resource_group): service_name="str", content_type_id="str", content_item_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_content_item_create_or_update(self, resource_group): content_type_id="str", content_item_id="str", parameters={"id": "str", "name": "str", "properties": {"str": {}}, "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -83,7 +83,7 @@ def test_content_item_delete(self, resource_group): content_type_id="str", content_item_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations_async.py index cf0aeb06d22f..ecb5a4b4f240 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations_async.py @@ -26,7 +26,7 @@ async def test_content_item_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", content_type_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_content_item_get_entity_tag(self, resource_group): service_name="str", content_type_id="str", content_item_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_content_item_get(self, resource_group): service_name="str", content_type_id="str", content_item_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_content_item_create_or_update(self, resource_group): content_type_id="str", content_item_id="str", parameters={"id": "str", "name": "str", "properties": {"str": {}}, "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -84,7 +84,7 @@ async def test_content_item_delete(self, resource_group): content_type_id="str", content_item_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations.py index bcdf5d36ab0d..1f3f4d679f13 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations.py @@ -24,7 +24,7 @@ def test_content_type_list_by_service(self, resource_group): response = self.client.content_type.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_content_type_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", content_type_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -58,7 +58,7 @@ def test_content_type_create_or_update(self, resource_group): "type": "str", "version": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_content_type_delete(self, resource_group): service_name="str", content_type_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations_async.py index 229079f4b923..2642c44ff7a3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations_async.py @@ -25,7 +25,7 @@ async def test_content_type_list_by_service(self, resource_group): response = self.client.content_type.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_content_type_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", content_type_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -59,7 +59,7 @@ async def test_content_type_create_or_update(self, resource_group): "type": "str", "version": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_content_type_delete(self, resource_group): service_name="str", content_type_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations.py index 6a2795b4fafc..270f55c5c882 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations.py @@ -24,7 +24,7 @@ def test_delegation_settings_get_entity_tag(self, resource_group): response = self.client.delegation_settings.get_entity_tag( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -36,7 +36,7 @@ def test_delegation_settings_get(self, resource_group): response = self.client.delegation_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -58,7 +58,7 @@ def test_delegation_settings_update(self, resource_group): "userRegistration": {"enabled": bool}, "validationKey": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ def test_delegation_settings_create_or_update(self, resource_group): "userRegistration": {"enabled": bool}, "validationKey": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -91,7 +91,7 @@ def test_delegation_settings_list_secrets(self, resource_group): response = self.client.delegation_settings.list_secrets( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations_async.py index 3bb2990d5fea..971c8f2ee362 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations_async.py @@ -25,7 +25,7 @@ async def test_delegation_settings_get_entity_tag(self, resource_group): response = await self.client.delegation_settings.get_entity_tag( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -37,7 +37,7 @@ async def test_delegation_settings_get(self, resource_group): response = await self.client.delegation_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -59,7 +59,7 @@ async def test_delegation_settings_update(self, resource_group): "userRegistration": {"enabled": bool}, "validationKey": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,7 +80,7 @@ async def test_delegation_settings_create_or_update(self, resource_group): "userRegistration": {"enabled": bool}, "validationKey": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -92,7 +92,7 @@ async def test_delegation_settings_list_secrets(self, resource_group): response = await self.client.delegation_settings.list_secrets( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations.py index 4dc386e3787c..29a0c9e4b7e2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations.py @@ -22,7 +22,7 @@ def setup_method(self, method): @recorded_by_proxy def test_deleted_services_list_by_subscription(self, resource_group): response = self.client.deleted_services.list_by_subscription( - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -34,7 +34,7 @@ def test_deleted_services_get_by_name(self, resource_group): response = self.client.deleted_services.get_by_name( service_name="str", location="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ def test_deleted_services_begin_purge(self, resource_group): response = self.client.deleted_services.begin_purge( service_name="str", location="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations_async.py index 2a033fb0012c..5ec47ace23ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations_async.py @@ -23,7 +23,7 @@ def setup_method(self, method): @recorded_by_proxy_async async def test_deleted_services_list_by_subscription(self, resource_group): response = self.client.deleted_services.list_by_subscription( - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -35,7 +35,7 @@ async def test_deleted_services_get_by_name(self, resource_group): response = await self.client.deleted_services.get_by_name( service_name="str", location="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,7 +48,7 @@ async def test_deleted_services_begin_purge(self, resource_group): await self.client.deleted_services.begin_purge( service_name="str", location="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations.py index ebf7d1cbddc2..5f13e9846f77 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations.py @@ -24,7 +24,7 @@ def test_diagnostic_list_by_service(self, resource_group): response = self.client.diagnostic.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_diagnostic_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_diagnostic_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -103,6 +103,11 @@ def test_diagnostic_create_or_update(self, resource_group): }, "httpCorrelationProtocol": "str", "id": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, "logClientIp": bool, "loggerId": "str", "metrics": bool, @@ -112,7 +117,7 @@ def test_diagnostic_create_or_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -166,6 +171,11 @@ def test_diagnostic_update(self, resource_group): }, "httpCorrelationProtocol": "str", "id": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, "logClientIp": bool, "loggerId": "str", "metrics": bool, @@ -175,7 +185,7 @@ def test_diagnostic_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -189,7 +199,7 @@ def test_diagnostic_delete(self, resource_group): service_name="str", diagnostic_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations_async.py index fa74106245b8..03cb0924291d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations_async.py @@ -25,7 +25,7 @@ async def test_diagnostic_list_by_service(self, resource_group): response = self.client.diagnostic.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_diagnostic_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_diagnostic_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -104,6 +104,11 @@ async def test_diagnostic_create_or_update(self, resource_group): }, "httpCorrelationProtocol": "str", "id": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, "logClientIp": bool, "loggerId": "str", "metrics": bool, @@ -113,7 +118,7 @@ async def test_diagnostic_create_or_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -167,6 +172,11 @@ async def test_diagnostic_update(self, resource_group): }, "httpCorrelationProtocol": "str", "id": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, "logClientIp": bool, "loggerId": "str", "metrics": bool, @@ -176,7 +186,7 @@ async def test_diagnostic_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -190,7 +200,7 @@ async def test_diagnostic_delete(self, resource_group): service_name="str", diagnostic_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations.py index e325fa776830..4561bc6f4fba 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations.py @@ -24,7 +24,7 @@ def test_documentation_list_by_service(self, resource_group): response = self.client.documentation.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_documentation_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", documentation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_documentation_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", documentation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,7 +64,7 @@ def test_documentation_create_or_update(self, resource_group): service_name="str", documentation_id="str", parameters={"content": "str", "id": "str", "name": "str", "title": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ def test_documentation_update(self, resource_group): documentation_id="str", if_match="str", parameters={"content": "str", "title": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -93,7 +93,7 @@ def test_documentation_delete(self, resource_group): service_name="str", documentation_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations_async.py index 98e4dfee4237..4225acca5aa5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations_async.py @@ -25,7 +25,7 @@ async def test_documentation_list_by_service(self, resource_group): response = self.client.documentation.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_documentation_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", documentation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_documentation_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", documentation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,7 +65,7 @@ async def test_documentation_create_or_update(self, resource_group): service_name="str", documentation_id="str", parameters={"content": "str", "id": "str", "name": "str", "title": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,7 +80,7 @@ async def test_documentation_update(self, resource_group): documentation_id="str", if_match="str", parameters={"content": "str", "title": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -94,7 +94,7 @@ async def test_documentation_delete(self, resource_group): service_name="str", documentation_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations.py index 3b156b37b864..e023f5c9fc18 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations.py @@ -24,7 +24,7 @@ def test_email_template_list_by_service(self, resource_group): response = self.client.email_template.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_email_template_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", template_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_email_template_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", template_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -70,7 +70,7 @@ def test_email_template_create_or_update(self, resource_group): "subject": "str", "title": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -91,7 +91,7 @@ def test_email_template_update(self, resource_group): "subject": "str", "title": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -105,7 +105,7 @@ def test_email_template_delete(self, resource_group): service_name="str", template_name="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations_async.py index 46925df8bb9d..c83345ca4410 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations_async.py @@ -25,7 +25,7 @@ async def test_email_template_list_by_service(self, resource_group): response = self.client.email_template.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_email_template_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", template_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_email_template_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", template_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -71,7 +71,7 @@ async def test_email_template_create_or_update(self, resource_group): "subject": "str", "title": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -92,7 +92,7 @@ async def test_email_template_update(self, resource_group): "subject": "str", "title": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -106,7 +106,7 @@ async def test_email_template_delete(self, resource_group): service_name="str", template_name="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations.py index 3aadc95277f7..264d416b35c7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations.py @@ -25,7 +25,7 @@ def test_gateway_api_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_gateway_api_get_entity_tag(self, resource_group): service_name="str", gateway_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_gateway_api_create_or_update(self, resource_group): service_name="str", gateway_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +67,7 @@ def test_gateway_api_delete(self, resource_group): service_name="str", gateway_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations_async.py index c4a4d4594e1a..7174c3c59052 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations_async.py @@ -26,7 +26,7 @@ async def test_gateway_api_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_gateway_api_get_entity_tag(self, resource_group): service_name="str", gateway_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_gateway_api_create_or_update(self, resource_group): service_name="str", gateway_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ async def test_gateway_api_delete(self, resource_group): service_name="str", gateway_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations.py index 84f64b5562a9..b05e332667c0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations.py @@ -25,7 +25,7 @@ def test_gateway_certificate_authority_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_gateway_certificate_authority_get_entity_tag(self, resource_group): service_name="str", gateway_id="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_gateway_certificate_authority_get(self, resource_group): service_name="str", gateway_id="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_gateway_certificate_authority_create_or_update(self, resource_group): gateway_id="str", certificate_id="str", parameters={"id": "str", "isTrusted": bool, "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -83,7 +83,7 @@ def test_gateway_certificate_authority_delete(self, resource_group): gateway_id="str", certificate_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations_async.py index 449e4d11db10..3f7b99a24789 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations_async.py @@ -26,7 +26,7 @@ async def test_gateway_certificate_authority_list_by_service(self, resource_grou resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_gateway_certificate_authority_get_entity_tag(self, resource_group service_name="str", gateway_id="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_gateway_certificate_authority_get(self, resource_group): service_name="str", gateway_id="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_gateway_certificate_authority_create_or_update(self, resource_gro gateway_id="str", certificate_id="str", parameters={"id": "str", "isTrusted": bool, "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -84,7 +84,7 @@ async def test_gateway_certificate_authority_delete(self, resource_group): gateway_id="str", certificate_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations.py index 2e17274869df..9bdee119c95b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations.py @@ -25,7 +25,7 @@ def test_gateway_hostname_configuration_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_gateway_hostname_configuration_get_entity_tag(self, resource_group): service_name="str", gateway_id="str", hc_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_gateway_hostname_configuration_get(self, resource_group): service_name="str", gateway_id="str", hc_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -78,7 +78,7 @@ def test_gateway_hostname_configuration_create_or_update(self, resource_group): "tls11Enabled": bool, "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -93,7 +93,7 @@ def test_gateway_hostname_configuration_delete(self, resource_group): gateway_id="str", hc_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations_async.py index 8f796225529a..1cf09e15c6a5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations_async.py @@ -26,7 +26,7 @@ async def test_gateway_hostname_configuration_list_by_service(self, resource_gro resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_gateway_hostname_configuration_get_entity_tag(self, resource_grou service_name="str", gateway_id="str", hc_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_gateway_hostname_configuration_get(self, resource_group): service_name="str", gateway_id="str", hc_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ async def test_gateway_hostname_configuration_create_or_update(self, resource_gr "tls11Enabled": bool, "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -94,7 +94,7 @@ async def test_gateway_hostname_configuration_delete(self, resource_group): gateway_id="str", hc_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations.py index 26324833afe8..53fb1864ea99 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations.py @@ -24,7 +24,7 @@ def test_gateway_list_by_service(self, resource_group): response = self.client.gateway.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_gateway_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_gateway_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,11 +66,17 @@ def test_gateway_create_or_update(self, resource_group): parameters={ "description": "str", "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "locationData": {"name": "str", "city": "str", "countryOrRegion": "str", "district": "str"}, "name": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -87,11 +93,17 @@ def test_gateway_update(self, resource_group): parameters={ "description": "str", "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "locationData": {"name": "str", "city": "str", "countryOrRegion": "str", "district": "str"}, "name": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -105,7 +117,7 @@ def test_gateway_delete(self, resource_group): service_name="str", gateway_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -118,7 +130,7 @@ def test_gateway_list_keys(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -132,7 +144,7 @@ def test_gateway_regenerate_key(self, resource_group): service_name="str", gateway_id="str", parameters={"keyType": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -146,7 +158,7 @@ def test_gateway_generate_token(self, resource_group): service_name="str", gateway_id="str", parameters={"expiry": "2020-02-20 00:00:00", "keyType": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -159,7 +171,7 @@ def test_gateway_invalidate_debug_credentials(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -173,7 +185,7 @@ def test_gateway_list_debug_credentials(self, resource_group): service_name="str", gateway_id="str", parameters={"apiId": "str", "purposes": ["str"], "credentialsExpireAfter": "1 day, 0:00:00"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -187,7 +199,7 @@ def test_gateway_list_trace(self, resource_group): service_name="str", gateway_id="str", parameters={"traceId": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations_async.py index 0f552105cf5d..2db74d54fdfc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations_async.py @@ -25,7 +25,7 @@ async def test_gateway_list_by_service(self, resource_group): response = self.client.gateway.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_gateway_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_gateway_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,11 +67,17 @@ async def test_gateway_create_or_update(self, resource_group): parameters={ "description": "str", "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "locationData": {"name": "str", "city": "str", "countryOrRegion": "str", "district": "str"}, "name": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -88,11 +94,17 @@ async def test_gateway_update(self, resource_group): parameters={ "description": "str", "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "locationData": {"name": "str", "city": "str", "countryOrRegion": "str", "district": "str"}, "name": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -106,7 +118,7 @@ async def test_gateway_delete(self, resource_group): service_name="str", gateway_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -119,7 +131,7 @@ async def test_gateway_list_keys(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -133,7 +145,7 @@ async def test_gateway_regenerate_key(self, resource_group): service_name="str", gateway_id="str", parameters={"keyType": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -147,7 +159,7 @@ async def test_gateway_generate_token(self, resource_group): service_name="str", gateway_id="str", parameters={"expiry": "2020-02-20 00:00:00", "keyType": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -160,7 +172,7 @@ async def test_gateway_invalidate_debug_credentials(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -174,7 +186,7 @@ async def test_gateway_list_debug_credentials(self, resource_group): service_name="str", gateway_id="str", parameters={"apiId": "str", "purposes": ["str"], "credentialsExpireAfter": "1 day, 0:00:00"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -188,7 +200,7 @@ async def test_gateway_list_trace(self, resource_group): service_name="str", gateway_id="str", parameters={"traceId": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations.py index 0a64c5e3afc6..c19abc0f52a0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations.py @@ -24,7 +24,7 @@ def test_global_schema_list_by_service(self, resource_group): response = self.client.global_schema.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_global_schema_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_global_schema_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ def test_global_schema_begin_create_or_update(self, resource_group): "type": "str", "value": {}, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -87,7 +87,7 @@ def test_global_schema_delete(self, resource_group): service_name="str", schema_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations_async.py index 03f0dbe5d099..c42ef54b9424 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations_async.py @@ -25,7 +25,7 @@ async def test_global_schema_list_by_service(self, resource_group): response = self.client.global_schema.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_global_schema_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_global_schema_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ async def test_global_schema_begin_create_or_update(self, resource_group): "type": "str", "value": {}, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -90,7 +90,7 @@ async def test_global_schema_delete(self, resource_group): service_name="str", schema_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations.py index b617f9e2493b..2dc519e11473 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations.py @@ -25,7 +25,7 @@ def test_graph_ql_api_resolver_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_graph_ql_api_resolver_get_entity_tag(self, resource_group): service_name="str", api_id="str", resolver_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_graph_ql_api_resolver_get(self, resource_group): service_name="str", api_id="str", resolver_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ def test_graph_ql_api_resolver_create_or_update(self, resource_group): "path": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -91,7 +91,7 @@ def test_graph_ql_api_resolver_update(self, resource_group): resolver_id="str", if_match="str", parameters={"description": "str", "displayName": "str", "path": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -106,7 +106,7 @@ def test_graph_ql_api_resolver_delete(self, resource_group): api_id="str", resolver_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations_async.py index 9d9a2848b11f..3e320753a496 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations_async.py @@ -26,7 +26,7 @@ async def test_graph_ql_api_resolver_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_graph_ql_api_resolver_get_entity_tag(self, resource_group): service_name="str", api_id="str", resolver_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_graph_ql_api_resolver_get(self, resource_group): service_name="str", api_id="str", resolver_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -76,7 +76,7 @@ async def test_graph_ql_api_resolver_create_or_update(self, resource_group): "path": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -92,7 +92,7 @@ async def test_graph_ql_api_resolver_update(self, resource_group): resolver_id="str", if_match="str", parameters={"description": "str", "displayName": "str", "path": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -107,7 +107,7 @@ async def test_graph_ql_api_resolver_delete(self, resource_group): api_id="str", resolver_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations.py index f0a95e8e1829..b6e61a45b368 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations.py @@ -26,7 +26,7 @@ def test_graph_ql_api_resolver_policy_list_by_resolver(self, resource_group): service_name="str", api_id="str", resolver_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_graph_ql_api_resolver_policy_get_entity_tag(self, resource_group): api_id="str", resolver_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_graph_ql_api_resolver_policy_get(self, resource_group): api_id="str", resolver_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_graph_ql_api_resolver_policy_create_or_update(self, resource_group): resolver_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -88,7 +88,7 @@ def test_graph_ql_api_resolver_policy_delete(self, resource_group): resolver_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations_async.py index 13918bb0712c..03653fe51072 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations_async.py @@ -27,7 +27,7 @@ async def test_graph_ql_api_resolver_policy_list_by_resolver(self, resource_grou service_name="str", api_id="str", resolver_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_graph_ql_api_resolver_policy_get_entity_tag(self, resource_group) api_id="str", resolver_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_graph_ql_api_resolver_policy_get(self, resource_group): api_id="str", resolver_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_graph_ql_api_resolver_policy_create_or_update(self, resource_grou resolver_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -89,7 +89,7 @@ async def test_graph_ql_api_resolver_policy_delete(self, resource_group): resolver_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations.py index 60b45e076dbe..b7afebb0bde7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations.py @@ -24,7 +24,7 @@ def test_group_list_by_service(self, resource_group): response = self.client.group.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_group_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_group_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,7 +64,7 @@ def test_group_create_or_update(self, resource_group): service_name="str", group_id="str", parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ def test_group_update(self, resource_group): group_id="str", if_match="str", parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -93,7 +93,7 @@ def test_group_delete(self, resource_group): service_name="str", group_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations_async.py index b8deb7d97a77..268921615a2a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations_async.py @@ -25,7 +25,7 @@ async def test_group_list_by_service(self, resource_group): response = self.client.group.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_group_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_group_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,7 +65,7 @@ async def test_group_create_or_update(self, resource_group): service_name="str", group_id="str", parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,7 +80,7 @@ async def test_group_update(self, resource_group): group_id="str", if_match="str", parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -94,7 +94,7 @@ async def test_group_delete(self, resource_group): service_name="str", group_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations.py index 9e364e61242d..528119fbead4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations.py @@ -25,7 +25,7 @@ def test_group_user_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_group_user_check_entity_exists(self, resource_group): service_name="str", group_id="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_group_user_create(self, resource_group): service_name="str", group_id="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +67,7 @@ def test_group_user_delete(self, resource_group): service_name="str", group_id="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations_async.py index 31b366035b65..477428647cf3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations_async.py @@ -26,7 +26,7 @@ async def test_group_user_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_group_user_check_entity_exists(self, resource_group): service_name="str", group_id="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_group_user_create(self, resource_group): service_name="str", group_id="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ async def test_group_user_delete(self, resource_group): service_name="str", group_id="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations.py index fdece69d4f73..27d0fe9405be 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations.py @@ -24,7 +24,7 @@ def test_identity_provider_list_by_service(self, resource_group): response = self.client.identity_provider.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_identity_provider_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_identity_provider_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,6 +66,7 @@ def test_identity_provider_create_or_update(self, resource_group): parameters={ "allowedTenants": ["str"], "authority": "str", + "certificateId": "str", "clientId": "str", "clientLibrary": "str", "clientSecret": "str", @@ -78,7 +79,7 @@ def test_identity_provider_create_or_update(self, resource_group): "signupPolicyName": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -95,6 +96,7 @@ def test_identity_provider_update(self, resource_group): parameters={ "allowedTenants": ["str"], "authority": "str", + "certificateId": "str", "clientId": "str", "clientLibrary": "str", "clientSecret": "str", @@ -105,7 +107,7 @@ def test_identity_provider_update(self, resource_group): "signupPolicyName": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -119,7 +121,7 @@ def test_identity_provider_delete(self, resource_group): service_name="str", identity_provider_name="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -132,7 +134,7 @@ def test_identity_provider_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations_async.py index 912eb8dd0ede..80d5b808b6eb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations_async.py @@ -25,7 +25,7 @@ async def test_identity_provider_list_by_service(self, resource_group): response = self.client.identity_provider.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_identity_provider_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_identity_provider_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,6 +67,7 @@ async def test_identity_provider_create_or_update(self, resource_group): parameters={ "allowedTenants": ["str"], "authority": "str", + "certificateId": "str", "clientId": "str", "clientLibrary": "str", "clientSecret": "str", @@ -79,7 +80,7 @@ async def test_identity_provider_create_or_update(self, resource_group): "signupPolicyName": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -96,6 +97,7 @@ async def test_identity_provider_update(self, resource_group): parameters={ "allowedTenants": ["str"], "authority": "str", + "certificateId": "str", "clientId": "str", "clientLibrary": "str", "clientSecret": "str", @@ -106,7 +108,7 @@ async def test_identity_provider_update(self, resource_group): "signupPolicyName": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -120,7 +122,7 @@ async def test_identity_provider_delete(self, resource_group): service_name="str", identity_provider_name="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -133,7 +135,7 @@ async def test_identity_provider_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations.py index 6db71e7d1ae8..66072e3a6f32 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations.py @@ -24,7 +24,7 @@ def test_issue_list_by_service(self, resource_group): response = self.client.issue.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_issue_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", issue_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations_async.py index f100d2f97bc5..5d6783e64910 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations_async.py @@ -25,7 +25,7 @@ async def test_issue_list_by_service(self, resource_group): response = self.client.issue.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_issue_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", issue_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations.py index de8356b4c36b..9b59427ce99f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations.py @@ -24,7 +24,7 @@ def test_logger_list_by_service(self, resource_group): response = self.client.logger.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_logger_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", logger_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_logger_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", logger_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ def test_logger_create_or_update(self, resource_group): "resourceId": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -88,7 +88,7 @@ def test_logger_update(self, resource_group): logger_id="str", if_match="str", parameters={"credentials": {"str": "str"}, "description": "str", "isBuffered": bool, "loggerType": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -102,7 +102,7 @@ def test_logger_delete(self, resource_group): service_name="str", logger_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations_async.py index 9741e779c0f0..e10085ec90b9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations_async.py @@ -25,7 +25,7 @@ async def test_logger_list_by_service(self, resource_group): response = self.client.logger.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_logger_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", logger_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_logger_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", logger_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -74,7 +74,7 @@ async def test_logger_create_or_update(self, resource_group): "resourceId": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -89,7 +89,7 @@ async def test_logger_update(self, resource_group): logger_id="str", if_match="str", parameters={"credentials": {"str": "str"}, "description": "str", "isBuffered": bool, "loggerType": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -103,7 +103,7 @@ async def test_logger_delete(self, resource_group): service_name="str", logger_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations.py index 210dea41b42f..c13cd7320166 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations.py @@ -24,7 +24,7 @@ def test_named_value_list_by_service(self, resource_group): response = self.client.named_value.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_named_value_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_named_value_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ def test_named_value_begin_create_or_update(self, resource_group): "type": "str", "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -94,7 +94,7 @@ def test_named_value_begin_update(self, resource_group): "tags": ["str"], "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -108,7 +108,7 @@ def test_named_value_delete(self, resource_group): service_name="str", named_value_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -121,7 +121,7 @@ def test_named_value_list_value(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -134,7 +134,7 @@ def test_named_value_begin_refresh_secret(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations_async.py index 997dab2c27d6..e5e5f65a4a09 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations_async.py @@ -25,7 +25,7 @@ async def test_named_value_list_by_service(self, resource_group): response = self.client.named_value.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_named_value_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_named_value_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ async def test_named_value_begin_create_or_update(self, resource_group): "type": "str", "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -98,7 +98,7 @@ async def test_named_value_begin_update(self, resource_group): "tags": ["str"], "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -113,7 +113,7 @@ async def test_named_value_delete(self, resource_group): service_name="str", named_value_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -126,7 +126,7 @@ async def test_named_value_list_value(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -140,7 +140,7 @@ async def test_named_value_begin_refresh_secret(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations.py index 485446d217b2..4218a8f8d30b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations.py @@ -24,7 +24,7 @@ def test_network_status_list_by_service(self, resource_group): response = self.client.network_status.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_network_status_list_by_location(self, resource_group): resource_group_name=resource_group.name, service_name="str", location_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations_async.py index cb2d7cf54ce4..e339bd8db2bb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations_async.py @@ -25,7 +25,7 @@ async def test_network_status_list_by_service(self, resource_group): response = await self.client.network_status.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_network_status_list_by_location(self, resource_group): resource_group_name=resource_group.name, service_name="str", location_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations.py index 8352fa27722f..f402d68d49ee 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations.py @@ -24,7 +24,7 @@ def test_notification_list_by_service(self, resource_group): response = self.client.notification.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_notification_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_notification_create_or_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations_async.py index f6a253f69c3e..4ee07f2b3457 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations_async.py @@ -25,7 +25,7 @@ async def test_notification_list_by_service(self, resource_group): response = self.client.notification.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_notification_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_notification_create_or_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations.py index 3342307215db..e659551b425f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations.py @@ -25,7 +25,7 @@ def test_notification_recipient_email_list_by_notification(self, resource_group) resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_notification_recipient_email_check_entity_exists(self, resource_group): service_name="str", notification_name="str", email="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_notification_recipient_email_create_or_update(self, resource_group): service_name="str", notification_name="str", email="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +67,7 @@ def test_notification_recipient_email_delete(self, resource_group): service_name="str", notification_name="str", email="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations_async.py index 9b5e4f786e4c..03e8dbff1d23 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations_async.py @@ -26,7 +26,7 @@ async def test_notification_recipient_email_list_by_notification(self, resource_ resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_notification_recipient_email_check_entity_exists(self, resource_g service_name="str", notification_name="str", email="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_notification_recipient_email_create_or_update(self, resource_grou service_name="str", notification_name="str", email="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ async def test_notification_recipient_email_delete(self, resource_group): service_name="str", notification_name="str", email="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations.py index 0d7350acbb5b..c7cfee1488b5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations.py @@ -25,7 +25,7 @@ def test_notification_recipient_user_list_by_notification(self, resource_group): resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_notification_recipient_user_check_entity_exists(self, resource_group): service_name="str", notification_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_notification_recipient_user_create_or_update(self, resource_group): service_name="str", notification_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +67,7 @@ def test_notification_recipient_user_delete(self, resource_group): service_name="str", notification_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations_async.py index 29c260fd56da..8cbce1dd56fb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations_async.py @@ -26,7 +26,7 @@ async def test_notification_recipient_user_list_by_notification(self, resource_g resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_notification_recipient_user_check_entity_exists(self, resource_gr service_name="str", notification_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_notification_recipient_user_create_or_update(self, resource_group service_name="str", notification_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ async def test_notification_recipient_user_delete(self, resource_group): service_name="str", notification_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations.py index 75eb6caea7de..109fe7fa96f9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations.py @@ -24,7 +24,7 @@ def test_open_id_connect_provider_list_by_service(self, resource_group): response = self.client.open_id_connect_provider.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_open_id_connect_provider_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", opid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_open_id_connect_provider_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", opid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ def test_open_id_connect_provider_create_or_update(self, resource_group): "useInApiDocumentation": bool, "useInTestConsole": bool, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -98,7 +98,7 @@ def test_open_id_connect_provider_update(self, resource_group): "useInApiDocumentation": bool, "useInTestConsole": bool, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -112,7 +112,7 @@ def test_open_id_connect_provider_delete(self, resource_group): service_name="str", opid="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -125,7 +125,7 @@ def test_open_id_connect_provider_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", opid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations_async.py index fef7919b6949..3018bf692f88 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations_async.py @@ -25,7 +25,7 @@ async def test_open_id_connect_provider_list_by_service(self, resource_group): response = self.client.open_id_connect_provider.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_open_id_connect_provider_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", opid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_open_id_connect_provider_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", opid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -76,7 +76,7 @@ async def test_open_id_connect_provider_create_or_update(self, resource_group): "useInApiDocumentation": bool, "useInTestConsole": bool, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -99,7 +99,7 @@ async def test_open_id_connect_provider_update(self, resource_group): "useInApiDocumentation": bool, "useInTestConsole": bool, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -113,7 +113,7 @@ async def test_open_id_connect_provider_delete(self, resource_group): service_name="str", opid="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -126,7 +126,7 @@ async def test_open_id_connect_provider_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", opid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations.py index 521c479bc87f..1b0badddf843 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations.py @@ -25,7 +25,7 @@ def test_operation_list_by_tags(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations_async.py index 5320b562093c..2e78b599f605 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations_async.py @@ -26,7 +26,7 @@ async def test_operation_list_by_tags(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations.py index ebee9a2989e1..877e73f6ad3d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations.py @@ -24,7 +24,7 @@ def test_operation_status_get(self, resource_group): response = self.client.operation_status.get( location="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations_async.py index 16251eec8d47..326092232846 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations_async.py @@ -25,7 +25,7 @@ async def test_operation_status_get(self, resource_group): response = await self.client.operation_status.get( location="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations.py index d7a4dda5cdb3..cb88f679f5b5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations.py @@ -24,7 +24,7 @@ def test_operations_results_get(self, resource_group): response = self.client.operations_results.get( location="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations_async.py index bed3f33fc7eb..13d245b77ddb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations_async.py @@ -25,7 +25,7 @@ async def test_operations_results_get(self, resource_group): response = await self.client.operations_results.get( location="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations.py index 21324c68d5f9..2988c30e67b3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations.py @@ -24,7 +24,7 @@ def test_outbound_network_dependencies_endpoints_list_by_service(self, resource_ response = self.client.outbound_network_dependencies_endpoints.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations_async.py index 040489551800..5cba0905f60f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations_async.py @@ -25,7 +25,7 @@ async def test_outbound_network_dependencies_endpoints_list_by_service(self, res response = await self.client.outbound_network_dependencies_endpoints.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations.py index b7be819db0a6..65c352e1cc20 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations.py @@ -24,7 +24,7 @@ def test_policy_description_list_by_service(self, resource_group): response = self.client.policy_description.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations_async.py index 54fa5b45bb29..2912ffaecbcf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations_async.py @@ -25,7 +25,7 @@ async def test_policy_description_list_by_service(self, resource_group): response = await self.client.policy_description.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations.py index c01561327d34..99c23ec9559e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations.py @@ -24,7 +24,7 @@ def test_policy_fragment_list_by_service(self, resource_group): response = self.client.policy_fragment.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_policy_fragment_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_policy_fragment_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_policy_fragment_begin_create_or_update(self, resource_group): "type": "str", "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -86,7 +86,7 @@ def test_policy_fragment_delete(self, resource_group): service_name="str", id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -99,7 +99,7 @@ def test_policy_fragment_list_references(self, resource_group): resource_group_name=resource_group.name, service_name="str", id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations_async.py index 36e5581c972d..7da555cc644a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations_async.py @@ -25,7 +25,7 @@ async def test_policy_fragment_list_by_service(self, resource_group): response = self.client.policy_fragment.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_policy_fragment_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_policy_fragment_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -74,7 +74,7 @@ async def test_policy_fragment_begin_create_or_update(self, resource_group): "type": "str", "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -89,7 +89,7 @@ async def test_policy_fragment_delete(self, resource_group): service_name="str", id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -102,7 +102,7 @@ async def test_policy_fragment_list_references(self, resource_group): resource_group_name=resource_group.name, service_name="str", id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations.py index 0f148897f1f2..7bbab52e8f57 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations.py @@ -24,7 +24,7 @@ def test_policy_list_by_service(self, resource_group): response = self.client.policy.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_policy_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_policy_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,7 +64,7 @@ def test_policy_create_or_update(self, resource_group): service_name="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -78,7 +78,7 @@ def test_policy_delete(self, resource_group): service_name="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations_async.py index 9b862dcf2a49..990c8d797b5e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations_async.py @@ -25,7 +25,7 @@ async def test_policy_list_by_service(self, resource_group): response = self.client.policy.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_policy_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_policy_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,7 +65,7 @@ async def test_policy_create_or_update(self, resource_group): service_name="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ async def test_policy_delete(self, resource_group): service_name="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations.py index f25a30c37fc0..0514833caee4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations.py @@ -24,7 +24,7 @@ def test_policy_restriction_list_by_service(self, resource_group): response = self.client.policy_restriction.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_policy_restriction_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_policy_restriction_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,7 +64,7 @@ def test_policy_restriction_create_or_update(self, resource_group): service_name="str", policy_restriction_id="str", parameters={"id": "str", "name": "str", "requireBase": "false", "scope": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ def test_policy_restriction_update(self, resource_group): policy_restriction_id="str", if_match="str", parameters={"requireBase": "false", "scope": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -92,7 +92,7 @@ def test_policy_restriction_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations_async.py index 1f53cf53c167..bea5266cc71a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations_async.py @@ -25,7 +25,7 @@ async def test_policy_restriction_list_by_service(self, resource_group): response = self.client.policy_restriction.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_policy_restriction_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_policy_restriction_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,7 +65,7 @@ async def test_policy_restriction_create_or_update(self, resource_group): service_name="str", policy_restriction_id="str", parameters={"id": "str", "name": "str", "requireBase": "false", "scope": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,7 +80,7 @@ async def test_policy_restriction_update(self, resource_group): policy_restriction_id="str", if_match="str", parameters={"requireBase": "false", "scope": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -93,7 +93,7 @@ async def test_policy_restriction_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations.py index 797cde4b2da3..05af1d56f832 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations.py @@ -24,7 +24,7 @@ def test_policy_restriction_validations_begin_by_service(self, resource_group): response = self.client.policy_restriction_validations.begin_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations_async.py index 0c62ce2c9d63..8451ba53b068 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations_async.py @@ -26,7 +26,7 @@ async def test_policy_restriction_validations_begin_by_service(self, resource_gr await self.client.policy_restriction_validations.begin_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations.py index a3def173d611..f203ae303676 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations.py @@ -24,7 +24,7 @@ def test_portal_config_list_by_service(self, resource_group): response = self.client.portal_config.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_portal_config_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_config_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_portal_config_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_config_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,7 +80,7 @@ def test_portal_config_update(self, resource_group): "signup": {"termsOfService": {"requireConsent": False, "text": "str"}}, "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -110,7 +110,7 @@ def test_portal_config_create_or_update(self, resource_group): "signup": {"termsOfService": {"requireConsent": False, "text": "str"}}, "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations_async.py index 37ee3a5b328f..955e45db278c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations_async.py @@ -25,7 +25,7 @@ async def test_portal_config_list_by_service(self, resource_group): response = self.client.portal_config.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_portal_config_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_config_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_portal_config_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_config_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -81,7 +81,7 @@ async def test_portal_config_update(self, resource_group): "signup": {"termsOfService": {"requireConsent": False, "text": "str"}}, "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -111,7 +111,7 @@ async def test_portal_config_create_or_update(self, resource_group): "signup": {"termsOfService": {"requireConsent": False, "text": "str"}}, "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations.py index 0004f6e7b2d7..9f2184833def 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations.py @@ -24,7 +24,7 @@ def test_portal_revision_list_by_service(self, resource_group): response = self.client.portal_revision.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_portal_revision_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_revision_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_portal_revision_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_revision_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ def test_portal_revision_begin_create_or_update(self, resource_group): "type": "str", "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -101,7 +101,7 @@ def test_portal_revision_begin_update(self, resource_group): "type": "str", "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations_async.py index c03d2289e98c..650e93217ea2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations_async.py @@ -25,7 +25,7 @@ async def test_portal_revision_list_by_service(self, resource_group): response = self.client.portal_revision.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_portal_revision_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_revision_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_portal_revision_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_revision_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ async def test_portal_revision_begin_create_or_update(self, resource_group): "type": "str", "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -105,7 +105,7 @@ async def test_portal_revision_begin_update(self, resource_group): "type": "str", "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations.py index a2b85cf6ed61..36eaae3141a2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations.py @@ -24,7 +24,7 @@ def test_portal_settings_list_by_service(self, resource_group): response = self.client.portal_settings.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations_async.py index 5efbc0415f5f..32915237749b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations_async.py @@ -25,7 +25,7 @@ async def test_portal_settings_list_by_service(self, resource_group): response = await self.client.portal_settings.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations.py index dba082e834eb..4a8f612abd98 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations.py @@ -24,7 +24,7 @@ def test_private_endpoint_connection_list_by_service(self, resource_group): response = self.client.private_endpoint_connection.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_private_endpoint_connection_get_by_name(self, resource_group): resource_group_name=resource_group.name, service_name="str", private_endpoint_connection_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -60,7 +60,7 @@ def test_private_endpoint_connection_begin_create_or_update(self, resource_group } }, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -73,7 +73,7 @@ def test_private_endpoint_connection_begin_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", private_endpoint_connection_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -85,7 +85,7 @@ def test_private_endpoint_connection_list_private_link_resources(self, resource_ response = self.client.private_endpoint_connection.list_private_link_resources( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -98,7 +98,7 @@ def test_private_endpoint_connection_get_private_link_resource(self, resource_gr resource_group_name=resource_group.name, service_name="str", private_link_sub_resource_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations_async.py index 4c862308e088..7ac38d3d8942 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations_async.py @@ -25,7 +25,7 @@ async def test_private_endpoint_connection_list_by_service(self, resource_group) response = self.client.private_endpoint_connection.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_private_endpoint_connection_get_by_name(self, resource_group): resource_group_name=resource_group.name, service_name="str", private_endpoint_connection_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -62,7 +62,7 @@ async def test_private_endpoint_connection_begin_create_or_update(self, resource } }, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -77,7 +77,7 @@ async def test_private_endpoint_connection_begin_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", private_endpoint_connection_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -90,7 +90,7 @@ async def test_private_endpoint_connection_list_private_link_resources(self, res response = await self.client.private_endpoint_connection.list_private_link_resources( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -103,7 +103,7 @@ async def test_private_endpoint_connection_get_private_link_resource(self, resou resource_group_name=resource_group.name, service_name="str", private_link_sub_resource_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations.py index 428fc96a40d2..82d2f4f665e4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations.py @@ -25,7 +25,7 @@ def test_product_api_link_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_product_api_link_get(self, resource_group): service_name="str", product_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ def test_product_api_link_create_or_update(self, resource_group): product_id="str", api_link_id="str", parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_product_api_link_delete(self, resource_group): service_name="str", product_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations_async.py index 15ea0269bd93..09cc3bf41e0f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations_async.py @@ -26,7 +26,7 @@ async def test_product_api_link_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_product_api_link_get(self, resource_group): service_name="str", product_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -55,7 +55,7 @@ async def test_product_api_link_create_or_update(self, resource_group): product_id="str", api_link_id="str", parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_product_api_link_delete(self, resource_group): service_name="str", product_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations.py index 2db156c81e6d..0828a55acbbc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations.py @@ -25,7 +25,7 @@ def test_product_api_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_product_api_check_entity_exists(self, resource_group): service_name="str", product_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_product_api_create_or_update(self, resource_group): service_name="str", product_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +67,7 @@ def test_product_api_delete(self, resource_group): service_name="str", product_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations_async.py index 19ed59a97a01..88a43d1beb2a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations_async.py @@ -26,7 +26,7 @@ async def test_product_api_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_product_api_check_entity_exists(self, resource_group): service_name="str", product_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_product_api_create_or_update(self, resource_group): service_name="str", product_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ async def test_product_api_delete(self, resource_group): service_name="str", product_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations.py index 0e2dff7236da..5a2505d0ff07 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations.py @@ -25,7 +25,7 @@ def test_product_group_link_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_product_group_link_get(self, resource_group): service_name="str", product_id="str", group_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ def test_product_group_link_create_or_update(self, resource_group): product_id="str", group_link_id="str", parameters={"groupId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_product_group_link_delete(self, resource_group): service_name="str", product_id="str", group_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations_async.py index 20771a695897..13c7709b18a0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations_async.py @@ -26,7 +26,7 @@ async def test_product_group_link_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_product_group_link_get(self, resource_group): service_name="str", product_id="str", group_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -55,7 +55,7 @@ async def test_product_group_link_create_or_update(self, resource_group): product_id="str", group_link_id="str", parameters={"groupId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_product_group_link_delete(self, resource_group): service_name="str", product_id="str", group_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations.py index 5f4cc2afc428..dfdcafc032fc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations.py @@ -25,7 +25,7 @@ def test_product_group_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_product_group_check_entity_exists(self, resource_group): service_name="str", product_id="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_product_group_create_or_update(self, resource_group): service_name="str", product_id="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +67,7 @@ def test_product_group_delete(self, resource_group): service_name="str", product_id="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations_async.py index 34d8dc6471ff..7226cdd1d8c2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations_async.py @@ -26,7 +26,7 @@ async def test_product_group_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_product_group_check_entity_exists(self, resource_group): service_name="str", product_id="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_product_group_create_or_update(self, resource_group): service_name="str", product_id="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ async def test_product_group_delete(self, resource_group): service_name="str", product_id="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations.py index 1cb10f80b36f..f7be3d8fd392 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations.py @@ -24,7 +24,7 @@ def test_product_list_by_service(self, resource_group): response = self.client.product.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_product_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_product_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,7 +64,9 @@ def test_product_create_or_update(self, resource_group): service_name="str", product_id="str", parameters={ + "application": {"entra": {"applicationId": "str", "audience": "str"}}, "approvalRequired": bool, + "authenticationType": ["str"], "description": "str", "displayName": "str", "id": "str", @@ -75,7 +77,7 @@ def test_product_create_or_update(self, resource_group): "terms": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -90,7 +92,9 @@ def test_product_update(self, resource_group): product_id="str", if_match="str", parameters={ + "application": {"entra": {"applicationId": "str", "audience": "str"}}, "approvalRequired": bool, + "authenticationType": ["str"], "description": "str", "displayName": "str", "state": "str", @@ -98,7 +102,7 @@ def test_product_update(self, resource_group): "subscriptionsLimit": 0, "terms": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -112,7 +116,7 @@ def test_product_delete(self, resource_group): service_name="str", product_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -124,7 +128,7 @@ def test_product_list_by_tags(self, resource_group): response = self.client.product.list_by_tags( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations_async.py index 05564f5d8de7..2deb1d06ec0d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations_async.py @@ -25,7 +25,7 @@ async def test_product_list_by_service(self, resource_group): response = self.client.product.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_product_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_product_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,7 +65,9 @@ async def test_product_create_or_update(self, resource_group): service_name="str", product_id="str", parameters={ + "application": {"entra": {"applicationId": "str", "audience": "str"}}, "approvalRequired": bool, + "authenticationType": ["str"], "description": "str", "displayName": "str", "id": "str", @@ -76,7 +78,7 @@ async def test_product_create_or_update(self, resource_group): "terms": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -91,7 +93,9 @@ async def test_product_update(self, resource_group): product_id="str", if_match="str", parameters={ + "application": {"entra": {"applicationId": "str", "audience": "str"}}, "approvalRequired": bool, + "authenticationType": ["str"], "description": "str", "displayName": "str", "state": "str", @@ -99,7 +103,7 @@ async def test_product_update(self, resource_group): "subscriptionsLimit": 0, "terms": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -113,7 +117,7 @@ async def test_product_delete(self, resource_group): service_name="str", product_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -125,7 +129,7 @@ async def test_product_list_by_tags(self, resource_group): response = self.client.product.list_by_tags( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations.py index 1ef463296a84..24c0560667ab 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations.py @@ -25,7 +25,7 @@ def test_product_policy_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_product_policy_get_entity_tag(self, resource_group): service_name="str", product_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_product_policy_get(self, resource_group): service_name="str", product_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_product_policy_create_or_update(self, resource_group): product_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -83,7 +83,7 @@ def test_product_policy_delete(self, resource_group): product_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations_async.py index 5c2757bfb83d..7bb0ae0f656c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations_async.py @@ -26,7 +26,7 @@ async def test_product_policy_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_product_policy_get_entity_tag(self, resource_group): service_name="str", product_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_product_policy_get(self, resource_group): service_name="str", product_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_product_policy_create_or_update(self, resource_group): product_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -84,7 +84,7 @@ async def test_product_policy_delete(self, resource_group): product_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations.py index a1c331048560..291b85ac4b0e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations.py @@ -25,7 +25,7 @@ def test_product_subscriptions_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations_async.py index 2f8a253de483..d6555cfd4821 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations_async.py @@ -26,7 +26,7 @@ async def test_product_subscriptions_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations.py index afa115909b19..48245be9e4f2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations.py @@ -25,7 +25,7 @@ def test_product_wiki_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -38,7 +38,7 @@ def test_product_wiki_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -52,7 +52,7 @@ def test_product_wiki_create_or_update(self, resource_group): service_name="str", product_id="str", parameters={"documents": [{"documentationId": "str"}], "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +67,7 @@ def test_product_wiki_update(self, resource_group): product_id="str", if_match="str", parameters={"documents": [{"documentationId": "str"}]}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -81,7 +81,7 @@ def test_product_wiki_delete(self, resource_group): service_name="str", product_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations_async.py index 9f96940c593f..ff3d664d14bc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations_async.py @@ -26,7 +26,7 @@ async def test_product_wiki_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -39,7 +39,7 @@ async def test_product_wiki_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ async def test_product_wiki_create_or_update(self, resource_group): service_name="str", product_id="str", parameters={"documents": [{"documentationId": "str"}], "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ async def test_product_wiki_update(self, resource_group): product_id="str", if_match="str", parameters={"documents": [{"documentationId": "str"}]}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -82,7 +82,7 @@ async def test_product_wiki_delete(self, resource_group): service_name="str", product_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations.py index 14cc774609dc..b60b52f9ee6e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations.py @@ -25,7 +25,7 @@ def test_product_wikis_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations_async.py index 882b2a33d53f..3baf9c683000 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations_async.py @@ -26,7 +26,7 @@ async def test_product_wikis_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations.py index f7552345916f..ff4c02816551 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations.py @@ -25,7 +25,7 @@ def test_quota_by_counter_keys_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", quota_counter_key="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_quota_by_counter_keys_update(self, resource_group): service_name="str", quota_counter_key="str", parameters={"callsCount": 0, "kbTransferred": 0.0}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations_async.py index 9e338785636a..515137e6d2fc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations_async.py @@ -26,7 +26,7 @@ async def test_quota_by_counter_keys_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", quota_counter_key="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_quota_by_counter_keys_update(self, resource_group): service_name="str", quota_counter_key="str", parameters={"callsCount": 0, "kbTransferred": 0.0}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations.py index 047ef69f1d0e..53bf7f854d2a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations.py @@ -26,7 +26,7 @@ def test_quota_by_period_keys_get(self, resource_group): service_name="str", quota_counter_key="str", quota_period_key="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_quota_by_period_keys_update(self, resource_group): quota_counter_key="str", quota_period_key="str", parameters={"callsCount": 0, "kbTransferred": 0.0}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations_async.py index a4d567cc8e4f..a463289ae6b1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations_async.py @@ -27,7 +27,7 @@ async def test_quota_by_period_keys_get(self, resource_group): service_name="str", quota_counter_key="str", quota_period_key="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_quota_by_period_keys_update(self, resource_group): quota_counter_key="str", quota_period_key="str", parameters={"callsCount": 0, "kbTransferred": 0.0}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations.py index 7a49f0564a3f..4e96b7837161 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations.py @@ -24,7 +24,7 @@ def test_region_list_by_service(self, resource_group): response = self.client.region.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations_async.py index 9aa9f5b8949b..1453805f300d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations_async.py @@ -25,7 +25,7 @@ async def test_region_list_by_service(self, resource_group): response = self.client.region.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations.py index 7781a9124853..143ce58d2724 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations.py @@ -25,7 +25,7 @@ def test_reports_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ def test_reports_list_by_user(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -51,7 +51,7 @@ def test_reports_list_by_operation(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -64,7 +64,7 @@ def test_reports_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -77,7 +77,7 @@ def test_reports_list_by_geo(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -90,7 +90,7 @@ def test_reports_list_by_subscription(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -104,7 +104,7 @@ def test_reports_list_by_time(self, resource_group): service_name="str", filter="str", interval="1 day, 0:00:00", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -117,7 +117,7 @@ def test_reports_list_by_request(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations_async.py index fbd5946babdf..d49f7a470542 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations_async.py @@ -26,7 +26,7 @@ async def test_reports_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ async def test_reports_list_by_user(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -52,7 +52,7 @@ async def test_reports_list_by_operation(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -65,7 +65,7 @@ async def test_reports_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -78,7 +78,7 @@ async def test_reports_list_by_geo(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -91,7 +91,7 @@ async def test_reports_list_by_subscription(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -105,7 +105,7 @@ async def test_reports_list_by_time(self, resource_group): service_name="str", filter="str", interval="1 day, 0:00:00", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -118,7 +118,7 @@ async def test_reports_list_by_request(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations.py index e22f66648b46..c21912332137 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations.py @@ -24,7 +24,7 @@ def test_sign_in_settings_get_entity_tag(self, resource_group): response = self.client.sign_in_settings.get_entity_tag( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -36,7 +36,7 @@ def test_sign_in_settings_get(self, resource_group): response = self.client.sign_in_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_sign_in_settings_update(self, resource_group): service_name="str", if_match="str", parameters={"enabled": bool, "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -63,7 +63,7 @@ def test_sign_in_settings_create_or_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", parameters={"enabled": bool, "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations_async.py index ad055b60b6b9..8868b41ac1b2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations_async.py @@ -25,7 +25,7 @@ async def test_sign_in_settings_get_entity_tag(self, resource_group): response = await self.client.sign_in_settings.get_entity_tag( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -37,7 +37,7 @@ async def test_sign_in_settings_get(self, resource_group): response = await self.client.sign_in_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_sign_in_settings_update(self, resource_group): service_name="str", if_match="str", parameters={"enabled": bool, "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,7 +64,7 @@ async def test_sign_in_settings_create_or_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", parameters={"enabled": bool, "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations.py index eb6043350608..2059135f3c3f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations.py @@ -24,7 +24,7 @@ def test_sign_up_settings_get_entity_tag(self, resource_group): response = self.client.sign_up_settings.get_entity_tag( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -36,7 +36,7 @@ def test_sign_up_settings_get(self, resource_group): response = self.client.sign_up_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_sign_up_settings_update(self, resource_group): "termsOfService": {"consentRequired": bool, "enabled": bool, "text": "str"}, "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ def test_sign_up_settings_create_or_update(self, resource_group): "termsOfService": {"consentRequired": bool, "enabled": bool, "text": "str"}, "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations_async.py index cafcd126a9fd..429cd2346718 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations_async.py @@ -25,7 +25,7 @@ async def test_sign_up_settings_get_entity_tag(self, resource_group): response = await self.client.sign_up_settings.get_entity_tag( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -37,7 +37,7 @@ async def test_sign_up_settings_get(self, resource_group): response = await self.client.sign_up_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_sign_up_settings_update(self, resource_group): "termsOfService": {"consentRequired": bool, "enabled": bool, "text": "str"}, "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -76,7 +76,7 @@ async def test_sign_up_settings_create_or_update(self, resource_group): "termsOfService": {"consentRequired": bool, "enabled": bool, "text": "str"}, "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations.py index 22465db60402..25a439ae3a4d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations.py @@ -24,7 +24,7 @@ def test_subscription_list(self, resource_group): response = self.client.subscription.list( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_subscription_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_subscription_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_subscription_create_or_update(self, resource_group): "secondaryKey": "str", "state": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -97,7 +97,7 @@ def test_subscription_update(self, resource_group): "state": "str", "stateComment": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -111,7 +111,7 @@ def test_subscription_delete(self, resource_group): service_name="str", sid="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -124,7 +124,7 @@ def test_subscription_regenerate_primary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -137,7 +137,7 @@ def test_subscription_regenerate_secondary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -150,7 +150,7 @@ def test_subscription_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations_async.py index 0f9252121f3e..b7ebc06acacb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations_async.py @@ -25,7 +25,7 @@ async def test_subscription_list(self, resource_group): response = self.client.subscription.list( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_subscription_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_subscription_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_subscription_create_or_update(self, resource_group): "secondaryKey": "str", "state": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -98,7 +98,7 @@ async def test_subscription_update(self, resource_group): "state": "str", "stateComment": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -112,7 +112,7 @@ async def test_subscription_delete(self, resource_group): service_name="str", sid="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -125,7 +125,7 @@ async def test_subscription_regenerate_primary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -138,7 +138,7 @@ async def test_subscription_regenerate_secondary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -151,7 +151,7 @@ async def test_subscription_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations.py index f99c6ea711e5..2ee429495988 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations.py @@ -25,7 +25,7 @@ def test_tag_api_link_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_tag_api_link_get(self, resource_group): service_name="str", tag_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ def test_tag_api_link_create_or_update(self, resource_group): tag_id="str", api_link_id="str", parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_tag_api_link_delete(self, resource_group): service_name="str", tag_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations_async.py index a91aa713ee40..e6d70ca78b75 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations_async.py @@ -26,7 +26,7 @@ async def test_tag_api_link_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_tag_api_link_get(self, resource_group): service_name="str", tag_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -55,7 +55,7 @@ async def test_tag_api_link_create_or_update(self, resource_group): tag_id="str", api_link_id="str", parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_tag_api_link_delete(self, resource_group): service_name="str", tag_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations.py index 4acf5d15353d..18cd9b38aa1f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations.py @@ -25,7 +25,7 @@ def test_tag_operation_link_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_tag_operation_link_get(self, resource_group): service_name="str", tag_id="str", operation_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ def test_tag_operation_link_create_or_update(self, resource_group): tag_id="str", operation_link_id="str", parameters={"id": "str", "name": "str", "operationId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_tag_operation_link_delete(self, resource_group): service_name="str", tag_id="str", operation_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations_async.py index 13929d410148..e74f7de0ae9f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations_async.py @@ -26,7 +26,7 @@ async def test_tag_operation_link_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_tag_operation_link_get(self, resource_group): service_name="str", tag_id="str", operation_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -55,7 +55,7 @@ async def test_tag_operation_link_create_or_update(self, resource_group): tag_id="str", operation_link_id="str", parameters={"id": "str", "name": "str", "operationId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_tag_operation_link_delete(self, resource_group): service_name="str", tag_id="str", operation_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations.py index 1def220d6b68..9168c4f63d22 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations.py @@ -26,7 +26,7 @@ def test_tag_list_by_operation(self, resource_group): service_name="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_tag_get_entity_state_by_operation(self, resource_group): api_id="str", operation_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_tag_get_by_operation(self, resource_group): api_id="str", operation_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -71,7 +71,7 @@ def test_tag_assign_to_operation(self, resource_group): api_id="str", operation_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -86,7 +86,7 @@ def test_tag_detach_from_operation(self, resource_group): api_id="str", operation_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -99,7 +99,7 @@ def test_tag_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -113,7 +113,7 @@ def test_tag_get_entity_state_by_api(self, resource_group): service_name="str", api_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -127,7 +127,7 @@ def test_tag_get_by_api(self, resource_group): service_name="str", api_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -141,7 +141,7 @@ def test_tag_assign_to_api(self, resource_group): service_name="str", api_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -155,7 +155,7 @@ def test_tag_detach_from_api(self, resource_group): service_name="str", api_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -168,7 +168,7 @@ def test_tag_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -182,7 +182,7 @@ def test_tag_get_entity_state_by_product(self, resource_group): service_name="str", product_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -196,7 +196,7 @@ def test_tag_get_by_product(self, resource_group): service_name="str", product_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -210,7 +210,7 @@ def test_tag_assign_to_product(self, resource_group): service_name="str", product_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -224,7 +224,7 @@ def test_tag_detach_from_product(self, resource_group): service_name="str", product_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -236,7 +236,7 @@ def test_tag_list_by_service(self, resource_group): response = self.client.tag.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -249,7 +249,7 @@ def test_tag_get_entity_state(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -262,7 +262,7 @@ def test_tag_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -276,7 +276,7 @@ def test_tag_create_or_update(self, resource_group): service_name="str", tag_id="str", parameters={"displayName": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -291,7 +291,7 @@ def test_tag_update(self, resource_group): tag_id="str", if_match="str", parameters={"displayName": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -305,7 +305,7 @@ def test_tag_delete(self, resource_group): service_name="str", tag_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations_async.py index 0b37ab4f580a..e9a6d6b1f86b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations_async.py @@ -27,7 +27,7 @@ async def test_tag_list_by_operation(self, resource_group): service_name="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_tag_get_entity_state_by_operation(self, resource_group): api_id="str", operation_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_tag_get_by_operation(self, resource_group): api_id="str", operation_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ async def test_tag_assign_to_operation(self, resource_group): api_id="str", operation_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -87,7 +87,7 @@ async def test_tag_detach_from_operation(self, resource_group): api_id="str", operation_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -100,7 +100,7 @@ async def test_tag_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -114,7 +114,7 @@ async def test_tag_get_entity_state_by_api(self, resource_group): service_name="str", api_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -128,7 +128,7 @@ async def test_tag_get_by_api(self, resource_group): service_name="str", api_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -142,7 +142,7 @@ async def test_tag_assign_to_api(self, resource_group): service_name="str", api_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -156,7 +156,7 @@ async def test_tag_detach_from_api(self, resource_group): service_name="str", api_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -169,7 +169,7 @@ async def test_tag_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -183,7 +183,7 @@ async def test_tag_get_entity_state_by_product(self, resource_group): service_name="str", product_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -197,7 +197,7 @@ async def test_tag_get_by_product(self, resource_group): service_name="str", product_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -211,7 +211,7 @@ async def test_tag_assign_to_product(self, resource_group): service_name="str", product_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -225,7 +225,7 @@ async def test_tag_detach_from_product(self, resource_group): service_name="str", product_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -237,7 +237,7 @@ async def test_tag_list_by_service(self, resource_group): response = self.client.tag.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -250,7 +250,7 @@ async def test_tag_get_entity_state(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -263,7 +263,7 @@ async def test_tag_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -277,7 +277,7 @@ async def test_tag_create_or_update(self, resource_group): service_name="str", tag_id="str", parameters={"displayName": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -292,7 +292,7 @@ async def test_tag_update(self, resource_group): tag_id="str", if_match="str", parameters={"displayName": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -306,7 +306,7 @@ async def test_tag_delete(self, resource_group): service_name="str", tag_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations.py index c5edc3e8742d..f82f3693443c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations.py @@ -25,7 +25,7 @@ def test_tag_product_link_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_tag_product_link_get(self, resource_group): service_name="str", tag_id="str", product_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ def test_tag_product_link_create_or_update(self, resource_group): tag_id="str", product_link_id="str", parameters={"id": "str", "name": "str", "productId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_tag_product_link_delete(self, resource_group): service_name="str", tag_id="str", product_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations_async.py index 2db65b97734b..05065b3124c7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations_async.py @@ -26,7 +26,7 @@ async def test_tag_product_link_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_tag_product_link_get(self, resource_group): service_name="str", tag_id="str", product_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -55,7 +55,7 @@ async def test_tag_product_link_create_or_update(self, resource_group): tag_id="str", product_link_id="str", parameters={"id": "str", "name": "str", "productId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_tag_product_link_delete(self, resource_group): service_name="str", tag_id="str", product_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations.py index c55240dd0e62..d41e0d0a724e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations.py @@ -24,7 +24,7 @@ def test_tag_resource_list_by_service(self, resource_group): response = self.client.tag_resource.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations_async.py index f3e80bbe470c..eba724d7aab1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations_async.py @@ -25,7 +25,7 @@ async def test_tag_resource_list_by_service(self, resource_group): response = self.client.tag_resource.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations.py index 2c57913ac984..66254f1be51f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations.py @@ -25,7 +25,7 @@ def test_tenant_access_git_regenerate_primary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -38,7 +38,7 @@ def test_tenant_access_git_regenerate_secondary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations_async.py index bb5e73656880..5efd63819eb8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations_async.py @@ -26,7 +26,7 @@ async def test_tenant_access_git_regenerate_primary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -39,7 +39,7 @@ async def test_tenant_access_git_regenerate_secondary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations.py index 7b80daa81245..4b5c77c1cc8d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations.py @@ -24,7 +24,7 @@ def test_tenant_access_list_by_service(self, resource_group): response = self.client.tenant_access.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_tenant_access_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_tenant_access_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,7 +65,7 @@ def test_tenant_access_create(self, resource_group): access_name="str", if_match="str", parameters={"enabled": bool, "primaryKey": "str", "principalId": "str", "secondaryKey": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,7 +80,7 @@ def test_tenant_access_update(self, resource_group): access_name="str", if_match="str", parameters={"enabled": bool}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -93,7 +93,7 @@ def test_tenant_access_regenerate_primary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -106,7 +106,7 @@ def test_tenant_access_regenerate_secondary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -119,7 +119,7 @@ def test_tenant_access_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations_async.py index e9baa75e972c..522b2b7848fa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations_async.py @@ -25,7 +25,7 @@ async def test_tenant_access_list_by_service(self, resource_group): response = self.client.tenant_access.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_tenant_access_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_tenant_access_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,7 +66,7 @@ async def test_tenant_access_create(self, resource_group): access_name="str", if_match="str", parameters={"enabled": bool, "primaryKey": "str", "principalId": "str", "secondaryKey": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -81,7 +81,7 @@ async def test_tenant_access_update(self, resource_group): access_name="str", if_match="str", parameters={"enabled": bool}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -94,7 +94,7 @@ async def test_tenant_access_regenerate_primary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -107,7 +107,7 @@ async def test_tenant_access_regenerate_secondary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -120,7 +120,7 @@ async def test_tenant_access_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations.py index 2040b66233e8..fb240e4632c8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations.py @@ -26,7 +26,7 @@ def test_tenant_configuration_begin_deploy(self, resource_group): service_name="str", configuration_name="str", parameters={"branch": "str", "force": bool}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -40,7 +40,7 @@ def test_tenant_configuration_begin_save(self, resource_group): service_name="str", configuration_name="str", parameters={"branch": "str", "force": bool}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -54,7 +54,7 @@ def test_tenant_configuration_begin_validate(self, resource_group): service_name="str", configuration_name="str", parameters={"branch": "str", "force": bool}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -67,7 +67,7 @@ def test_tenant_configuration_get_sync_state(self, resource_group): resource_group_name=resource_group.name, service_name="str", configuration_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations_async.py index 634aa0562cc1..2961a76d1d6f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations_async.py @@ -28,7 +28,7 @@ async def test_tenant_configuration_begin_deploy(self, resource_group): service_name="str", configuration_name="str", parameters={"branch": "str", "force": bool}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -44,7 +44,7 @@ async def test_tenant_configuration_begin_save(self, resource_group): service_name="str", configuration_name="str", parameters={"branch": "str", "force": bool}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -60,7 +60,7 @@ async def test_tenant_configuration_begin_validate(self, resource_group): service_name="str", configuration_name="str", parameters={"branch": "str", "force": bool}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -74,7 +74,7 @@ async def test_tenant_configuration_get_sync_state(self, resource_group): resource_group_name=resource_group.name, service_name="str", configuration_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations.py index 1d0f76304b6d..2239714dc814 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations.py @@ -24,7 +24,7 @@ def test_tenant_settings_list_by_service(self, resource_group): response = self.client.tenant_settings.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_tenant_settings_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", settings_type="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations_async.py index c6b67794d762..dbd370b0ab63 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations_async.py @@ -25,7 +25,7 @@ async def test_tenant_settings_list_by_service(self, resource_group): response = self.client.tenant_settings.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_tenant_settings_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", settings_type="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations.py index fecf1cd6879a..89f0345782c1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations.py @@ -25,7 +25,7 @@ def test_user_confirmation_password_send(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations_async.py index 7e6df681a86a..f94a6721f2d5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations_async.py @@ -26,7 +26,7 @@ async def test_user_confirmation_password_send(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations.py index 668da1620970..384a20b069c4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations.py @@ -25,7 +25,7 @@ def test_user_group_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations_async.py index e6c4687cc60e..0fe8b552da73 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations_async.py @@ -26,7 +26,7 @@ async def test_user_group_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations.py index 0bce5d7b5de0..26ace55d9c20 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations.py @@ -25,7 +25,7 @@ def test_user_identities_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations_async.py index 43ac550f81d2..413a849653fc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations_async.py @@ -26,7 +26,7 @@ async def test_user_identities_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations.py index 6af885006330..ab088cd589ef 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations.py @@ -24,7 +24,7 @@ def test_user_list_by_service(self, resource_group): response = self.client.user.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_user_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_user_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -74,7 +74,7 @@ def test_user_create_or_update(self, resource_group): "password": "str", "state": "active", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -97,7 +97,7 @@ def test_user_update(self, resource_group): "password": "str", "state": "active", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -111,7 +111,7 @@ def test_user_begin_delete(self, resource_group): service_name="str", user_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -124,7 +124,7 @@ def test_user_generate_sso_url(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -138,7 +138,7 @@ def test_user_get_shared_access_token(self, resource_group): service_name="str", user_id="str", parameters={"expiry": "2020-02-20 00:00:00", "keyType": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations_async.py index 2b730c6e6aaf..f50fce05932f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations_async.py @@ -25,7 +25,7 @@ async def test_user_list_by_service(self, resource_group): response = self.client.user.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_user_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_user_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ async def test_user_create_or_update(self, resource_group): "password": "str", "state": "active", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -98,7 +98,7 @@ async def test_user_update(self, resource_group): "password": "str", "state": "active", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -113,7 +113,7 @@ async def test_user_begin_delete(self, resource_group): service_name="str", user_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -127,7 +127,7 @@ async def test_user_generate_sso_url(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -141,7 +141,7 @@ async def test_user_get_shared_access_token(self, resource_group): service_name="str", user_id="str", parameters={"expiry": "2020-02-20 00:00:00", "keyType": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations.py index 32b3920e1652..b9c8b55bf9f6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations.py @@ -25,7 +25,7 @@ def test_user_subscription_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_user_subscription_get(self, resource_group): service_name="str", user_id="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations_async.py index 1d5158f5d5d1..93ac5b7df813 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations_async.py @@ -26,7 +26,7 @@ async def test_user_subscription_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_user_subscription_get(self, resource_group): service_name="str", user_id="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations.py index ef615eaa5136..60dba95b0554 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations.py @@ -26,7 +26,7 @@ def test_workspace_api_diagnostic_list_by_workspace(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_api_diagnostic_get_entity_tag(self, resource_group): workspace_id="str", api_id="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_workspace_api_diagnostic_get(self, resource_group): workspace_id="str", api_id="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -111,6 +111,11 @@ def test_workspace_api_diagnostic_create_or_update(self, resource_group): }, "httpCorrelationProtocol": "str", "id": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, "logClientIp": bool, "loggerId": "str", "metrics": bool, @@ -120,7 +125,7 @@ def test_workspace_api_diagnostic_create_or_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -185,7 +190,7 @@ def test_workspace_api_diagnostic_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -201,7 +206,7 @@ def test_workspace_api_diagnostic_delete(self, resource_group): api_id="str", diagnostic_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations_async.py index 46ca240d446b..1f768182bca8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_api_diagnostic_list_by_workspace(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_api_diagnostic_get_entity_tag(self, resource_group): workspace_id="str", api_id="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_workspace_api_diagnostic_get(self, resource_group): workspace_id="str", api_id="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -112,6 +112,11 @@ async def test_workspace_api_diagnostic_create_or_update(self, resource_group): }, "httpCorrelationProtocol": "str", "id": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, "logClientIp": bool, "loggerId": "str", "metrics": bool, @@ -121,7 +126,7 @@ async def test_workspace_api_diagnostic_create_or_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -186,7 +191,7 @@ async def test_workspace_api_diagnostic_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -202,7 +207,7 @@ async def test_workspace_api_diagnostic_delete(self, resource_group): api_id="str", diagnostic_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations.py index 3528d25308e0..2275ab877e1e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations.py @@ -28,7 +28,7 @@ def test_workspace_api_export_get(self, resource_group): api_id="str", format="str", export="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations_async.py index b95f314d1d65..b7da7f174d32 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations_async.py @@ -29,7 +29,7 @@ async def test_workspace_api_export_get(self, resource_group): api_id="str", format="str", export="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations.py index def475abf244..4ee9c57ef144 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations.py @@ -26,7 +26,7 @@ def test_workspace_api_operation_list_by_api(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_api_operation_get_entity_tag(self, resource_group): workspace_id="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_workspace_api_operation_get(self, resource_group): workspace_id="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -210,7 +210,7 @@ def test_workspace_api_operation_create_or_update(self, resource_group): "type": "str", "urlTemplate": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -362,7 +362,7 @@ def test_workspace_api_operation_update(self, resource_group): ], "urlTemplate": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -378,7 +378,7 @@ def test_workspace_api_operation_delete(self, resource_group): api_id="str", operation_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations_async.py index a849dde7c416..18fb39c916f6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_api_operation_list_by_api(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_api_operation_get_entity_tag(self, resource_group): workspace_id="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_workspace_api_operation_get(self, resource_group): workspace_id="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -211,7 +211,7 @@ async def test_workspace_api_operation_create_or_update(self, resource_group): "type": "str", "urlTemplate": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -363,7 +363,7 @@ async def test_workspace_api_operation_update(self, resource_group): ], "urlTemplate": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -379,7 +379,7 @@ async def test_workspace_api_operation_delete(self, resource_group): api_id="str", operation_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations.py index 66177796c58d..fe3d99cd03aa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations.py @@ -27,7 +27,7 @@ def test_workspace_api_operation_policy_list_by_operation(self, resource_group): workspace_id="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -43,7 +43,7 @@ def test_workspace_api_operation_policy_get_entity_tag(self, resource_group): api_id="str", operation_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -59,7 +59,7 @@ def test_workspace_api_operation_policy_get(self, resource_group): api_id="str", operation_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -76,7 +76,7 @@ def test_workspace_api_operation_policy_create_or_update(self, resource_group): operation_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -93,7 +93,7 @@ def test_workspace_api_operation_policy_delete(self, resource_group): operation_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations_async.py index 8eaa1eeed7f0..f97dbf0206dc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations_async.py @@ -28,7 +28,7 @@ async def test_workspace_api_operation_policy_list_by_operation(self, resource_g workspace_id="str", api_id="str", operation_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -44,7 +44,7 @@ async def test_workspace_api_operation_policy_get_entity_tag(self, resource_grou api_id="str", operation_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -60,7 +60,7 @@ async def test_workspace_api_operation_policy_get(self, resource_group): api_id="str", operation_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ async def test_workspace_api_operation_policy_create_or_update(self, resource_gr operation_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -94,7 +94,7 @@ async def test_workspace_api_operation_policy_delete(self, resource_group): operation_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations.py index 561f506810b7..3147253ac8f7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations.py @@ -25,7 +25,7 @@ def test_workspace_api_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_api_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_api_get(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -108,7 +108,7 @@ def test_workspace_api_begin_create_or_update(self, resource_group): "value": "str", "wsdlSelector": {"wsdlEndpointName": "str", "wsdlServiceName": "str"}, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -149,7 +149,7 @@ def test_workspace_api_update(self, resource_group): "termsOfServiceUrl": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -164,7 +164,7 @@ def test_workspace_api_delete(self, resource_group): workspace_id="str", api_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations_async.py index 3296863a2b61..2262faeac0a2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_api_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_api_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_api_get(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -112,7 +112,7 @@ async def test_workspace_api_begin_create_or_update(self, resource_group): "value": "str", "wsdlSelector": {"wsdlEndpointName": "str", "wsdlServiceName": "str"}, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -154,7 +154,7 @@ async def test_workspace_api_update(self, resource_group): "termsOfServiceUrl": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -169,7 +169,7 @@ async def test_workspace_api_delete(self, resource_group): workspace_id="str", api_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations.py index 0eeb75f8ca9c..9f6927ca70a8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations.py @@ -26,7 +26,7 @@ def test_workspace_api_policy_list_by_api(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_api_policy_get_entity_tag(self, resource_group): workspace_id="str", api_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_workspace_api_policy_get(self, resource_group): workspace_id="str", api_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_workspace_api_policy_create_or_update(self, resource_group): api_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -88,7 +88,7 @@ def test_workspace_api_policy_delete(self, resource_group): api_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations_async.py index 5fa60009416f..191995fe1959 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_api_policy_list_by_api(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_api_policy_get_entity_tag(self, resource_group): workspace_id="str", api_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_workspace_api_policy_get(self, resource_group): workspace_id="str", api_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_workspace_api_policy_create_or_update(self, resource_group): api_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -89,7 +89,7 @@ async def test_workspace_api_policy_delete(self, resource_group): api_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations.py index 769e3c63fb2d..1ce249fa5f99 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations.py @@ -26,7 +26,7 @@ def test_workspace_api_release_list_by_service(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_api_release_get_entity_tag(self, resource_group): workspace_id="str", api_id="str", release_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_workspace_api_release_get(self, resource_group): workspace_id="str", api_id="str", release_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,7 +80,7 @@ def test_workspace_api_release_create_or_update(self, resource_group): "type": "str", "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -105,7 +105,7 @@ def test_workspace_api_release_update(self, resource_group): "type": "str", "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -121,7 +121,7 @@ def test_workspace_api_release_delete(self, resource_group): api_id="str", release_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations_async.py index b318faff6ee5..36fd5ce4c61e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_api_release_list_by_service(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_api_release_get_entity_tag(self, resource_group): workspace_id="str", api_id="str", release_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_workspace_api_release_get(self, resource_group): workspace_id="str", api_id="str", release_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -81,7 +81,7 @@ async def test_workspace_api_release_create_or_update(self, resource_group): "type": "str", "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -106,7 +106,7 @@ async def test_workspace_api_release_update(self, resource_group): "type": "str", "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -122,7 +122,7 @@ async def test_workspace_api_release_delete(self, resource_group): api_id="str", release_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations.py index a0814be521bb..cd1c3ad63d36 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations.py @@ -26,7 +26,7 @@ def test_workspace_api_revision_list_by_service(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations_async.py index 0c0a83fe7032..b93c01e7c03e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_api_revision_list_by_service(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations.py index dd534c94e7fd..23ad9a300dfb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations.py @@ -26,7 +26,7 @@ def test_workspace_api_schema_list_by_api(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_api_schema_get_entity_tag(self, resource_group): workspace_id="str", api_id="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_workspace_api_schema_get(self, resource_group): workspace_id="str", api_id="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -81,7 +81,7 @@ def test_workspace_api_schema_begin_create_or_update(self, resource_group): "type": "str", "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -97,7 +97,7 @@ def test_workspace_api_schema_delete(self, resource_group): api_id="str", schema_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations_async.py index 3d419218eac2..d4ecf51251d6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_api_schema_list_by_api(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_api_schema_get_entity_tag(self, resource_group): workspace_id="str", api_id="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_workspace_api_schema_get(self, resource_group): workspace_id="str", api_id="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -83,7 +83,7 @@ async def test_workspace_api_schema_begin_create_or_update(self, resource_group) "type": "str", "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -100,7 +100,7 @@ async def test_workspace_api_schema_delete(self, resource_group): api_id="str", schema_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations.py index ae5157bfae94..0b514d7929f5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations.py @@ -25,7 +25,7 @@ def test_workspace_api_version_set_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_api_version_set_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", version_set_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_api_version_set_get(self, resource_group): service_name="str", workspace_id="str", version_set_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ def test_workspace_api_version_set_create_or_update(self, resource_group): "versionQueryName": "str", "versioningScheme": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -99,7 +99,7 @@ def test_workspace_api_version_set_update(self, resource_group): "versionQueryName": "str", "versioningScheme": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -114,7 +114,7 @@ def test_workspace_api_version_set_delete(self, resource_group): workspace_id="str", version_set_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations_async.py index c843cf6c9d23..03dd981515cd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_api_version_set_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_api_version_set_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", version_set_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_api_version_set_get(self, resource_group): service_name="str", workspace_id="str", version_set_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -78,7 +78,7 @@ async def test_workspace_api_version_set_create_or_update(self, resource_group): "versionQueryName": "str", "versioningScheme": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -100,7 +100,7 @@ async def test_workspace_api_version_set_update(self, resource_group): "versionQueryName": "str", "versioningScheme": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -115,7 +115,7 @@ async def test_workspace_api_version_set_delete(self, resource_group): workspace_id="str", version_set_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations.py index abb7169aacd3..46c0227ade91 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations.py @@ -25,7 +25,7 @@ def test_workspace_backend_list_by_workspace(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_backend_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", backend_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_backend_get(self, resource_group): service_name="str", workspace_id="str", backend_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,6 +68,7 @@ def test_workspace_backend_create_or_update(self, resource_group): workspace_id="str", backend_id="str", parameters={ + "azureRegion": "str", "circuitBreaker": { "rules": [ { @@ -79,6 +80,7 @@ def test_workspace_backend_create_or_update(self, resource_group): "percentage": 0, "statusCodeRanges": [{"max": 0, "min": 0}], }, + "failureResponse": {"statusCode": 0}, "name": "str", "tripDuration": "1 day, 0:00:00", } @@ -94,7 +96,11 @@ def test_workspace_backend_create_or_update(self, resource_group): "description": "str", "id": "str", "name": "str", - "pool": {"services": [{"id": "str", "priority": 0, "weight": 0}]}, + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, "properties": { "serviceFabricCluster": { "managementEndpoints": ["str"], @@ -109,11 +115,16 @@ def test_workspace_backend_create_or_update(self, resource_group): "proxy": {"url": "str", "password": "str", "username": "str"}, "resourceId": "str", "title": "str", - "tls": {"validateCertificateChain": True, "validateCertificateName": True}, + "tls": { + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + "validateCertificateChain": True, + "validateCertificateName": True, + }, "type": "str", "url": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -129,6 +140,7 @@ def test_workspace_backend_update(self, resource_group): backend_id="str", if_match="str", parameters={ + "azureRegion": "str", "circuitBreaker": { "rules": [ { @@ -140,6 +152,7 @@ def test_workspace_backend_update(self, resource_group): "percentage": 0, "statusCodeRanges": [{"max": 0, "min": 0}], }, + "failureResponse": {"statusCode": 0}, "name": "str", "tripDuration": "1 day, 0:00:00", } @@ -153,7 +166,11 @@ def test_workspace_backend_update(self, resource_group): "query": {"str": ["str"]}, }, "description": "str", - "pool": {"services": [{"id": "str", "priority": 0, "weight": 0}]}, + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, "properties": { "serviceFabricCluster": { "managementEndpoints": ["str"], @@ -168,11 +185,16 @@ def test_workspace_backend_update(self, resource_group): "proxy": {"url": "str", "password": "str", "username": "str"}, "resourceId": "str", "title": "str", - "tls": {"validateCertificateChain": True, "validateCertificateName": True}, + "tls": { + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + "validateCertificateChain": True, + "validateCertificateName": True, + }, "type": "str", "url": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -187,7 +209,7 @@ def test_workspace_backend_delete(self, resource_group): workspace_id="str", backend_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations_async.py index 52c14e2a15e1..c307058cd0fc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_backend_list_by_workspace(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_backend_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", backend_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_backend_get(self, resource_group): service_name="str", workspace_id="str", backend_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,6 +69,7 @@ async def test_workspace_backend_create_or_update(self, resource_group): workspace_id="str", backend_id="str", parameters={ + "azureRegion": "str", "circuitBreaker": { "rules": [ { @@ -80,6 +81,7 @@ async def test_workspace_backend_create_or_update(self, resource_group): "percentage": 0, "statusCodeRanges": [{"max": 0, "min": 0}], }, + "failureResponse": {"statusCode": 0}, "name": "str", "tripDuration": "1 day, 0:00:00", } @@ -95,7 +97,11 @@ async def test_workspace_backend_create_or_update(self, resource_group): "description": "str", "id": "str", "name": "str", - "pool": {"services": [{"id": "str", "priority": 0, "weight": 0}]}, + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, "properties": { "serviceFabricCluster": { "managementEndpoints": ["str"], @@ -110,11 +116,16 @@ async def test_workspace_backend_create_or_update(self, resource_group): "proxy": {"url": "str", "password": "str", "username": "str"}, "resourceId": "str", "title": "str", - "tls": {"validateCertificateChain": True, "validateCertificateName": True}, + "tls": { + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + "validateCertificateChain": True, + "validateCertificateName": True, + }, "type": "str", "url": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -130,6 +141,7 @@ async def test_workspace_backend_update(self, resource_group): backend_id="str", if_match="str", parameters={ + "azureRegion": "str", "circuitBreaker": { "rules": [ { @@ -141,6 +153,7 @@ async def test_workspace_backend_update(self, resource_group): "percentage": 0, "statusCodeRanges": [{"max": 0, "min": 0}], }, + "failureResponse": {"statusCode": 0}, "name": "str", "tripDuration": "1 day, 0:00:00", } @@ -154,7 +167,11 @@ async def test_workspace_backend_update(self, resource_group): "query": {"str": ["str"]}, }, "description": "str", - "pool": {"services": [{"id": "str", "priority": 0, "weight": 0}]}, + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, "properties": { "serviceFabricCluster": { "managementEndpoints": ["str"], @@ -169,11 +186,16 @@ async def test_workspace_backend_update(self, resource_group): "proxy": {"url": "str", "password": "str", "username": "str"}, "resourceId": "str", "title": "str", - "tls": {"validateCertificateChain": True, "validateCertificateName": True}, + "tls": { + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + "validateCertificateChain": True, + "validateCertificateName": True, + }, "type": "str", "url": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -188,7 +210,7 @@ async def test_workspace_backend_delete(self, resource_group): workspace_id="str", backend_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations.py index 6d9c4df715aa..5f9953553046 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations.py @@ -25,7 +25,7 @@ def test_workspace_certificate_list_by_workspace(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_certificate_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_certificate_get(self, resource_group): service_name="str", workspace_id="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_workspace_certificate_create_or_update(self, resource_group): "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, "password": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -87,7 +87,7 @@ def test_workspace_certificate_delete(self, resource_group): workspace_id="str", certificate_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -101,7 +101,7 @@ def test_workspace_certificate_refresh_secret(self, resource_group): service_name="str", workspace_id="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations_async.py index 155460b1fa63..8c7019f4eaf4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_certificate_list_by_workspace(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_certificate_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_certificate_get(self, resource_group): service_name="str", workspace_id="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_workspace_certificate_create_or_update(self, resource_group): "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, "password": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -88,7 +88,7 @@ async def test_workspace_certificate_delete(self, resource_group): workspace_id="str", certificate_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -102,7 +102,7 @@ async def test_workspace_certificate_refresh_secret(self, resource_group): service_name="str", workspace_id="str", certificate_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations.py index 1eeff8f62b47..34e6de5aff27 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations.py @@ -25,7 +25,7 @@ def test_workspace_diagnostic_list_by_workspace(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_diagnostic_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_diagnostic_get(self, resource_group): service_name="str", workspace_id="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -107,6 +107,11 @@ def test_workspace_diagnostic_create_or_update(self, resource_group): }, "httpCorrelationProtocol": "str", "id": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, "logClientIp": bool, "loggerId": "str", "metrics": bool, @@ -116,7 +121,7 @@ def test_workspace_diagnostic_create_or_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -180,7 +185,7 @@ def test_workspace_diagnostic_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -195,7 +200,7 @@ def test_workspace_diagnostic_delete(self, resource_group): workspace_id="str", diagnostic_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations_async.py index 3f276c516041..712eec09f6ec 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_diagnostic_list_by_workspace(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_diagnostic_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_diagnostic_get(self, resource_group): service_name="str", workspace_id="str", diagnostic_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -108,6 +108,11 @@ async def test_workspace_diagnostic_create_or_update(self, resource_group): }, "httpCorrelationProtocol": "str", "id": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, "logClientIp": bool, "loggerId": "str", "metrics": bool, @@ -117,7 +122,7 @@ async def test_workspace_diagnostic_create_or_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -181,7 +186,7 @@ async def test_workspace_diagnostic_update(self, resource_group): "type": "str", "verbosity": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -196,7 +201,7 @@ async def test_workspace_diagnostic_delete(self, resource_group): workspace_id="str", diagnostic_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations.py index d719385e27ac..a36de0526c70 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations.py @@ -25,7 +25,7 @@ def test_workspace_global_schema_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_global_schema_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_global_schema_get(self, resource_group): service_name="str", workspace_id="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ def test_workspace_global_schema_begin_create_or_update(self, resource_group): "type": "str", "value": {}, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -92,7 +92,7 @@ def test_workspace_global_schema_delete(self, resource_group): workspace_id="str", schema_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations_async.py index aed219cbeb88..2f408dd3f917 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_global_schema_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_global_schema_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_global_schema_get(self, resource_group): service_name="str", workspace_id="str", schema_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ async def test_workspace_global_schema_begin_create_or_update(self, resource_gro "type": "str", "value": {}, }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -95,7 +95,7 @@ async def test_workspace_global_schema_delete(self, resource_group): workspace_id="str", schema_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations.py index 79baaa8a4b48..2887e1d658fd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations.py @@ -25,7 +25,7 @@ def test_workspace_group_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_group_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_group_get(self, resource_group): service_name="str", workspace_id="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_workspace_group_create_or_update(self, resource_group): workspace_id="str", group_id="str", parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -84,7 +84,7 @@ def test_workspace_group_update(self, resource_group): group_id="str", if_match="str", parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -99,7 +99,7 @@ def test_workspace_group_delete(self, resource_group): workspace_id="str", group_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations_async.py index c8ba2bf14a08..1e522e7fc677 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_group_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_group_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_group_get(self, resource_group): service_name="str", workspace_id="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_workspace_group_create_or_update(self, resource_group): workspace_id="str", group_id="str", parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -85,7 +85,7 @@ async def test_workspace_group_update(self, resource_group): group_id="str", if_match="str", parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -100,7 +100,7 @@ async def test_workspace_group_delete(self, resource_group): workspace_id="str", group_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations.py index 60ecd53cc804..fd2c9f3d5558 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations.py @@ -26,7 +26,7 @@ def test_workspace_group_user_list(self, resource_group): service_name="str", workspace_id="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_group_user_check_entity_exists(self, resource_group): workspace_id="str", group_id="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_workspace_group_user_create(self, resource_group): workspace_id="str", group_id="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -71,7 +71,7 @@ def test_workspace_group_user_delete(self, resource_group): workspace_id="str", group_id="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations_async.py index c00f2ef62ac2..9654ed23c087 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_group_user_list(self, resource_group): service_name="str", workspace_id="str", group_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_group_user_check_entity_exists(self, resource_group): workspace_id="str", group_id="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_workspace_group_user_create(self, resource_group): workspace_id="str", group_id="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ async def test_workspace_group_user_delete(self, resource_group): workspace_id="str", group_id="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations.py index 9190fd02c087..a1c014e65935 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations.py @@ -25,7 +25,7 @@ def test_workspace_logger_list_by_workspace(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_logger_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", logger_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_logger_get(self, resource_group): service_name="str", workspace_id="str", logger_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ def test_workspace_logger_create_or_update(self, resource_group): "resourceId": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -93,7 +93,7 @@ def test_workspace_logger_update(self, resource_group): logger_id="str", if_match="str", parameters={"credentials": {"str": "str"}, "description": "str", "isBuffered": bool, "loggerType": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -108,7 +108,7 @@ def test_workspace_logger_delete(self, resource_group): workspace_id="str", logger_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations_async.py index ae7a384cdc50..cc47cef76e79 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_logger_list_by_workspace(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_logger_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", logger_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_logger_get(self, resource_group): service_name="str", workspace_id="str", logger_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -78,7 +78,7 @@ async def test_workspace_logger_create_or_update(self, resource_group): "resourceId": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -94,7 +94,7 @@ async def test_workspace_logger_update(self, resource_group): logger_id="str", if_match="str", parameters={"credentials": {"str": "str"}, "description": "str", "isBuffered": bool, "loggerType": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -109,7 +109,7 @@ async def test_workspace_logger_delete(self, resource_group): workspace_id="str", logger_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations.py index d954cb6a235c..d9723ec0b570 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations.py @@ -25,7 +25,7 @@ def test_workspace_named_value_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_named_value_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_named_value_get(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ def test_workspace_named_value_begin_create_or_update(self, resource_group): "type": "str", "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -99,7 +99,7 @@ def test_workspace_named_value_begin_update(self, resource_group): "tags": ["str"], "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -114,7 +114,7 @@ def test_workspace_named_value_delete(self, resource_group): workspace_id="str", named_value_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -128,7 +128,7 @@ def test_workspace_named_value_list_value(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -142,7 +142,7 @@ def test_workspace_named_value_begin_refresh_secret(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations_async.py index 29077ed40ac6..3c64816784df 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_named_value_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_named_value_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_named_value_get(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ async def test_workspace_named_value_begin_create_or_update(self, resource_group "type": "str", "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -103,7 +103,7 @@ async def test_workspace_named_value_begin_update(self, resource_group): "tags": ["str"], "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -119,7 +119,7 @@ async def test_workspace_named_value_delete(self, resource_group): workspace_id="str", named_value_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -133,7 +133,7 @@ async def test_workspace_named_value_list_value(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -148,7 +148,7 @@ async def test_workspace_named_value_begin_refresh_secret(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations.py index 517ebeb9e88c..cb59e3f66477 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations.py @@ -25,7 +25,7 @@ def test_workspace_notification_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_notification_get(self, resource_group): service_name="str", workspace_id="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_notification_create_or_update(self, resource_group): service_name="str", workspace_id="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations_async.py index 5d42ad8f2e91..bca895516d42 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_notification_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_notification_get(self, resource_group): service_name="str", workspace_id="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_notification_create_or_update(self, resource_group): service_name="str", workspace_id="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations.py index b604a967e2e0..4b0bac2b9b83 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations.py @@ -26,7 +26,7 @@ def test_workspace_notification_recipient_email_list_by_notification(self, resou service_name="str", workspace_id="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_notification_recipient_email_check_entity_exists(self, resour workspace_id="str", notification_name="str", email="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_workspace_notification_recipient_email_create_or_update(self, resource_ workspace_id="str", notification_name="str", email="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -71,7 +71,7 @@ def test_workspace_notification_recipient_email_delete(self, resource_group): workspace_id="str", notification_name="str", email="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations_async.py index 495d787477cd..6946743204bb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_notification_recipient_email_list_by_notification(self, service_name="str", workspace_id="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_notification_recipient_email_check_entity_exists(self, workspace_id="str", notification_name="str", email="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_workspace_notification_recipient_email_create_or_update(self, res workspace_id="str", notification_name="str", email="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ async def test_workspace_notification_recipient_email_delete(self, resource_grou workspace_id="str", notification_name="str", email="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations.py index 45a1a9d5a23d..963c3668a478 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations.py @@ -26,7 +26,7 @@ def test_workspace_notification_recipient_user_list_by_notification(self, resour service_name="str", workspace_id="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_notification_recipient_user_check_entity_exists(self, resourc workspace_id="str", notification_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_workspace_notification_recipient_user_create_or_update(self, resource_g workspace_id="str", notification_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -71,7 +71,7 @@ def test_workspace_notification_recipient_user_delete(self, resource_group): workspace_id="str", notification_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations_async.py index 6bca6d3edcc4..e66aed2245fd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_notification_recipient_user_list_by_notification(self, service_name="str", workspace_id="str", notification_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_notification_recipient_user_check_entity_exists(self, r workspace_id="str", notification_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_workspace_notification_recipient_user_create_or_update(self, reso workspace_id="str", notification_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ async def test_workspace_notification_recipient_user_delete(self, resource_group workspace_id="str", notification_name="str", user_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations.py index 26ecaee932b4..e853634f014c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations.py @@ -24,7 +24,7 @@ def test_workspace_list_by_service(self, resource_group): response = self.client.workspace.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_workspace_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_workspace_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,7 +64,7 @@ def test_workspace_create_or_update(self, resource_group): service_name="str", workspace_id="str", parameters={"description": "str", "displayName": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ def test_workspace_update(self, resource_group): workspace_id="str", if_match="str", parameters={"description": "str", "displayName": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -93,7 +93,7 @@ def test_workspace_delete(self, resource_group): service_name="str", workspace_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations_async.py index ff284b090703..4a26a98b98af 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations_async.py @@ -25,7 +25,7 @@ async def test_workspace_list_by_service(self, resource_group): response = self.client.workspace.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_workspace_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_workspace_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,7 +65,7 @@ async def test_workspace_create_or_update(self, resource_group): service_name="str", workspace_id="str", parameters={"description": "str", "displayName": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,7 +80,7 @@ async def test_workspace_update(self, resource_group): workspace_id="str", if_match="str", parameters={"description": "str", "displayName": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -94,7 +94,7 @@ async def test_workspace_delete(self, resource_group): service_name="str", workspace_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations.py index a33a58210ae3..ebf53dcaf9f7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations.py @@ -25,7 +25,7 @@ def test_workspace_policy_fragment_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_policy_fragment_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_policy_fragment_get(self, resource_group): service_name="str", workspace_id="str", id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -76,7 +76,7 @@ def test_workspace_policy_fragment_begin_create_or_update(self, resource_group): "type": "str", "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -91,7 +91,7 @@ def test_workspace_policy_fragment_delete(self, resource_group): workspace_id="str", id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -105,7 +105,7 @@ def test_workspace_policy_fragment_list_references(self, resource_group): service_name="str", workspace_id="str", id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations_async.py index 6b35f719b6ad..f1e4a7bcc8cb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_policy_fragment_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_policy_fragment_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_policy_fragment_get(self, resource_group): service_name="str", workspace_id="str", id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -78,7 +78,7 @@ async def test_workspace_policy_fragment_begin_create_or_update(self, resource_g "type": "str", "value": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -94,7 +94,7 @@ async def test_workspace_policy_fragment_delete(self, resource_group): workspace_id="str", id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -108,7 +108,7 @@ async def test_workspace_policy_fragment_list_references(self, resource_group): service_name="str", workspace_id="str", id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations.py index 900dafb6ddd8..cf27da9bde8f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations.py @@ -25,7 +25,7 @@ def test_workspace_policy_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_policy_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_policy_get(self, resource_group): service_name="str", workspace_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_workspace_policy_create_or_update(self, resource_group): workspace_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -83,7 +83,7 @@ def test_workspace_policy_delete(self, resource_group): workspace_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations_async.py index 6701fc5de297..11f280283e4c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_policy_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_policy_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_policy_get(self, resource_group): service_name="str", workspace_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_workspace_policy_create_or_update(self, resource_group): workspace_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -84,7 +84,7 @@ async def test_workspace_policy_delete(self, resource_group): workspace_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations.py index 5af8056859c5..eb745be7cb3c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations.py @@ -26,7 +26,7 @@ def test_workspace_product_api_link_list_by_product(self, resource_group): service_name="str", workspace_id="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_product_api_link_get(self, resource_group): workspace_id="str", product_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ def test_workspace_product_api_link_create_or_update(self, resource_group): product_id="str", api_link_id="str", parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_workspace_product_api_link_delete(self, resource_group): workspace_id="str", product_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations_async.py index d392c08eb705..1f3ac4a91c6a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_product_api_link_list_by_product(self, resource_group): service_name="str", workspace_id="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_product_api_link_get(self, resource_group): workspace_id="str", product_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -58,7 +58,7 @@ async def test_workspace_product_api_link_create_or_update(self, resource_group) product_id="str", api_link_id="str", parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_workspace_product_api_link_delete(self, resource_group): workspace_id="str", product_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations.py index 64604e98a15b..6e2f4e07f2b6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations.py @@ -26,7 +26,7 @@ def test_workspace_product_group_link_list_by_product(self, resource_group): service_name="str", workspace_id="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_product_group_link_get(self, resource_group): workspace_id="str", product_id="str", group_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ def test_workspace_product_group_link_create_or_update(self, resource_group): product_id="str", group_link_id="str", parameters={"groupId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_workspace_product_group_link_delete(self, resource_group): workspace_id="str", product_id="str", group_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations_async.py index 350071bdfc76..0b07d65953d2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_product_group_link_list_by_product(self, resource_group service_name="str", workspace_id="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_product_group_link_get(self, resource_group): workspace_id="str", product_id="str", group_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -58,7 +58,7 @@ async def test_workspace_product_group_link_create_or_update(self, resource_grou product_id="str", group_link_id="str", parameters={"groupId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_workspace_product_group_link_delete(self, resource_group): workspace_id="str", product_id="str", group_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations.py index 69a586593427..f9d311c165e6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations.py @@ -25,7 +25,7 @@ def test_workspace_product_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_product_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_product_get(self, resource_group): service_name="str", workspace_id="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,9 @@ def test_workspace_product_create_or_update(self, resource_group): workspace_id="str", product_id="str", parameters={ + "application": {"entra": {"applicationId": "str", "audience": "str"}}, "approvalRequired": bool, + "authenticationType": ["str"], "description": "str", "displayName": "str", "id": "str", @@ -79,7 +81,7 @@ def test_workspace_product_create_or_update(self, resource_group): "terms": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -95,7 +97,9 @@ def test_workspace_product_update(self, resource_group): product_id="str", if_match="str", parameters={ + "application": {"entra": {"applicationId": "str", "audience": "str"}}, "approvalRequired": bool, + "authenticationType": ["str"], "description": "str", "displayName": "str", "state": "str", @@ -103,7 +107,7 @@ def test_workspace_product_update(self, resource_group): "subscriptionsLimit": 0, "terms": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -118,7 +122,7 @@ def test_workspace_product_delete(self, resource_group): workspace_id="str", product_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations_async.py index 3f4ab6d34dbb..ef5d158327f5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_product_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_product_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_product_get(self, resource_group): service_name="str", workspace_id="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,9 @@ async def test_workspace_product_create_or_update(self, resource_group): workspace_id="str", product_id="str", parameters={ + "application": {"entra": {"applicationId": "str", "audience": "str"}}, "approvalRequired": bool, + "authenticationType": ["str"], "description": "str", "displayName": "str", "id": "str", @@ -80,7 +82,7 @@ async def test_workspace_product_create_or_update(self, resource_group): "terms": "str", "type": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -96,7 +98,9 @@ async def test_workspace_product_update(self, resource_group): product_id="str", if_match="str", parameters={ + "application": {"entra": {"applicationId": "str", "audience": "str"}}, "approvalRequired": bool, + "authenticationType": ["str"], "description": "str", "displayName": "str", "state": "str", @@ -104,7 +108,7 @@ async def test_workspace_product_update(self, resource_group): "subscriptionsLimit": 0, "terms": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -119,7 +123,7 @@ async def test_workspace_product_delete(self, resource_group): workspace_id="str", product_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations.py index 38a90dff138f..829b3375c82b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations.py @@ -26,7 +26,7 @@ def test_workspace_product_policy_list_by_product(self, resource_group): service_name="str", workspace_id="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_product_policy_get_entity_tag(self, resource_group): workspace_id="str", product_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_workspace_product_policy_get(self, resource_group): workspace_id="str", product_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_workspace_product_policy_create_or_update(self, resource_group): product_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -88,7 +88,7 @@ def test_workspace_product_policy_delete(self, resource_group): product_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations_async.py index 7294abb1b797..efa168aa6cf2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_product_policy_list_by_product(self, resource_group): service_name="str", workspace_id="str", product_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_product_policy_get_entity_tag(self, resource_group): workspace_id="str", product_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_workspace_product_policy_get(self, resource_group): workspace_id="str", product_id="str", policy_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_workspace_product_policy_create_or_update(self, resource_group): product_id="str", policy_id="str", parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -89,7 +89,7 @@ async def test_workspace_product_policy_delete(self, resource_group): product_id="str", policy_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations.py index 6f18307877c0..eb0062ef2efb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations.py @@ -25,7 +25,7 @@ def test_workspace_subscription_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_subscription_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_subscription_get(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -76,7 +76,7 @@ def test_workspace_subscription_create_or_update(self, resource_group): "secondaryKey": "str", "state": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -102,7 +102,7 @@ def test_workspace_subscription_update(self, resource_group): "state": "str", "stateComment": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -117,7 +117,7 @@ def test_workspace_subscription_delete(self, resource_group): workspace_id="str", sid="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -131,7 +131,7 @@ def test_workspace_subscription_regenerate_primary_key(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -145,7 +145,7 @@ def test_workspace_subscription_regenerate_secondary_key(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -159,7 +159,7 @@ def test_workspace_subscription_list_secrets(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations_async.py index 68eaddceb31c..30b181fe40ba 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_subscription_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_subscription_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_subscription_get(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ async def test_workspace_subscription_create_or_update(self, resource_group): "secondaryKey": "str", "state": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -103,7 +103,7 @@ async def test_workspace_subscription_update(self, resource_group): "state": "str", "stateComment": "str", }, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -118,7 +118,7 @@ async def test_workspace_subscription_delete(self, resource_group): workspace_id="str", sid="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -132,7 +132,7 @@ async def test_workspace_subscription_regenerate_primary_key(self, resource_grou service_name="str", workspace_id="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -146,7 +146,7 @@ async def test_workspace_subscription_regenerate_secondary_key(self, resource_gr service_name="str", workspace_id="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -160,7 +160,7 @@ async def test_workspace_subscription_list_secrets(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations.py index 38d4291b823f..2ed2f8169be1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations.py @@ -26,7 +26,7 @@ def test_workspace_tag_api_link_list_by_product(self, resource_group): service_name="str", workspace_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_tag_api_link_get(self, resource_group): workspace_id="str", tag_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ def test_workspace_tag_api_link_create_or_update(self, resource_group): tag_id="str", api_link_id="str", parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_workspace_tag_api_link_delete(self, resource_group): workspace_id="str", tag_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations_async.py index 149df5af2f2c..4f2061de3b2e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_tag_api_link_list_by_product(self, resource_group): service_name="str", workspace_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_tag_api_link_get(self, resource_group): workspace_id="str", tag_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -58,7 +58,7 @@ async def test_workspace_tag_api_link_create_or_update(self, resource_group): tag_id="str", api_link_id="str", parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_workspace_tag_api_link_delete(self, resource_group): workspace_id="str", tag_id="str", api_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations.py index 57823b6ec8e3..e1a028787b1d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations.py @@ -26,7 +26,7 @@ def test_workspace_tag_operation_link_list_by_product(self, resource_group): service_name="str", workspace_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_tag_operation_link_get(self, resource_group): workspace_id="str", tag_id="str", operation_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ def test_workspace_tag_operation_link_create_or_update(self, resource_group): tag_id="str", operation_link_id="str", parameters={"id": "str", "name": "str", "operationId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_workspace_tag_operation_link_delete(self, resource_group): workspace_id="str", tag_id="str", operation_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations_async.py index ef709673fd56..4dedb2bd81f1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_tag_operation_link_list_by_product(self, resource_group service_name="str", workspace_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_tag_operation_link_get(self, resource_group): workspace_id="str", tag_id="str", operation_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -58,7 +58,7 @@ async def test_workspace_tag_operation_link_create_or_update(self, resource_grou tag_id="str", operation_link_id="str", parameters={"id": "str", "name": "str", "operationId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_workspace_tag_operation_link_delete(self, resource_group): workspace_id="str", tag_id="str", operation_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations.py index 4608a287d894..c435159d78a7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations.py @@ -25,7 +25,7 @@ def test_workspace_tag_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_workspace_tag_get_entity_state(self, resource_group): service_name="str", workspace_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_workspace_tag_get(self, resource_group): service_name="str", workspace_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ def test_workspace_tag_create_or_update(self, resource_group): workspace_id="str", tag_id="str", parameters={"displayName": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -84,7 +84,7 @@ def test_workspace_tag_update(self, resource_group): tag_id="str", if_match="str", parameters={"displayName": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -99,7 +99,7 @@ def test_workspace_tag_delete(self, resource_group): workspace_id="str", tag_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations_async.py index e14cbb023b58..2d4b5b4fa5ad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations_async.py @@ -26,7 +26,7 @@ async def test_workspace_tag_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_workspace_tag_get_entity_state(self, resource_group): service_name="str", workspace_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_workspace_tag_get(self, resource_group): service_name="str", workspace_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ async def test_workspace_tag_create_or_update(self, resource_group): workspace_id="str", tag_id="str", parameters={"displayName": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -85,7 +85,7 @@ async def test_workspace_tag_update(self, resource_group): tag_id="str", if_match="str", parameters={"displayName": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -100,7 +100,7 @@ async def test_workspace_tag_delete(self, resource_group): workspace_id="str", tag_id="str", if_match="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations.py index 0d36c7f85dc1..4c5e23a0aea6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations.py @@ -26,7 +26,7 @@ def test_workspace_tag_product_link_list_by_product(self, resource_group): service_name="str", workspace_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_workspace_tag_product_link_get(self, resource_group): workspace_id="str", tag_id="str", product_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ def test_workspace_tag_product_link_create_or_update(self, resource_group): tag_id="str", product_link_id="str", parameters={"id": "str", "name": "str", "productId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_workspace_tag_product_link_delete(self, resource_group): workspace_id="str", tag_id="str", product_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations_async.py index f2e475a0480f..0720f925f10a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations_async.py @@ -27,7 +27,7 @@ async def test_workspace_tag_product_link_list_by_product(self, resource_group): service_name="str", workspace_id="str", tag_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_workspace_tag_product_link_get(self, resource_group): workspace_id="str", tag_id="str", product_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -58,7 +58,7 @@ async def test_workspace_tag_product_link_create_or_update(self, resource_group) tag_id="str", product_link_id="str", parameters={"id": "str", "name": "str", "productId": "str", "type": "str"}, - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_workspace_tag_product_link_delete(self, resource_group): workspace_id="str", tag_id="str", product_link_id="str", - api_version="2024-05-01", + api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/pyproject.toml b/sdk/apimanagement/azure-mgmt-apimanagement/pyproject.toml index 540da07d41af..54800c9de9e5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/pyproject.toml +++ b/sdk/apimanagement/azure-mgmt-apimanagement/pyproject.toml @@ -1,6 +1,88 @@ +[build-system] +requires = [ + "setuptools>=77.0.3", + "wheel", +] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-mgmt-apimanagement" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Azure Apimanagement Management Client Library for Python" +license = "MIT" +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] +requires-python = ">=3.9" +keywords = [ + "azure", + "azure sdk", +] +dependencies = [ + "isodate>=0.6.1", + "azure-mgmt-core>=1.6.0", + "typing-extensions>=4.6.0", +] +dynamic = [ + "version", + "readme", +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python" + +[tool.setuptools.dynamic.version] +attr = "azure.mgmt.apimanagement._version.VERSION" + +[tool.setuptools.dynamic.readme] +file = [ + "README.md", + "CHANGELOG.md", +] +content-type = "text/markdown" + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "generated_tests*", + "samples*", + "generated_samples*", + "doc*", + "azure", + "azure.mgmt", +] + +[tool.setuptools.package-data] +pytyped = [ + "py.typed", +] + [tool.azure-sdk-build] breaking = false mypy = false pyright = false type_check_samples = false verifytypes = false + +[packaging] +package_name = "azure-mgmt-apimanagement" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "API Management" +package_doc_id = "" +is_stable = false +is_arm = true +sample_link = "" +title = "ApiManagementClient" +need_msrestazure = false +need_azuremgmtcore = true +exclude_folders = "" diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/sdk_packaging.toml b/sdk/apimanagement/azure-mgmt-apimanagement/sdk_packaging.toml deleted file mode 100644 index 6cecfcf96902..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/sdk_packaging.toml +++ /dev/null @@ -1,9 +0,0 @@ -[packaging] -package_name = "azure-mgmt-apimanagement" -package_nspkg = "azure-mgmt-nspkg" -package_pprint_name = "API Management" -package_doc_id = "" -is_stable = true -is_arm = true -sample_link = "" -title = "ApiManagementClient" diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/setup.py b/sdk/apimanagement/azure-mgmt-apimanagement/setup.py deleted file mode 100644 index 6e06a94738de..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env python - -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-apimanagement" -PACKAGE_PPRINT_NAME = "API Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace("-", ".") - -# Version extraction inspired from 'requests' -with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), - "r", -) as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - -with open("README.md", encoding="utf-8") as f: - readme = f.read() -with open("CHANGELOG.md", encoding="utf-8") as f: - changelog = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=readme + "\n\n" + changelog, - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python", - keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.mgmt", - ] - ), - include_package_data=True, - package_data={ - "pytyped": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "typing-extensions>=4.6.0", - "azure-common>=1.1", - "azure-mgmt-core>=1.3.2", - ], - python_requires=">=3.8", -) From 2e283f91c12c85b19004ba6f5dd1744c805a6b9d Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Wed, 25 Mar 2026 21:03:08 +0800 Subject: [PATCH 2/3] generated from typespec:bee1dd3e0ddbd975c77f38a3e66f762981c35429 --- .../azure-mgmt-apimanagement/_metadata.json | 15 +- .../apiview-properties.json | 3567 +- .../azure/mgmt/apimanagement/__init__.py | 4 +- .../{_api_management_client.py => _client.py} | 639 +- .../mgmt/apimanagement/_configuration.py | 13 +- .../azure/mgmt/apimanagement/_patch.py | 37 +- .../mgmt/apimanagement/_utils/__init__.py | 2 +- .../mgmt/apimanagement/_utils/model_base.py | 1368 + .../apimanagement/_utils/serialization.py | 2 +- .../azure/mgmt/apimanagement/_utils/utils.py | 36 +- .../azure/mgmt/apimanagement/_version.py | 3 +- .../azure/mgmt/apimanagement/aio/__init__.py | 4 +- .../{_api_management_client.py => _client.py} | 655 +- .../mgmt/apimanagement/aio/_configuration.py | 13 +- .../azure/mgmt/apimanagement/aio/_patch.py | 37 +- .../apimanagement/aio/operations/__init__.py | 419 +- .../operations/_all_policies_operations.py | 143 - .../operations/_api_diagnostic_operations.py | 737 - .../aio/operations/_api_export_operations.py | 133 - ...pi_gateway_config_connection_operations.py | 572 - ...api_gateway_hostname_binding_operations.py | 724 - .../aio/operations/_api_gateway_operations.py | 826 - .../_api_issue_attachment_operations.py | 600 - .../_api_issue_comment_operations.py | 600 - .../aio/operations/_api_issue_operations.py | 750 - .../_api_management_client_operations.py | 254 - ..._api_management_gateway_skus_operations.py | 146 - .../_api_management_operations_operations.py | 132 - .../_api_management_service_operations.py | 2045 - ..._api_management_service_skus_operations.py | 145 - .../_api_management_skus_operations.py | 134 - ...pi_management_workspace_link_operations.py | 118 - ...i_management_workspace_links_operations.py | 144 - .../operations/_api_operation_operations.py | 745 - .../_api_operation_policy_operations.py | 558 - .../aio/operations/_api_operations.py | 985 - .../aio/operations/_api_policy_operations.py | 526 - .../aio/operations/_api_product_operations.py | 166 - .../aio/operations/_api_release_operations.py | 739 - .../operations/_api_revision_operations.py | 166 - .../aio/operations/_api_schema_operations.py | 657 - .../_api_tag_description_operations.py | 569 - .../aio/operations/_api_tool_operations.py | 707 - .../operations/_api_version_set_operations.py | 694 - .../aio/operations/_api_wiki_operations.py | 582 - .../aio/operations/_api_wikis_operations.py | 164 - ..._authorization_access_policy_operations.py | 515 - .../_authorization_login_links_operations.py | 212 - .../operations/_authorization_operations.py | 648 - .../_authorization_provider_operations.py | 529 - .../_authorization_server_operations.py | 754 - .../aio/operations/_backend_operations.py | 845 - .../aio/operations/_cache_operations.py | 693 - .../aio/operations/_certificate_operations.py | 623 - .../_client_application_operations.py | 582 - ...ent_application_product_link_operations.py | 475 - .../operations/_content_item_operations.py | 535 - .../operations/_content_type_operations.py | 451 - .../_delegation_settings_operations.py | 532 - .../_deleted_services_operations.py | 324 - .../aio/operations/_diagnostic_operations.py | 694 - .../operations/_documentation_operations.py | 694 - .../operations/_email_template_operations.py | 759 - .../aio/operations/_gateway_api_operations.py | 470 - ...ateway_certificate_authority_operations.py | 567 - ...teway_hostname_configuration_operations.py | 564 - .../aio/operations/_gateway_operations.py | 1413 - .../operations/_global_schema_operations.py | 616 - .../_graph_ql_api_resolver_operations.py | 740 - ...graph_ql_api_resolver_policy_operations.py | 589 - .../aio/operations/_group_operations.py | 696 - .../aio/operations/_group_user_operations.py | 375 - .../_identity_provider_operations.py | 770 - .../aio/operations/_issue_operations.py | 233 - .../aio/operations/_logger_operations.py | 697 - .../aio/operations/_named_value_operations.py | 1061 - .../operations/_network_status_operations.py | 183 - .../operations/_notification_operations.py | 307 - ...notification_recipient_email_operations.py | 347 - ..._notification_recipient_user_operations.py | 350 - .../_open_id_connect_provider_operations.py | 754 - .../aio/operations/_operation_operations.py | 175 - .../_operation_status_operations.py | 111 - .../aio/operations/_operations.py | 85220 +++++++ .../_operations_results_operations.py | 112 - ...twork_dependencies_endpoints_operations.py | 114 - .../apimanagement/aio/operations/_patch.py | 14 +- .../_policy_description_operations.py | 122 - .../operations/_policy_fragment_operations.py | 700 - .../aio/operations/_policy_operations.py | 521 - .../_policy_restriction_operations.py | 673 - ...licy_restriction_validations_operations.py | 178 - .../operations/_portal_config_operations.py | 597 - .../operations/_portal_revision_operations.py | 792 - .../operations/_portal_settings_operations.py | 114 - ..._private_endpoint_connection_operations.py | 680 - .../_product_api_link_operations.py | 471 - .../aio/operations/_product_api_operations.py | 375 - .../_product_group_link_operations.py | 471 - .../operations/_product_group_operations.py | 371 - .../aio/operations/_product_operations.py | 830 - .../operations/_product_policy_operations.py | 556 - .../_product_subscriptions_operations.py | 174 - .../operations/_product_wiki_operations.py | 582 - .../operations/_product_wikis_operations.py | 164 - .../_quota_by_counter_keys_operations.py | 285 - .../_quota_by_period_keys_operations.py | 295 - .../aio/operations/_region_operations.py | 143 - .../aio/operations/_reports_operations.py | 1006 - .../_sign_in_settings_operations.py | 470 - .../_sign_up_settings_operations.py | 470 - .../operations/_subscription_operations.py | 968 - .../operations/_tag_api_link_operations.py | 470 - .../_tag_operation_link_operations.py | 471 - .../aio/operations/_tag_operations.py | 1892 - .../_tag_product_link_operations.py | 471 - .../operations/_tag_resource_operations.py | 172 - .../_tenant_access_git_operations.py | 178 - .../operations/_tenant_access_operations.py | 809 - .../_tenant_configuration_operations.py | 827 - .../operations/_tenant_settings_operations.py | 219 - .../_user_confirmation_password_operations.py | 124 - .../aio/operations/_user_group_operations.py | 168 - .../operations/_user_identities_operations.py | 148 - .../aio/operations/_user_operations.py | 1024 - .../_user_subscription_operations.py | 246 - .../_workspace_api_diagnostic_operations.py | 799 - .../_workspace_api_export_operations.py | 138 - .../_workspace_api_operation_operations.py | 807 - ...rkspace_api_operation_policy_operations.py | 626 - .../operations/_workspace_api_operations.py | 851 - .../_workspace_api_policy_operations.py | 588 - .../_workspace_api_release_operations.py | 801 - .../_workspace_api_revision_operations.py | 171 - .../_workspace_api_schema_operations.py | 690 - .../_workspace_api_version_set_operations.py | 743 - .../_workspace_backend_operations.py | 745 - .../_workspace_certificate_operations.py | 663 - .../_workspace_diagnostic_operations.py | 743 - .../_workspace_global_schema_operations.py | 659 - .../operations/_workspace_group_operations.py | 747 - .../_workspace_group_user_operations.py | 392 - .../_workspace_logger_operations.py | 748 - .../_workspace_named_value_operations.py | 1123 - .../_workspace_notification_operations.py | 322 - ...notification_recipient_email_operations.py | 367 - ..._notification_recipient_user_operations.py | 370 - .../aio/operations/_workspace_operations.py | 695 - .../_workspace_policy_fragment_operations.py | 742 - .../_workspace_policy_operations.py | 556 - .../_workspace_product_api_link_operations.py | 509 - ...workspace_product_group_link_operations.py | 509 - .../_workspace_product_operations.py | 761 - .../_workspace_product_policy_operations.py | 558 - .../_workspace_subscription_operations.py | 1030 - .../_workspace_tag_api_link_operations.py | 508 - ...workspace_tag_operation_link_operations.py | 509 - .../operations/_workspace_tag_operations.py | 741 - .../_workspace_tag_product_link_operations.py | 509 - .../mgmt/apimanagement/models/__init__.py | 316 +- ...i_management_client_enums.py => _enums.py} | 275 +- .../mgmt/apimanagement/models/_models.py | 21629 ++ .../mgmt/apimanagement/models/_models_py3.py | 24292 -- .../azure/mgmt/apimanagement/models/_patch.py | 14 +- .../mgmt/apimanagement/operations/__init__.py | 419 +- .../operations/_all_policies_operations.py | 185 - .../operations/_api_diagnostic_operations.py | 1037 - .../operations/_api_export_operations.py | 186 - ...pi_gateway_config_connection_operations.py | 761 - ...api_gateway_hostname_binding_operations.py | 967 - .../operations/_api_gateway_operations.py | 1037 - .../_api_issue_attachment_operations.py | 876 - .../_api_issue_comment_operations.py | 876 - .../operations/_api_issue_operations.py | 1067 - .../_api_management_client_operations.py | 300 - ..._api_management_gateway_skus_operations.py | 188 - .../_api_management_operations_operations.py | 153 - .../_api_management_service_operations.py | 2554 - ..._api_management_service_skus_operations.py | 187 - .../_api_management_skus_operations.py | 159 - ...pi_management_workspace_link_operations.py | 164 - ...i_management_workspace_links_operations.py | 187 - .../operations/_api_operation_operations.py | 1038 - .../_api_operation_policy_operations.py | 807 - .../operations/_api_operations.py | 1323 - .../operations/_api_policy_operations.py | 769 - .../operations/_api_product_operations.py | 223 - .../operations/_api_release_operations.py | 1039 - .../operations/_api_revision_operations.py | 223 - .../operations/_api_schema_operations.py | 898 - .../_api_tag_description_operations.py | 825 - .../operations/_api_tool_operations.py | 983 - .../operations/_api_version_set_operations.py | 982 - .../operations/_api_wiki_operations.py | 798 - .../operations/_api_wikis_operations.py | 222 - ..._authorization_access_policy_operations.py | 783 - .../_authorization_login_links_operations.py | 274 - .../operations/_authorization_operations.py | 942 - .../_authorization_provider_operations.py | 788 - .../_authorization_server_operations.py | 1063 - .../operations/_backend_operations.py | 1156 - .../operations/_cache_operations.py | 957 - .../operations/_certificate_operations.py | 906 - .../_client_application_operations.py | 848 - ...ent_application_product_link_operations.py | 694 - .../operations/_content_item_operations.py | 769 - .../operations/_content_type_operations.py | 628 - .../_delegation_settings_operations.py | 736 - .../_deleted_services_operations.py | 416 - .../operations/_diagnostic_operations.py | 982 - .../operations/_documentation_operations.py | 982 - .../operations/_email_template_operations.py | 1047 - .../operations/_gateway_api_operations.py | 651 - ...ateway_certificate_authority_operations.py | 824 - ...teway_hostname_configuration_operations.py | 803 - .../operations/_gateway_operations.py | 1932 - .../operations/_global_schema_operations.py | 837 - .../_graph_ql_api_resolver_operations.py | 1030 - ...graph_ql_api_resolver_policy_operations.py | 836 - .../operations/_group_operations.py | 963 - .../operations/_group_user_operations.py | 553 - .../_identity_provider_operations.py | 1088 - .../operations/_issue_operations.py | 329 - .../operations/_logger_operations.py | 963 - .../operations/_named_value_operations.py | 1437 - .../operations/_network_status_operations.py | 267 - .../operations/_notification_operations.py | 448 - ...notification_recipient_email_operations.py | 531 - ..._notification_recipient_user_operations.py | 534 - .../_open_id_connect_provider_operations.py | 1063 - .../operations/_operation_operations.py | 237 - .../_operation_status_operations.py | 143 - .../apimanagement/operations/_operations.py | 107496 ++++++++ .../_operations_results_operations.py | 146 - ...twork_dependencies_endpoints_operations.py | 157 - .../mgmt/apimanagement/operations/_patch.py | 14 +- .../_policy_description_operations.py | 172 - .../operations/_policy_fragment_operations.py | 985 - .../operations/_policy_operations.py | 750 - .../_policy_restriction_operations.py | 952 - ...licy_restriction_validations_operations.py | 218 - .../operations/_portal_config_operations.py | 814 - .../operations/_portal_revision_operations.py | 1019 - .../operations/_portal_settings_operations.py | 157 - ..._private_endpoint_connection_operations.py | 946 - .../_product_api_link_operations.py | 657 - .../operations/_product_api_operations.py | 553 - .../_product_group_link_operations.py | 672 - .../operations/_product_group_operations.py | 549 - .../operations/_product_operations.py | 1169 - .../operations/_product_policy_operations.py | 794 - .../_product_subscriptions_operations.py | 231 - .../operations/_product_wiki_operations.py | 798 - .../operations/_product_wikis_operations.py | 222 - .../_quota_by_counter_keys_operations.py | 372 - .../_quota_by_period_keys_operations.py | 394 - .../operations/_region_operations.py | 185 - .../operations/_reports_operations.py | 1428 - .../_sign_in_settings_operations.py | 635 - .../_sign_up_settings_operations.py | 635 - .../operations/_subscription_operations.py | 1374 - .../operations/_tag_api_link_operations.py | 656 - .../_tag_operation_link_operations.py | 672 - .../operations/_tag_operations.py | 2847 - .../_tag_product_link_operations.py | 657 - .../operations/_tag_resource_operations.py | 227 - .../_tenant_access_git_operations.py | 268 - .../operations/_tenant_access_operations.py | 1171 - .../_tenant_configuration_operations.py | 1004 - .../operations/_tenant_settings_operations.py | 307 - .../_user_confirmation_password_operations.py | 176 - .../operations/_user_group_operations.py | 226 - .../operations/_user_identities_operations.py | 191 - .../operations/_user_operations.py | 1394 - .../_user_subscription_operations.py | 344 - .../_workspace_api_diagnostic_operations.py | 1133 - .../_workspace_api_export_operations.py | 195 - .../_workspace_api_operation_operations.py | 1134 - ...rkspace_api_operation_policy_operations.py | 898 - .../operations/_workspace_api_operations.py | 1163 - .../_workspace_api_policy_operations.py | 845 - .../_workspace_api_release_operations.py | 1135 - .../_workspace_api_revision_operations.py | 232 - .../_workspace_api_schema_operations.py | 961 - .../_workspace_api_version_set_operations.py | 1065 - .../_workspace_backend_operations.py | 1047 - .../_workspace_certificate_operations.py | 984 - .../_workspace_diagnostic_operations.py | 1065 - .../_workspace_global_schema_operations.py | 904 - .../operations/_workspace_group_operations.py | 1050 - .../_workspace_group_user_operations.py | 601 - .../_workspace_logger_operations.py | 1050 - .../_workspace_named_value_operations.py | 1549 - .../_workspace_notification_operations.py | 475 - ...notification_recipient_email_operations.py | 567 - ..._notification_recipient_user_operations.py | 570 - .../operations/_workspace_operations.py | 983 - .../_workspace_policy_fragment_operations.py | 1054 - .../_workspace_policy_operations.py | 804 - .../_workspace_product_api_link_operations.py | 726 - ...workspace_product_group_link_operations.py | 726 - .../_workspace_product_operations.py | 1072 - .../_workspace_product_policy_operations.py | 817 - .../_workspace_subscription_operations.py | 1472 - .../_workspace_tag_api_link_operations.py | 725 - ...workspace_tag_operation_link_operations.py | 726 - .../operations/_workspace_tag_operations.py | 1047 - .../_workspace_tag_product_link_operations.py | 726 - .../code_report_typespec.json | 192296 +++++++++++++++ ...custom_assigned_certificate_thumbprints.py | 7 +- .../api_management_all_policies.py | 7 +- ...ent_apply_network_configuration_updates.py | 7 +- ...e_or_reject_private_endpoint_connection.py | 6 +- ...ement_authorization_server_list_secrets.py | 7 +- .../api_management_backend_reconnect.py | 7 +- .../api_management_backup_with_access_key.py | 7 +- ...ent_backup_with_system_managed_identity.py | 7 +- ...kup_with_user_assigned_managed_identity.py | 7 +- .../api_management_create_ai_logger.py | 7 +- .../api_management_create_api.py | 7 +- .../api_management_create_api_clone.py | 6 +- .../api_management_create_api_diagnostic.py | 7 +- .../api_management_create_api_issue.py | 6 +- ..._management_create_api_issue_attachment.py | 7 +- ...api_management_create_api_issue_comment.py | 6 +- ...eate_api_new_version_using_existing_api.py | 6 +- .../api_management_create_api_operation.py | 7 +- ..._management_create_api_operation_policy.py | 7 +- ...api_management_create_api_operation_tag.py | 7 +- .../api_management_create_api_policy.py | 7 +- ...ement_create_api_policy_non_xml_encoded.py | 6 +- .../api_management_create_api_release.py | 6 +- ...t_create_api_revision_from_existing_api.py | 6 +- .../api_management_create_api_schema.py | 6 +- .../api_management_create_api_tag.py | 7 +- ...i_management_create_api_tag_description.py | 6 +- .../api_management_create_api_tool.py | 6 +- ...e_api_using_import_override_service_url.py | 7 +- ...management_create_api_using_oai3_import.py | 6 +- ...slate_required_query_parameters_conduct.py | 6 +- ...agement_create_api_using_swagger_import.py | 7 +- ...management_create_api_using_wadl_import.py | 6 +- .../api_management_create_api_version_set.py | 7 +- .../api_management_create_api_wiki.py | 7 +- ...t_create_api_with_multiple_auth_servers.py | 7 +- ...with_multiple_open_id_connect_providers.py | 7 +- ...agement_create_api_with_open_id_connect.py | 6 +- ...ment_create_authorization_aad_auth_code.py | 7 +- ...nt_create_authorization_aad_client_cred.py | 7 +- ...ment_create_authorization_access_policy.py | 7 +- ...te_authorization_provider_aad_auth_code.py | 7 +- ...n_provider_aad_auth_code_with_key_vault.py | 7 +- ..._authorization_provider_aad_client_cred.py | 7 +- ...e_authorization_provider_generic_oauth2.py | 7 +- ...reate_authorization_provider_oob_google.py | 6 +- ..._management_create_authorization_server.py | 7 +- ...management_create_backend_proxy_backend.py | 7 +- ...anagement_create_backend_service_fabric.py | 6 +- ...gement_create_backend_with_azure_region.py | 7 +- ...backend_with_carbon_aware_load_balancer.py | 6 +- ..._custom_assigned_certificate_x509_names.py | 7 +- ...ckend_with_priority_based_load_balancer.py | 6 +- ...reate_backend_with_simple_load_balancer.py | 6 +- ...ate_backend_with_weighted_load_balancer.py | 6 +- .../api_management_create_cache.py | 6 +- .../api_management_create_certificate.py | 7 +- ...ement_create_certificate_with_key_vault.py | 6 +- ...pi_management_create_client_application.py | 7 +- ..._create_client_application_product_link.py | 6 +- .../api_management_create_content_type.py | 7 +- ...gement_create_content_type_content_item.py | 7 +- .../api_management_create_diagnostic.py | 7 +- .../api_management_create_documentation.py | 7 +- .../api_management_create_eh_logger.py | 6 +- .../api_management_create_gateway.py | 7 +- .../api_management_create_gateway_api.py | 7 +- ...nt_create_gateway_certificate_authority.py | 7 +- ...gement_create_gateway_config_connection.py | 6 +- ...agement_create_gateway_hostname_binding.py | 7 +- ...t_create_gateway_hostname_configuration.py | 6 +- .../api_management_create_global_schema1.py | 6 +- .../api_management_create_global_schema2.py | 7 +- .../api_management_create_graph_ql_api.py | 7 +- ...management_create_graph_ql_api_resolver.py | 7 +- ...ent_create_graph_ql_api_resolver_policy.py | 6 +- .../api_management_create_group.py | 7 +- .../api_management_create_group_external.py | 7 +- .../api_management_create_group_user.py | 7 +- .../api_management_create_grpc_api.py | 6 +- ...api_management_create_identity_provider.py | 7 +- ...lti_region_service_with_custom_hostname.py | 7 +- .../api_management_create_named_value.py | 7 +- ...ement_create_named_value_with_key_vault.py | 7 +- .../api_management_create_notification.py | 7 +- ...ent_create_notification_recipient_email.py | 7 +- ...ment_create_notification_recipient_user.py | 7 +- .../api_management_create_odata_api.py | 7 +- ...agement_create_open_id_connect_provider.py | 7 +- .../api_management_create_policy.py | 6 +- .../api_management_create_policy_fragment.py | 7 +- ...pi_management_create_policy_restriction.py | 7 +- .../api_management_create_portal_config.py | 10 +- .../api_management_create_portal_revision.py | 7 +- .../api_management_create_product.py | 7 +- .../api_management_create_product_api.py | 7 +- .../api_management_create_product_api_link.py | 6 +- .../api_management_create_product_group.py | 7 +- ...pi_management_create_product_group_link.py | 6 +- .../api_management_create_product_policy.py | 6 +- .../api_management_create_product_tag.py | 7 +- .../api_management_create_product_wiki.py | 7 +- .../api_management_create_service.py | 7 +- ...pi_management_create_service_having_msi.py | 7 +- ...t_create_service_in_vnet_with_public_ip.py | 6 +- .../api_management_create_service_in_zones.py | 7 +- ...management_create_service_skuv2_service.py | 7 +- ..._service_with_custom_hostname_key_vault.py | 6 +- ...nt_create_service_with_developer_portal.py | 7 +- ...create_service_with_nat_gateway_enabled.py | 7 +- ...create_service_with_system_certificates.py | 7 +- ...ate_service_with_user_assigned_identity.py | 6 +- ...ervice_without_legacy_configuration_api.py | 7 +- ...soap_pass_through_api_using_wsdl_import.py | 7 +- ...eate_soap_to_rest_api_using_wsdl_import.py | 7 +- .../api_management_create_standard_gateway.py | 6 +- .../api_management_create_subscription.py | 6 +- .../api_management_create_tag.py | 7 +- .../api_management_create_tag_api_link.py | 6 +- ...pi_management_create_tag_operation_link.py | 6 +- .../api_management_create_tag_product_link.py | 6 +- .../api_management_create_template.py | 7 +- .../api_management_create_tenant_access.py | 10 +- .../api_management_create_user.py | 7 +- .../api_management_create_websocket_api.py | 7 +- .../api_management_create_workspace.py | 7 +- ...i_management_create_workspace_ai_logger.py | 7 +- .../api_management_create_workspace_api.py | 7 +- ...agement_create_workspace_api_diagnostic.py | 7 +- ...nagement_create_workspace_api_operation.py | 7 +- ...t_create_workspace_api_operation_policy.py | 7 +- ..._management_create_workspace_api_policy.py | 7 +- ...management_create_workspace_api_release.py | 6 +- ..._management_create_workspace_api_schema.py | 6 +- ...gement_create_workspace_api_version_set.py | 7 +- ..._create_workspace_backend_proxy_backend.py | 7 +- ...create_workspace_backend_service_fabric.py | 6 +- ...management_create_workspace_certificate.py | 7 +- ...te_workspace_certificate_with_key_vault.py | 6 +- ..._management_create_workspace_diagnostic.py | 7 +- ...i_management_create_workspace_eh_logger.py | 6 +- .../api_management_create_workspace_group.py | 7 +- ...agement_create_workspace_group_external.py | 7 +- ..._management_create_workspace_group_user.py | 7 +- ...management_create_workspace_named_value.py | 7 +- ...te_workspace_named_value_with_key_vault.py | 7 +- ...anagement_create_workspace_notification.py | 7 +- ..._workspace_notification_recipient_email.py | 7 +- ...e_workspace_notification_recipient_user.py | 7 +- .../api_management_create_workspace_policy.py | 7 +- ...gement_create_workspace_policy_fragment.py | 7 +- ...create_workspace_policy_non_xml_encoded.py | 6 +- ...gement_create_workspace_premium_gateway.py | 6 +- ...api_management_create_workspace_product.py | 7 +- ...ement_create_workspace_product_api_link.py | 6 +- ...ent_create_workspace_product_group_link.py | 6 +- ...agement_create_workspace_product_policy.py | 6 +- .../api_management_create_workspace_schema.py | 6 +- ...anagement_create_workspace_subscription.py | 6 +- .../api_management_create_workspace_tag.py | 7 +- ...anagement_create_workspace_tag_api_link.py | 6 +- ...ent_create_workspace_tag_operation_link.py | 6 +- ...ement_create_workspace_tag_product_link.py | 6 +- .../api_management_delete_api.py | 10 +- .../api_management_delete_api_diagnostic.py | 10 +- .../api_management_delete_api_issue.py | 10 +- ..._management_delete_api_issue_attachment.py | 10 +- ...api_management_delete_api_issue_comment.py | 10 +- .../api_management_delete_api_operation.py | 10 +- ..._management_delete_api_operation_policy.py | 10 +- ...api_management_delete_api_operation_tag.py | 7 +- .../api_management_delete_api_policy.py | 10 +- .../api_management_delete_api_release.py | 10 +- .../api_management_delete_api_schema.py | 10 +- .../api_management_delete_api_tag.py | 7 +- ...i_management_delete_api_tag_description.py | 10 +- .../api_management_delete_api_tool.py | 7 +- .../api_management_delete_api_version_set.py | 10 +- .../api_management_delete_api_wiki.py | 10 +- .../api_management_delete_authorization.py | 10 +- ...ment_delete_authorization_access_policy.py | 10 +- ...anagement_delete_authorization_provider.py | 10 +- ..._management_delete_authorization_server.py | 10 +- .../api_management_delete_backend.py | 10 +- .../api_management_delete_cache.py | 10 +- .../api_management_delete_certificate.py | 10 +- ...pi_management_delete_client_application.py | 7 +- ..._delete_client_application_product_link.py | 7 +- .../api_management_delete_content_type.py | 10 +- ...gement_delete_content_type_content_item.py | 10 +- .../api_management_delete_diagnostic.py | 10 +- .../api_management_delete_documentation.py | 10 +- .../api_management_delete_gateway.py | 10 +- .../api_management_delete_gateway_api.py | 7 +- ...nt_delete_gateway_certificate_authority.py | 10 +- ...gement_delete_gateway_config_connection.py | 10 +- ...agement_delete_gateway_hostname_binding.py | 10 +- ...t_delete_gateway_hostname_configuration.py | 10 +- .../api_management_delete_global_schema.py | 10 +- ...management_delete_graph_ql_api_resolver.py | 10 +- ...ent_delete_graph_ql_api_resolver_policy.py | 10 +- .../api_management_delete_group.py | 10 +- .../api_management_delete_group_user.py | 7 +- ...api_management_delete_identity_provider.py | 10 +- .../api_management_delete_logger.py | 10 +- .../api_management_delete_named_value.py | 10 +- ...ent_delete_notification_recipient_email.py | 7 +- ...ment_delete_notification_recipient_user.py | 7 +- ...agement_delete_open_id_connect_provider.py | 10 +- .../api_management_delete_policy.py | 10 +- .../api_management_delete_policy_fragment.py | 10 +- ...pi_management_delete_policy_restriction.py | 7 +- ...ment_delete_private_endpoint_connection.py | 7 +- .../api_management_delete_product.py | 10 +- .../api_management_delete_product_api.py | 7 +- .../api_management_delete_product_api_link.py | 7 +- .../api_management_delete_product_group.py | 7 +- ...pi_management_delete_product_group_link.py | 7 +- .../api_management_delete_product_policy.py | 10 +- .../api_management_delete_product_tag.py | 7 +- .../api_management_delete_product_wiki.py | 10 +- .../api_management_delete_subscription.py | 10 +- .../api_management_delete_tag.py | 10 +- .../api_management_delete_tag_api_link.py | 7 +- ...pi_management_delete_tag_operation_link.py | 7 +- .../api_management_delete_tag_product_link.py | 7 +- .../api_management_delete_template.py | 10 +- .../api_management_delete_user.py | 10 +- .../api_management_delete_workspace.py | 10 +- .../api_management_delete_workspace_api.py | 10 +- ...agement_delete_workspace_api_diagnostic.py | 10 +- ...nagement_delete_workspace_api_operation.py | 10 +- ...t_delete_workspace_api_operation_policy.py | 10 +- ..._management_delete_workspace_api_policy.py | 10 +- ...management_delete_workspace_api_release.py | 10 +- ..._management_delete_workspace_api_schema.py | 10 +- ...gement_delete_workspace_api_version_set.py | 10 +- ...api_management_delete_workspace_backend.py | 10 +- ...management_delete_workspace_certificate.py | 10 +- ..._management_delete_workspace_diagnostic.py | 10 +- .../api_management_delete_workspace_group.py | 10 +- ..._management_delete_workspace_group_user.py | 7 +- .../api_management_delete_workspace_logger.py | 10 +- ...management_delete_workspace_named_value.py | 10 +- ..._workspace_notification_recipient_email.py | 7 +- ...e_workspace_notification_recipient_user.py | 7 +- .../api_management_delete_workspace_policy.py | 10 +- ...gement_delete_workspace_policy_fragment.py | 10 +- ...api_management_delete_workspace_product.py | 10 +- ...ement_delete_workspace_product_api_link.py | 7 +- ...ent_delete_workspace_product_group_link.py | 7 +- ...agement_delete_workspace_product_policy.py | 10 +- .../api_management_delete_workspace_schema.py | 10 +- ...anagement_delete_workspace_subscription.py | 10 +- .../api_management_delete_workspace_tag.py | 10 +- ...anagement_delete_workspace_tag_api_link.py | 7 +- ...ent_delete_workspace_tag_operation_link.py | 7 +- ...ement_delete_workspace_tag_product_link.py | 7 +- ...t_deleted_services_list_by_subscription.py | 7 +- .../api_management_deleted_services_purge.py | 9 +- .../api_management_gateway_delete_gateway.py | 7 +- .../api_management_gateway_generate_token.py | 7 +- .../api_management_gateway_get_gateway.py | 7 +- ...nt_gateway_invalidate_debug_credentials.py | 7 +- ...nagement_gateway_list_debug_credentials.py | 6 +- .../api_management_gateway_list_keys.py | 7 +- .../api_management_gateway_list_trace.py | 7 +- .../api_management_gateway_regenerate_key.py | 7 +- .../api_management_get_api_contract.py | 7 +- .../api_management_get_api_diagnostic.py | 7 +- ...agement_get_api_export_in_open_api2dot0.py | 7 +- ...agement_get_api_export_in_open_api3dot0.py | 7 +- .../api_management_get_api_issue.py | 7 +- ...api_management_get_api_issue_attachment.py | 7 +- .../api_management_get_api_issue_comment.py | 7 +- .../api_management_get_api_operation.py | 7 +- ..._management_get_api_operation_pet_store.py | 7 +- ...api_management_get_api_operation_policy.py | 7 +- .../api_management_get_api_operation_tag.py | 7 +- .../api_management_get_api_policy.py | 7 +- .../api_management_get_api_release.py | 7 +- .../api_management_get_api_revision.py | 7 +- .../api_management_get_api_schema.py | 7 +- .../api_management_get_api_tag.py | 7 +- .../api_management_get_api_tag_description.py | 7 +- .../api_management_get_api_tool.py | 7 +- .../api_management_get_api_version_set.py | 7 +- .../api_management_get_api_wiki.py | 7 +- .../api_management_get_authorization.py | 7 +- ...agement_get_authorization_access_policy.py | 7 +- ...agement_get_authorization_login_request.py | 7 +- ...i_management_get_authorization_provider.py | 7 +- ...api_management_get_authorization_server.py | 7 +- .../api_management_get_backend.py | 7 +- .../api_management_get_cache.py | 7 +- .../api_management_get_certificate.py | 7 +- ...nagement_get_certificate_with_key_vault.py | 7 +- .../api_management_get_client_application.py | 7 +- ...ent_get_client_application_product_link.py | 7 +- .../api_management_get_content_type.py | 7 +- ...anagement_get_content_type_content_item.py | 7 +- ..._management_get_deleted_service_by_name.py | 9 +- .../api_management_get_diagnostic.py | 7 +- .../api_management_get_documentation.py | 7 +- .../api_management_get_gateway.py | 7 +- ...ement_get_gateway_certificate_authority.py | 7 +- ...anagement_get_gateway_config_connection.py | 7 +- ...management_get_gateway_hostname_binding.py | 7 +- ...ment_get_gateway_hostname_configuration.py | 7 +- .../api_management_get_global_schema1.py | 7 +- .../api_management_get_global_schema2.py | 7 +- ...pi_management_get_graph_ql_api_resolver.py | 7 +- ...gement_get_graph_ql_api_resolver_policy.py | 7 +- .../api_management_get_group.py | 7 +- .../api_management_get_identity_provider.py | 7 +- .../api_management_get_issue.py | 7 +- .../api_management_get_logger.py | 7 +- .../api_management_get_named_value.py | 7 +- ...nagement_get_named_value_with_key_vault.py | 7 +- .../api_management_get_notification.py | 7 +- ...management_get_open_id_connect_provider.py | 7 +- .../api_management_get_operation_result.py | 7 +- .../api_management_get_operation_status.py | 7 +- .../api_management_get_policy.py | 7 +- .../api_management_get_policy_format.py | 7 +- .../api_management_get_policy_fragment.py | 7 +- ...i_management_get_policy_fragment_format.py | 7 +- .../api_management_get_policy_restriction.py | 7 +- .../api_management_get_portal_revision.py | 7 +- ...agement_get_private_endpoint_connection.py | 7 +- ...agement_get_private_link_group_resource.py | 7 +- .../api_management_get_product.py | 7 +- .../api_management_get_product_api_link.py | 7 +- .../api_management_get_product_group_link.py | 7 +- .../api_management_get_product_policy.py | 7 +- .../api_management_get_product_tag.py | 7 +- .../api_management_get_product_wiki.py | 7 +- .../api_management_get_quota_counter_keys.py | 7 +- ..._get_quota_counter_keys_by_quota_period.py | 7 +- .../api_management_get_reports_by_api.py | 7 +- .../api_management_get_reports_by_geo.py | 7 +- ...api_management_get_reports_by_operation.py | 7 +- .../api_management_get_reports_by_product.py | 7 +- .../api_management_get_reports_by_request.py | 7 +- ..._management_get_reports_by_subscription.py | 7 +- .../api_management_get_reports_by_time.py | 7 +- .../api_management_get_reports_by_user.py | 7 +- .../api_management_get_subscription.py | 7 +- .../api_management_get_tag.py | 7 +- .../api_management_get_tag_api_link.py | 7 +- .../api_management_get_tag_operation_link.py | 7 +- .../api_management_get_tag_product_link.py | 7 +- .../api_management_get_template.py | 7 +- .../api_management_get_tenant_access.py | 7 +- .../api_management_get_tenant_git_access.py | 7 +- .../api_management_get_tenant_settings.py | 7 +- .../api_management_get_user.py | 7 +- .../api_management_get_user_subscription.py | 7 +- .../api_management_get_workspace.py | 7 +- ...i_management_get_workspace_api_contract.py | 7 +- ...management_get_workspace_api_diagnostic.py | 7 +- ...t_workspace_api_export_in_open_api2dot0.py | 7 +- ...t_workspace_api_export_in_open_api3dot0.py | 7 +- ..._management_get_workspace_api_operation.py | 7 +- ...ment_get_workspace_api_operation_policy.py | 7 +- ...api_management_get_workspace_api_policy.py | 7 +- ...pi_management_get_workspace_api_release.py | 7 +- ...i_management_get_workspace_api_revision.py | 7 +- ...api_management_get_workspace_api_schema.py | 7 +- ...anagement_get_workspace_api_version_set.py | 7 +- .../api_management_get_workspace_backend.py | 7 +- ...pi_management_get_workspace_certificate.py | 7 +- ...et_workspace_certificate_with_key_vault.py | 7 +- ...api_management_get_workspace_diagnostic.py | 7 +- .../api_management_get_workspace_group.py | 7 +- .../api_management_get_workspace_link.py | 7 +- .../api_management_get_workspace_logger.py | 7 +- ...pi_management_get_workspace_named_value.py | 7 +- ...et_workspace_named_value_with_key_vault.py | 7 +- ...i_management_get_workspace_notification.py | 7 +- .../api_management_get_workspace_policy.py | 7 +- ...anagement_get_workspace_policy_fragment.py | 7 +- ...nt_get_workspace_policy_fragment_format.py | 7 +- .../api_management_get_workspace_product.py | 7 +- ...nagement_get_workspace_product_api_link.py | 7 +- ...gement_get_workspace_product_group_link.py | 7 +- ...management_get_workspace_product_policy.py | 7 +- .../api_management_get_workspace_schema.py | 7 +- ...i_management_get_workspace_subscription.py | 7 +- .../api_management_get_workspace_tag.py | 7 +- ...i_management_get_workspace_tag_api_link.py | 7 +- ...gement_get_workspace_tag_operation_link.py | 7 +- ...nagement_get_workspace_tag_product_link.py | 7 +- .../api_management_head_api.py | 7 +- .../api_management_head_api_diagnostic.py | 7 +- .../api_management_head_api_issue.py | 7 +- ...pi_management_head_api_issue_attachment.py | 7 +- .../api_management_head_api_issue_comment.py | 7 +- .../api_management_head_api_operation.py | 7 +- ...pi_management_head_api_operation_policy.py | 7 +- .../api_management_head_api_operation_tag.py | 7 +- .../api_management_head_api_policy.py | 7 +- .../api_management_head_api_release.py | 7 +- .../api_management_head_api_schema.py | 7 +- .../api_management_head_api_tag.py | 7 +- ...api_management_head_api_tag_description.py | 7 +- .../api_management_head_api_tool.py | 7 +- .../api_management_head_api_version_set.py | 7 +- .../api_management_head_api_wiki.py | 7 +- ...pi_management_head_authorization_server.py | 7 +- .../api_management_head_backend.py | 7 +- .../api_management_head_cache.py | 7 +- .../api_management_head_certificate.py | 7 +- .../api_management_head_client_application.py | 7 +- ...nagement_head_content_type_content_item.py | 7 +- ...api_management_head_delegation_settings.py | 7 +- .../api_management_head_diagnostic.py | 7 +- .../api_management_head_documentation.py | 7 +- .../api_management_head_email_template.py | 7 +- .../api_management_head_gateway.py | 7 +- .../api_management_head_gateway_api.py | 7 +- ...ment_head_gateway_certificate_authority.py | 7 +- ...ent_head_gateway_hostname_configuration.py | 7 +- .../api_management_head_global_schema.py | 7 +- ...i_management_head_graph_ql_api_resolver.py | 7 +- ...ement_head_graph_ql_api_resolver_policy.py | 7 +- .../api_management_head_group.py | 7 +- .../api_management_head_group_user.py | 7 +- .../api_management_head_identity_provider.py | 7 +- .../api_management_head_logger.py | 7 +- .../api_management_head_named_value.py | 7 +- ...ement_head_notification_recipient_email.py | 7 +- ...gement_head_notification_recipient_user.py | 7 +- ...anagement_head_open_id_connect_provider.py | 7 +- .../api_management_head_policy.py | 7 +- .../api_management_head_policy_fragment.py | 7 +- .../api_management_head_policy_restriction.py | 7 +- .../api_management_head_portal_config.py | 7 +- .../api_management_head_portal_revision.py | 7 +- .../api_management_head_product.py | 7 +- .../api_management_head_product_api.py | 7 +- .../api_management_head_product_group.py | 7 +- .../api_management_head_product_policy.py | 7 +- .../api_management_head_product_tag.py | 7 +- .../api_management_head_product_wiki.py | 7 +- .../api_management_head_sign_in_settings.py | 7 +- .../api_management_head_sign_up_settings.py | 7 +- .../api_management_head_subscription.py | 7 +- .../api_management_head_tag.py | 7 +- .../api_management_head_tenant_access.py | 7 +- .../api_management_head_user.py | 7 +- .../api_management_head_workspace.py | 7 +- .../api_management_head_workspace_api.py | 7 +- ...anagement_head_workspace_api_diagnostic.py | 7 +- ...management_head_workspace_api_operation.py | 7 +- ...ent_head_workspace_api_operation_policy.py | 7 +- ...pi_management_head_workspace_api_policy.py | 7 +- ...i_management_head_workspace_api_release.py | 7 +- ...pi_management_head_workspace_api_schema.py | 7 +- ...nagement_head_workspace_api_version_set.py | 7 +- .../api_management_head_workspace_backend.py | 7 +- ...i_management_head_workspace_certificate.py | 7 +- ...pi_management_head_workspace_diagnostic.py | 7 +- .../api_management_head_workspace_group.py | 7 +- ...pi_management_head_workspace_group_user.py | 7 +- .../api_management_head_workspace_logger.py | 7 +- ...i_management_head_workspace_named_value.py | 7 +- ..._workspace_notification_recipient_email.py | 7 +- ...d_workspace_notification_recipient_user.py | 7 +- .../api_management_head_workspace_policy.py | 7 +- ...nagement_head_workspace_policy_fragment.py | 7 +- .../api_management_head_workspace_product.py | 7 +- ...anagement_head_workspace_product_policy.py | 7 +- .../api_management_head_workspace_schema.py | 7 +- ..._management_head_workspace_subscription.py | 7 +- .../api_management_head_workspace_tag.py | 7 +- ...nagement_identity_provider_list_secrets.py | 7 +- .../api_management_list_api_diagnostics.py | 7 +- ...i_management_list_api_issue_attachments.py | 7 +- .../api_management_list_api_issue_comments.py | 7 +- .../api_management_list_api_issues.py | 7 +- ..._management_list_api_operation_policies.py | 7 +- .../api_management_list_api_operation_tags.py | 7 +- .../api_management_list_api_operations.py | 7 +- ..._management_list_api_operations_by_tags.py | 7 +- .../api_management_list_api_policies.py | 7 +- .../api_management_list_api_products.py | 7 +- .../api_management_list_api_releases.py | 7 +- .../api_management_list_api_revisions.py | 7 +- .../api_management_list_api_schemas.py | 7 +- ...pi_management_list_api_tag_descriptions.py | 7 +- .../api_management_list_api_tags.py | 7 +- .../api_management_list_api_tools.py | 7 +- .../api_management_list_api_version_sets.py | 7 +- .../api_management_list_api_wikis.py | 7 +- .../api_management_list_apis.py | 7 +- .../api_management_list_apis_by_tags.py | 7 +- ...ment_list_authorization_access_policies.py | 7 +- ...management_list_authorization_providers.py | 7 +- ...i_management_list_authorization_servers.py | 7 +- ...anagement_list_authorizations_auth_code.py | 7 +- ...agement_list_authorizations_client_cred.py | 7 +- .../api_management_list_backends.py | 7 +- .../api_management_list_caches.py | 7 +- .../api_management_list_certificates.py | 7 +- ...t_list_client_application_product_links.py | 7 +- ...agement_list_client_application_secrets.py | 7 +- ...api_management_list_client_applications.py | 7 +- ...agement_list_content_type_content_items.py | 7 +- .../api_management_list_content_types.py | 7 +- .../api_management_list_diagnostics.py | 7 +- .../api_management_list_documentations.py | 7 +- .../api_management_list_gateway_apis.py | 7 +- ...nt_list_gateway_certificate_authorities.py | 7 +- ...nagement_list_gateway_config_connection.py | 7 +- ...nagement_list_gateway_hostname_bindings.py | 7 +- ...nt_list_gateway_hostname_configurations.py | 7 +- .../api_management_list_gateways.py | 7 +- ...anagement_list_gateways_by_subscription.py | 7 +- ...ways_by_subscription_and_resource_group.py | 7 +- .../api_management_list_global_schemas.py | 7 +- ...ent_list_graph_ql_api_resolver_policies.py | 7 +- ..._management_list_graph_ql_api_resolvers.py | 7 +- .../api_management_list_group_users.py | 7 +- .../api_management_list_groups.py | 7 +- .../api_management_list_identity_providers.py | 7 +- .../api_management_list_issues.py | 7 +- .../api_management_list_loggers.py | 7 +- .../api_management_list_named_values.py | 7 +- ...ment_list_notification_recipient_emails.py | 7 +- ...ement_list_notification_recipient_users.py | 7 +- .../api_management_list_notifications.py | 7 +- ...nagement_list_open_id_connect_providers.py | 7 +- .../api_management_list_operations.py | 5 +- .../api_management_list_policies.py | 7 +- ...api_management_list_policy_descriptions.py | 7 +- ...agement_list_policy_fragment_references.py | 7 +- .../api_management_list_policy_fragments.py | 7 +- ...api_management_list_policy_restrictions.py | 7 +- .../api_management_list_portal_config.py | 7 +- .../api_management_list_portal_revisions.py | 7 +- .../api_management_list_portal_settings.py | 7 +- ...ement_list_private_endpoint_connections.py | 7 +- ...ement_list_private_link_group_resources.py | 7 +- .../api_management_list_product_api_links.py | 7 +- .../api_management_list_product_apis.py | 7 +- ...api_management_list_product_group_links.py | 7 +- .../api_management_list_product_groups.py | 7 +- .../api_management_list_product_policies.py | 7 +- ...i_management_list_product_subscriptions.py | 7 +- .../api_management_list_product_tags.py | 7 +- .../api_management_list_product_wikis.py | 7 +- .../api_management_list_products.py | 7 +- .../api_management_list_products_by_tags.py | 7 +- .../api_management_list_regions.py | 7 +- ..._secrets_portal_settings_validation_key.py | 7 +- ...i_management_list_secrets_tenant_access.py | 7 +- ...management_list_service_by_subscription.py | 7 +- ...vice_by_subscription_and_resource_group.py | 7 +- .../api_management_list_sk_us_consumption.py | 7 +- .../api_management_list_sk_us_dedicated.py | 7 +- .../api_management_list_sk_us_gateways.py | 7 +- .../api_management_list_sku.py | 7 +- .../api_management_list_subscriptions.py | 7 +- .../api_management_list_tag_api_links.py | 7 +- ...api_management_list_tag_operation_links.py | 7 +- .../api_management_list_tag_product_links.py | 7 +- .../api_management_list_tag_resources.py | 7 +- .../api_management_list_tags.py | 7 +- .../api_management_list_templates.py | 7 +- .../api_management_list_tenant_access.py | 7 +- .../api_management_list_tenant_settings.py | 7 +- .../api_management_list_user_groups.py | 7 +- .../api_management_list_user_identities.py | 7 +- .../api_management_list_user_subscriptions.py | 7 +- .../api_management_list_users.py | 7 +- ...nagement_list_workspace_api_diagnostics.py | 7 +- ...t_list_workspace_api_operation_policies.py | 7 +- ...anagement_list_workspace_api_operations.py | 7 +- ..._management_list_workspace_api_policies.py | 7 +- ..._management_list_workspace_api_releases.py | 7 +- ...management_list_workspace_api_revisions.py | 7 +- ...i_management_list_workspace_api_schemas.py | 7 +- ...agement_list_workspace_api_version_sets.py | 7 +- .../api_management_list_workspace_apis.py | 7 +- .../api_management_list_workspace_backends.py | 7 +- ..._management_list_workspace_certificates.py | 7 +- ...i_management_list_workspace_diagnostics.py | 7 +- ...i_management_list_workspace_group_users.py | 7 +- .../api_management_list_workspace_groups.py | 7 +- .../api_management_list_workspace_links.py | 7 +- .../api_management_list_workspace_loggers.py | 7 +- ..._management_list_workspace_named_values.py | 7 +- ...workspace_notification_recipient_emails.py | 7 +- ..._workspace_notification_recipient_users.py | 7 +- ...management_list_workspace_notifications.py | 7 +- .../api_management_list_workspace_policies.py | 7 +- ...st_workspace_policy_fragment_references.py | 7 +- ...agement_list_workspace_policy_fragments.py | 7 +- ...gement_list_workspace_product_api_links.py | 7 +- ...ment_list_workspace_product_group_links.py | 7 +- ...agement_list_workspace_product_policies.py | 7 +- .../api_management_list_workspace_products.py | 7 +- .../api_management_list_workspace_schemas.py | 7 +- ...management_list_workspace_subscriptions.py | 7 +- ...management_list_workspace_tag_api_links.py | 7 +- ...ment_list_workspace_tag_operation_links.py | 7 +- ...gement_list_workspace_tag_product_links.py | 7 +- .../api_management_list_workspace_tags.py | 7 +- .../api_management_list_workspaces.py | 7 +- .../api_management_named_value_list_value.py | 7 +- ...nt_openid_connect_provider_list_secrets.py | 7 +- ...i_management_perform_connectivity_check.py | 7 +- ...perform_connectivity_check_http_connect.py | 7 +- .../api_management_portal_config.py | 7 +- ...nagement_portal_settings_get_delegation.py | 7 +- ..._management_portal_settings_get_sign_in.py | 7 +- ..._management_portal_settings_get_sign_up.py | 7 +- ...nagement_portal_settings_put_delegation.py | 7 +- ..._management_portal_settings_put_sign_in.py | 7 +- ..._management_portal_settings_put_sign_up.py | 7 +- ...ement_portal_settings_update_delegation.py | 10 +- ...nagement_portal_settings_update_sign_in.py | 10 +- ...nagement_portal_settings_update_sign_up.py | 10 +- ...horization_confirm_consent_code_request.py | 7 +- ...t_refresh_authorization_provider_secret.py | 7 +- .../api_management_refresh_certificate.py | 7 +- ...refresh_gateway_hostname_binding_secret.py | 7 +- .../api_management_refresh_named_value.py | 7 +- ...anagement_refresh_workspace_certificate.py | 7 +- ...anagement_refresh_workspace_named_value.py | 7 +- .../api_management_restore_with_access_key.py | 7 +- ...agement_service_check_name_availability.py | 7 +- .../api_management_service_delete_service.py | 7 +- ...service_get_domain_ownership_identifier.py | 7 +- ..._service_get_multi_region_internal_vnet.py | 7 +- ...i_management_service_get_network_status.py | 7 +- ..._service_get_network_status_by_location.py | 7 +- ...outbound_network_dependencies_endpoints.py | 7 +- .../api_management_service_get_service.py | 7 +- ...nagement_service_get_service_having_msi.py | 7 +- .../api_management_service_get_sso_token.py | 7 +- .../api_management_service_migrate_to_stv2.py | 7 +- ...ent_service_refresh_key_vault_hostnames.py | 7 +- ...pi_management_subscription_list_secrets.py | 7 +- ...ent_subscription_regenerate_primary_key.py | 7 +- ...t_subscription_regenerate_secondary_key.py | 7 +- ...enant_access_git_regenerate_primary_key.py | 42 + ...management_tenant_access_regenerate_key.py | 9 +- ...nt_tenant_access_regenerate_primary_key.py | 42 + ..._tenant_access_regenerate_secondary_key.py | 42 + ...api_management_tenant_access_sync_state.py | 7 +- ..._management_tenant_configuration_deploy.py | 7 +- ...pi_management_tenant_configuration_save.py | 7 +- ...anagement_tenant_configuration_validate.py | 7 +- .../api_management_undelete.py | 7 +- .../api_management_update_api.py | 10 +- .../api_management_update_api_diagnostic.py | 10 +- .../api_management_update_api_issue.py | 10 +- .../api_management_update_api_operation.py | 10 +- .../api_management_update_api_release.py | 9 +- .../api_management_update_api_tool.py | 7 +- .../api_management_update_api_version_set.py | 10 +- .../api_management_update_api_wiki.py | 10 +- ..._management_update_authorization_server.py | 10 +- .../api_management_update_backend.py | 10 +- .../api_management_update_cache.py | 10 +- .../api_management_update_diagnostic.py | 10 +- .../api_management_update_documentation.py | 10 +- .../api_management_update_gateway.py | 10 +- ...management_update_graph_ql_api_resolver.py | 10 +- .../api_management_update_group.py | 10 +- ...api_management_update_identity_provider.py | 10 +- .../api_management_update_logger.py | 10 +- .../api_management_update_named_value.py | 10 +- ...agement_update_open_id_connect_provider.py | 10 +- ...pi_management_update_policy_restriction.py | 10 +- .../api_management_update_portal_config.py | 10 +- .../api_management_update_portal_revision.py | 10 +- .../api_management_update_product.py | 10 +- .../api_management_update_product_wiki.py | 10 +- ...api_management_update_quota_counter_key.py | 7 +- ...pdate_quota_counter_key_by_quota_period.py | 7 +- ...management_update_service_disable_tls10.py | 7 +- ...gement_update_service_publisher_details.py | 7 +- ...ment_update_service_to_new_vnet_and_azs.py | 6 +- .../api_management_update_standard_gateway.py | 7 +- .../api_management_update_subscription.py | 10 +- .../api_management_update_tag.py | 10 +- .../api_management_update_template.py | 9 +- .../api_management_update_tenant_access.py | 10 +- .../api_management_update_user.py | 10 +- .../api_management_update_workspace.py | 10 +- .../api_management_update_workspace_api.py | 10 +- ...agement_update_workspace_api_diagnostic.py | 10 +- ...nagement_update_workspace_api_operation.py | 10 +- ...management_update_workspace_api_release.py | 9 +- ...gement_update_workspace_api_version_set.py | 10 +- ...api_management_update_workspace_backend.py | 10 +- ..._management_update_workspace_diagnostic.py | 10 +- .../api_management_update_workspace_group.py | 10 +- .../api_management_update_workspace_logger.py | 10 +- ...management_update_workspace_named_value.py | 10 +- ...api_management_update_workspace_product.py | 10 +- ...anagement_update_workspace_subscription.py | 10 +- .../api_management_update_workspace_tag.py | 10 +- ...agement_user_confirmation_password_send.py | 7 +- .../api_management_user_generate_sso_url.py | 7 +- .../api_management_user_token.py | 7 +- .../api_management_validate_policies.py | 7 +- ...gement_workspace_named_value_list_value.py | 7 +- ...ent_workspace_subscription_list_secrets.py | 7 +- ...ace_subscription_regenerate_primary_key.py | 7 +- ...e_subscription_regenerate_secondary_key.py | 7 +- .../generated_tests/conftest.py | 2 +- .../generated_tests/test_api_management.py | 3 +- ..._api_management_all_policies_operations.py | 3 +- ...anagement_all_policies_operations_async.py | 3 +- ...pi_management_api_diagnostic_operations.py | 238 +- ...agement_api_diagnostic_operations_async.py | 238 +- ...st_api_management_api_export_operations.py | 3 +- ..._management_api_export_operations_async.py | 3 +- ...pi_gateway_config_connection_operations.py | 49 +- ...eway_config_connection_operations_async.py | 49 +- ...api_gateway_hostname_binding_operations.py | 62 +- ...teway_hostname_binding_operations_async.py | 62 +- ...t_api_management_api_gateway_operations.py | 65 +- ...management_api_gateway_operations_async.py | 65 +- ...agement_api_issue_attachment_operations.py | 54 +- ...t_api_issue_attachment_operations_async.py | 54 +- ...management_api_issue_comment_operations.py | 54 +- ...ment_api_issue_comment_operations_async.py | 54 +- ...est_api_management_api_issue_operations.py | 82 +- ...i_management_api_issue_operations_async.py | 82 +- ..._api_management_gateway_skus_operations.py | 3 +- ...anagement_gateway_skus_operations_async.py | 3 +- ...nt_api_management_operations_operations.py | 6 +- ..._management_operations_operations_async.py | 6 +- ...ement_api_management_service_operations.py | 504 +- ...api_management_service_operations_async.py | 532 +- ..._api_management_service_skus_operations.py | 3 +- ...anagement_service_skus_operations_async.py | 3 +- ...nagement_api_management_skus_operations.py | 6 +- ...nt_api_management_skus_operations_async.py | 6 +- ...pi_management_workspace_link_operations.py | 3 +- ...agement_workspace_link_operations_async.py | 3 +- ...i_management_workspace_links_operations.py | 3 +- ...gement_workspace_links_operations_async.py | 3 +- ...api_management_api_operation_operations.py | 408 +- ...nagement_api_operation_operations_async.py | 408 +- ...agement_api_operation_policy_operations.py | 43 +- ...t_api_operation_policy_operations_async.py | 43 +- .../test_api_management_api_operations.py | 177 +- ...est_api_management_api_operations_async.py | 159 +- ...st_api_management_api_policy_operations.py | 43 +- ..._management_api_policy_operations_async.py | 43 +- ...t_api_management_api_product_operations.py | 3 +- ...management_api_product_operations_async.py | 3 +- ...t_api_management_api_release_operations.py | 82 +- ...management_api_release_operations_async.py | 82 +- ..._api_management_api_revision_operations.py | 3 +- ...anagement_api_revision_operations_async.py | 3 +- ...st_api_management_api_schema_operations.py | 60 +- ..._management_api_schema_operations_async.py | 60 +- ...nagement_api_tag_description_operations.py | 36 +- ...nt_api_tag_description_operations_async.py | 36 +- ...test_api_management_api_tool_operations.py | 64 +- ...pi_management_api_tool_operations_async.py | 64 +- ...i_management_api_version_set_operations.py | 76 +- ...gement_api_version_set_operations_async.py | 76 +- ...test_api_management_api_wiki_operations.py | 38 +- ...pi_management_api_wiki_operations_async.py | 38 +- ...est_api_management_api_wikis_operations.py | 3 +- ...i_management_api_wikis_operations_async.py | 3 +- .../test_api_management_async.py | 3 +- ..._authorization_access_policy_operations.py | 47 +- ...rization_access_policy_operations_async.py | 47 +- ...nt_authorization_login_links_operations.py | 3 +- ...horization_login_links_operations_async.py | 3 +- ...api_management_authorization_operations.py | 54 +- ...nagement_authorization_operations_async.py | 54 +- ...ement_authorization_provider_operations.py | 60 +- ...authorization_provider_operations_async.py | 60 +- ...agement_authorization_server_operations.py | 137 +- ...t_authorization_server_operations_async.py | 137 +- .../test_api_management_backend_operations.py | 252 +- ...api_management_backend_operations_async.py | 252 +- .../test_api_management_cache_operations.py | 71 +- ...t_api_management_cache_operations_async.py | 71 +- ...t_api_management_certificate_operations.py | 45 +- ...management_certificate_operations_async.py | 45 +- ...anagement_client_application_operations.py | 60 +- ...ent_client_application_operations_async.py | 60 +- ...ent_application_product_link_operations.py | 43 +- ...plication_product_link_operations_async.py | 43 +- ..._api_management_content_item_operations.py | 47 +- ...anagement_content_item_operations_async.py | 47 +- ..._api_management_content_type_operations.py | 43 +- ...anagement_content_type_operations_async.py | 43 +- ...nagement_delegation_settings_operations.py | 62 +- ...nt_delegation_settings_operations_async.py | 62 +- ..._management_deleted_services_operations.py | 26 +- ...ement_deleted_services_operations_async.py | 26 +- ...st_api_management_diagnostic_operations.py | 236 +- ..._management_diagnostic_operations_async.py | 236 +- ...api_management_documentation_operations.py | 57 +- ...nagement_documentation_operations_async.py | 57 +- ...pi_management_email_template_operations.py | 68 +- ...agement_email_template_operations_async.py | 68 +- ...t_api_management_gateway_api_operations.py | 6 +- ...management_gateway_api_operations_async.py | 6 +- ...ateway_certificate_authority_operations.py | 47 +- ..._certificate_authority_operations_async.py | 47 +- ...teway_hostname_configuration_operations.py | 64 +- ...hostname_configuration_operations_async.py | 64 +- .../test_api_management_gateway_operations.py | 78 +- ...api_management_gateway_operations_async.py | 78 +- ...api_management_global_schema_operations.py | 60 +- ...nagement_global_schema_operations_async.py | 60 +- ...gement_graph_ql_api_resolver_operations.py | 60 +- ..._graph_ql_api_resolver_operations_async.py | 60 +- ...graph_ql_api_resolver_policy_operations.py | 47 +- ...ql_api_resolver_policy_operations_async.py | 47 +- .../test_api_management_group_operations.py | 44 +- ...t_api_management_group_operations_async.py | 44 +- ...st_api_management_group_user_operations.py | 6 +- ..._management_group_user_operations_async.py | 6 +- ...management_identity_provider_operations.py | 104 +- ...ment_identity_provider_operations_async.py | 104 +- .../test_api_management_issue_operations.py | 18 +- ...t_api_management_issue_operations_async.py | 18 +- .../test_api_management_logger_operations.py | 73 +- ..._api_management_logger_operations_async.py | 73 +- ...t_api_management_named_value_operations.py | 78 +- ...management_named_value_operations_async.py | 78 +- ...pi_management_network_status_operations.py | 4 +- ...agement_network_status_operations_async.py | 4 +- ..._api_management_notification_operations.py | 23 +- ...anagement_notification_operations_async.py | 23 +- ...notification_recipient_email_operations.py | 6 +- ...cation_recipient_email_operations_async.py | 6 +- ..._notification_recipient_user_operations.py | 6 +- ...ication_recipient_user_operations_async.py | 6 +- ...ent_open_id_connect_provider_operations.py | 85 +- ...en_id_connect_provider_operations_async.py | 85 +- ...est_api_management_operation_operations.py | 3 +- ...i_management_operation_operations_async.py | 3 +- ..._management_operation_status_operations.py | 3 +- ...ement_operation_status_operations_async.py | 3 +- ...anagement_operations_results_operations.py | 3 +- ...ent_operations_results_operations_async.py | 3 +- ...twork_dependencies_endpoints_operations.py | 3 +- ...dependencies_endpoints_operations_async.py | 3 +- ...anagement_policy_description_operations.py | 3 +- ...ent_policy_description_operations_async.py | 3 +- ...i_management_policy_fragment_operations.py | 54 +- ...gement_policy_fragment_operations_async.py | 54 +- .../test_api_management_policy_operations.py | 47 +- ..._api_management_policy_operations_async.py | 47 +- ...anagement_policy_restriction_operations.py | 54 +- ...ent_policy_restriction_operations_async.py | 54 +- ...licy_restriction_validations_operations.py | 3 +- ...estriction_validations_operations_async.py | 3 +- ...api_management_portal_config_operations.py | 105 +- ...nagement_portal_config_operations_async.py | 105 +- ...i_management_portal_revision_operations.py | 88 +- ...gement_portal_revision_operations_async.py | 88 +- ...i_management_portal_settings_operations.py | 3 +- ...gement_portal_settings_operations_async.py | 3 +- ..._private_endpoint_connection_operations.py | 36 +- ...te_endpoint_connection_operations_async.py | 36 +- ..._management_product_api_link_operations.py | 43 +- ...ement_product_api_link_operations_async.py | 43 +- ...t_api_management_product_api_operations.py | 6 +- ...management_product_api_operations_async.py | 6 +- ...anagement_product_group_link_operations.py | 43 +- ...ent_product_group_link_operations_async.py | 43 +- ...api_management_product_group_operations.py | 6 +- ...nagement_product_group_operations_async.py | 6 +- .../test_api_management_product_operations.py | 79 +- ...api_management_product_operations_async.py | 79 +- ...pi_management_product_policy_operations.py | 47 +- ...agement_product_policy_operations_async.py | 47 +- ...gement_product_subscriptions_operations.py | 3 +- ..._product_subscriptions_operations_async.py | 3 +- ..._api_management_product_wiki_operations.py | 38 +- ...anagement_product_wiki_operations_async.py | 38 +- ...api_management_product_wikis_operations.py | 3 +- ...nagement_product_wikis_operations_async.py | 3 +- ...gement_quota_by_counter_keys_operations.py | 6 +- ..._quota_by_counter_keys_operations_async.py | 6 +- ...agement_quota_by_period_keys_operations.py | 6 +- ...t_quota_by_period_keys_operations_async.py | 6 +- .../test_api_management_region_operations.py | 3 +- ..._api_management_region_operations_async.py | 3 +- .../test_api_management_reports_operations.py | 10 +- ...api_management_reports_operations_async.py | 10 +- ..._management_sign_in_settings_operations.py | 55 +- ...ement_sign_in_settings_operations_async.py | 55 +- ..._management_sign_up_settings_operations.py | 53 +- ...ement_sign_up_settings_operations_async.py | 53 +- ..._api_management_subscription_operations.py | 83 +- ...anagement_subscription_operations_async.py | 83 +- ..._api_management_tag_api_link_operations.py | 43 +- ...anagement_tag_api_link_operations_async.py | 43 +- ...anagement_tag_operation_link_operations.py | 43 +- ...ent_tag_operation_link_operations_async.py | 43 +- .../test_api_management_tag_operations.py | 125 +- ...est_api_management_tag_operations_async.py | 125 +- ..._management_tag_product_link_operations.py | 43 +- ...ement_tag_product_link_operations_async.py | 43 +- ..._api_management_tag_resource_operations.py | 3 +- ...anagement_tag_resource_operations_async.py | 3 +- ...management_tenant_access_git_operations.py | 4 +- ...ment_tenant_access_git_operations_async.py | 4 +- ...api_management_tenant_access_operations.py | 44 +- ...nagement_tenant_access_operations_async.py | 44 +- ...agement_tenant_configuration_operations.py | 12 +- ...t_tenant_configuration_operations_async.py | 12 +- ...i_management_tenant_settings_operations.py | 18 +- ...gement_tenant_settings_operations_async.py | 18 +- ...t_user_confirmation_password_operations.py | 3 +- ..._confirmation_password_operations_async.py | 3 +- ...st_api_management_user_group_operations.py | 3 +- ..._management_user_group_operations_async.py | 3 +- ...i_management_user_identities_operations.py | 3 +- ...gement_user_identities_operations_async.py | 3 +- .../test_api_management_user_operations.py | 84 +- ...st_api_management_user_operations_async.py | 84 +- ...management_user_subscription_operations.py | 18 +- ...ment_user_subscription_operations_async.py | 18 +- ...ent_workspace_api_diagnostic_operations.py | 232 +- ...rkspace_api_diagnostic_operations_async.py | 232 +- ...agement_workspace_api_export_operations.py | 3 +- ...t_workspace_api_export_operations_async.py | 3 +- ...ment_workspace_api_operation_operations.py | 412 +- ...orkspace_api_operation_operations_async.py | 412 +- ...rkspace_api_operation_policy_operations.py | 47 +- ...e_api_operation_policy_operations_async.py | 47 +- ...api_management_workspace_api_operations.py | 178 +- ...nagement_workspace_api_operations_async.py | 152 +- ...agement_workspace_api_policy_operations.py | 47 +- ...t_workspace_api_policy_operations_async.py | 47 +- ...gement_workspace_api_release_operations.py | 84 +- ..._workspace_api_release_operations_async.py | 84 +- ...ement_workspace_api_revision_operations.py | 3 +- ...workspace_api_revision_operations_async.py | 3 +- ...agement_workspace_api_schema_operations.py | 62 +- ...t_workspace_api_schema_operations_async.py | 62 +- ...nt_workspace_api_version_set_operations.py | 78 +- ...kspace_api_version_set_operations_async.py | 78 +- ...management_workspace_backend_operations.py | 253 +- ...ment_workspace_backend_operations_async.py | 253 +- ...gement_workspace_certificate_operations.py | 45 +- ..._workspace_certificate_operations_async.py | 45 +- ...agement_workspace_diagnostic_operations.py | 230 +- ...t_workspace_diagnostic_operations_async.py | 230 +- ...ment_workspace_global_schema_operations.py | 62 +- ...orkspace_global_schema_operations_async.py | 62 +- ...i_management_workspace_group_operations.py | 44 +- ...gement_workspace_group_operations_async.py | 44 +- ...agement_workspace_group_user_operations.py | 6 +- ...t_workspace_group_user_operations_async.py | 6 +- ..._management_workspace_logger_operations.py | 75 +- ...ement_workspace_logger_operations_async.py | 75 +- ...gement_workspace_named_value_operations.py | 80 +- ..._workspace_named_value_operations_async.py | 80 +- ...ement_workspace_notification_operations.py | 23 +- ...workspace_notification_operations_async.py | 23 +- ...notification_recipient_email_operations.py | 6 +- ...cation_recipient_email_operations_async.py | 6 +- ..._notification_recipient_user_operations.py | 6 +- ...ication_recipient_user_operations_async.py | 6 +- ...est_api_management_workspace_operations.py | 70 +- ...i_management_workspace_operations_async.py | 70 +- ...nt_workspace_policy_fragment_operations.py | 56 +- ...kspace_policy_fragment_operations_async.py | 56 +- ..._management_workspace_policy_operations.py | 47 +- ...ement_workspace_policy_operations_async.py | 47 +- ...t_workspace_product_api_link_operations.py | 43 +- ...space_product_api_link_operations_async.py | 43 +- ...workspace_product_group_link_operations.py | 43 +- ...ace_product_group_link_operations_async.py | 43 +- ...management_workspace_product_operations.py | 94 +- ...ment_workspace_product_operations_async.py | 94 +- ...ent_workspace_product_policy_operations.py | 43 +- ...rkspace_product_policy_operations_async.py | 43 +- ...ement_workspace_subscription_operations.py | 83 +- ...workspace_subscription_operations_async.py | 83 +- ...ement_workspace_tag_api_link_operations.py | 43 +- ...workspace_tag_api_link_operations_async.py | 43 +- ...workspace_tag_operation_link_operations.py | 43 +- ...ace_tag_operation_link_operations_async.py | 43 +- ...api_management_workspace_tag_operations.py | 44 +- ...nagement_workspace_tag_operations_async.py | 44 +- ...t_workspace_tag_product_link_operations.py | 43 +- ...space_tag_product_link_operations_async.py | 43 +- .../tsp-location.yaml | 4 + 1307 files changed, 422641 insertions(+), 221657 deletions(-) rename sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/{_api_management_client.py => _client.py} (98%) create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/model_base.py rename sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/{_api_management_client.py => _client.py} (98%) delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_all_policies_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_config_connection_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_hostname_binding_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_client_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_gateway_skus_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_links_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tool_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wiki_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wikis_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_access_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_login_links_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_provider_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_product_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_documentation_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_global_schema_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_status_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operations_results_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_fragment_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_validations_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_config_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_private_endpoint_connection_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wiki_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wikis_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_api_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operation_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_product_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_diagnostic_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_export_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_release_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_revision_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_schema_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_version_set_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_backend_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_certificate_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_diagnostic_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_global_schema_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_user_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_logger_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_named_value_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_email_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_user_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_fragment_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_api_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_group_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_subscription_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_api_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operation_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_product_link_operations.py rename sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/{_api_management_client_enums.py => _enums.py} (84%) create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_all_policies_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_config_connection_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_hostname_binding_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_client_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_gateway_skus_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_links_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tool_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wiki_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wikis_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_access_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_login_links_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_provider_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_product_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_documentation_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_global_schema_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_status_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operations_results_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_fragment_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_validations_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_config_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_private_endpoint_connection_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wiki_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wikis_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_api_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operation_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_product_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_diagnostic_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_export_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_release_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_revision_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_schema_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_version_set_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_backend_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_certificate_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_diagnostic_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_global_schema_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_user_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_logger_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_named_value_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_email_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_user_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_fragment_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_api_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_group_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_policy_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_subscription_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_api_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operation_link_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operations.py delete mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_product_link_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/code_report_typespec.json create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_git_regenerate_primary_key.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_primary_key.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_secondary_key.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/tsp-location.yaml diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/_metadata.json b/sdk/apimanagement/azure-mgmt-apimanagement/_metadata.json index 844e4d4f1150..2631b883275d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/_metadata.json +++ b/sdk/apimanagement/azure-mgmt-apimanagement/_metadata.json @@ -1,11 +1,10 @@ { - "commit": "cae4dfe61e44bc4a40dc577d0948c1474c7b39c8", + "apiVersion": "2025-03-01-preview", + "apiVersions": { + "Microsoft.ApiManagement": "2025-03-01-preview" + }, + "commit": "bee1dd3e0ddbd975c77f38a3e66f762981c35429", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.10.2", - "use": [ - "@autorest/python@6.50.0", - "@autorest/modelerfour@4.27.0" - ], - "autorest_command": "autorest specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=C:\\dev\\worktrees\\sdk-azure-mgmt-apimanagement\\sdk --use=@autorest/python@6.50.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", - "readme": "specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/readme.md" + "typespec_src": "specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement", + "emitterVersion": "0.61.1" } \ No newline at end of file diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/apiview-properties.json b/sdk/apimanagement/azure-mgmt-apimanagement/apiview-properties.json index 67ea133dbc4d..ab988829e6da 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/apiview-properties.json +++ b/sdk/apimanagement/azure-mgmt-apimanagement/apiview-properties.json @@ -1,1788 +1,1787 @@ { - "CrossLanguagePackageId": null, + "CrossLanguagePackageId": "Microsoft.ApiManagement", "CrossLanguageDefinitionId": { - "azure.mgmt.apimanagement.models.AccessInformationCollection": null, - "azure.mgmt.apimanagement.models.Resource": null, - "azure.mgmt.apimanagement.models.ProxyResource": null, - "azure.mgmt.apimanagement.models.AccessInformationContract": null, - "azure.mgmt.apimanagement.models.AccessInformationCreateParameters": null, - "azure.mgmt.apimanagement.models.AccessInformationSecretsContract": null, - "azure.mgmt.apimanagement.models.AccessInformationUpdateParameters": null, - "azure.mgmt.apimanagement.models.AdditionalLocation": null, - "azure.mgmt.apimanagement.models.AllPoliciesCollection": null, - "azure.mgmt.apimanagement.models.AllPoliciesContract": null, - "azure.mgmt.apimanagement.models.ApiCollection": null, - "azure.mgmt.apimanagement.models.ApiContactInformation": null, - "azure.mgmt.apimanagement.models.ApiContract": null, - "azure.mgmt.apimanagement.models.ApiEntityBaseContract": null, - "azure.mgmt.apimanagement.models.ApiContractProperties": null, - "azure.mgmt.apimanagement.models.ApiContractUpdateProperties": null, - "azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter": null, - "azure.mgmt.apimanagement.models.ApiCreateOrUpdateProperties": null, - "azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector": null, - "azure.mgmt.apimanagement.models.ApiExportResult": null, - "azure.mgmt.apimanagement.models.ApiExportResultValue": null, - "azure.mgmt.apimanagement.models.ApiLicenseInformation": null, - "azure.mgmt.apimanagement.models.ApiManagementGatewayBaseProperties": null, - "azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionListResult": null, - "azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource": null, - "azure.mgmt.apimanagement.models.ApiManagementGatewayListResult": null, - "azure.mgmt.apimanagement.models.ApiManagementGatewayProperties": null, - "azure.mgmt.apimanagement.models.ApimResource": null, - "azure.mgmt.apimanagement.models.ApiManagementGatewayResource": null, - "azure.mgmt.apimanagement.models.ApiManagementGatewaySkuProperties": null, - "azure.mgmt.apimanagement.models.ApiManagementGatewaySkuPropertiesForPatch": null, - "azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateParameters": null, - "azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateProperties": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceBaseProperties": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceCheckNameAvailabilityParameters": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceGetDomainOwnershipIdentifierResult": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceGetSsoTokenResult": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceIdentity": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceListResult": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceProperties": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceResource": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters": null, - "azure.mgmt.apimanagement.models.ApiManagementServiceUpdateProperties": null, - "azure.mgmt.apimanagement.models.ApiManagementSku": null, - "azure.mgmt.apimanagement.models.ApiManagementSkuCapabilities": null, - "azure.mgmt.apimanagement.models.ApiManagementSkuCapacity": null, - "azure.mgmt.apimanagement.models.ApiManagementSkuCosts": null, - "azure.mgmt.apimanagement.models.ApiManagementSkuLocationInfo": null, - "azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionInfo": null, - "azure.mgmt.apimanagement.models.ApiManagementSkuRestrictions": null, - "azure.mgmt.apimanagement.models.ApiManagementSkusResult": null, - "azure.mgmt.apimanagement.models.ApiManagementSkuZoneDetails": null, - "azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksListResult": null, - "azure.mgmt.apimanagement.models.WorkspaceLinksBaseProperties": null, - "azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksProperties": null, - "azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksResource": null, - "azure.mgmt.apimanagement.models.ApiReleaseCollection": null, - "azure.mgmt.apimanagement.models.ApiReleaseContract": null, - "azure.mgmt.apimanagement.models.ApiRevisionCollection": null, - "azure.mgmt.apimanagement.models.ApiRevisionContract": null, - "azure.mgmt.apimanagement.models.ApiRevisionInfoContract": null, - "azure.mgmt.apimanagement.models.ApiTagResourceContractProperties": null, - "azure.mgmt.apimanagement.models.ApiUpdateContract": null, - "azure.mgmt.apimanagement.models.ApiVersionConstraint": null, - "azure.mgmt.apimanagement.models.ApiVersionSetCollection": null, - "azure.mgmt.apimanagement.models.ApiVersionSetContract": null, - "azure.mgmt.apimanagement.models.ApiVersionSetContractDetails": null, - "azure.mgmt.apimanagement.models.ApiVersionSetEntityBase": null, - "azure.mgmt.apimanagement.models.ApiVersionSetContractProperties": null, - "azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters": null, - "azure.mgmt.apimanagement.models.ApiVersionSetUpdateParametersProperties": null, - "azure.mgmt.apimanagement.models.ArmIdWrapper": null, - "azure.mgmt.apimanagement.models.AssociationContract": null, - "azure.mgmt.apimanagement.models.AuthenticationSettingsContract": null, - "azure.mgmt.apimanagement.models.AuthorizationAccessPolicyCollection": null, - "azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract": null, - "azure.mgmt.apimanagement.models.AuthorizationCollection": null, - "azure.mgmt.apimanagement.models.AuthorizationConfirmConsentCodeRequestContract": null, - "azure.mgmt.apimanagement.models.AuthorizationContract": null, - "azure.mgmt.apimanagement.models.AuthorizationError": null, - "azure.mgmt.apimanagement.models.AuthorizationLoginRequestContract": null, - "azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract": null, - "azure.mgmt.apimanagement.models.AuthorizationProviderCollection": null, - "azure.mgmt.apimanagement.models.AuthorizationProviderContract": null, - "azure.mgmt.apimanagement.models.AuthorizationProviderKeyVaultCreateProperties": null, - "azure.mgmt.apimanagement.models.AuthorizationProviderKeyVaultContract": null, - "azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2GrantTypes": null, - "azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2Settings": null, - "azure.mgmt.apimanagement.models.AuthorizationServerCollection": null, - "azure.mgmt.apimanagement.models.AuthorizationServerContract": null, - "azure.mgmt.apimanagement.models.AuthorizationServerContractBaseProperties": null, - "azure.mgmt.apimanagement.models.AuthorizationServerContractProperties": null, - "azure.mgmt.apimanagement.models.AuthorizationServerSecretsContract": null, - "azure.mgmt.apimanagement.models.AuthorizationServerUpdateContract": null, - "azure.mgmt.apimanagement.models.AuthorizationServerUpdateContractProperties": null, - "azure.mgmt.apimanagement.models.BackendAuthorizationHeaderCredentials": null, - "azure.mgmt.apimanagement.models.BackendBaseParameters": null, - "azure.mgmt.apimanagement.models.BackendPool": null, - "azure.mgmt.apimanagement.models.BackendBaseParametersPool": null, - "azure.mgmt.apimanagement.models.BackendCircuitBreaker": null, - "azure.mgmt.apimanagement.models.BackendCollection": null, - "azure.mgmt.apimanagement.models.BackendConfiguration": null, - "azure.mgmt.apimanagement.models.BackendContract": null, - "azure.mgmt.apimanagement.models.BackendContractProperties": null, - "azure.mgmt.apimanagement.models.BackendCredentialsContract": null, - "azure.mgmt.apimanagement.models.BackendFailureResponse": null, - "azure.mgmt.apimanagement.models.BackendPoolItem": null, - "azure.mgmt.apimanagement.models.BackendProperties": null, - "azure.mgmt.apimanagement.models.BackendProxyContract": null, - "azure.mgmt.apimanagement.models.BackendReconnectContract": null, - "azure.mgmt.apimanagement.models.BackendServiceFabricClusterProperties": null, - "azure.mgmt.apimanagement.models.BackendSessionAffinity": null, - "azure.mgmt.apimanagement.models.BackendSessionId": null, - "azure.mgmt.apimanagement.models.BackendSubnetConfiguration": null, - "azure.mgmt.apimanagement.models.BackendTlsProperties": null, - "azure.mgmt.apimanagement.models.BackendUpdateParameterProperties": null, - "azure.mgmt.apimanagement.models.BackendUpdateParameters": null, - "azure.mgmt.apimanagement.models.BodyDiagnosticSettings": null, - "azure.mgmt.apimanagement.models.CacheCollection": null, - "azure.mgmt.apimanagement.models.CacheContract": null, - "azure.mgmt.apimanagement.models.CacheUpdateParameters": null, - "azure.mgmt.apimanagement.models.CertificateCollection": null, - "azure.mgmt.apimanagement.models.CertificateConfiguration": null, - "azure.mgmt.apimanagement.models.CertificateContract": null, - "azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters": null, - "azure.mgmt.apimanagement.models.CertificateInformation": null, - "azure.mgmt.apimanagement.models.CircuitBreakerFailureCondition": null, - "azure.mgmt.apimanagement.models.CircuitBreakerRule": null, - "azure.mgmt.apimanagement.models.ClientApplicationCollection": null, - "azure.mgmt.apimanagement.models.ClientApplicationContract": null, - "azure.mgmt.apimanagement.models.ClientApplicationProductLinkCollection": null, - "azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract": null, - "azure.mgmt.apimanagement.models.ClientApplicationSecretsContract": null, - "azure.mgmt.apimanagement.models.ClientApplicationSecretsContractEntra": null, - "azure.mgmt.apimanagement.models.ClientSecretContract": null, - "azure.mgmt.apimanagement.models.ConfigurationApi": null, - "azure.mgmt.apimanagement.models.ConnectivityCheckRequest": null, - "azure.mgmt.apimanagement.models.ConnectivityCheckRequestDestination": null, - "azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfiguration": null, - "azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration": null, - "azure.mgmt.apimanagement.models.ConnectivityCheckRequestSource": null, - "azure.mgmt.apimanagement.models.ConnectivityCheckResponse": null, - "azure.mgmt.apimanagement.models.ConnectivityHop": null, - "azure.mgmt.apimanagement.models.ConnectivityIssue": null, - "azure.mgmt.apimanagement.models.ConnectivityStatusContract": null, - "azure.mgmt.apimanagement.models.ContentItemCollection": null, - "azure.mgmt.apimanagement.models.ContentItemContract": null, - "azure.mgmt.apimanagement.models.ContentTypeCollection": null, - "azure.mgmt.apimanagement.models.ContentTypeContract": null, - "azure.mgmt.apimanagement.models.DataMasking": null, - "azure.mgmt.apimanagement.models.DataMaskingEntity": null, - "azure.mgmt.apimanagement.models.DeletedServiceContract": null, - "azure.mgmt.apimanagement.models.DeletedServicesCollection": null, - "azure.mgmt.apimanagement.models.DeployConfigurationParameters": null, - "azure.mgmt.apimanagement.models.DiagnosticCollection": null, - "azure.mgmt.apimanagement.models.DiagnosticContract": null, - "azure.mgmt.apimanagement.models.DiagnosticUpdateContract": null, - "azure.mgmt.apimanagement.models.DocumentationCollection": null, - "azure.mgmt.apimanagement.models.DocumentationContract": null, - "azure.mgmt.apimanagement.models.DocumentationUpdateContract": null, - "azure.mgmt.apimanagement.models.EmailTemplateCollection": null, - "azure.mgmt.apimanagement.models.EmailTemplateContract": null, - "azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties": null, - "azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters": null, - "azure.mgmt.apimanagement.models.EndpointDependency": null, - "azure.mgmt.apimanagement.models.EndpointDetail": null, - "azure.mgmt.apimanagement.models.ErrorAdditionalInfo": null, - "azure.mgmt.apimanagement.models.ErrorDetail": null, - "azure.mgmt.apimanagement.models.ErrorFieldContract": null, - "azure.mgmt.apimanagement.models.ErrorResponse": null, - "azure.mgmt.apimanagement.models.ErrorResponseBody": null, - "azure.mgmt.apimanagement.models.FailureStatusCodeRange": null, - "azure.mgmt.apimanagement.models.FrontendConfiguration": null, - "azure.mgmt.apimanagement.models.GatewayCertificateAuthorityCollection": null, - "azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract": null, - "azure.mgmt.apimanagement.models.GatewayCollection": null, - "azure.mgmt.apimanagement.models.GatewayConfigurationApi": null, - "azure.mgmt.apimanagement.models.GatewayContract": null, - "azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract": null, - "azure.mgmt.apimanagement.models.GatewayHostnameBindingCertificate": null, - "azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVault": null, - "azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVaultLastStatus": null, - "azure.mgmt.apimanagement.models.GatewayHostnameBindingListResult": null, - "azure.mgmt.apimanagement.models.GatewayHostnameBindingResource": null, - "azure.mgmt.apimanagement.models.GatewayHostnameConfigurationCollection": null, - "azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract": null, - "azure.mgmt.apimanagement.models.GatewayKeyRegenerationRequestContract": null, - "azure.mgmt.apimanagement.models.GatewayKeysContract": null, - "azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContract": null, - "azure.mgmt.apimanagement.models.GatewayListTraceContract": null, - "azure.mgmt.apimanagement.models.GatewayResourceSkuResult": null, - "azure.mgmt.apimanagement.models.GatewayResourceSkuResults": null, - "azure.mgmt.apimanagement.models.GatewaySku": null, - "azure.mgmt.apimanagement.models.GatewaySkuCapacity": null, - "azure.mgmt.apimanagement.models.GatewayTokenContract": null, - "azure.mgmt.apimanagement.models.GatewayTokenRequestContract": null, - "azure.mgmt.apimanagement.models.GenerateSsoUrlResult": null, - "azure.mgmt.apimanagement.models.GlobalSchemaCollection": null, - "azure.mgmt.apimanagement.models.GlobalSchemaContract": null, - "azure.mgmt.apimanagement.models.GroupCollection": null, - "azure.mgmt.apimanagement.models.GroupContract": null, - "azure.mgmt.apimanagement.models.GroupContractProperties": null, - "azure.mgmt.apimanagement.models.GroupCreateParameters": null, - "azure.mgmt.apimanagement.models.GroupUpdateParameters": null, - "azure.mgmt.apimanagement.models.HostnameConfiguration": null, - "azure.mgmt.apimanagement.models.HTTPHeader": null, - "azure.mgmt.apimanagement.models.HttpMessageDiagnostic": null, - "azure.mgmt.apimanagement.models.IdentityProviderBaseParameters": null, - "azure.mgmt.apimanagement.models.IdentityProviderContract": null, - "azure.mgmt.apimanagement.models.IdentityProviderContractProperties": null, - "azure.mgmt.apimanagement.models.IdentityProviderCreateContract": null, - "azure.mgmt.apimanagement.models.IdentityProviderCreateContractProperties": null, - "azure.mgmt.apimanagement.models.IdentityProviderList": null, - "azure.mgmt.apimanagement.models.IdentityProviderUpdateParameters": null, - "azure.mgmt.apimanagement.models.IdentityProviderUpdateProperties": null, - "azure.mgmt.apimanagement.models.IssueAttachmentCollection": null, - "azure.mgmt.apimanagement.models.IssueAttachmentContract": null, - "azure.mgmt.apimanagement.models.IssueCollection": null, - "azure.mgmt.apimanagement.models.IssueCommentCollection": null, - "azure.mgmt.apimanagement.models.IssueCommentContract": null, - "azure.mgmt.apimanagement.models.IssueContract": null, - "azure.mgmt.apimanagement.models.IssueContractBaseProperties": null, - "azure.mgmt.apimanagement.models.IssueContractProperties": null, - "azure.mgmt.apimanagement.models.IssueUpdateContract": null, - "azure.mgmt.apimanagement.models.IssueUpdateContractProperties": null, - "azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties": null, - "azure.mgmt.apimanagement.models.KeyVaultContractProperties": null, - "azure.mgmt.apimanagement.models.KeyVaultLastAccessStatusContractProperties": null, - "azure.mgmt.apimanagement.models.LLMDiagnosticSettings": null, - "azure.mgmt.apimanagement.models.LLMMessageDiagnosticSettings": null, - "azure.mgmt.apimanagement.models.LoggerCollection": null, - "azure.mgmt.apimanagement.models.LoggerContract": null, - "azure.mgmt.apimanagement.models.LoggerUpdateContract": null, - "azure.mgmt.apimanagement.models.ManagedServiceIdentity": null, - "azure.mgmt.apimanagement.models.MigrateToStv2Contract": null, - "azure.mgmt.apimanagement.models.NamedValueCollection": null, - "azure.mgmt.apimanagement.models.NamedValueContract": null, - "azure.mgmt.apimanagement.models.NamedValueEntityBaseParameters": null, - "azure.mgmt.apimanagement.models.NamedValueContractProperties": null, - "azure.mgmt.apimanagement.models.NamedValueCreateContract": null, - "azure.mgmt.apimanagement.models.NamedValueCreateContractProperties": null, - "azure.mgmt.apimanagement.models.NamedValueSecretContract": null, - "azure.mgmt.apimanagement.models.NamedValueUpdateParameterProperties": null, - "azure.mgmt.apimanagement.models.NamedValueUpdateParameters": null, - "azure.mgmt.apimanagement.models.NetworkStatusContract": null, - "azure.mgmt.apimanagement.models.NetworkStatusContractByLocation": null, - "azure.mgmt.apimanagement.models.NotificationCollection": null, - "azure.mgmt.apimanagement.models.NotificationContract": null, - "azure.mgmt.apimanagement.models.OAuth2AuthenticationSettingsContract": null, - "azure.mgmt.apimanagement.models.OpenIdAuthenticationSettingsContract": null, - "azure.mgmt.apimanagement.models.OpenIdConnectProviderCollection": null, - "azure.mgmt.apimanagement.models.OpenidConnectProviderContract": null, - "azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContract": null, - "azure.mgmt.apimanagement.models.Operation": null, - "azure.mgmt.apimanagement.models.OperationCollection": null, - "azure.mgmt.apimanagement.models.OperationContract": null, - "azure.mgmt.apimanagement.models.OperationEntityBaseContract": null, - "azure.mgmt.apimanagement.models.OperationContractProperties": null, - "azure.mgmt.apimanagement.models.OperationDisplay": null, - "azure.mgmt.apimanagement.models.OperationListResult": null, - "azure.mgmt.apimanagement.models.OperationResultContract": null, - "azure.mgmt.apimanagement.models.OperationResultLogItemContract": null, - "azure.mgmt.apimanagement.models.OperationStatusResult": null, - "azure.mgmt.apimanagement.models.OperationTagResourceContractProperties": null, - "azure.mgmt.apimanagement.models.OperationUpdateContract": null, - "azure.mgmt.apimanagement.models.OperationUpdateContractProperties": null, - "azure.mgmt.apimanagement.models.OutboundEnvironmentEndpoint": null, - "azure.mgmt.apimanagement.models.OutboundEnvironmentEndpointList": null, - "azure.mgmt.apimanagement.models.ParameterContract": null, - "azure.mgmt.apimanagement.models.ParameterExampleContract": null, - "azure.mgmt.apimanagement.models.PipelineDiagnosticSettings": null, - "azure.mgmt.apimanagement.models.PolicyCollection": null, - "azure.mgmt.apimanagement.models.PolicyContract": null, - "azure.mgmt.apimanagement.models.PolicyDescriptionCollection": null, - "azure.mgmt.apimanagement.models.PolicyDescriptionContract": null, - "azure.mgmt.apimanagement.models.PolicyFragmentCollection": null, - "azure.mgmt.apimanagement.models.PolicyFragmentContract": null, - "azure.mgmt.apimanagement.models.PolicyRestrictionCollection": null, - "azure.mgmt.apimanagement.models.PolicyRestrictionContract": null, - "azure.mgmt.apimanagement.models.PolicyRestrictionUpdateContract": null, - "azure.mgmt.apimanagement.models.PolicyWithComplianceCollection": null, - "azure.mgmt.apimanagement.models.PolicyWithComplianceContract": null, - "azure.mgmt.apimanagement.models.PortalConfigCollection": null, - "azure.mgmt.apimanagement.models.PortalConfigContract": null, - "azure.mgmt.apimanagement.models.PortalConfigCorsProperties": null, - "azure.mgmt.apimanagement.models.PortalConfigCspProperties": null, - "azure.mgmt.apimanagement.models.PortalConfigDelegationProperties": null, - "azure.mgmt.apimanagement.models.PortalConfigPropertiesSignin": null, - "azure.mgmt.apimanagement.models.PortalConfigPropertiesSignup": null, - "azure.mgmt.apimanagement.models.PortalConfigTermsOfServiceProperties": null, - "azure.mgmt.apimanagement.models.PortalDelegationSettings": null, - "azure.mgmt.apimanagement.models.PortalRevisionCollection": null, - "azure.mgmt.apimanagement.models.PortalRevisionContract": null, - "azure.mgmt.apimanagement.models.PortalSettingsCollection": null, - "azure.mgmt.apimanagement.models.PortalSettingsContract": null, - "azure.mgmt.apimanagement.models.PortalSettingValidationKeyContract": null, - "azure.mgmt.apimanagement.models.PortalSigninSettings": null, - "azure.mgmt.apimanagement.models.PortalSignupSettings": null, - "azure.mgmt.apimanagement.models.PrivateEndpoint": null, - "azure.mgmt.apimanagement.models.PrivateEndpointConnection": null, - "azure.mgmt.apimanagement.models.PrivateEndpointConnectionListResult": null, - "azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequest": null, - "azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequestProperties": null, - "azure.mgmt.apimanagement.models.PrivateLinkResource": null, - "azure.mgmt.apimanagement.models.PrivateLinkResourceListResult": null, - "azure.mgmt.apimanagement.models.PrivateLinkServiceConnectionState": null, - "azure.mgmt.apimanagement.models.ProductApiLinkCollection": null, - "azure.mgmt.apimanagement.models.ProductApiLinkContract": null, - "azure.mgmt.apimanagement.models.ProductApplicationContract": null, - "azure.mgmt.apimanagement.models.ProductApplicationContractEntra": null, - "azure.mgmt.apimanagement.models.ProductCollection": null, - "azure.mgmt.apimanagement.models.ProductContract": null, - "azure.mgmt.apimanagement.models.ProductEntityBaseParameters": null, - "azure.mgmt.apimanagement.models.ProductContractProperties": null, - "azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication": null, - "azure.mgmt.apimanagement.models.ProductGroupLinkCollection": null, - "azure.mgmt.apimanagement.models.ProductGroupLinkContract": null, - "azure.mgmt.apimanagement.models.ProductTagResourceContractProperties": null, - "azure.mgmt.apimanagement.models.ProductUpdateParameters": null, - "azure.mgmt.apimanagement.models.ProductUpdateProperties": null, - "azure.mgmt.apimanagement.models.QuotaCounterCollection": null, - "azure.mgmt.apimanagement.models.QuotaCounterContract": null, - "azure.mgmt.apimanagement.models.QuotaCounterValueContract": null, - "azure.mgmt.apimanagement.models.QuotaCounterValueContractProperties": null, - "azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract": null, - "azure.mgmt.apimanagement.models.RecipientEmailCollection": null, - "azure.mgmt.apimanagement.models.RecipientEmailContract": null, - "azure.mgmt.apimanagement.models.RecipientsContractProperties": null, - "azure.mgmt.apimanagement.models.RecipientUserCollection": null, - "azure.mgmt.apimanagement.models.RecipientUserContract": null, - "azure.mgmt.apimanagement.models.RegionContract": null, - "azure.mgmt.apimanagement.models.RegionListResult": null, - "azure.mgmt.apimanagement.models.RegistrationDelegationSettingsProperties": null, - "azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper": null, - "azure.mgmt.apimanagement.models.ReportCollection": null, - "azure.mgmt.apimanagement.models.ReportRecordContract": null, - "azure.mgmt.apimanagement.models.RepresentationContract": null, - "azure.mgmt.apimanagement.models.RequestContract": null, - "azure.mgmt.apimanagement.models.RequestReportCollection": null, - "azure.mgmt.apimanagement.models.RequestReportRecordContract": null, - "azure.mgmt.apimanagement.models.ResolverCollection": null, - "azure.mgmt.apimanagement.models.ResolverContract": null, - "azure.mgmt.apimanagement.models.ResolverResultContract": null, - "azure.mgmt.apimanagement.models.ResolverResultLogItemContract": null, - "azure.mgmt.apimanagement.models.ResolverUpdateContract": null, - "azure.mgmt.apimanagement.models.ResourceCollection": null, - "azure.mgmt.apimanagement.models.ResourceCollectionValueItem": null, - "azure.mgmt.apimanagement.models.ResourceLocationDataContract": null, - "azure.mgmt.apimanagement.models.ResourceSku": null, - "azure.mgmt.apimanagement.models.ResourceSkuCapacity": null, - "azure.mgmt.apimanagement.models.ResourceSkuResult": null, - "azure.mgmt.apimanagement.models.ResourceSkuResults": null, - "azure.mgmt.apimanagement.models.ResponseContract": null, - "azure.mgmt.apimanagement.models.SamplingSettings": null, - "azure.mgmt.apimanagement.models.SaveConfigurationParameter": null, - "azure.mgmt.apimanagement.models.SchemaCollection": null, - "azure.mgmt.apimanagement.models.SchemaContract": null, - "azure.mgmt.apimanagement.models.SubscriptionCollection": null, - "azure.mgmt.apimanagement.models.SubscriptionContract": null, - "azure.mgmt.apimanagement.models.SubscriptionCreateParameters": null, - "azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract": null, - "azure.mgmt.apimanagement.models.SubscriptionKeysContract": null, - "azure.mgmt.apimanagement.models.SubscriptionsDelegationSettingsProperties": null, - "azure.mgmt.apimanagement.models.SubscriptionUpdateParameters": null, - "azure.mgmt.apimanagement.models.SystemData": null, - "azure.mgmt.apimanagement.models.TagApiLinkCollection": null, - "azure.mgmt.apimanagement.models.TagApiLinkContract": null, - "azure.mgmt.apimanagement.models.TagCollection": null, - "azure.mgmt.apimanagement.models.TagContract": null, - "azure.mgmt.apimanagement.models.TagCreateUpdateParameters": null, - "azure.mgmt.apimanagement.models.TagDescriptionBaseProperties": null, - "azure.mgmt.apimanagement.models.TagDescriptionCollection": null, - "azure.mgmt.apimanagement.models.TagDescriptionContract": null, - "azure.mgmt.apimanagement.models.TagDescriptionContractProperties": null, - "azure.mgmt.apimanagement.models.TagDescriptionCreateParameters": null, - "azure.mgmt.apimanagement.models.TagOperationLinkCollection": null, - "azure.mgmt.apimanagement.models.TagOperationLinkContract": null, - "azure.mgmt.apimanagement.models.TagProductLinkCollection": null, - "azure.mgmt.apimanagement.models.TagProductLinkContract": null, - "azure.mgmt.apimanagement.models.TagResourceCollection": null, - "azure.mgmt.apimanagement.models.TagResourceContract": null, - "azure.mgmt.apimanagement.models.TagResourceContractProperties": null, - "azure.mgmt.apimanagement.models.TenantConfigurationSyncStateContract": null, - "azure.mgmt.apimanagement.models.TenantSettingsCollection": null, - "azure.mgmt.apimanagement.models.TenantSettingsContract": null, - "azure.mgmt.apimanagement.models.TermsOfServiceProperties": null, - "azure.mgmt.apimanagement.models.TokenBodyParameterContract": null, - "azure.mgmt.apimanagement.models.ToolCollection": null, - "azure.mgmt.apimanagement.models.ToolContract": null, - "azure.mgmt.apimanagement.models.UserAssignedIdentity": null, - "azure.mgmt.apimanagement.models.UserCollection": null, - "azure.mgmt.apimanagement.models.UserContract": null, - "azure.mgmt.apimanagement.models.UserEntityBaseParameters": null, - "azure.mgmt.apimanagement.models.UserContractProperties": null, - "azure.mgmt.apimanagement.models.UserCreateParameterProperties": null, - "azure.mgmt.apimanagement.models.UserCreateParameters": null, - "azure.mgmt.apimanagement.models.UserIdentityCollection": null, - "azure.mgmt.apimanagement.models.UserIdentityContract": null, - "azure.mgmt.apimanagement.models.UserIdentityProperties": null, - "azure.mgmt.apimanagement.models.UserTokenParameters": null, - "azure.mgmt.apimanagement.models.UserTokenResult": null, - "azure.mgmt.apimanagement.models.UserUpdateParameters": null, - "azure.mgmt.apimanagement.models.UserUpdateParametersProperties": null, - "azure.mgmt.apimanagement.models.VirtualNetworkConfiguration": null, - "azure.mgmt.apimanagement.models.WikiCollection": null, - "azure.mgmt.apimanagement.models.WikiContract": null, - "azure.mgmt.apimanagement.models.WikiDocumentationContract": null, - "azure.mgmt.apimanagement.models.WikiUpdateContract": null, - "azure.mgmt.apimanagement.models.WorkspaceCollection": null, - "azure.mgmt.apimanagement.models.WorkspaceContract": null, - "azure.mgmt.apimanagement.models.WorkspaceLinksGateway": null, - "azure.mgmt.apimanagement.models.X509CertificateName": null, - "azure.mgmt.apimanagement.models.ApiGatewaySkuType": null, - "azure.mgmt.apimanagement.models.CreatedByType": null, - "azure.mgmt.apimanagement.models.VirtualNetworkType": null, - "azure.mgmt.apimanagement.models.GatewaySkuCapacityScaleType": null, - "azure.mgmt.apimanagement.models.PolicyComplianceState": null, - "azure.mgmt.apimanagement.models.Protocol": null, - "azure.mgmt.apimanagement.models.BearerTokenSendingMethods": null, - "azure.mgmt.apimanagement.models.ApiType": null, - "azure.mgmt.apimanagement.models.VersioningScheme": null, - "azure.mgmt.apimanagement.models.PolicyContentFormat": null, - "azure.mgmt.apimanagement.models.ProductAuthType": null, - "azure.mgmt.apimanagement.models.ProductState": null, - "azure.mgmt.apimanagement.models.DataMaskingMode": null, - "azure.mgmt.apimanagement.models.AlwaysLog": null, - "azure.mgmt.apimanagement.models.SamplingType": null, - "azure.mgmt.apimanagement.models.LlmDiagnosticSettings": null, - "azure.mgmt.apimanagement.models.LlmMessageLogTypes": null, - "azure.mgmt.apimanagement.models.HttpCorrelationProtocol": null, - "azure.mgmt.apimanagement.models.Verbosity": null, - "azure.mgmt.apimanagement.models.OperationNameFormat": null, - "azure.mgmt.apimanagement.models.State": null, - "azure.mgmt.apimanagement.models.AuthorizationType": null, - "azure.mgmt.apimanagement.models.OAuth2GrantType": null, - "azure.mgmt.apimanagement.models.GrantType": null, - "azure.mgmt.apimanagement.models.AuthorizationMethod": null, - "azure.mgmt.apimanagement.models.ClientAuthenticationMethod": null, - "azure.mgmt.apimanagement.models.BearerTokenSendingMethod": null, - "azure.mgmt.apimanagement.models.CarbonEmissionCategory": null, - "azure.mgmt.apimanagement.models.BackendSessionIdSource": null, - "azure.mgmt.apimanagement.models.BackendType": null, - "azure.mgmt.apimanagement.models.BackendProtocol": null, - "azure.mgmt.apimanagement.models.ClientApplicationState": null, - "azure.mgmt.apimanagement.models.Origin": null, - "azure.mgmt.apimanagement.models.Severity": null, - "azure.mgmt.apimanagement.models.IssueType": null, - "azure.mgmt.apimanagement.models.SkuType": null, - "azure.mgmt.apimanagement.models.ResourceSkuCapacityScaleType": null, - "azure.mgmt.apimanagement.models.HostnameType": null, - "azure.mgmt.apimanagement.models.CertificateSource": null, - "azure.mgmt.apimanagement.models.CertificateStatus": null, - "azure.mgmt.apimanagement.models.NatGatewayState": null, - "azure.mgmt.apimanagement.models.PlatformVersion": null, - "azure.mgmt.apimanagement.models.CertificateConfigurationStoreName": null, - "azure.mgmt.apimanagement.models.PrivateEndpointServiceConnectionStatus": null, - "azure.mgmt.apimanagement.models.ApimIdentityType": null, - "azure.mgmt.apimanagement.models.PublicNetworkAccess": null, - "azure.mgmt.apimanagement.models.LegacyApiState": null, - "azure.mgmt.apimanagement.models.LegacyPortalStatus": null, - "azure.mgmt.apimanagement.models.DeveloperPortalStatus": null, - "azure.mgmt.apimanagement.models.ReleaseChannel": null, - "azure.mgmt.apimanagement.models.KeyVaultFetchCode": null, - "azure.mgmt.apimanagement.models.ManagedServiceIdentityType": null, - "azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContractPurpose": null, - "azure.mgmt.apimanagement.models.GroupType": null, - "azure.mgmt.apimanagement.models.UserState": null, - "azure.mgmt.apimanagement.models.IdentityProviderType": null, - "azure.mgmt.apimanagement.models.LoggerType": null, - "azure.mgmt.apimanagement.models.ConnectivityStatusType": null, - "azure.mgmt.apimanagement.models.PolicyFragmentContentFormat": null, - "azure.mgmt.apimanagement.models.PolicyRestrictionRequireBase": null, - "azure.mgmt.apimanagement.models.PortalSettingsCspMode": null, - "azure.mgmt.apimanagement.models.PortalRevisionStatus": null, - "azure.mgmt.apimanagement.models.PrivateEndpointConnectionProvisioningState": null, - "azure.mgmt.apimanagement.models.SubscriptionState": null, - "azure.mgmt.apimanagement.models.SchemaType": null, - "azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionsType": null, - "azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionsReasonCode": null, - "azure.mgmt.apimanagement.models.ApiManagementSkuCapacityScaleType": null, - "azure.mgmt.apimanagement.models.ContentFormat": null, - "azure.mgmt.apimanagement.models.SoapApiType": null, - "azure.mgmt.apimanagement.models.TranslateRequiredQueryParametersConduct": null, - "azure.mgmt.apimanagement.models.PolicyIdName": null, - "azure.mgmt.apimanagement.models.PolicyExportFormat": null, - "azure.mgmt.apimanagement.models.ExportFormat": null, - "azure.mgmt.apimanagement.models.ExportApi": null, - "azure.mgmt.apimanagement.models.ExportResultFormat": null, - "azure.mgmt.apimanagement.models.PreferredIPVersion": null, - "azure.mgmt.apimanagement.models.ConnectivityCheckProtocol": null, - "azure.mgmt.apimanagement.models.Method": null, - "azure.mgmt.apimanagement.models.ConnectionStatus": null, - "azure.mgmt.apimanagement.models.AccessType": null, - "azure.mgmt.apimanagement.models.MigrateToStv2Mode": null, - "azure.mgmt.apimanagement.models.TemplateName": null, - "azure.mgmt.apimanagement.models.NotificationName": null, - "azure.mgmt.apimanagement.models.SettingsTypeName": null, - "azure.mgmt.apimanagement.models.AppType": null, - "azure.mgmt.apimanagement.models.AccessIdName": null, - "azure.mgmt.apimanagement.models.ConfigurationIdName": null, - "azure.mgmt.apimanagement.models.Confirmation": null, - "azure.mgmt.apimanagement.models.KeyVaultRefreshState": null, - "azure.mgmt.apimanagement.models.NameAvailabilityReason": null, - "azure.mgmt.apimanagement.models.KeyType": null, - "azure.mgmt.apimanagement.models.AsyncOperationStatus": null, - "azure.mgmt.apimanagement.models.AsyncResolverStatus": null, - "azure.mgmt.apimanagement.models.PolicyScopeContract": null, - "azure.mgmt.apimanagement.operations.ApiGatewayOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiGatewayOperations.begin_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.begin_update": null, - "azure.mgmt.apimanagement.operations.ApiGatewayOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiGatewayOperations.begin_delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.begin_delete": null, - "azure.mgmt.apimanagement.operations.ApiGatewayOperations.list_by_resource_group": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.list_by_resource_group": null, - "azure.mgmt.apimanagement.operations.ApiGatewayOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.list": null, - "azure.mgmt.apimanagement.operations.ApiManagementGatewaySkusOperations.list_available_skus": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementGatewaySkusOperations.list_available_skus": null, - "azure.mgmt.apimanagement.operations.AllPoliciesOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.AllPoliciesOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ApiOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ApiOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperations.update": null, - "azure.mgmt.apimanagement.operations.ApiOperations.begin_delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperations.begin_delete": null, - "azure.mgmt.apimanagement.operations.ApiOperations.list_by_tags": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperations.list_by_tags": null, - "azure.mgmt.apimanagement.operations.ApiRevisionOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ApiRevisionOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ApiReleaseOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ApiReleaseOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiReleaseOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiReleaseOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiReleaseOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.update": null, - "azure.mgmt.apimanagement.operations.ApiReleaseOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.delete": null, - "azure.mgmt.apimanagement.operations.ApiOperationOperations.list_by_api": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.list_by_api": null, - "azure.mgmt.apimanagement.operations.ApiOperationOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiOperationOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiOperationOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiOperationOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.update": null, - "azure.mgmt.apimanagement.operations.ApiOperationOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.delete": null, - "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.list_by_operation": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.list_by_operation": null, - "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.delete": null, - "azure.mgmt.apimanagement.operations.TagOperations.list_by_operation": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.list_by_operation": null, - "azure.mgmt.apimanagement.operations.TagOperations.get_entity_state_by_operation": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.get_entity_state_by_operation": null, - "azure.mgmt.apimanagement.operations.TagOperations.get_by_operation": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.get_by_operation": null, - "azure.mgmt.apimanagement.operations.TagOperations.assign_to_operation": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.assign_to_operation": null, - "azure.mgmt.apimanagement.operations.TagOperations.detach_from_operation": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.detach_from_operation": null, - "azure.mgmt.apimanagement.operations.TagOperations.list_by_api": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.list_by_api": null, - "azure.mgmt.apimanagement.operations.TagOperations.get_entity_state_by_api": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.get_entity_state_by_api": null, - "azure.mgmt.apimanagement.operations.TagOperations.get_by_api": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.get_by_api": null, - "azure.mgmt.apimanagement.operations.TagOperations.assign_to_api": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.assign_to_api": null, - "azure.mgmt.apimanagement.operations.TagOperations.detach_from_api": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.detach_from_api": null, - "azure.mgmt.apimanagement.operations.TagOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.TagOperations.get_entity_state_by_product": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.get_entity_state_by_product": null, - "azure.mgmt.apimanagement.operations.TagOperations.get_by_product": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.get_by_product": null, - "azure.mgmt.apimanagement.operations.TagOperations.assign_to_product": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.assign_to_product": null, - "azure.mgmt.apimanagement.operations.TagOperations.detach_from_product": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.detach_from_product": null, - "azure.mgmt.apimanagement.operations.TagOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.TagOperations.get_entity_state": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.get_entity_state": null, - "azure.mgmt.apimanagement.operations.TagOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.get": null, - "azure.mgmt.apimanagement.operations.TagOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.TagOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.update": null, - "azure.mgmt.apimanagement.operations.TagOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.TagOperations.delete": null, - "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.list_by_api": null, - "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.list_by_api": null, - "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.get": null, - "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.update": null, - "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.delete": null, - "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.list_by_resolver": null, - "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.list_by_resolver": null, - "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.get": null, - "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.delete": null, - "azure.mgmt.apimanagement.operations.ApiProductOperations.list_by_apis": null, - "azure.mgmt.apimanagement.aio.operations.ApiProductOperations.list_by_apis": null, - "azure.mgmt.apimanagement.operations.ApiPolicyOperations.list_by_api": null, - "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.list_by_api": null, - "azure.mgmt.apimanagement.operations.ApiPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiPolicyOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiPolicyOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.delete": null, - "azure.mgmt.apimanagement.operations.ApiSchemaOperations.list_by_api": null, - "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.list_by_api": null, - "azure.mgmt.apimanagement.operations.ApiSchemaOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiSchemaOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiSchemaOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiSchemaOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.delete": null, - "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.update": null, - "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.delete": null, - "azure.mgmt.apimanagement.operations.ApiIssueOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ApiIssueOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiIssueOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiIssueOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiIssueOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.update": null, - "azure.mgmt.apimanagement.operations.ApiIssueOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.delete": null, - "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.delete": null, - "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.delete": null, - "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.delete": null, - "azure.mgmt.apimanagement.operations.OperationOperations.list_by_tags": null, - "azure.mgmt.apimanagement.aio.operations.OperationOperations.list_by_tags": null, - "azure.mgmt.apimanagement.operations.ApiWikiOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiWikiOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiWikiOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiWikiOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.update": null, - "azure.mgmt.apimanagement.operations.ApiWikiOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.delete": null, - "azure.mgmt.apimanagement.operations.ApiWikisOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.ApiWikisOperations.list": null, - "azure.mgmt.apimanagement.operations.ApiToolOperations.list_by_api": null, - "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.list_by_api": null, - "azure.mgmt.apimanagement.operations.ApiToolOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiToolOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiToolOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiToolOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.update": null, - "azure.mgmt.apimanagement.operations.ApiToolOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.delete": null, - "azure.mgmt.apimanagement.operations.ApiExportOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiExportOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.update": null, - "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.delete": null, - "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.get": null, - "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.delete": null, - "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.refresh_secret": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.refresh_secret": null, - "azure.mgmt.apimanagement.operations.AuthorizationOperations.list_by_authorization_provider": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.list_by_authorization_provider": null, - "azure.mgmt.apimanagement.operations.AuthorizationOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.get": null, - "azure.mgmt.apimanagement.operations.AuthorizationOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.AuthorizationOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.delete": null, - "azure.mgmt.apimanagement.operations.AuthorizationOperations.confirm_consent_code": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.confirm_consent_code": null, - "azure.mgmt.apimanagement.operations.AuthorizationLoginLinksOperations.post": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationLoginLinksOperations.post": null, - "azure.mgmt.apimanagement.operations.AuthorizationAccessPolicyOperations.list_by_authorization": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationAccessPolicyOperations.list_by_authorization": null, - "azure.mgmt.apimanagement.operations.AuthorizationAccessPolicyOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationAccessPolicyOperations.get": null, - "azure.mgmt.apimanagement.operations.AuthorizationAccessPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationAccessPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.AuthorizationAccessPolicyOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationAccessPolicyOperations.delete": null, - "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.get": null, - "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.update": null, - "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.delete": null, - "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.list_secrets": null, - "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.list_secrets": null, - "azure.mgmt.apimanagement.operations.BackendOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.BackendOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.BackendOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.BackendOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.BackendOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.BackendOperations.get": null, - "azure.mgmt.apimanagement.operations.BackendOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.BackendOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.BackendOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.BackendOperations.update": null, - "azure.mgmt.apimanagement.operations.BackendOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.BackendOperations.delete": null, - "azure.mgmt.apimanagement.operations.BackendOperations.reconnect": null, - "azure.mgmt.apimanagement.aio.operations.BackendOperations.reconnect": null, - "azure.mgmt.apimanagement.operations.CacheOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.CacheOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.CacheOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.CacheOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.CacheOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.CacheOperations.get": null, - "azure.mgmt.apimanagement.operations.CacheOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.CacheOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.CacheOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.CacheOperations.update": null, - "azure.mgmt.apimanagement.operations.CacheOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.CacheOperations.delete": null, - "azure.mgmt.apimanagement.operations.CertificateOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.CertificateOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.CertificateOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.CertificateOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.CertificateOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.CertificateOperations.get": null, - "azure.mgmt.apimanagement.operations.CertificateOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.CertificateOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.CertificateOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.CertificateOperations.delete": null, - "azure.mgmt.apimanagement.operations.CertificateOperations.refresh_secret": null, - "azure.mgmt.apimanagement.aio.operations.CertificateOperations.refresh_secret": null, - "azure.mgmt.apimanagement.operations.ClientApplicationOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ClientApplicationOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ClientApplicationOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.get": null, - "azure.mgmt.apimanagement.operations.ClientApplicationOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ClientApplicationOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.delete": null, - "azure.mgmt.apimanagement.operations.ClientApplicationOperations.list_secrets": null, - "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.list_secrets": null, - "azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations.list_by_client_applications": null, - "azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations.list_by_client_applications": null, - "azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations.get": null, - "azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations.create": null, - "azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations.create": null, - "azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations.delete": null, - "azure.mgmt.apimanagement.ApiManagementClient.begin_perform_connectivity_check_async": null, - "azure.mgmt.apimanagement.aio.ApiManagementClient.begin_perform_connectivity_check_async": null, - "azure.mgmt.apimanagement.operations.ContentTypeOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ContentTypeOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ContentTypeOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ContentTypeOperations.get": null, - "azure.mgmt.apimanagement.operations.ContentTypeOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ContentTypeOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ContentTypeOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ContentTypeOperations.delete": null, - "azure.mgmt.apimanagement.operations.ContentItemOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ContentItemOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ContentItemOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.get": null, - "azure.mgmt.apimanagement.operations.ContentItemOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ContentItemOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.delete": null, - "azure.mgmt.apimanagement.operations.DeletedServicesOperations.list_by_subscription": null, - "azure.mgmt.apimanagement.aio.operations.DeletedServicesOperations.list_by_subscription": null, - "azure.mgmt.apimanagement.operations.DeletedServicesOperations.get_by_name": null, - "azure.mgmt.apimanagement.aio.operations.DeletedServicesOperations.get_by_name": null, - "azure.mgmt.apimanagement.operations.DeletedServicesOperations.begin_purge": null, - "azure.mgmt.apimanagement.aio.operations.DeletedServicesOperations.begin_purge": null, - "azure.mgmt.apimanagement.operations.ApiManagementOperationsOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementOperationsOperations.list": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceSkusOperations.list_available_service_skus": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceSkusOperations.list_available_service_skus": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_restore": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_restore": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_backup": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_backup": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_update": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_delete": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_migrate_to_stv2": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_migrate_to_stv2": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.list_by_resource_group": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.list_by_resource_group": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.list": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.get_sso_token": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.get_sso_token": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.check_name_availability": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.check_name_availability": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.get_domain_ownership_identifier": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.get_domain_ownership_identifier": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_apply_network_configuration_updates": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_apply_network_configuration_updates": null, - "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_refresh_hostnames": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_refresh_hostnames": null, - "azure.mgmt.apimanagement.operations.DiagnosticOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.DiagnosticOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.DiagnosticOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.get": null, - "azure.mgmt.apimanagement.operations.DiagnosticOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.DiagnosticOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.update": null, - "azure.mgmt.apimanagement.operations.DiagnosticOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.delete": null, - "azure.mgmt.apimanagement.operations.DocumentationOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.DocumentationOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.DocumentationOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.get": null, - "azure.mgmt.apimanagement.operations.DocumentationOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.DocumentationOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.update": null, - "azure.mgmt.apimanagement.operations.DocumentationOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.delete": null, - "azure.mgmt.apimanagement.operations.EmailTemplateOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.EmailTemplateOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.EmailTemplateOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.get": null, - "azure.mgmt.apimanagement.operations.EmailTemplateOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.EmailTemplateOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.update": null, - "azure.mgmt.apimanagement.operations.EmailTemplateOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.delete": null, - "azure.mgmt.apimanagement.operations.ApiGatewayConfigConnectionOperations.list_by_gateway": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayConfigConnectionOperations.list_by_gateway": null, - "azure.mgmt.apimanagement.operations.ApiGatewayConfigConnectionOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayConfigConnectionOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiGatewayConfigConnectionOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayConfigConnectionOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiGatewayConfigConnectionOperations.begin_delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayConfigConnectionOperations.begin_delete": null, - "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.list_by_gateway": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.list_by_gateway": null, - "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.begin_delete": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.begin_delete": null, - "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.begin_refresh_secret": null, - "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.begin_refresh_secret": null, - "azure.mgmt.apimanagement.operations.GatewayOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.GatewayOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.GatewayOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.GatewayOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.GatewayOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.GatewayOperations.get": null, - "azure.mgmt.apimanagement.operations.GatewayOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.GatewayOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.GatewayOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.GatewayOperations.update": null, - "azure.mgmt.apimanagement.operations.GatewayOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.GatewayOperations.delete": null, - "azure.mgmt.apimanagement.operations.GatewayOperations.list_keys": null, - "azure.mgmt.apimanagement.aio.operations.GatewayOperations.list_keys": null, - "azure.mgmt.apimanagement.operations.GatewayOperations.regenerate_key": null, - "azure.mgmt.apimanagement.aio.operations.GatewayOperations.regenerate_key": null, - "azure.mgmt.apimanagement.operations.GatewayOperations.generate_token": null, - "azure.mgmt.apimanagement.aio.operations.GatewayOperations.generate_token": null, - "azure.mgmt.apimanagement.operations.GatewayOperations.invalidate_debug_credentials": null, - "azure.mgmt.apimanagement.aio.operations.GatewayOperations.invalidate_debug_credentials": null, - "azure.mgmt.apimanagement.operations.GatewayOperations.list_debug_credentials": null, - "azure.mgmt.apimanagement.aio.operations.GatewayOperations.list_debug_credentials": null, - "azure.mgmt.apimanagement.operations.GatewayOperations.list_trace": null, - "azure.mgmt.apimanagement.aio.operations.GatewayOperations.list_trace": null, - "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.get": null, - "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.delete": null, - "azure.mgmt.apimanagement.operations.GatewayApiOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.GatewayApiOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.GatewayApiOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.GatewayApiOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.GatewayApiOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.GatewayApiOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.GatewayApiOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.GatewayApiOperations.delete": null, - "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.get": null, - "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.delete": null, - "azure.mgmt.apimanagement.operations.GroupOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.GroupOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.GroupOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.GroupOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.GroupOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.GroupOperations.get": null, - "azure.mgmt.apimanagement.operations.GroupOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.GroupOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.GroupOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.GroupOperations.update": null, - "azure.mgmt.apimanagement.operations.GroupOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.GroupOperations.delete": null, - "azure.mgmt.apimanagement.operations.GroupUserOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.GroupUserOperations.list": null, - "azure.mgmt.apimanagement.operations.GroupUserOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.aio.operations.GroupUserOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.operations.GroupUserOperations.create": null, - "azure.mgmt.apimanagement.aio.operations.GroupUserOperations.create": null, - "azure.mgmt.apimanagement.operations.GroupUserOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.GroupUserOperations.delete": null, - "azure.mgmt.apimanagement.operations.IdentityProviderOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.IdentityProviderOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.IdentityProviderOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.get": null, - "azure.mgmt.apimanagement.operations.IdentityProviderOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.IdentityProviderOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.update": null, - "azure.mgmt.apimanagement.operations.IdentityProviderOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.delete": null, - "azure.mgmt.apimanagement.operations.IdentityProviderOperations.list_secrets": null, - "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.list_secrets": null, - "azure.mgmt.apimanagement.operations.IssueOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.IssueOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.IssueOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.IssueOperations.get": null, - "azure.mgmt.apimanagement.operations.LoggerOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.LoggerOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.LoggerOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.LoggerOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.LoggerOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.LoggerOperations.get": null, - "azure.mgmt.apimanagement.operations.LoggerOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.LoggerOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.LoggerOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.LoggerOperations.update": null, - "azure.mgmt.apimanagement.operations.LoggerOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.LoggerOperations.delete": null, - "azure.mgmt.apimanagement.operations.NamedValueOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.NamedValueOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.NamedValueOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.get": null, - "azure.mgmt.apimanagement.operations.NamedValueOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.NamedValueOperations.begin_update": null, - "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.begin_update": null, - "azure.mgmt.apimanagement.operations.NamedValueOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.delete": null, - "azure.mgmt.apimanagement.operations.NamedValueOperations.list_value": null, - "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.list_value": null, - "azure.mgmt.apimanagement.operations.NamedValueOperations.begin_refresh_secret": null, - "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.begin_refresh_secret": null, - "azure.mgmt.apimanagement.operations.NetworkStatusOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.NetworkStatusOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.NetworkStatusOperations.list_by_location": null, - "azure.mgmt.apimanagement.aio.operations.NetworkStatusOperations.list_by_location": null, - "azure.mgmt.apimanagement.operations.NotificationOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.NotificationOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.NotificationOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.NotificationOperations.get": null, - "azure.mgmt.apimanagement.operations.NotificationOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.NotificationOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations.list_by_notification": null, - "azure.mgmt.apimanagement.aio.operations.NotificationRecipientUserOperations.list_by_notification": null, - "azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.aio.operations.NotificationRecipientUserOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.NotificationRecipientUserOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.NotificationRecipientUserOperations.delete": null, - "azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations.list_by_notification": null, - "azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations.list_by_notification": null, - "azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations.delete": null, - "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.get": null, - "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.update": null, - "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.delete": null, - "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.list_secrets": null, - "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.list_secrets": null, - "azure.mgmt.apimanagement.operations.OutboundNetworkDependenciesEndpointsOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.OutboundNetworkDependenciesEndpointsOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.PolicyOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.PolicyOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.PolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.PolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.PolicyOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.PolicyOperations.get": null, - "azure.mgmt.apimanagement.operations.PolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.PolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.PolicyOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.PolicyOperations.delete": null, - "azure.mgmt.apimanagement.operations.PolicyDescriptionOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.PolicyDescriptionOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.get": null, - "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.delete": null, - "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.list_references": null, - "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.list_references": null, - "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.get": null, - "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.update": null, - "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.delete": null, - "azure.mgmt.apimanagement.operations.PolicyRestrictionValidationsOperations.begin_by_service": null, - "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionValidationsOperations.begin_by_service": null, - "azure.mgmt.apimanagement.operations.PortalConfigOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.PortalConfigOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.PortalConfigOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.get": null, - "azure.mgmt.apimanagement.operations.PortalConfigOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.update": null, - "azure.mgmt.apimanagement.operations.PortalConfigOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.PortalRevisionOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.PortalRevisionOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.PortalRevisionOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.get": null, - "azure.mgmt.apimanagement.operations.PortalRevisionOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.PortalRevisionOperations.begin_update": null, - "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.begin_update": null, - "azure.mgmt.apimanagement.operations.PortalSettingsOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.PortalSettingsOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.SignInSettingsOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.SignInSettingsOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations.get": null, - "azure.mgmt.apimanagement.operations.SignInSettingsOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations.update": null, - "azure.mgmt.apimanagement.operations.SignInSettingsOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.SignUpSettingsOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.SignUpSettingsOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations.get": null, - "azure.mgmt.apimanagement.operations.SignUpSettingsOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations.update": null, - "azure.mgmt.apimanagement.operations.SignUpSettingsOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.get": null, - "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.update": null, - "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.list_secrets": null, - "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.list_secrets": null, - "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.get_by_name": null, - "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.get_by_name": null, - "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.begin_delete": null, - "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.begin_delete": null, - "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.list_private_link_resources": null, - "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.list_private_link_resources": null, - "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.get_private_link_resource": null, - "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.get_private_link_resource": null, - "azure.mgmt.apimanagement.operations.ProductOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ProductOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ProductOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ProductOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ProductOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ProductOperations.get": null, - "azure.mgmt.apimanagement.operations.ProductOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ProductOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ProductOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.ProductOperations.update": null, - "azure.mgmt.apimanagement.operations.ProductOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ProductOperations.delete": null, - "azure.mgmt.apimanagement.operations.ProductOperations.list_by_tags": null, - "azure.mgmt.apimanagement.aio.operations.ProductOperations.list_by_tags": null, - "azure.mgmt.apimanagement.operations.ProductApiOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.ProductApiOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.ProductApiOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.aio.operations.ProductApiOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.operations.ProductApiOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ProductApiOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ProductApiOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ProductApiOperations.delete": null, - "azure.mgmt.apimanagement.operations.ProductGroupOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.ProductGroupOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.ProductGroupOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.aio.operations.ProductGroupOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.operations.ProductGroupOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ProductGroupOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ProductGroupOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ProductGroupOperations.delete": null, - "azure.mgmt.apimanagement.operations.ProductSubscriptionsOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.ProductSubscriptionsOperations.list": null, - "azure.mgmt.apimanagement.operations.ProductPolicyOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.ProductPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ProductPolicyOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.get": null, - "azure.mgmt.apimanagement.operations.ProductPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ProductPolicyOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.delete": null, - "azure.mgmt.apimanagement.operations.ProductWikiOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.ProductWikiOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.get": null, - "azure.mgmt.apimanagement.operations.ProductWikiOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ProductWikiOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.update": null, - "azure.mgmt.apimanagement.operations.ProductWikiOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.delete": null, - "azure.mgmt.apimanagement.operations.ProductWikisOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.ProductWikisOperations.list": null, - "azure.mgmt.apimanagement.operations.ProductApiLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.ProductApiLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.ProductApiLinkOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ProductApiLinkOperations.get": null, - "azure.mgmt.apimanagement.operations.ProductApiLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ProductApiLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ProductApiLinkOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ProductApiLinkOperations.delete": null, - "azure.mgmt.apimanagement.operations.ProductGroupLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.ProductGroupLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.ProductGroupLinkOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ProductGroupLinkOperations.get": null, - "azure.mgmt.apimanagement.operations.ProductGroupLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.ProductGroupLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.ProductGroupLinkOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.ProductGroupLinkOperations.delete": null, - "azure.mgmt.apimanagement.operations.QuotaByCounterKeysOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.QuotaByCounterKeysOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.QuotaByCounterKeysOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.QuotaByCounterKeysOperations.update": null, - "azure.mgmt.apimanagement.operations.QuotaByPeriodKeysOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.QuotaByPeriodKeysOperations.get": null, - "azure.mgmt.apimanagement.operations.QuotaByPeriodKeysOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.QuotaByPeriodKeysOperations.update": null, - "azure.mgmt.apimanagement.operations.RegionOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.RegionOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_api": null, - "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_api": null, - "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_user": null, - "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_user": null, - "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_operation": null, - "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_operation": null, - "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_geo": null, - "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_geo": null, - "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_subscription": null, - "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_subscription": null, - "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_time": null, - "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_time": null, - "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_request": null, - "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_request": null, - "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.get": null, - "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.delete": null, - "azure.mgmt.apimanagement.operations.TenantSettingsOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.TenantSettingsOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.TenantSettingsOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.TenantSettingsOperations.get": null, - "azure.mgmt.apimanagement.operations.ApiManagementSkusOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementSkusOperations.list": null, - "azure.mgmt.apimanagement.operations.SubscriptionOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.list": null, - "azure.mgmt.apimanagement.operations.SubscriptionOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.SubscriptionOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.get": null, - "azure.mgmt.apimanagement.operations.SubscriptionOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.SubscriptionOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.update": null, - "azure.mgmt.apimanagement.operations.SubscriptionOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.delete": null, - "azure.mgmt.apimanagement.operations.SubscriptionOperations.regenerate_primary_key": null, - "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.regenerate_primary_key": null, - "azure.mgmt.apimanagement.operations.SubscriptionOperations.regenerate_secondary_key": null, - "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.regenerate_secondary_key": null, - "azure.mgmt.apimanagement.operations.SubscriptionOperations.list_secrets": null, - "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.list_secrets": null, - "azure.mgmt.apimanagement.operations.TagResourceOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.TagResourceOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.TagApiLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.TagApiLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.TagApiLinkOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.TagApiLinkOperations.get": null, - "azure.mgmt.apimanagement.operations.TagApiLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.TagApiLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.TagApiLinkOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.TagApiLinkOperations.delete": null, - "azure.mgmt.apimanagement.operations.TagOperationLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.TagOperationLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.TagOperationLinkOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.TagOperationLinkOperations.get": null, - "azure.mgmt.apimanagement.operations.TagOperationLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.TagOperationLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.TagOperationLinkOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.TagOperationLinkOperations.delete": null, - "azure.mgmt.apimanagement.operations.TagProductLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.TagProductLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.TagProductLinkOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.TagProductLinkOperations.get": null, - "azure.mgmt.apimanagement.operations.TagProductLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.TagProductLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.TagProductLinkOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.TagProductLinkOperations.delete": null, - "azure.mgmt.apimanagement.operations.TenantAccessOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.TenantAccessOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.TenantAccessOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.get": null, - "azure.mgmt.apimanagement.operations.TenantAccessOperations.create": null, - "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.create": null, - "azure.mgmt.apimanagement.operations.TenantAccessOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.update": null, - "azure.mgmt.apimanagement.operations.TenantAccessOperations.regenerate_primary_key": null, - "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.regenerate_primary_key": null, - "azure.mgmt.apimanagement.operations.TenantAccessOperations.regenerate_secondary_key": null, - "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.regenerate_secondary_key": null, - "azure.mgmt.apimanagement.operations.TenantAccessOperations.list_secrets": null, - "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.list_secrets": null, - "azure.mgmt.apimanagement.operations.TenantAccessGitOperations.regenerate_primary_key": null, - "azure.mgmt.apimanagement.aio.operations.TenantAccessGitOperations.regenerate_primary_key": null, - "azure.mgmt.apimanagement.operations.TenantAccessGitOperations.regenerate_secondary_key": null, - "azure.mgmt.apimanagement.aio.operations.TenantAccessGitOperations.regenerate_secondary_key": null, - "azure.mgmt.apimanagement.operations.TenantConfigurationOperations.begin_deploy": null, - "azure.mgmt.apimanagement.aio.operations.TenantConfigurationOperations.begin_deploy": null, - "azure.mgmt.apimanagement.operations.TenantConfigurationOperations.begin_save": null, - "azure.mgmt.apimanagement.aio.operations.TenantConfigurationOperations.begin_save": null, - "azure.mgmt.apimanagement.operations.TenantConfigurationOperations.begin_validate": null, - "azure.mgmt.apimanagement.aio.operations.TenantConfigurationOperations.begin_validate": null, - "azure.mgmt.apimanagement.operations.TenantConfigurationOperations.get_sync_state": null, - "azure.mgmt.apimanagement.aio.operations.TenantConfigurationOperations.get_sync_state": null, - "azure.mgmt.apimanagement.operations.UserOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.UserOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.UserOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.UserOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.UserOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.UserOperations.get": null, - "azure.mgmt.apimanagement.operations.UserOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.UserOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.UserOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.UserOperations.update": null, - "azure.mgmt.apimanagement.operations.UserOperations.begin_delete": null, - "azure.mgmt.apimanagement.aio.operations.UserOperations.begin_delete": null, - "azure.mgmt.apimanagement.operations.UserOperations.generate_sso_url": null, - "azure.mgmt.apimanagement.aio.operations.UserOperations.generate_sso_url": null, - "azure.mgmt.apimanagement.operations.UserOperations.get_shared_access_token": null, - "azure.mgmt.apimanagement.aio.operations.UserOperations.get_shared_access_token": null, - "azure.mgmt.apimanagement.operations.UserGroupOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.UserGroupOperations.list": null, - "azure.mgmt.apimanagement.operations.UserSubscriptionOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.UserSubscriptionOperations.list": null, - "azure.mgmt.apimanagement.operations.UserSubscriptionOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.UserSubscriptionOperations.get": null, - "azure.mgmt.apimanagement.operations.UserIdentitiesOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.UserIdentitiesOperations.list": null, - "azure.mgmt.apimanagement.operations.UserConfirmationPasswordOperations.send": null, - "azure.mgmt.apimanagement.aio.operations.UserConfirmationPasswordOperations.send": null, - "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.list_by_workspace": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.list_by_workspace": null, - "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.update": null, - "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.list_by_workspace": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.list_by_workspace": null, - "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.refresh_secret": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.refresh_secret": null, - "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.list_by_workspace": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.list_by_workspace": null, - "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.update": null, - "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.list_by_workspace": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.list_by_workspace": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.update": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.delete": null, - "azure.mgmt.apimanagement.operations.ApiManagementWorkspaceLinksOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementWorkspaceLinksOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.ApiManagementWorkspaceLinkOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.ApiManagementWorkspaceLinkOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.list_by_workspace": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.list_by_workspace": null, - "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.update": null, - "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.WorkspaceOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.update": null, - "azure.mgmt.apimanagement.operations.WorkspaceOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.list_by_api": null, - "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.list_by_api": null, - "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.begin_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.begin_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.list_value": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.list_value": null, - "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.begin_refresh_secret": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.begin_refresh_secret": null, - "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceNotificationOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.WorkspaceNotificationOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceNotificationOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations.list_by_notification": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations.list_by_notification": null, - "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations.list_by_notification": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations.list_by_notification": null, - "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.list_references": null, - "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.list_references": null, - "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.update": null, - "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations.list": null, - "azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations.check_entity_exists": null, - "azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations.create": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations.create": null, - "azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.list": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.list": null, - "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.update": null, - "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.regenerate_primary_key": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.regenerate_primary_key": null, - "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.regenerate_secondary_key": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.regenerate_secondary_key": null, - "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.list_secrets": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.list_secrets": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.update": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.update": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiRevisionOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiRevisionOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.update": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.list_by_api": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.list_by_api": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.update": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.list_by_operation": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.list_by_operation": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.list_by_api": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.list_by_api": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.list_by_api": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.list_by_api": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.begin_create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.update": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.get_entity_tag": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.list_by_service": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.list_by_service": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.get_entity_state": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.get_entity_state": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.update": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations.list_by_product": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations.get": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations.create_or_update": null, - "azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations.delete": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations.delete": null, - "azure.mgmt.apimanagement.operations.WorkspaceApiExportOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.WorkspaceApiExportOperations.get": null, - "azure.mgmt.apimanagement.operations.OperationStatusOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.OperationStatusOperations.get": null, - "azure.mgmt.apimanagement.operations.OperationsResultsOperations.get": null, - "azure.mgmt.apimanagement.aio.operations.OperationsResultsOperations.get": null + "azure.mgmt.apimanagement.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", + "azure.mgmt.apimanagement.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource", + "azure.mgmt.apimanagement.models.AccessInformationContract": "Microsoft.ApiManagement.AccessInformationContract", + "azure.mgmt.apimanagement.models.AccessInformationContractProperties": "Microsoft.ApiManagement.AccessInformationContractProperties", + "azure.mgmt.apimanagement.models.AccessInformationCreateParameterProperties": "Microsoft.ApiManagement.AccessInformationCreateParameterProperties", + "azure.mgmt.apimanagement.models.AccessInformationCreateParameters": "Microsoft.ApiManagement.AccessInformationCreateParameters", + "azure.mgmt.apimanagement.models.AccessInformationSecretsContract": "Microsoft.ApiManagement.AccessInformationSecretsContract", + "azure.mgmt.apimanagement.models.AccessInformationUpdateParameterProperties": "Microsoft.ApiManagement.AccessInformationUpdateParameterProperties", + "azure.mgmt.apimanagement.models.AccessInformationUpdateParameters": "Microsoft.ApiManagement.AccessInformationUpdateParameters", + "azure.mgmt.apimanagement.models.AdditionalLocation": "Microsoft.ApiManagement.AdditionalLocation", + "azure.mgmt.apimanagement.models.AllPoliciesContract": "Microsoft.ApiManagement.AllPoliciesContract", + "azure.mgmt.apimanagement.models.AllPoliciesContractProperties": "Microsoft.ApiManagement.AllPoliciesContractProperties", + "azure.mgmt.apimanagement.models.ApiContactInformation": "Microsoft.ApiManagement.ApiContactInformation", + "azure.mgmt.apimanagement.models.ApiContract": "Microsoft.ApiManagement.ApiContract", + "azure.mgmt.apimanagement.models.ApiEntityBaseContract": "Microsoft.ApiManagement.ApiEntityBaseContract", + "azure.mgmt.apimanagement.models.ApiContractProperties": "Microsoft.ApiManagement.ApiContractProperties", + "azure.mgmt.apimanagement.models.ApiContractUpdateProperties": "Microsoft.ApiManagement.ApiContractUpdateProperties", + "azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter": "Microsoft.ApiManagement.ApiCreateOrUpdateParameter", + "azure.mgmt.apimanagement.models.ApiCreateOrUpdateProperties": "Microsoft.ApiManagement.ApiCreateOrUpdateProperties", + "azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector": "Microsoft.ApiManagement.ApiCreateOrUpdatePropertiesWsdlSelector", + "azure.mgmt.apimanagement.models.ApiExportResult": "Microsoft.ApiManagement.ApiExportResult", + "azure.mgmt.apimanagement.models.ApiExportResultValue": "Microsoft.ApiManagement.ApiExportResultValue", + "azure.mgmt.apimanagement.models.ApiLicenseInformation": "Microsoft.ApiManagement.ApiLicenseInformation", + "azure.mgmt.apimanagement.models.ApiManagementGatewayBaseProperties": "Microsoft.ApiManagement.ApiManagementGatewayBaseProperties", + "azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResource", + "azure.mgmt.apimanagement.models.ApiManagementGatewayProperties": "Microsoft.ApiManagement.ApiManagementGatewayProperties", + "azure.mgmt.apimanagement.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", + "azure.mgmt.apimanagement.models.ApiManagementGatewayResource": "Microsoft.ApiManagement.ApiManagementGatewayResource", + "azure.mgmt.apimanagement.models.ApiManagementGatewaySkuProperties": "Microsoft.ApiManagement.ApiManagementGatewaySkuProperties", + "azure.mgmt.apimanagement.models.ApiManagementGatewaySkuPropertiesForPatch": "Microsoft.ApiManagement.ApiManagementGatewaySkuPropertiesForPatch", + "azure.mgmt.apimanagement.models.ApimResource": "Microsoft.ApiManagement.ApimResource", + "azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateParameters": "Microsoft.ApiManagement.ApiManagementGatewayUpdateParameters", + "azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateProperties": "Microsoft.ApiManagement.ApiManagementGatewayUpdateProperties", + "azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters": "Microsoft.ApiManagement.ApiManagementServiceApplyNetworkConfigurationParameters", + "azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters": "Microsoft.ApiManagement.ApiManagementServiceBackupRestoreParameters", + "azure.mgmt.apimanagement.models.ApiManagementServiceBaseProperties": "Microsoft.ApiManagement.ApiManagementServiceBaseProperties", + "azure.mgmt.apimanagement.models.ApiManagementServiceCheckNameAvailabilityParameters": "Microsoft.ApiManagement.ApiManagementServiceCheckNameAvailabilityParameters", + "azure.mgmt.apimanagement.models.ApiManagementServiceGetDomainOwnershipIdentifierResult": "Microsoft.ApiManagement.ApiManagementServiceGetDomainOwnershipIdentifierResult", + "azure.mgmt.apimanagement.models.ApiManagementServiceGetSsoTokenResult": "Microsoft.ApiManagement.ApiManagementServiceGetSsoTokenResult", + "azure.mgmt.apimanagement.models.ApiManagementServiceIdentity": "Microsoft.ApiManagement.ApiManagementServiceIdentity", + "azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult": "Microsoft.ApiManagement.ApiManagementServiceNameAvailabilityResult", + "azure.mgmt.apimanagement.models.ApiManagementServiceProperties": "Microsoft.ApiManagement.ApiManagementServiceProperties", + "azure.mgmt.apimanagement.models.ApiManagementServiceResource": "Microsoft.ApiManagement.ApiManagementServiceResource", + "azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties": "Microsoft.ApiManagement.ApiManagementServiceSkuProperties", + "azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters": "Microsoft.ApiManagement.ApiManagementServiceUpdateParameters", + "azure.mgmt.apimanagement.models.ApiManagementServiceUpdateProperties": "Microsoft.ApiManagement.ApiManagementServiceUpdateProperties", + "azure.mgmt.apimanagement.models.ApiManagementSku": "Microsoft.ApiManagement.ApiManagementSku", + "azure.mgmt.apimanagement.models.ApiManagementSkuCapabilities": "Microsoft.ApiManagement.ApiManagementSkuCapabilities", + "azure.mgmt.apimanagement.models.ApiManagementSkuCapacity": "Microsoft.ApiManagement.ApiManagementSkuCapacity", + "azure.mgmt.apimanagement.models.ApiManagementSkuCosts": "Microsoft.ApiManagement.ApiManagementSkuCosts", + "azure.mgmt.apimanagement.models.ApiManagementSkuLocationInfo": "Microsoft.ApiManagement.ApiManagementSkuLocationInfo", + "azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionInfo": "Microsoft.ApiManagement.ApiManagementSkuRestrictionInfo", + "azure.mgmt.apimanagement.models.ApiManagementSkuRestrictions": "Microsoft.ApiManagement.ApiManagementSkuRestrictions", + "azure.mgmt.apimanagement.models.ApiManagementSkuZoneDetails": "Microsoft.ApiManagement.ApiManagementSkuZoneDetails", + "azure.mgmt.apimanagement.models.WorkspaceLinksBaseProperties": "Microsoft.ApiManagement.WorkspaceLinksBaseProperties", + "azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksProperties": "Microsoft.ApiManagement.ApiManagementWorkspaceLinksProperties", + "azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksResource": "Microsoft.ApiManagement.ApiManagementWorkspaceLinksResource", + "azure.mgmt.apimanagement.models.ApiReleaseContract": "Microsoft.ApiManagement.ApiReleaseContract", + "azure.mgmt.apimanagement.models.ApiReleaseContractProperties": "Microsoft.ApiManagement.ApiReleaseContractProperties", + "azure.mgmt.apimanagement.models.ApiRevisionContract": "Microsoft.ApiManagement.ApiRevisionContract", + "azure.mgmt.apimanagement.models.ApiTagResourceContractProperties": "Microsoft.ApiManagement.ApiTagResourceContractProperties", + "azure.mgmt.apimanagement.models.ApiUpdateContract": "Microsoft.ApiManagement.ApiUpdateContract", + "azure.mgmt.apimanagement.models.ApiVersionConstraint": "Microsoft.ApiManagement.ApiVersionConstraint", + "azure.mgmt.apimanagement.models.ApiVersionSetContract": "Microsoft.ApiManagement.ApiVersionSetContract", + "azure.mgmt.apimanagement.models.ApiVersionSetContractDetails": "Microsoft.ApiManagement.ApiVersionSetContractDetails", + "azure.mgmt.apimanagement.models.ApiVersionSetEntityBase": "Microsoft.ApiManagement.ApiVersionSetEntityBase", + "azure.mgmt.apimanagement.models.ApiVersionSetContractProperties": "Microsoft.ApiManagement.ApiVersionSetContractProperties", + "azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters": "Microsoft.ApiManagement.ApiVersionSetUpdateParameters", + "azure.mgmt.apimanagement.models.ApiVersionSetUpdateParametersProperties": "Microsoft.ApiManagement.ApiVersionSetUpdateParametersProperties", + "azure.mgmt.apimanagement.models.ArmIdWrapper": "Microsoft.ApiManagement.ArmIdWrapper", + "azure.mgmt.apimanagement.models.AssociationContract": "Microsoft.ApiManagement.AssociationContract", + "azure.mgmt.apimanagement.models.AssociationContractProperties": "Microsoft.ApiManagement.AssociationContractProperties", + "azure.mgmt.apimanagement.models.AuthenticationSettingsContract": "Microsoft.ApiManagement.AuthenticationSettingsContract", + "azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract": "Microsoft.ApiManagement.AuthorizationAccessPolicyContract", + "azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContractProperties": "Microsoft.ApiManagement.AuthorizationAccessPolicyContractProperties", + "azure.mgmt.apimanagement.models.AuthorizationConfirmConsentCodeRequestContract": "Microsoft.ApiManagement.AuthorizationConfirmConsentCodeRequestContract", + "azure.mgmt.apimanagement.models.AuthorizationContract": "Microsoft.ApiManagement.AuthorizationContract", + "azure.mgmt.apimanagement.models.AuthorizationContractProperties": "Microsoft.ApiManagement.AuthorizationContractProperties", + "azure.mgmt.apimanagement.models.AuthorizationError": "Microsoft.ApiManagement.AuthorizationError", + "azure.mgmt.apimanagement.models.AuthorizationLoginRequestContract": "Microsoft.ApiManagement.AuthorizationLoginRequestContract", + "azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract": "Microsoft.ApiManagement.AuthorizationLoginResponseContract", + "azure.mgmt.apimanagement.models.AuthorizationProviderContract": "Microsoft.ApiManagement.AuthorizationProviderContract", + "azure.mgmt.apimanagement.models.AuthorizationProviderContractProperties": "Microsoft.ApiManagement.AuthorizationProviderContractProperties", + "azure.mgmt.apimanagement.models.AuthorizationProviderKeyVaultCreateProperties": "Microsoft.ApiManagement.AuthorizationProviderKeyVaultCreateProperties", + "azure.mgmt.apimanagement.models.AuthorizationProviderKeyVaultContract": "Microsoft.ApiManagement.AuthorizationProviderKeyVaultContract", + "azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2GrantTypes": "Microsoft.ApiManagement.AuthorizationProviderOAuth2GrantTypes", + "azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2Settings": "Microsoft.ApiManagement.AuthorizationProviderOAuth2Settings", + "azure.mgmt.apimanagement.models.AuthorizationServerContract": "Microsoft.ApiManagement.AuthorizationServerContract", + "azure.mgmt.apimanagement.models.AuthorizationServerContractBaseProperties": "Microsoft.ApiManagement.AuthorizationServerContractBaseProperties", + "azure.mgmt.apimanagement.models.AuthorizationServerContractProperties": "Microsoft.ApiManagement.AuthorizationServerContractProperties", + "azure.mgmt.apimanagement.models.AuthorizationServerSecretsContract": "Microsoft.ApiManagement.AuthorizationServerSecretsContract", + "azure.mgmt.apimanagement.models.AuthorizationServerUpdateContract": "Microsoft.ApiManagement.AuthorizationServerUpdateContract", + "azure.mgmt.apimanagement.models.AuthorizationServerUpdateContractProperties": "Microsoft.ApiManagement.AuthorizationServerUpdateContractProperties", + "azure.mgmt.apimanagement.models.BackendAuthorizationHeaderCredentials": "Microsoft.ApiManagement.BackendAuthorizationHeaderCredentials", + "azure.mgmt.apimanagement.models.BackendBaseParameters": "Microsoft.ApiManagement.BackendBaseParameters", + "azure.mgmt.apimanagement.models.BackendPool": "Microsoft.ApiManagement.BackendPool", + "azure.mgmt.apimanagement.models.BackendBaseParametersPool": "Microsoft.ApiManagement.BackendBaseParametersPool", + "azure.mgmt.apimanagement.models.BackendCircuitBreaker": "Microsoft.ApiManagement.BackendCircuitBreaker", + "azure.mgmt.apimanagement.models.BackendConfiguration": "Microsoft.ApiManagement.BackendConfiguration", + "azure.mgmt.apimanagement.models.BackendContract": "Microsoft.ApiManagement.BackendContract", + "azure.mgmt.apimanagement.models.BackendContractProperties": "Microsoft.ApiManagement.BackendContractProperties", + "azure.mgmt.apimanagement.models.BackendCredentialsContract": "Microsoft.ApiManagement.BackendCredentialsContract", + "azure.mgmt.apimanagement.models.BackendFailureResponse": "Microsoft.ApiManagement.BackendFailureResponse", + "azure.mgmt.apimanagement.models.BackendPoolItem": "Microsoft.ApiManagement.BackendPoolItem", + "azure.mgmt.apimanagement.models.BackendProperties": "Microsoft.ApiManagement.BackendProperties", + "azure.mgmt.apimanagement.models.BackendProxyContract": "Microsoft.ApiManagement.BackendProxyContract", + "azure.mgmt.apimanagement.models.BackendReconnectContract": "Microsoft.ApiManagement.BackendReconnectContract", + "azure.mgmt.apimanagement.models.BackendReconnectProperties": "Microsoft.ApiManagement.BackendReconnectProperties", + "azure.mgmt.apimanagement.models.BackendServiceFabricClusterProperties": "Microsoft.ApiManagement.BackendServiceFabricClusterProperties", + "azure.mgmt.apimanagement.models.BackendSessionAffinity": "Microsoft.ApiManagement.BackendSessionAffinity", + "azure.mgmt.apimanagement.models.BackendSessionId": "Microsoft.ApiManagement.BackendSessionId", + "azure.mgmt.apimanagement.models.BackendSubnetConfiguration": "Microsoft.ApiManagement.BackendSubnetConfiguration", + "azure.mgmt.apimanagement.models.BackendTlsProperties": "Microsoft.ApiManagement.BackendTlsProperties", + "azure.mgmt.apimanagement.models.BackendUpdateParameterProperties": "Microsoft.ApiManagement.BackendUpdateParameterProperties", + "azure.mgmt.apimanagement.models.BackendUpdateParameters": "Microsoft.ApiManagement.BackendUpdateParameters", + "azure.mgmt.apimanagement.models.BodyDiagnosticSettings": "Microsoft.ApiManagement.BodyDiagnosticSettings", + "azure.mgmt.apimanagement.models.CacheContract": "Microsoft.ApiManagement.CacheContract", + "azure.mgmt.apimanagement.models.CacheContractProperties": "Microsoft.ApiManagement.CacheContractProperties", + "azure.mgmt.apimanagement.models.CacheUpdateParameters": "Microsoft.ApiManagement.CacheUpdateParameters", + "azure.mgmt.apimanagement.models.CacheUpdateProperties": "Microsoft.ApiManagement.CacheUpdateProperties", + "azure.mgmt.apimanagement.models.CertificateConfiguration": "Microsoft.ApiManagement.CertificateConfiguration", + "azure.mgmt.apimanagement.models.CertificateContract": "Microsoft.ApiManagement.CertificateContract", + "azure.mgmt.apimanagement.models.CertificateContractProperties": "Microsoft.ApiManagement.CertificateContractProperties", + "azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters": "Microsoft.ApiManagement.CertificateCreateOrUpdateParameters", + "azure.mgmt.apimanagement.models.CertificateCreateOrUpdateProperties": "Microsoft.ApiManagement.CertificateCreateOrUpdateProperties", + "azure.mgmt.apimanagement.models.CertificateInformation": "Microsoft.ApiManagement.CertificateInformation", + "azure.mgmt.apimanagement.models.CircuitBreakerFailureCondition": "Microsoft.ApiManagement.CircuitBreakerFailureCondition", + "azure.mgmt.apimanagement.models.CircuitBreakerRule": "Microsoft.ApiManagement.CircuitBreakerRule", + "azure.mgmt.apimanagement.models.ClientApplicationContract": "Microsoft.ApiManagement.ClientApplicationContract", + "azure.mgmt.apimanagement.models.ClientApplicationContractProperties": "Microsoft.ApiManagement.ClientApplicationContractProperties", + "azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract": "Microsoft.ApiManagement.ClientApplicationProductLinkContract", + "azure.mgmt.apimanagement.models.ClientApplicationProductLinkContractProperties": "Microsoft.ApiManagement.ClientApplicationProductLinkContractProperties", + "azure.mgmt.apimanagement.models.ClientApplicationSecretsContract": "Microsoft.ApiManagement.ClientApplicationSecretsContract", + "azure.mgmt.apimanagement.models.ClientApplicationSecretsContractEntra": "Microsoft.ApiManagement.ClientApplicationSecretsContractEntra", + "azure.mgmt.apimanagement.models.ClientSecretContract": "Microsoft.ApiManagement.ClientSecretContract", + "azure.mgmt.apimanagement.models.ConfigurationApi": "Microsoft.ApiManagement.ConfigurationApi", + "azure.mgmt.apimanagement.models.ConnectivityCheckRequest": "Microsoft.ApiManagement.ConnectivityCheckRequest", + "azure.mgmt.apimanagement.models.ConnectivityCheckRequestDestination": "Microsoft.ApiManagement.ConnectivityCheckRequestDestination", + "azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfiguration": "Microsoft.ApiManagement.ConnectivityCheckRequestProtocolConfiguration", + "azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfigurationHttpConfiguration": "Microsoft.ApiManagement.ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", + "azure.mgmt.apimanagement.models.ConnectivityCheckRequestSource": "Microsoft.ApiManagement.ConnectivityCheckRequestSource", + "azure.mgmt.apimanagement.models.ConnectivityCheckResponse": "Microsoft.ApiManagement.ConnectivityCheckResponse", + "azure.mgmt.apimanagement.models.ConnectivityHop": "Microsoft.ApiManagement.ConnectivityHop", + "azure.mgmt.apimanagement.models.ConnectivityIssue": "Microsoft.ApiManagement.ConnectivityIssue", + "azure.mgmt.apimanagement.models.ConnectivityStatusContract": "Microsoft.ApiManagement.ConnectivityStatusContract", + "azure.mgmt.apimanagement.models.ContentItemContract": "Microsoft.ApiManagement.ContentItemContract", + "azure.mgmt.apimanagement.models.ContentTypeContract": "Microsoft.ApiManagement.ContentTypeContract", + "azure.mgmt.apimanagement.models.ContentTypeContractProperties": "Microsoft.ApiManagement.ContentTypeContractProperties", + "azure.mgmt.apimanagement.models.DataMasking": "Microsoft.ApiManagement.DataMasking", + "azure.mgmt.apimanagement.models.DataMaskingEntity": "Microsoft.ApiManagement.DataMaskingEntity", + "azure.mgmt.apimanagement.models.DeletedServiceContract": "Microsoft.ApiManagement.DeletedServiceContract", + "azure.mgmt.apimanagement.models.DeletedServiceContractProperties": "Microsoft.ApiManagement.DeletedServiceContractProperties", + "azure.mgmt.apimanagement.models.DeployConfigurationParameterProperties": "Microsoft.ApiManagement.DeployConfigurationParameterProperties", + "azure.mgmt.apimanagement.models.DeployConfigurationParameters": "Microsoft.ApiManagement.DeployConfigurationParameters", + "azure.mgmt.apimanagement.models.DiagnosticContract": "Microsoft.ApiManagement.DiagnosticContract", + "azure.mgmt.apimanagement.models.DiagnosticContractProperties": "Microsoft.ApiManagement.DiagnosticContractProperties", + "azure.mgmt.apimanagement.models.DiagnosticContractUpdateProperties": "Microsoft.ApiManagement.DiagnosticContractUpdateProperties", + "azure.mgmt.apimanagement.models.DiagnosticUpdateContract": "Microsoft.ApiManagement.DiagnosticUpdateContract", + "azure.mgmt.apimanagement.models.DocumentationContract": "Microsoft.ApiManagement.DocumentationContract", + "azure.mgmt.apimanagement.models.DocumentationContractProperties": "Microsoft.ApiManagement.DocumentationContractProperties", + "azure.mgmt.apimanagement.models.DocumentationUpdateContract": "Microsoft.ApiManagement.DocumentationUpdateContract", + "azure.mgmt.apimanagement.models.EmailTemplateContract": "Microsoft.ApiManagement.EmailTemplateContract", + "azure.mgmt.apimanagement.models.EmailTemplateContractProperties": "Microsoft.ApiManagement.EmailTemplateContractProperties", + "azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties": "Microsoft.ApiManagement.EmailTemplateParametersContractProperties", + "azure.mgmt.apimanagement.models.EmailTemplateUpdateParameterProperties": "Microsoft.ApiManagement.EmailTemplateUpdateParameterProperties", + "azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters": "Microsoft.ApiManagement.EmailTemplateUpdateParameters", + "azure.mgmt.apimanagement.models.EndpointDependency": "Microsoft.ApiManagement.EndpointDependency", + "azure.mgmt.apimanagement.models.EndpointDetail": "Microsoft.ApiManagement.EndpointDetail", + "azure.mgmt.apimanagement.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "azure.mgmt.apimanagement.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "azure.mgmt.apimanagement.models.ErrorFieldContract": "Microsoft.ApiManagement.ErrorFieldContract", + "azure.mgmt.apimanagement.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "azure.mgmt.apimanagement.models.ErrorResponseBody": "Microsoft.ApiManagement.ErrorResponseBody", + "azure.mgmt.apimanagement.models.FailureStatusCodeRange": "Microsoft.ApiManagement.FailureStatusCodeRange", + "azure.mgmt.apimanagement.models.FrontendConfiguration": "Microsoft.ApiManagement.FrontendConfiguration", + "azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract": "Microsoft.ApiManagement.GatewayCertificateAuthorityContract", + "azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContractProperties": "Microsoft.ApiManagement.GatewayCertificateAuthorityContractProperties", + "azure.mgmt.apimanagement.models.GatewayConfigConnectionBaseProperties": "Microsoft.ApiManagement.GatewayConfigConnectionBaseProperties", + "azure.mgmt.apimanagement.models.GatewayConfigurationApi": "Microsoft.ApiManagement.GatewayConfigurationApi", + "azure.mgmt.apimanagement.models.GatewayContract": "Microsoft.ApiManagement.GatewayContract", + "azure.mgmt.apimanagement.models.GatewayContractProperties": "Microsoft.ApiManagement.GatewayContractProperties", + "azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract": "Microsoft.ApiManagement.GatewayDebugCredentialsContract", + "azure.mgmt.apimanagement.models.GatewayHostnameBindingBaseProperties": "Microsoft.ApiManagement.GatewayHostnameBindingBaseProperties", + "azure.mgmt.apimanagement.models.GatewayHostnameBindingCertificate": "Microsoft.ApiManagement.GatewayHostnameBindingCertificate", + "azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVault": "Microsoft.ApiManagement.GatewayHostnameBindingKeyVault", + "azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVaultLastStatus": "Microsoft.ApiManagement.GatewayHostnameBindingKeyVaultLastStatus", + "azure.mgmt.apimanagement.models.GatewayHostnameBindingResource": "Microsoft.ApiManagement.GatewayHostnameBindingResource", + "azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract": "Microsoft.ApiManagement.GatewayHostnameConfigurationContract", + "azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContractProperties": "Microsoft.ApiManagement.GatewayHostnameConfigurationContractProperties", + "azure.mgmt.apimanagement.models.GatewayKeyRegenerationRequestContract": "Microsoft.ApiManagement.GatewayKeyRegenerationRequestContract", + "azure.mgmt.apimanagement.models.GatewayKeysContract": "Microsoft.ApiManagement.GatewayKeysContract", + "azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContract": "Microsoft.ApiManagement.GatewayListDebugCredentialsContract", + "azure.mgmt.apimanagement.models.GatewayListTraceContract": "Microsoft.ApiManagement.GatewayListTraceContract", + "azure.mgmt.apimanagement.models.GatewayResourceSkuResult": "Microsoft.ApiManagement.GatewayResourceSkuResult", + "azure.mgmt.apimanagement.models.GatewaySku": "Microsoft.ApiManagement.GatewaySku", + "azure.mgmt.apimanagement.models.GatewaySkuCapacity": "Microsoft.ApiManagement.GatewaySkuCapacity", + "azure.mgmt.apimanagement.models.GatewayTokenContract": "Microsoft.ApiManagement.GatewayTokenContract", + "azure.mgmt.apimanagement.models.GatewayTokenRequestContract": "Microsoft.ApiManagement.GatewayTokenRequestContract", + "azure.mgmt.apimanagement.models.GenerateSsoUrlResult": "Microsoft.ApiManagement.GenerateSsoUrlResult", + "azure.mgmt.apimanagement.models.GlobalSchemaContract": "Microsoft.ApiManagement.GlobalSchemaContract", + "azure.mgmt.apimanagement.models.GlobalSchemaContractProperties": "Microsoft.ApiManagement.GlobalSchemaContractProperties", + "azure.mgmt.apimanagement.models.GroupContract": "Microsoft.ApiManagement.GroupContract", + "azure.mgmt.apimanagement.models.GroupContractProperties": "Microsoft.ApiManagement.GroupContractProperties", + "azure.mgmt.apimanagement.models.GroupCreateParameters": "Microsoft.ApiManagement.GroupCreateParameters", + "azure.mgmt.apimanagement.models.GroupCreateParametersProperties": "Microsoft.ApiManagement.GroupCreateParametersProperties", + "azure.mgmt.apimanagement.models.GroupUpdateParameters": "Microsoft.ApiManagement.GroupUpdateParameters", + "azure.mgmt.apimanagement.models.GroupUpdateParametersProperties": "Microsoft.ApiManagement.GroupUpdateParametersProperties", + "azure.mgmt.apimanagement.models.HostnameConfiguration": "Microsoft.ApiManagement.HostnameConfiguration", + "azure.mgmt.apimanagement.models.HTTPHeader": "Microsoft.ApiManagement.HttpHeader", + "azure.mgmt.apimanagement.models.HttpMessageDiagnostic": "Microsoft.ApiManagement.HttpMessageDiagnostic", + "azure.mgmt.apimanagement.models.IdentityProviderBaseParameters": "Microsoft.ApiManagement.IdentityProviderBaseParameters", + "azure.mgmt.apimanagement.models.IdentityProviderContract": "Microsoft.ApiManagement.IdentityProviderContract", + "azure.mgmt.apimanagement.models.IdentityProviderContractProperties": "Microsoft.ApiManagement.IdentityProviderContractProperties", + "azure.mgmt.apimanagement.models.IdentityProviderCreateContract": "Microsoft.ApiManagement.IdentityProviderCreateContract", + "azure.mgmt.apimanagement.models.IdentityProviderCreateContractProperties": "Microsoft.ApiManagement.IdentityProviderCreateContractProperties", + "azure.mgmt.apimanagement.models.IdentityProviderUpdateParameters": "Microsoft.ApiManagement.IdentityProviderUpdateParameters", + "azure.mgmt.apimanagement.models.IdentityProviderUpdateProperties": "Microsoft.ApiManagement.IdentityProviderUpdateProperties", + "azure.mgmt.apimanagement.models.IssueAttachmentContract": "Microsoft.ApiManagement.IssueAttachmentContract", + "azure.mgmt.apimanagement.models.IssueAttachmentContractProperties": "Microsoft.ApiManagement.IssueAttachmentContractProperties", + "azure.mgmt.apimanagement.models.IssueCommentContract": "Microsoft.ApiManagement.IssueCommentContract", + "azure.mgmt.apimanagement.models.IssueCommentContractProperties": "Microsoft.ApiManagement.IssueCommentContractProperties", + "azure.mgmt.apimanagement.models.IssueContract": "Microsoft.ApiManagement.IssueContract", + "azure.mgmt.apimanagement.models.IssueContractBaseProperties": "Microsoft.ApiManagement.IssueContractBaseProperties", + "azure.mgmt.apimanagement.models.IssueContractProperties": "Microsoft.ApiManagement.IssueContractProperties", + "azure.mgmt.apimanagement.models.IssueUpdateContract": "Microsoft.ApiManagement.IssueUpdateContract", + "azure.mgmt.apimanagement.models.IssueUpdateContractProperties": "Microsoft.ApiManagement.IssueUpdateContractProperties", + "azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties": "Microsoft.ApiManagement.KeyVaultContractCreateProperties", + "azure.mgmt.apimanagement.models.KeyVaultContractProperties": "Microsoft.ApiManagement.KeyVaultContractProperties", + "azure.mgmt.apimanagement.models.KeyVaultLastAccessStatusContractProperties": "Microsoft.ApiManagement.KeyVaultLastAccessStatusContractProperties", + "azure.mgmt.apimanagement.models.LLMDiagnosticSettings": "Microsoft.ApiManagement.LLMDiagnosticSettings", + "azure.mgmt.apimanagement.models.LLMMessageDiagnosticSettings": "Microsoft.ApiManagement.LLMMessageDiagnosticSettings", + "azure.mgmt.apimanagement.models.LoggerContract": "Microsoft.ApiManagement.LoggerContract", + "azure.mgmt.apimanagement.models.LoggerContractProperties": "Microsoft.ApiManagement.LoggerContractProperties", + "azure.mgmt.apimanagement.models.LoggerUpdateContract": "Microsoft.ApiManagement.LoggerUpdateContract", + "azure.mgmt.apimanagement.models.LoggerUpdateParameters": "Microsoft.ApiManagement.LoggerUpdateParameters", + "azure.mgmt.apimanagement.models.ManagedServiceIdentity": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "azure.mgmt.apimanagement.models.MigrateToStv2Contract": "Microsoft.ApiManagement.MigrateToStv2Contract", + "azure.mgmt.apimanagement.models.NamedValueContract": "Microsoft.ApiManagement.NamedValueContract", + "azure.mgmt.apimanagement.models.NamedValueEntityBaseParameters": "Microsoft.ApiManagement.NamedValueEntityBaseParameters", + "azure.mgmt.apimanagement.models.NamedValueContractProperties": "Microsoft.ApiManagement.NamedValueContractProperties", + "azure.mgmt.apimanagement.models.NamedValueCreateContract": "Microsoft.ApiManagement.NamedValueCreateContract", + "azure.mgmt.apimanagement.models.NamedValueCreateContractProperties": "Microsoft.ApiManagement.NamedValueCreateContractProperties", + "azure.mgmt.apimanagement.models.NamedValueSecretContract": "Microsoft.ApiManagement.NamedValueSecretContract", + "azure.mgmt.apimanagement.models.NamedValueUpdateParameterProperties": "Microsoft.ApiManagement.NamedValueUpdateParameterProperties", + "azure.mgmt.apimanagement.models.NamedValueUpdateParameters": "Microsoft.ApiManagement.NamedValueUpdateParameters", + "azure.mgmt.apimanagement.models.NetworkStatusContract": "Microsoft.ApiManagement.NetworkStatusContract", + "azure.mgmt.apimanagement.models.NetworkStatusContractByLocation": "Microsoft.ApiManagement.NetworkStatusContractByLocation", + "azure.mgmt.apimanagement.models.NotificationContract": "Microsoft.ApiManagement.NotificationContract", + "azure.mgmt.apimanagement.models.NotificationContractProperties": "Microsoft.ApiManagement.NotificationContractProperties", + "azure.mgmt.apimanagement.models.OAuth2AuthenticationSettingsContract": "Microsoft.ApiManagement.OAuth2AuthenticationSettingsContract", + "azure.mgmt.apimanagement.models.OpenIdAuthenticationSettingsContract": "Microsoft.ApiManagement.OpenIdAuthenticationSettingsContract", + "azure.mgmt.apimanagement.models.OpenidConnectProviderContract": "Microsoft.ApiManagement.OpenidConnectProviderContract", + "azure.mgmt.apimanagement.models.OpenidConnectProviderContractProperties": "Microsoft.ApiManagement.OpenidConnectProviderContractProperties", + "azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContract": "Microsoft.ApiManagement.OpenidConnectProviderUpdateContract", + "azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContractProperties": "Microsoft.ApiManagement.OpenidConnectProviderUpdateContractProperties", + "azure.mgmt.apimanagement.models.Operation": "Microsoft.ApiManagement.Operation", + "azure.mgmt.apimanagement.models.OperationContract": "Microsoft.ApiManagement.OperationContract", + "azure.mgmt.apimanagement.models.OperationEntityBaseContract": "Microsoft.ApiManagement.OperationEntityBaseContract", + "azure.mgmt.apimanagement.models.OperationContractProperties": "Microsoft.ApiManagement.OperationContractProperties", + "azure.mgmt.apimanagement.models.OperationDisplay": "Microsoft.ApiManagement.OperationDisplay", + "azure.mgmt.apimanagement.models.OperationResultContract": "Microsoft.ApiManagement.OperationResultContract", + "azure.mgmt.apimanagement.models.OperationResultContractProperties": "Microsoft.ApiManagement.OperationResultContractProperties", + "azure.mgmt.apimanagement.models.OperationResultLogItemContract": "Microsoft.ApiManagement.OperationResultLogItemContract", + "azure.mgmt.apimanagement.models.OperationStatusResult": "Azure.ResourceManager.CommonTypes.OperationStatusResult", + "azure.mgmt.apimanagement.models.OperationTagResourceContractProperties": "Microsoft.ApiManagement.OperationTagResourceContractProperties", + "azure.mgmt.apimanagement.models.OperationUpdateContract": "Microsoft.ApiManagement.OperationUpdateContract", + "azure.mgmt.apimanagement.models.OperationUpdateContractProperties": "Microsoft.ApiManagement.OperationUpdateContractProperties", + "azure.mgmt.apimanagement.models.OutboundEnvironmentEndpoint": "Microsoft.ApiManagement.OutboundEnvironmentEndpoint", + "azure.mgmt.apimanagement.models.OutboundEnvironmentEndpointList": "Microsoft.ApiManagement.OutboundEnvironmentEndpointList", + "azure.mgmt.apimanagement.models.ParameterContract": "Microsoft.ApiManagement.ParameterContract", + "azure.mgmt.apimanagement.models.ParameterExampleContract": "Microsoft.ApiManagement.ParameterExampleContract", + "azure.mgmt.apimanagement.models.PipelineDiagnosticSettings": "Microsoft.ApiManagement.PipelineDiagnosticSettings", + "azure.mgmt.apimanagement.models.PolicyCollection": "Microsoft.ApiManagement.PolicyCollection", + "azure.mgmt.apimanagement.models.PolicyContract": "Microsoft.ApiManagement.PolicyContract", + "azure.mgmt.apimanagement.models.PolicyContractProperties": "Microsoft.ApiManagement.PolicyContractProperties", + "azure.mgmt.apimanagement.models.PolicyDescriptionCollection": "Microsoft.ApiManagement.PolicyDescriptionCollection", + "azure.mgmt.apimanagement.models.PolicyDescriptionContract": "Microsoft.ApiManagement.PolicyDescriptionContract", + "azure.mgmt.apimanagement.models.PolicyDescriptionContractProperties": "Microsoft.ApiManagement.PolicyDescriptionContractProperties", + "azure.mgmt.apimanagement.models.PolicyFragmentContract": "Microsoft.ApiManagement.PolicyFragmentContract", + "azure.mgmt.apimanagement.models.PolicyFragmentContractProperties": "Microsoft.ApiManagement.PolicyFragmentContractProperties", + "azure.mgmt.apimanagement.models.PolicyRestrictionContract": "Microsoft.ApiManagement.PolicyRestrictionContract", + "azure.mgmt.apimanagement.models.PolicyRestrictionContractProperties": "Microsoft.ApiManagement.PolicyRestrictionContractProperties", + "azure.mgmt.apimanagement.models.PolicyRestrictionUpdateContract": "Microsoft.ApiManagement.PolicyRestrictionUpdateContract", + "azure.mgmt.apimanagement.models.PortalConfigContract": "Microsoft.ApiManagement.PortalConfigContract", + "azure.mgmt.apimanagement.models.PortalConfigCorsProperties": "Microsoft.ApiManagement.PortalConfigCorsProperties", + "azure.mgmt.apimanagement.models.PortalConfigCspProperties": "Microsoft.ApiManagement.PortalConfigCspProperties", + "azure.mgmt.apimanagement.models.PortalConfigDelegationProperties": "Microsoft.ApiManagement.PortalConfigDelegationProperties", + "azure.mgmt.apimanagement.models.PortalConfigProperties": "Microsoft.ApiManagement.PortalConfigProperties", + "azure.mgmt.apimanagement.models.PortalConfigPropertiesSignin": "Microsoft.ApiManagement.PortalConfigPropertiesSignin", + "azure.mgmt.apimanagement.models.PortalConfigPropertiesSignup": "Microsoft.ApiManagement.PortalConfigPropertiesSignup", + "azure.mgmt.apimanagement.models.PortalConfigTermsOfServiceProperties": "Microsoft.ApiManagement.PortalConfigTermsOfServiceProperties", + "azure.mgmt.apimanagement.models.PortalDelegationSettings": "Microsoft.ApiManagement.PortalDelegationSettings", + "azure.mgmt.apimanagement.models.PortalDelegationSettingsProperties": "Microsoft.ApiManagement.PortalDelegationSettingsProperties", + "azure.mgmt.apimanagement.models.PortalRevisionContract": "Microsoft.ApiManagement.PortalRevisionContract", + "azure.mgmt.apimanagement.models.PortalRevisionContractProperties": "Microsoft.ApiManagement.PortalRevisionContractProperties", + "azure.mgmt.apimanagement.models.PortalSettingsCollection": "Microsoft.ApiManagement.PortalSettingsCollection", + "azure.mgmt.apimanagement.models.PortalSettingsContract": "Microsoft.ApiManagement.PortalSettingsContract", + "azure.mgmt.apimanagement.models.PortalSettingsContractProperties": "Microsoft.ApiManagement.PortalSettingsContractProperties", + "azure.mgmt.apimanagement.models.PortalSettingValidationKeyContract": "Microsoft.ApiManagement.PortalSettingValidationKeyContract", + "azure.mgmt.apimanagement.models.PortalSigninSettingProperties": "Microsoft.ApiManagement.PortalSigninSettingProperties", + "azure.mgmt.apimanagement.models.PortalSigninSettings": "Microsoft.ApiManagement.PortalSigninSettings", + "azure.mgmt.apimanagement.models.PortalSignupSettings": "Microsoft.ApiManagement.PortalSignupSettings", + "azure.mgmt.apimanagement.models.PortalSignupSettingsProperties": "Microsoft.ApiManagement.PortalSignupSettingsProperties", + "azure.mgmt.apimanagement.models.PrivateEndpoint": "Azure.ResourceManager.CommonTypes.PrivateEndpoint", + "azure.mgmt.apimanagement.models.PrivateEndpointConnection": "Microsoft.ApiManagement.PrivateEndpointConnection", + "azure.mgmt.apimanagement.models.PrivateEndpointConnectionProperties": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties", + "azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequest": "Microsoft.ApiManagement.PrivateEndpointConnectionRequest", + "azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequestProperties": "Microsoft.ApiManagement.PrivateEndpointConnectionRequestProperties", + "azure.mgmt.apimanagement.models.PrivateEndpointConnectionWrapperProperties": "Microsoft.ApiManagement.PrivateEndpointConnectionWrapperProperties", + "azure.mgmt.apimanagement.models.PrivateLinkResource": "Microsoft.ApiManagement.PrivateLinkResource", + "azure.mgmt.apimanagement.models.PrivateLinkResourceListResult": "Azure.ResourceManager.ResourceListResult", + "azure.mgmt.apimanagement.models.PrivateLinkResourceProperties": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties", + "azure.mgmt.apimanagement.models.PrivateLinkServiceConnectionState": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState", + "azure.mgmt.apimanagement.models.ProductApiLinkContract": "Microsoft.ApiManagement.ProductApiLinkContract", + "azure.mgmt.apimanagement.models.ProductApiLinkContractProperties": "Microsoft.ApiManagement.ProductApiLinkContractProperties", + "azure.mgmt.apimanagement.models.ProductApplicationContract": "Microsoft.ApiManagement.ProductApplicationContract", + "azure.mgmt.apimanagement.models.ProductApplicationContractEntra": "Microsoft.ApiManagement.ProductApplicationContractEntra", + "azure.mgmt.apimanagement.models.ProductContract": "Microsoft.ApiManagement.ProductContract", + "azure.mgmt.apimanagement.models.ProductEntityBaseParameters": "Microsoft.ApiManagement.ProductEntityBaseParameters", + "azure.mgmt.apimanagement.models.ProductContractProperties": "Microsoft.ApiManagement.ProductContractProperties", + "azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication": "Microsoft.ApiManagement.ProductEntityBaseParametersApplication", + "azure.mgmt.apimanagement.models.ProductGroupLinkContract": "Microsoft.ApiManagement.ProductGroupLinkContract", + "azure.mgmt.apimanagement.models.ProductGroupLinkContractProperties": "Microsoft.ApiManagement.ProductGroupLinkContractProperties", + "azure.mgmt.apimanagement.models.ProductTagResourceContractProperties": "Microsoft.ApiManagement.ProductTagResourceContractProperties", + "azure.mgmt.apimanagement.models.ProductUpdateParameters": "Microsoft.ApiManagement.ProductUpdateParameters", + "azure.mgmt.apimanagement.models.ProductUpdateProperties": "Microsoft.ApiManagement.ProductUpdateProperties", + "azure.mgmt.apimanagement.models.QuotaCounterCollection": "Microsoft.ApiManagement.QuotaCounterCollection", + "azure.mgmt.apimanagement.models.QuotaCounterContract": "Microsoft.ApiManagement.QuotaCounterContract", + "azure.mgmt.apimanagement.models.QuotaCounterValueContractProperties": "Microsoft.ApiManagement.QuotaCounterValueContractProperties", + "azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract": "Microsoft.ApiManagement.QuotaCounterValueUpdateContract", + "azure.mgmt.apimanagement.models.RecipientEmailCollection": "Microsoft.ApiManagement.RecipientEmailCollection", + "azure.mgmt.apimanagement.models.RecipientEmailContract": "Microsoft.ApiManagement.RecipientEmailContract", + "azure.mgmt.apimanagement.models.RecipientEmailContractProperties": "Microsoft.ApiManagement.RecipientEmailContractProperties", + "azure.mgmt.apimanagement.models.RecipientsContractProperties": "Microsoft.ApiManagement.RecipientsContractProperties", + "azure.mgmt.apimanagement.models.RecipientUserCollection": "Microsoft.ApiManagement.RecipientUserCollection", + "azure.mgmt.apimanagement.models.RecipientUserContract": "Microsoft.ApiManagement.RecipientUserContract", + "azure.mgmt.apimanagement.models.RecipientUsersContractProperties": "Microsoft.ApiManagement.RecipientUsersContractProperties", + "azure.mgmt.apimanagement.models.RegionContract": "Microsoft.ApiManagement.RegionContract", + "azure.mgmt.apimanagement.models.RegistrationDelegationSettingsProperties": "Microsoft.ApiManagement.RegistrationDelegationSettingsProperties", + "azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper": "Microsoft.ApiManagement.RemotePrivateEndpointConnectionWrapper", + "azure.mgmt.apimanagement.models.ReportRecordContract": "Microsoft.ApiManagement.ReportRecordContract", + "azure.mgmt.apimanagement.models.RepresentationContract": "Microsoft.ApiManagement.RepresentationContract", + "azure.mgmt.apimanagement.models.RequestContract": "Microsoft.ApiManagement.RequestContract", + "azure.mgmt.apimanagement.models.RequestReportRecordContract": "Microsoft.ApiManagement.RequestReportRecordContract", + "azure.mgmt.apimanagement.models.ResolverContract": "Microsoft.ApiManagement.ResolverContract", + "azure.mgmt.apimanagement.models.ResolverEntityBaseContract": "Microsoft.ApiManagement.ResolverEntityBaseContract", + "azure.mgmt.apimanagement.models.ResolverUpdateContract": "Microsoft.ApiManagement.ResolverUpdateContract", + "azure.mgmt.apimanagement.models.ResolverUpdateContractProperties": "Microsoft.ApiManagement.ResolverUpdateContractProperties", + "azure.mgmt.apimanagement.models.ResourceCollection": "Microsoft.ApiManagement.ResourceCollection", + "azure.mgmt.apimanagement.models.ResourceCollectionValueItem": "Microsoft.ApiManagement.ResourceCollectionValueItem", + "azure.mgmt.apimanagement.models.ResourceLocationDataContract": "Microsoft.ApiManagement.ResourceLocationDataContract", + "azure.mgmt.apimanagement.models.ResourceSku": "Microsoft.ApiManagement.ResourceSku", + "azure.mgmt.apimanagement.models.ResourceSkuCapacity": "Microsoft.ApiManagement.ResourceSkuCapacity", + "azure.mgmt.apimanagement.models.ResourceSkuResult": "Microsoft.ApiManagement.ResourceSkuResult", + "azure.mgmt.apimanagement.models.ResponseContract": "Microsoft.ApiManagement.ResponseContract", + "azure.mgmt.apimanagement.models.SamplingSettings": "Microsoft.ApiManagement.SamplingSettings", + "azure.mgmt.apimanagement.models.SaveConfigurationParameter": "Microsoft.ApiManagement.SaveConfigurationParameter", + "azure.mgmt.apimanagement.models.SaveConfigurationParameterProperties": "Microsoft.ApiManagement.SaveConfigurationParameterProperties", + "azure.mgmt.apimanagement.models.SchemaContract": "Microsoft.ApiManagement.SchemaContract", + "azure.mgmt.apimanagement.models.SchemaContractProperties": "Microsoft.ApiManagement.SchemaContractProperties", + "azure.mgmt.apimanagement.models.SchemaDocumentProperties": "Microsoft.ApiManagement.SchemaDocumentProperties", + "azure.mgmt.apimanagement.models.SubscriptionContract": "Microsoft.ApiManagement.SubscriptionContract", + "azure.mgmt.apimanagement.models.SubscriptionContractProperties": "Microsoft.ApiManagement.SubscriptionContractProperties", + "azure.mgmt.apimanagement.models.SubscriptionCreateParameterProperties": "Microsoft.ApiManagement.SubscriptionCreateParameterProperties", + "azure.mgmt.apimanagement.models.SubscriptionCreateParameters": "Microsoft.ApiManagement.SubscriptionCreateParameters", + "azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract": "Microsoft.ApiManagement.SubscriptionKeyParameterNamesContract", + "azure.mgmt.apimanagement.models.SubscriptionKeysContract": "Microsoft.ApiManagement.SubscriptionKeysContract", + "azure.mgmt.apimanagement.models.SubscriptionsDelegationSettingsProperties": "Microsoft.ApiManagement.SubscriptionsDelegationSettingsProperties", + "azure.mgmt.apimanagement.models.SubscriptionUpdateParameterProperties": "Microsoft.ApiManagement.SubscriptionUpdateParameterProperties", + "azure.mgmt.apimanagement.models.SubscriptionUpdateParameters": "Microsoft.ApiManagement.SubscriptionUpdateParameters", + "azure.mgmt.apimanagement.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.apimanagement.models.TagApiLinkContract": "Microsoft.ApiManagement.TagApiLinkContract", + "azure.mgmt.apimanagement.models.TagApiLinkContractProperties": "Microsoft.ApiManagement.TagApiLinkContractProperties", + "azure.mgmt.apimanagement.models.TagContract": "Microsoft.ApiManagement.TagContract", + "azure.mgmt.apimanagement.models.TagContractProperties": "Microsoft.ApiManagement.TagContractProperties", + "azure.mgmt.apimanagement.models.TagCreateUpdateParameters": "Microsoft.ApiManagement.TagCreateUpdateParameters", + "azure.mgmt.apimanagement.models.TagDescriptionBaseProperties": "Microsoft.ApiManagement.TagDescriptionBaseProperties", + "azure.mgmt.apimanagement.models.TagDescriptionContract": "Microsoft.ApiManagement.TagDescriptionContract", + "azure.mgmt.apimanagement.models.TagDescriptionContractProperties": "Microsoft.ApiManagement.TagDescriptionContractProperties", + "azure.mgmt.apimanagement.models.TagDescriptionCreateParameters": "Microsoft.ApiManagement.TagDescriptionCreateParameters", + "azure.mgmt.apimanagement.models.TagOperationLinkContract": "Microsoft.ApiManagement.TagOperationLinkContract", + "azure.mgmt.apimanagement.models.TagOperationLinkContractProperties": "Microsoft.ApiManagement.TagOperationLinkContractProperties", + "azure.mgmt.apimanagement.models.TagProductLinkContract": "Microsoft.ApiManagement.TagProductLinkContract", + "azure.mgmt.apimanagement.models.TagProductLinkContractProperties": "Microsoft.ApiManagement.TagProductLinkContractProperties", + "azure.mgmt.apimanagement.models.TagResourceContract": "Microsoft.ApiManagement.TagResourceContract", + "azure.mgmt.apimanagement.models.TagResourceContractProperties": "Microsoft.ApiManagement.TagTagResourceContractProperties", + "azure.mgmt.apimanagement.models.TenantConfigurationSyncStateContract": "Microsoft.ApiManagement.TenantConfigurationSyncStateContract", + "azure.mgmt.apimanagement.models.TenantConfigurationSyncStateContractProperties": "Microsoft.ApiManagement.TenantConfigurationSyncStateContractProperties", + "azure.mgmt.apimanagement.models.TenantSettingsContract": "Microsoft.ApiManagement.TenantSettingsContract", + "azure.mgmt.apimanagement.models.TenantSettingsContractProperties": "Microsoft.ApiManagement.TenantSettingsContractProperties", + "azure.mgmt.apimanagement.models.TermsOfServiceProperties": "Microsoft.ApiManagement.TermsOfServiceProperties", + "azure.mgmt.apimanagement.models.TokenBodyParameterContract": "Microsoft.ApiManagement.TokenBodyParameterContract", + "azure.mgmt.apimanagement.models.ToolContract": "Microsoft.ApiManagement.ToolContract", + "azure.mgmt.apimanagement.models.ToolContractProperties": "Microsoft.ApiManagement.ToolContractProperties", + "azure.mgmt.apimanagement.models.UserAssignedIdentity": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "azure.mgmt.apimanagement.models.UserContract": "Microsoft.ApiManagement.UserContract", + "azure.mgmt.apimanagement.models.UserEntityBaseParameters": "Microsoft.ApiManagement.UserEntityBaseParameters", + "azure.mgmt.apimanagement.models.UserContractProperties": "Microsoft.ApiManagement.UserContractProperties", + "azure.mgmt.apimanagement.models.UserCreateParameterProperties": "Microsoft.ApiManagement.UserCreateParameterProperties", + "azure.mgmt.apimanagement.models.UserCreateParameters": "Microsoft.ApiManagement.UserCreateParameters", + "azure.mgmt.apimanagement.models.UserIdentityContract": "Microsoft.ApiManagement.UserIdentityContract", + "azure.mgmt.apimanagement.models.UserIdentityProperties": "Microsoft.ApiManagement.UserIdentityProperties", + "azure.mgmt.apimanagement.models.UserTokenParameterProperties": "Microsoft.ApiManagement.UserTokenParameterProperties", + "azure.mgmt.apimanagement.models.UserTokenParameters": "Microsoft.ApiManagement.UserTokenParameters", + "azure.mgmt.apimanagement.models.UserTokenResult": "Microsoft.ApiManagement.UserTokenResult", + "azure.mgmt.apimanagement.models.UserUpdateParameters": "Microsoft.ApiManagement.UserUpdateParameters", + "azure.mgmt.apimanagement.models.UserUpdateParametersProperties": "Microsoft.ApiManagement.UserUpdateParametersProperties", + "azure.mgmt.apimanagement.models.VirtualNetworkConfiguration": "Microsoft.ApiManagement.VirtualNetworkConfiguration", + "azure.mgmt.apimanagement.models.WikiContract": "Microsoft.ApiManagement.WikiContract", + "azure.mgmt.apimanagement.models.WikiContractProperties": "Microsoft.ApiManagement.WikiContractProperties", + "azure.mgmt.apimanagement.models.WikiDocumentationContract": "Microsoft.ApiManagement.WikiDocumentationContract", + "azure.mgmt.apimanagement.models.WikiUpdateContract": "Microsoft.ApiManagement.WikiUpdateContract", + "azure.mgmt.apimanagement.models.WorkspaceContract": "Microsoft.ApiManagement.WorkspaceContract", + "azure.mgmt.apimanagement.models.WorkspaceContractProperties": "Microsoft.ApiManagement.WorkspaceContractProperties", + "azure.mgmt.apimanagement.models.WorkspaceLinksGateway": "Microsoft.ApiManagement.WorkspaceLinksGateway", + "azure.mgmt.apimanagement.models.X509CertificateName": "Microsoft.ApiManagement.X509CertificateName", + "azure.mgmt.apimanagement.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", + "azure.mgmt.apimanagement.models.BearerTokenSendingMethods": "Microsoft.ApiManagement.BearerTokenSendingMethods", + "azure.mgmt.apimanagement.models.ApiType": "Microsoft.ApiManagement.ApiType", + "azure.mgmt.apimanagement.models.Protocol": "Microsoft.ApiManagement.Protocol", + "azure.mgmt.apimanagement.models.VersioningScheme": "Microsoft.ApiManagement.VersioningScheme", + "azure.mgmt.apimanagement.models.ContentFormat": "Microsoft.ApiManagement.ContentFormat", + "azure.mgmt.apimanagement.models.SoapApiType": "Microsoft.ApiManagement.SoapApiType", + "azure.mgmt.apimanagement.models.TranslateRequiredQueryParametersConduct": "Microsoft.ApiManagement.TranslateRequiredQueryParametersConduct", + "azure.mgmt.apimanagement.models.PolicyContentFormat": "Microsoft.ApiManagement.PolicyContentFormat", + "azure.mgmt.apimanagement.models.PolicyIdName": "Microsoft.ApiManagement.PolicyIdName", + "azure.mgmt.apimanagement.models.PolicyExportFormat": "Microsoft.ApiManagement.PolicyExportFormat", + "azure.mgmt.apimanagement.models.AlwaysLog": "Microsoft.ApiManagement.AlwaysLog", + "azure.mgmt.apimanagement.models.SamplingType": "Microsoft.ApiManagement.SamplingType", + "azure.mgmt.apimanagement.models.DataMaskingMode": "Microsoft.ApiManagement.DataMaskingMode", + "azure.mgmt.apimanagement.models.LlmDiagnosticSettings": "Microsoft.ApiManagement.LlmDiagnosticSettings", + "azure.mgmt.apimanagement.models.LlmMessageLogTypes": "Microsoft.ApiManagement.LlmMessageLogTypes", + "azure.mgmt.apimanagement.models.HttpCorrelationProtocol": "Microsoft.ApiManagement.HttpCorrelationProtocol", + "azure.mgmt.apimanagement.models.Verbosity": "Microsoft.ApiManagement.Verbosity", + "azure.mgmt.apimanagement.models.OperationNameFormat": "Microsoft.ApiManagement.OperationNameFormat", + "azure.mgmt.apimanagement.models.State": "Microsoft.ApiManagement.State", + "azure.mgmt.apimanagement.models.CarbonEmissionCategory": "Microsoft.ApiManagement.CarbonEmissionCategory", + "azure.mgmt.apimanagement.models.BackendSessionIdSource": "Microsoft.ApiManagement.BackendSessionIdSource", + "azure.mgmt.apimanagement.models.BackendType": "Microsoft.ApiManagement.BackendType", + "azure.mgmt.apimanagement.models.BackendProtocol": "Microsoft.ApiManagement.BackendProtocol", + "azure.mgmt.apimanagement.models.GroupType": "Microsoft.ApiManagement.GroupType", + "azure.mgmt.apimanagement.models.LoggerType": "Microsoft.ApiManagement.LoggerType", + "azure.mgmt.apimanagement.models.KeyVaultRefreshState": "Microsoft.ApiManagement.KeyVaultRefreshState", + "azure.mgmt.apimanagement.models.NotificationName": "Microsoft.ApiManagement.NotificationName", + "azure.mgmt.apimanagement.models.PolicyFragmentContentFormat": "Microsoft.ApiManagement.PolicyFragmentContentFormat", + "azure.mgmt.apimanagement.models.ProductAuthType": "Microsoft.ApiManagement.ProductAuthType", + "azure.mgmt.apimanagement.models.ProductState": "Microsoft.ApiManagement.ProductState", + "azure.mgmt.apimanagement.models.SchemaType": "Microsoft.ApiManagement.SchemaType", + "azure.mgmt.apimanagement.models.SubscriptionState": "Microsoft.ApiManagement.SubscriptionState", + "azure.mgmt.apimanagement.models.AppType": "Microsoft.ApiManagement.AppType", + "azure.mgmt.apimanagement.models.VirtualNetworkType": "Microsoft.ApiManagement.VirtualNetworkType", + "azure.mgmt.apimanagement.models.ApiGatewaySkuType": "Microsoft.ApiManagement.ApiGatewaySkuType", + "azure.mgmt.apimanagement.models.GatewaySkuCapacityScaleType": "Microsoft.ApiManagement.GatewaySkuCapacityScaleType", + "azure.mgmt.apimanagement.models.HostnameType": "Microsoft.ApiManagement.HostnameType", + "azure.mgmt.apimanagement.models.CertificateSource": "Microsoft.ApiManagement.CertificateSource", + "azure.mgmt.apimanagement.models.CertificateStatus": "Microsoft.ApiManagement.CertificateStatus", + "azure.mgmt.apimanagement.models.PublicNetworkAccess": "Microsoft.ApiManagement.PublicNetworkAccess", + "azure.mgmt.apimanagement.models.LegacyApiState": "Microsoft.ApiManagement.LegacyApiState", + "azure.mgmt.apimanagement.models.SkuType": "Microsoft.ApiManagement.SkuType", + "azure.mgmt.apimanagement.models.NatGatewayState": "Microsoft.ApiManagement.NatGatewayState", + "azure.mgmt.apimanagement.models.PlatformVersion": "Microsoft.ApiManagement.PlatformVersion", + "azure.mgmt.apimanagement.models.CertificateConfigurationStoreName": "Microsoft.ApiManagement.CertificateConfigurationStoreName", + "azure.mgmt.apimanagement.models.PrivateEndpointServiceConnectionStatus": "Azure.ResourceManager.CommonTypes.PrivateEndpointServiceConnectionStatus", + "azure.mgmt.apimanagement.models.LegacyPortalStatus": "Microsoft.ApiManagement.LegacyPortalStatus", + "azure.mgmt.apimanagement.models.DeveloperPortalStatus": "Microsoft.ApiManagement.DeveloperPortalStatus", + "azure.mgmt.apimanagement.models.ReleaseChannel": "Microsoft.ApiManagement.ReleaseChannel", + "azure.mgmt.apimanagement.models.ApimIdentityType": "Microsoft.ApiManagement.ApimIdentityType", + "azure.mgmt.apimanagement.models.AccessType": "Microsoft.ApiManagement.AccessType", + "azure.mgmt.apimanagement.models.MigrateToStv2Mode": "Microsoft.ApiManagement.MigrateToStv2Mode", + "azure.mgmt.apimanagement.models.NameAvailabilityReason": "Microsoft.ApiManagement.NameAvailabilityReason", + "azure.mgmt.apimanagement.models.PolicyComplianceState": "Microsoft.ApiManagement.PolicyComplianceState", + "azure.mgmt.apimanagement.models.ResourceSkuCapacityScaleType": "Microsoft.ApiManagement.ResourceSkuCapacityScaleType", + "azure.mgmt.apimanagement.models.ConnectivityStatusType": "Microsoft.ApiManagement.ConnectivityStatusType", + "azure.mgmt.apimanagement.models.PolicyScopeContract": "Microsoft.ApiManagement.PolicyScopeContract", + "azure.mgmt.apimanagement.models.AsyncOperationStatus": "Microsoft.ApiManagement.AsyncOperationStatus", + "azure.mgmt.apimanagement.models.AuthorizationType": "Microsoft.ApiManagement.AuthorizationType", + "azure.mgmt.apimanagement.models.OAuth2GrantType": "Microsoft.ApiManagement.OAuth2GrantType", + "azure.mgmt.apimanagement.models.AuthorizationMethod": "Microsoft.ApiManagement.AuthorizationMethod", + "azure.mgmt.apimanagement.models.ClientAuthenticationMethod": "Microsoft.ApiManagement.ClientAuthenticationMethod", + "azure.mgmt.apimanagement.models.BearerTokenSendingMethod": "Microsoft.ApiManagement.BearerTokenSendingMethod", + "azure.mgmt.apimanagement.models.GrantType": "Microsoft.ApiManagement.GrantType", + "azure.mgmt.apimanagement.models.TemplateName": "Microsoft.ApiManagement.TemplateName", + "azure.mgmt.apimanagement.models.KeyVaultFetchCode": "Microsoft.ApiManagement.KeyVaultFetchCode", + "azure.mgmt.apimanagement.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "azure.mgmt.apimanagement.models.KeyType": "Microsoft.ApiManagement.KeyType", + "azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContractPurpose": "Microsoft.ApiManagement.GatewayListDebugCredentialsContractPurpose", + "azure.mgmt.apimanagement.models.UserState": "Microsoft.ApiManagement.UserState", + "azure.mgmt.apimanagement.models.IdentityProviderType": "Microsoft.ApiManagement.IdentityProviderType", + "azure.mgmt.apimanagement.models.PolicyRestrictionRequireBase": "Microsoft.ApiManagement.PolicyRestrictionRequireBase", + "azure.mgmt.apimanagement.models.PortalSettingsCspMode": "Microsoft.ApiManagement.PortalSettingsCspMode", + "azure.mgmt.apimanagement.models.ClientApplicationState": "Microsoft.ApiManagement.ClientApplicationState", + "azure.mgmt.apimanagement.models.PortalRevisionStatus": "Microsoft.ApiManagement.PortalRevisionStatus", + "azure.mgmt.apimanagement.models.PrivateEndpointConnectionProvisioningState": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProvisioningState", + "azure.mgmt.apimanagement.models.SettingsTypeName": "Microsoft.ApiManagement.SettingsTypeName", + "azure.mgmt.apimanagement.models.AccessIdName": "Microsoft.ApiManagement.AccessIdName", + "azure.mgmt.apimanagement.models.ConfigurationIdName": "Microsoft.ApiManagement.ConfigurationIdName", + "azure.mgmt.apimanagement.models.Confirmation": "Microsoft.ApiManagement.Confirmation", + "azure.mgmt.apimanagement.models.ExportResultFormat": "Microsoft.ApiManagement.ExportResultFormat", + "azure.mgmt.apimanagement.models.ExportFormat": "Microsoft.ApiManagement.ExportFormat", + "azure.mgmt.apimanagement.models.ExportApi": "Microsoft.ApiManagement.ExportApi", + "azure.mgmt.apimanagement.models.ApiManagementSkuCapacityScaleType": "Microsoft.ApiManagement.ApiManagementSkuCapacityScaleType", + "azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionsType": "Microsoft.ApiManagement.ApiManagementSkuRestrictionsType", + "azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionsReasonCode": "Microsoft.ApiManagement.ApiManagementSkuRestrictionsReasonCode", + "azure.mgmt.apimanagement.models.Origin": "Microsoft.ApiManagement.Origin", + "azure.mgmt.apimanagement.models.Severity": "Microsoft.ApiManagement.Severity", + "azure.mgmt.apimanagement.models.IssueType": "Microsoft.ApiManagement.IssueType", + "azure.mgmt.apimanagement.models.ConnectionStatus": "Microsoft.ApiManagement.ConnectionStatus", + "azure.mgmt.apimanagement.models.PreferredIPVersion": "Microsoft.ApiManagement.PreferredIPVersion", + "azure.mgmt.apimanagement.models.ConnectivityCheckProtocol": "Microsoft.ApiManagement.ConnectivityCheckProtocol", + "azure.mgmt.apimanagement.models.Method": "Microsoft.ApiManagement.Method", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.get": "Microsoft.ApiManagement.WorkspaceApi.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.get": "Microsoft.ApiManagement.WorkspaceApi.get", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApi.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApi.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.begin_create_or_update": "Microsoft.ApiManagement.WorkspaceApi.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.begin_create_or_update": "Microsoft.ApiManagement.WorkspaceApi.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.update": "Microsoft.ApiManagement.WorkspaceApi.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.update": "Microsoft.ApiManagement.WorkspaceApi.update", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.delete": "Microsoft.ApiManagement.WorkspaceApi.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.delete": "Microsoft.ApiManagement.WorkspaceApi.delete", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceApi.listByService", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceApi.listByService", + "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.get": "Microsoft.ApiManagement.WorkspaceApiRelease.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.get": "Microsoft.ApiManagement.WorkspaceApiRelease.get", + "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiRelease.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiRelease.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceApiRelease.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceApiRelease.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.update": "Microsoft.ApiManagement.WorkspaceApiRelease.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.update": "Microsoft.ApiManagement.WorkspaceApiRelease.update", + "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.delete": "Microsoft.ApiManagement.WorkspaceApiRelease.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.delete": "Microsoft.ApiManagement.WorkspaceApiRelease.delete", + "azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceApiRelease.listByService", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceApiRelease.listByService", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.get": "Microsoft.ApiManagement.WorkspaceApiOperation.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.get": "Microsoft.ApiManagement.WorkspaceApiOperation.get", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiOperation.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiOperation.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceApiOperation.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceApiOperation.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.update": "Microsoft.ApiManagement.WorkspaceApiOperation.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.update": "Microsoft.ApiManagement.WorkspaceApiOperation.update", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.delete": "Microsoft.ApiManagement.WorkspaceApiOperation.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.delete": "Microsoft.ApiManagement.WorkspaceApiOperation.delete", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations.list_by_api": "Microsoft.ApiManagement.WorkspaceApiOperation.listByApi", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations.list_by_api": "Microsoft.ApiManagement.WorkspaceApiOperation.listByApi", + "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.get": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.get", + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.get": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.get", + "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.getEntityTag", + "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.create_or_update": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.create_or_update": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.createOrUpdate", + "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.delete": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.delete", + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.delete": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.delete", + "azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations.list_by_resolver": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.listByResolver", + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations.list_by_resolver": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.listByResolver", + "azure.mgmt.apimanagement.operations.ApiPolicyOperations.get": "Microsoft.ApiManagement.ApiPolicy.get", + "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.get": "Microsoft.ApiManagement.ApiPolicy.get", + "azure.mgmt.apimanagement.operations.ApiPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.ApiPolicy.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.ApiPolicy.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiPolicyOperations.create_or_update": "Microsoft.ApiManagement.ApiPolicy.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.create_or_update": "Microsoft.ApiManagement.ApiPolicy.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiPolicyOperations.delete": "Microsoft.ApiManagement.ApiPolicy.delete", + "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.delete": "Microsoft.ApiManagement.ApiPolicy.delete", + "azure.mgmt.apimanagement.operations.ApiPolicyOperations.list_by_api": "Microsoft.ApiManagement.ApiPolicy.listByApi", + "azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations.list_by_api": "Microsoft.ApiManagement.ApiPolicy.listByApi", + "azure.mgmt.apimanagement.operations.PolicyOperations.get": "Microsoft.ApiManagement.Policy.get", + "azure.mgmt.apimanagement.aio.operations.PolicyOperations.get": "Microsoft.ApiManagement.Policy.get", + "azure.mgmt.apimanagement.operations.PolicyOperations.get_entity_tag": "Microsoft.ApiManagement.Policy.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.PolicyOperations.get_entity_tag": "Microsoft.ApiManagement.Policy.getEntityTag", + "azure.mgmt.apimanagement.operations.PolicyOperations.create_or_update": "Microsoft.ApiManagement.Policy.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.PolicyOperations.create_or_update": "Microsoft.ApiManagement.Policy.createOrUpdate", + "azure.mgmt.apimanagement.operations.PolicyOperations.delete": "Microsoft.ApiManagement.Policy.delete", + "azure.mgmt.apimanagement.aio.operations.PolicyOperations.delete": "Microsoft.ApiManagement.Policy.delete", + "azure.mgmt.apimanagement.operations.PolicyOperations.list_by_service": "Microsoft.ApiManagement.Policy.listByService", + "azure.mgmt.apimanagement.aio.operations.PolicyOperations.list_by_service": "Microsoft.ApiManagement.Policy.listByService", + "azure.mgmt.apimanagement.operations.ProductPolicyOperations.get": "Microsoft.ApiManagement.ProductPolicy.get", + "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.get": "Microsoft.ApiManagement.ProductPolicy.get", + "azure.mgmt.apimanagement.operations.ProductPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.ProductPolicy.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.ProductPolicy.getEntityTag", + "azure.mgmt.apimanagement.operations.ProductPolicyOperations.create_or_update": "Microsoft.ApiManagement.ProductPolicy.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.create_or_update": "Microsoft.ApiManagement.ProductPolicy.createOrUpdate", + "azure.mgmt.apimanagement.operations.ProductPolicyOperations.delete": "Microsoft.ApiManagement.ProductPolicy.delete", + "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.delete": "Microsoft.ApiManagement.ProductPolicy.delete", + "azure.mgmt.apimanagement.operations.ProductPolicyOperations.list_by_product": "Microsoft.ApiManagement.ProductPolicy.listByProduct", + "azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations.list_by_product": "Microsoft.ApiManagement.ProductPolicy.listByProduct", + "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.get": "Microsoft.ApiManagement.WorkspacePolicy.get", + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.get": "Microsoft.ApiManagement.WorkspacePolicy.get", + "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspacePolicy.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspacePolicy.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.create_or_update": "Microsoft.ApiManagement.WorkspacePolicy.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.create_or_update": "Microsoft.ApiManagement.WorkspacePolicy.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.delete": "Microsoft.ApiManagement.WorkspacePolicy.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.delete": "Microsoft.ApiManagement.WorkspacePolicy.delete", + "azure.mgmt.apimanagement.operations.WorkspacePolicyOperations.list_by_api": "Microsoft.ApiManagement.WorkspacePolicy.listByApi", + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations.list_by_api": "Microsoft.ApiManagement.WorkspacePolicy.listByApi", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.get": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.get": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.get", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.delete": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.delete": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.delete", + "azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations.list_by_operation": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.listByOperation", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations.list_by_operation": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.listByOperation", + "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.get": "Microsoft.ApiManagement.WorkspaceApiPolicy.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.get": "Microsoft.ApiManagement.WorkspaceApiPolicy.get", + "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiPolicy.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiPolicy.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceApiPolicy.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceApiPolicy.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.delete": "Microsoft.ApiManagement.WorkspaceApiPolicy.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.delete": "Microsoft.ApiManagement.WorkspaceApiPolicy.delete", + "azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations.list_by_api": "Microsoft.ApiManagement.WorkspaceApiPolicy.listByApi", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations.list_by_api": "Microsoft.ApiManagement.WorkspaceApiPolicy.listByApi", + "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.get": "Microsoft.ApiManagement.WorkspaceProductPolicy.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.get": "Microsoft.ApiManagement.WorkspaceProductPolicy.get", + "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceProductPolicy.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceProductPolicy.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceProductPolicy.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceProductPolicy.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.delete": "Microsoft.ApiManagement.WorkspaceProductPolicy.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.delete": "Microsoft.ApiManagement.WorkspaceProductPolicy.delete", + "azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations.list_by_product": "Microsoft.ApiManagement.WorkspaceProductPolicy.listByProduct", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations.list_by_product": "Microsoft.ApiManagement.WorkspaceProductPolicy.listByProduct", + "azure.mgmt.apimanagement.operations.TagOperations.get_by_api": "Microsoft.ApiManagement.Tag.getByApi", + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_by_api": "Microsoft.ApiManagement.Tag.getByApi", + "azure.mgmt.apimanagement.operations.TagOperations.get_entity_state_by_api": "Microsoft.ApiManagement.Tag.getEntityStateByApi", + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_entity_state_by_api": "Microsoft.ApiManagement.Tag.getEntityStateByApi", + "azure.mgmt.apimanagement.operations.TagOperations.assign_to_api": "Microsoft.ApiManagement.Tag.assignToApi", + "azure.mgmt.apimanagement.aio.operations.TagOperations.assign_to_api": "Microsoft.ApiManagement.Tag.assignToApi", + "azure.mgmt.apimanagement.operations.TagOperations.detach_from_api": "Microsoft.ApiManagement.Tag.detachFromApi", + "azure.mgmt.apimanagement.aio.operations.TagOperations.detach_from_api": "Microsoft.ApiManagement.Tag.detachFromApi", + "azure.mgmt.apimanagement.operations.TagOperations.list_by_api": "Microsoft.ApiManagement.Tag.listByApi", + "azure.mgmt.apimanagement.aio.operations.TagOperations.list_by_api": "Microsoft.ApiManagement.Tag.listByApi", + "azure.mgmt.apimanagement.operations.TagOperations.get_by_operation": "Microsoft.ApiManagement.TagContracts.getByOperation", + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_by_operation": "Microsoft.ApiManagement.TagContracts.getByOperation", + "azure.mgmt.apimanagement.operations.TagOperations.get_entity_state_by_operation": "Microsoft.ApiManagement.TagContracts.getEntityStateByOperation", + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_entity_state_by_operation": "Microsoft.ApiManagement.TagContracts.getEntityStateByOperation", + "azure.mgmt.apimanagement.operations.TagOperations.assign_to_operation": "Microsoft.ApiManagement.TagContracts.assignToOperation", + "azure.mgmt.apimanagement.aio.operations.TagOperations.assign_to_operation": "Microsoft.ApiManagement.TagContracts.assignToOperation", + "azure.mgmt.apimanagement.operations.TagOperations.detach_from_operation": "Microsoft.ApiManagement.TagContracts.detachFromOperation", + "azure.mgmt.apimanagement.aio.operations.TagOperations.detach_from_operation": "Microsoft.ApiManagement.TagContracts.detachFromOperation", + "azure.mgmt.apimanagement.operations.TagOperations.list_by_operation": "Microsoft.ApiManagement.TagContracts.listByOperation", + "azure.mgmt.apimanagement.aio.operations.TagOperations.list_by_operation": "Microsoft.ApiManagement.TagContracts.listByOperation", + "azure.mgmt.apimanagement.operations.TagOperations.get_by_product": "Microsoft.ApiManagement.TagContractOperation.getByProduct", + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_by_product": "Microsoft.ApiManagement.TagContractOperation.getByProduct", + "azure.mgmt.apimanagement.operations.TagOperations.get_entity_state_by_product": "Microsoft.ApiManagement.TagContractOperation.getEntityStateByProduct", + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_entity_state_by_product": "Microsoft.ApiManagement.TagContractOperation.getEntityStateByProduct", + "azure.mgmt.apimanagement.operations.TagOperations.assign_to_product": "Microsoft.ApiManagement.TagContractOperation.assignToProduct", + "azure.mgmt.apimanagement.aio.operations.TagOperations.assign_to_product": "Microsoft.ApiManagement.TagContractOperation.assignToProduct", + "azure.mgmt.apimanagement.operations.TagOperations.detach_from_product": "Microsoft.ApiManagement.TagContractOperation.detachFromProduct", + "azure.mgmt.apimanagement.aio.operations.TagOperations.detach_from_product": "Microsoft.ApiManagement.TagContractOperation.detachFromProduct", + "azure.mgmt.apimanagement.operations.TagOperations.list_by_product": "Microsoft.ApiManagement.TagContractOperation.listByProduct", + "azure.mgmt.apimanagement.aio.operations.TagOperations.list_by_product": "Microsoft.ApiManagement.TagContractOperation.listByProduct", + "azure.mgmt.apimanagement.operations.TagOperations.get": "Microsoft.ApiManagement.TagContractOperationGroup.get", + "azure.mgmt.apimanagement.aio.operations.TagOperations.get": "Microsoft.ApiManagement.TagContractOperationGroup.get", + "azure.mgmt.apimanagement.operations.TagOperations.get_entity_state": "Microsoft.ApiManagement.TagContractOperationGroup.getEntityState", + "azure.mgmt.apimanagement.aio.operations.TagOperations.get_entity_state": "Microsoft.ApiManagement.TagContractOperationGroup.getEntityState", + "azure.mgmt.apimanagement.operations.TagOperations.create_or_update": "Microsoft.ApiManagement.TagContractOperationGroup.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.TagOperations.create_or_update": "Microsoft.ApiManagement.TagContractOperationGroup.createOrUpdate", + "azure.mgmt.apimanagement.operations.TagOperations.update": "Microsoft.ApiManagement.TagContractOperationGroup.update", + "azure.mgmt.apimanagement.aio.operations.TagOperations.update": "Microsoft.ApiManagement.TagContractOperationGroup.update", + "azure.mgmt.apimanagement.operations.TagOperations.delete": "Microsoft.ApiManagement.TagContractOperationGroup.delete", + "azure.mgmt.apimanagement.aio.operations.TagOperations.delete": "Microsoft.ApiManagement.TagContractOperationGroup.delete", + "azure.mgmt.apimanagement.operations.TagOperations.list_by_service": "Microsoft.ApiManagement.TagContractOperationGroup.listByService", + "azure.mgmt.apimanagement.aio.operations.TagOperations.list_by_service": "Microsoft.ApiManagement.TagContractOperationGroup.listByService", + "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.get": "Microsoft.ApiManagement.WorkspaceTag.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.get": "Microsoft.ApiManagement.WorkspaceTag.get", + "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.get_entity_state": "Microsoft.ApiManagement.WorkspaceTag.getEntityState", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.get_entity_state": "Microsoft.ApiManagement.WorkspaceTag.getEntityState", + "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceTag.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceTag.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.update": "Microsoft.ApiManagement.WorkspaceTag.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.update": "Microsoft.ApiManagement.WorkspaceTag.update", + "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.delete": "Microsoft.ApiManagement.WorkspaceTag.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.delete": "Microsoft.ApiManagement.WorkspaceTag.delete", + "azure.mgmt.apimanagement.operations.WorkspaceTagOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceTag.listByService", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceTag.listByService", + "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.get": "Microsoft.ApiManagement.WorkspaceApiSchema.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.get": "Microsoft.ApiManagement.WorkspaceApiSchema.get", + "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiSchema.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiSchema.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.begin_create_or_update": "Microsoft.ApiManagement.WorkspaceApiSchema.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.begin_create_or_update": "Microsoft.ApiManagement.WorkspaceApiSchema.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.delete": "Microsoft.ApiManagement.WorkspaceApiSchema.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.delete": "Microsoft.ApiManagement.WorkspaceApiSchema.delete", + "azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations.list_by_api": "Microsoft.ApiManagement.WorkspaceApiSchema.listByApi", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations.list_by_api": "Microsoft.ApiManagement.WorkspaceApiSchema.listByApi", + "azure.mgmt.apimanagement.operations.DiagnosticOperations.get": "Microsoft.ApiManagement.Diagnostic.get", + "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.get": "Microsoft.ApiManagement.Diagnostic.get", + "azure.mgmt.apimanagement.operations.DiagnosticOperations.get_entity_tag": "Microsoft.ApiManagement.Diagnostic.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.get_entity_tag": "Microsoft.ApiManagement.Diagnostic.getEntityTag", + "azure.mgmt.apimanagement.operations.DiagnosticOperations.create_or_update": "Microsoft.ApiManagement.Diagnostic.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.create_or_update": "Microsoft.ApiManagement.Diagnostic.createOrUpdate", + "azure.mgmt.apimanagement.operations.DiagnosticOperations.update": "Microsoft.ApiManagement.Diagnostic.update", + "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.update": "Microsoft.ApiManagement.Diagnostic.update", + "azure.mgmt.apimanagement.operations.DiagnosticOperations.delete": "Microsoft.ApiManagement.Diagnostic.delete", + "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.delete": "Microsoft.ApiManagement.Diagnostic.delete", + "azure.mgmt.apimanagement.operations.DiagnosticOperations.list_by_service": "Microsoft.ApiManagement.Diagnostic.listByService", + "azure.mgmt.apimanagement.aio.operations.DiagnosticOperations.list_by_service": "Microsoft.ApiManagement.Diagnostic.listByService", + "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.get": "Microsoft.ApiManagement.WorkspaceDiagnostic.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.get": "Microsoft.ApiManagement.WorkspaceDiagnostic.get", + "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceDiagnostic.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceDiagnostic.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceDiagnostic.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceDiagnostic.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.update": "Microsoft.ApiManagement.WorkspaceDiagnostic.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.update": "Microsoft.ApiManagement.WorkspaceDiagnostic.update", + "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.delete": "Microsoft.ApiManagement.WorkspaceDiagnostic.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.delete": "Microsoft.ApiManagement.WorkspaceDiagnostic.delete", + "azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations.list_by_workspace": "Microsoft.ApiManagement.WorkspaceDiagnostic.listByWorkspace", + "azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations.list_by_workspace": "Microsoft.ApiManagement.WorkspaceDiagnostic.listByWorkspace", + "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.get": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.get": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.get", + "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.update": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.update": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.update", + "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.delete": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.delete": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.delete", + "azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations.list_by_workspace": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.listByWorkspace", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations.list_by_workspace": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.listByWorkspace", + "azure.mgmt.apimanagement.operations.IssueOperations.get": "Microsoft.ApiManagement.Issue.get", + "azure.mgmt.apimanagement.aio.operations.IssueOperations.get": "Microsoft.ApiManagement.Issue.get", + "azure.mgmt.apimanagement.operations.IssueOperations.list_by_service": "Microsoft.ApiManagement.Issue.listByService", + "azure.mgmt.apimanagement.aio.operations.IssueOperations.list_by_service": "Microsoft.ApiManagement.Issue.listByService", + "azure.mgmt.apimanagement.operations.ProductWikiOperations.get": "Microsoft.ApiManagement.ProductWiki.get", + "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.get": "Microsoft.ApiManagement.ProductWiki.get", + "azure.mgmt.apimanagement.operations.ProductWikiOperations.get_entity_tag": "Microsoft.ApiManagement.ProductWiki.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.get_entity_tag": "Microsoft.ApiManagement.ProductWiki.getEntityTag", + "azure.mgmt.apimanagement.operations.ProductWikiOperations.create_or_update": "Microsoft.ApiManagement.ProductWiki.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.create_or_update": "Microsoft.ApiManagement.ProductWiki.createOrUpdate", + "azure.mgmt.apimanagement.operations.ProductWikiOperations.update": "Microsoft.ApiManagement.ProductWiki.update", + "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.update": "Microsoft.ApiManagement.ProductWiki.update", + "azure.mgmt.apimanagement.operations.ProductWikiOperations.delete": "Microsoft.ApiManagement.ProductWiki.delete", + "azure.mgmt.apimanagement.aio.operations.ProductWikiOperations.delete": "Microsoft.ApiManagement.ProductWiki.delete", + "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.get": "Microsoft.ApiManagement.WorkspaceApiVersionSet.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.get": "Microsoft.ApiManagement.WorkspaceApiVersionSet.get", + "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiVersionSet.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceApiVersionSet.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceApiVersionSet.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceApiVersionSet.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.update": "Microsoft.ApiManagement.WorkspaceApiVersionSet.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.update": "Microsoft.ApiManagement.WorkspaceApiVersionSet.update", + "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.delete": "Microsoft.ApiManagement.WorkspaceApiVersionSet.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.delete": "Microsoft.ApiManagement.WorkspaceApiVersionSet.delete", + "azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceApiVersionSet.listByService", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceApiVersionSet.listByService", + "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.get": "Microsoft.ApiManagement.WorkspaceBackend.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.get": "Microsoft.ApiManagement.WorkspaceBackend.get", + "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceBackend.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceBackend.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceBackend.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceBackend.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.update": "Microsoft.ApiManagement.WorkspaceBackend.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.update": "Microsoft.ApiManagement.WorkspaceBackend.update", + "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.delete": "Microsoft.ApiManagement.WorkspaceBackend.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.delete": "Microsoft.ApiManagement.WorkspaceBackend.delete", + "azure.mgmt.apimanagement.operations.WorkspaceBackendOperations.list_by_workspace": "Microsoft.ApiManagement.WorkspaceBackend.listByWorkspace", + "azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations.list_by_workspace": "Microsoft.ApiManagement.WorkspaceBackend.listByWorkspace", + "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.get": "Microsoft.ApiManagement.WorkspaceCertificate.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.get": "Microsoft.ApiManagement.WorkspaceCertificate.get", + "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceCertificate.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceCertificate.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceCertificate.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceCertificate.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.delete": "Microsoft.ApiManagement.WorkspaceCertificate.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.delete": "Microsoft.ApiManagement.WorkspaceCertificate.delete", + "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.list_by_workspace": "Microsoft.ApiManagement.WorkspaceCertificate.listByWorkspace", + "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.list_by_workspace": "Microsoft.ApiManagement.WorkspaceCertificate.listByWorkspace", + "azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations.refresh_secret": "Microsoft.ApiManagement.WorkspaceCertificate.refreshSecret", + "azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations.refresh_secret": "Microsoft.ApiManagement.WorkspaceCertificate.refreshSecret", + "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.get": "Microsoft.ApiManagement.WorkspaceGroup.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.get": "Microsoft.ApiManagement.WorkspaceGroup.get", + "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceGroup.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceGroup.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceGroup.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceGroup.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.update": "Microsoft.ApiManagement.WorkspaceGroup.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.update": "Microsoft.ApiManagement.WorkspaceGroup.update", + "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.delete": "Microsoft.ApiManagement.WorkspaceGroup.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.delete": "Microsoft.ApiManagement.WorkspaceGroup.delete", + "azure.mgmt.apimanagement.operations.WorkspaceGroupOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceGroup.listByService", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceGroup.listByService", + "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.get": "Microsoft.ApiManagement.WorkspaceLogger.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.get": "Microsoft.ApiManagement.WorkspaceLogger.get", + "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceLogger.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceLogger.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceLogger.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceLogger.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.update": "Microsoft.ApiManagement.WorkspaceLogger.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.update": "Microsoft.ApiManagement.WorkspaceLogger.update", + "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.delete": "Microsoft.ApiManagement.WorkspaceLogger.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.delete": "Microsoft.ApiManagement.WorkspaceLogger.delete", + "azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations.list_by_workspace": "Microsoft.ApiManagement.WorkspaceLogger.listByWorkspace", + "azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations.list_by_workspace": "Microsoft.ApiManagement.WorkspaceLogger.listByWorkspace", + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.get": "Microsoft.ApiManagement.WorkspaceNamedValue.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.get": "Microsoft.ApiManagement.WorkspaceNamedValue.get", + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceNamedValue.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceNamedValue.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.begin_create_or_update": "Microsoft.ApiManagement.WorkspaceNamedValue.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.begin_create_or_update": "Microsoft.ApiManagement.WorkspaceNamedValue.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.begin_update": "Microsoft.ApiManagement.WorkspaceNamedValue.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.begin_update": "Microsoft.ApiManagement.WorkspaceNamedValue.update", + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.delete": "Microsoft.ApiManagement.WorkspaceNamedValue.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.delete": "Microsoft.ApiManagement.WorkspaceNamedValue.delete", + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceNamedValue.listByService", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceNamedValue.listByService", + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.list_value": "Microsoft.ApiManagement.WorkspaceNamedValue.listValue", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.list_value": "Microsoft.ApiManagement.WorkspaceNamedValue.listValue", + "azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations.begin_refresh_secret": "Microsoft.ApiManagement.WorkspaceNamedValue.refreshSecret", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations.begin_refresh_secret": "Microsoft.ApiManagement.WorkspaceNamedValue.refreshSecret", + "azure.mgmt.apimanagement.operations.WorkspaceNotificationOperations.get": "Microsoft.ApiManagement.WorkspaceNotification.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationOperations.get": "Microsoft.ApiManagement.WorkspaceNotification.get", + "azure.mgmt.apimanagement.operations.WorkspaceNotificationOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceNotification.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceNotification.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceNotificationOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceNotification.listByService", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceNotification.listByService", + "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.get": "Microsoft.ApiManagement.WorkspacePolicyFragment.get", + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.get": "Microsoft.ApiManagement.WorkspacePolicyFragment.get", + "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspacePolicyFragment.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspacePolicyFragment.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.begin_create_or_update": "Microsoft.ApiManagement.WorkspacePolicyFragment.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.begin_create_or_update": "Microsoft.ApiManagement.WorkspacePolicyFragment.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.delete": "Microsoft.ApiManagement.WorkspacePolicyFragment.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.delete": "Microsoft.ApiManagement.WorkspacePolicyFragment.delete", + "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.list_by_service": "Microsoft.ApiManagement.WorkspacePolicyFragment.listByService", + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.list_by_service": "Microsoft.ApiManagement.WorkspacePolicyFragment.listByService", + "azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations.list_references": "Microsoft.ApiManagement.WorkspacePolicyFragment.listReferences", + "azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations.list_references": "Microsoft.ApiManagement.WorkspacePolicyFragment.listReferences", + "azure.mgmt.apimanagement.operations.SignInSettingsOperations.get": "Microsoft.ApiManagement.SignInSettings.get", + "azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations.get": "Microsoft.ApiManagement.SignInSettings.get", + "azure.mgmt.apimanagement.operations.SignInSettingsOperations.get_entity_tag": "Microsoft.ApiManagement.SignInSettings.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations.get_entity_tag": "Microsoft.ApiManagement.SignInSettings.getEntityTag", + "azure.mgmt.apimanagement.operations.SignInSettingsOperations.create_or_update": "Microsoft.ApiManagement.SignInSettings.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations.create_or_update": "Microsoft.ApiManagement.SignInSettings.createOrUpdate", + "azure.mgmt.apimanagement.operations.SignInSettingsOperations.update": "Microsoft.ApiManagement.SignInSettings.update", + "azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations.update": "Microsoft.ApiManagement.SignInSettings.update", + "azure.mgmt.apimanagement.operations.SignUpSettingsOperations.get": "Microsoft.ApiManagement.SignUpSettings.get", + "azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations.get": "Microsoft.ApiManagement.SignUpSettings.get", + "azure.mgmt.apimanagement.operations.SignUpSettingsOperations.get_entity_tag": "Microsoft.ApiManagement.SignUpSettings.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations.get_entity_tag": "Microsoft.ApiManagement.SignUpSettings.getEntityTag", + "azure.mgmt.apimanagement.operations.SignUpSettingsOperations.create_or_update": "Microsoft.ApiManagement.SignUpSettings.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations.create_or_update": "Microsoft.ApiManagement.SignUpSettings.createOrUpdate", + "azure.mgmt.apimanagement.operations.SignUpSettingsOperations.update": "Microsoft.ApiManagement.SignUpSettings.update", + "azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations.update": "Microsoft.ApiManagement.SignUpSettings.update", + "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.get": "Microsoft.ApiManagement.DelegationSettings.get", + "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.get": "Microsoft.ApiManagement.DelegationSettings.get", + "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.get_entity_tag": "Microsoft.ApiManagement.DelegationSettings.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.get_entity_tag": "Microsoft.ApiManagement.DelegationSettings.getEntityTag", + "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.create_or_update": "Microsoft.ApiManagement.DelegationSettings.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.create_or_update": "Microsoft.ApiManagement.DelegationSettings.createOrUpdate", + "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.update": "Microsoft.ApiManagement.DelegationSettings.update", + "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.update": "Microsoft.ApiManagement.DelegationSettings.update", + "azure.mgmt.apimanagement.operations.DelegationSettingsOperations.list_secrets": "Microsoft.ApiManagement.DelegationSettings.listSecrets", + "azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations.list_secrets": "Microsoft.ApiManagement.DelegationSettings.listSecrets", + "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.get": "Microsoft.ApiManagement.WorkspaceProduct.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.get": "Microsoft.ApiManagement.WorkspaceProduct.get", + "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceProduct.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceProduct.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceProduct.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceProduct.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.update": "Microsoft.ApiManagement.WorkspaceProduct.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.update": "Microsoft.ApiManagement.WorkspaceProduct.update", + "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.delete": "Microsoft.ApiManagement.WorkspaceProduct.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.delete": "Microsoft.ApiManagement.WorkspaceProduct.delete", + "azure.mgmt.apimanagement.operations.WorkspaceProductOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceProduct.listByService", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceProduct.listByService", + "azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations.get": "Microsoft.ApiManagement.WorkspaceProductApiLink.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations.get": "Microsoft.ApiManagement.WorkspaceProductApiLink.get", + "azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceProductApiLink.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceProductApiLink.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations.delete": "Microsoft.ApiManagement.WorkspaceProductApiLink.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations.delete": "Microsoft.ApiManagement.WorkspaceProductApiLink.delete", + "azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations.list_by_product": "Microsoft.ApiManagement.WorkspaceProductApiLink.listByProduct", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations.list_by_product": "Microsoft.ApiManagement.WorkspaceProductApiLink.listByProduct", + "azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations.get": "Microsoft.ApiManagement.WorkspaceProductGroupLink.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations.get": "Microsoft.ApiManagement.WorkspaceProductGroupLink.get", + "azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceProductGroupLink.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceProductGroupLink.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations.delete": "Microsoft.ApiManagement.WorkspaceProductGroupLink.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations.delete": "Microsoft.ApiManagement.WorkspaceProductGroupLink.delete", + "azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations.list_by_product": "Microsoft.ApiManagement.WorkspaceProductGroupLink.listByProduct", + "azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations.list_by_product": "Microsoft.ApiManagement.WorkspaceProductGroupLink.listByProduct", + "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.get": "Microsoft.ApiManagement.WorkspaceGlobalSchema.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.get": "Microsoft.ApiManagement.WorkspaceGlobalSchema.get", + "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceGlobalSchema.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceGlobalSchema.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.begin_create_or_update": "Microsoft.ApiManagement.WorkspaceGlobalSchema.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.begin_create_or_update": "Microsoft.ApiManagement.WorkspaceGlobalSchema.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.delete": "Microsoft.ApiManagement.WorkspaceGlobalSchema.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.delete": "Microsoft.ApiManagement.WorkspaceGlobalSchema.delete", + "azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceGlobalSchema.listByService", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceGlobalSchema.listByService", + "azure.mgmt.apimanagement.operations.UserSubscriptionOperations.get": "Microsoft.ApiManagement.UserSubscription.get", + "azure.mgmt.apimanagement.aio.operations.UserSubscriptionOperations.get": "Microsoft.ApiManagement.UserSubscription.get", + "azure.mgmt.apimanagement.operations.UserSubscriptionOperations.list": "Microsoft.ApiManagement.UserSubscription.list", + "azure.mgmt.apimanagement.aio.operations.UserSubscriptionOperations.list": "Microsoft.ApiManagement.UserSubscription.list", + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.get": "Microsoft.ApiManagement.WorkspaceSubscription.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.get": "Microsoft.ApiManagement.WorkspaceSubscription.get", + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceSubscription.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceSubscription.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceSubscription.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceSubscription.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.update": "Microsoft.ApiManagement.WorkspaceSubscription.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.update": "Microsoft.ApiManagement.WorkspaceSubscription.update", + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.delete": "Microsoft.ApiManagement.WorkspaceSubscription.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.delete": "Microsoft.ApiManagement.WorkspaceSubscription.delete", + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.list": "Microsoft.ApiManagement.WorkspaceSubscription.list", + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.list": "Microsoft.ApiManagement.WorkspaceSubscription.list", + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.regenerate_primary_key": "Microsoft.ApiManagement.WorkspaceSubscription.regeneratePrimaryKey", + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.regenerate_primary_key": "Microsoft.ApiManagement.WorkspaceSubscription.regeneratePrimaryKey", + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.regenerate_secondary_key": "Microsoft.ApiManagement.WorkspaceSubscription.regenerateSecondaryKey", + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.regenerate_secondary_key": "Microsoft.ApiManagement.WorkspaceSubscription.regenerateSecondaryKey", + "azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations.list_secrets": "Microsoft.ApiManagement.WorkspaceSubscription.listSecrets", + "azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations.list_secrets": "Microsoft.ApiManagement.WorkspaceSubscription.listSecrets", + "azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations.get": "Microsoft.ApiManagement.WorkspaceTagApiLink.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations.get": "Microsoft.ApiManagement.WorkspaceTagApiLink.get", + "azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceTagApiLink.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceTagApiLink.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations.delete": "Microsoft.ApiManagement.WorkspaceTagApiLink.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations.delete": "Microsoft.ApiManagement.WorkspaceTagApiLink.delete", + "azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations.list_by_product": "Microsoft.ApiManagement.WorkspaceTagApiLink.listByProduct", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations.list_by_product": "Microsoft.ApiManagement.WorkspaceTagApiLink.listByProduct", + "azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations.get": "Microsoft.ApiManagement.WorkspaceTagOperationLink.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations.get": "Microsoft.ApiManagement.WorkspaceTagOperationLink.get", + "azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceTagOperationLink.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceTagOperationLink.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations.delete": "Microsoft.ApiManagement.WorkspaceTagOperationLink.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations.delete": "Microsoft.ApiManagement.WorkspaceTagOperationLink.delete", + "azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations.list_by_product": "Microsoft.ApiManagement.WorkspaceTagOperationLink.listByProduct", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations.list_by_product": "Microsoft.ApiManagement.WorkspaceTagOperationLink.listByProduct", + "azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations.get": "Microsoft.ApiManagement.WorkspaceTagProductLink.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations.get": "Microsoft.ApiManagement.WorkspaceTagProductLink.get", + "azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceTagProductLink.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceTagProductLink.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations.delete": "Microsoft.ApiManagement.WorkspaceTagProductLink.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations.delete": "Microsoft.ApiManagement.WorkspaceTagProductLink.delete", + "azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations.list_by_product": "Microsoft.ApiManagement.WorkspaceTagProductLink.listByProduct", + "azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations.list_by_product": "Microsoft.ApiManagement.WorkspaceTagProductLink.listByProduct", + "azure.mgmt.apimanagement.operations.ApiManagementOperationsOperations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.apimanagement.aio.operations.ApiManagementOperationsOperations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.apimanagement.operations.ApiGatewayOperations.get": "Microsoft.ApiManagement.ApiManagementGatewayResources.get", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.get": "Microsoft.ApiManagement.ApiManagementGatewayResources.get", + "azure.mgmt.apimanagement.operations.ApiGatewayOperations.begin_create_or_update": "Microsoft.ApiManagement.ApiManagementGatewayResources.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.begin_create_or_update": "Microsoft.ApiManagement.ApiManagementGatewayResources.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiGatewayOperations.begin_update": "Microsoft.ApiManagement.ApiManagementGatewayResources.update", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.begin_update": "Microsoft.ApiManagement.ApiManagementGatewayResources.update", + "azure.mgmt.apimanagement.operations.ApiGatewayOperations.begin_delete": "Microsoft.ApiManagement.ApiManagementGatewayResources.delete", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.begin_delete": "Microsoft.ApiManagement.ApiManagementGatewayResources.delete", + "azure.mgmt.apimanagement.operations.ApiGatewayOperations.list_by_resource_group": "Microsoft.ApiManagement.ApiManagementGatewayResources.listByResourceGroup", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.list_by_resource_group": "Microsoft.ApiManagement.ApiManagementGatewayResources.listByResourceGroup", + "azure.mgmt.apimanagement.operations.ApiGatewayOperations.list": "Microsoft.ApiManagement.ApiManagementGatewayResources.list", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations.list": "Microsoft.ApiManagement.ApiManagementGatewayResources.list", + "azure.mgmt.apimanagement.operations.ApiManagementGatewaySkusOperations.list_available_skus": "Microsoft.ApiManagement.ApiManagementGatewayResources.listAvailableSkus", + "azure.mgmt.apimanagement.aio.operations.ApiManagementGatewaySkusOperations.list_available_skus": "Microsoft.ApiManagement.ApiManagementGatewayResources.listAvailableSkus", + "azure.mgmt.apimanagement.operations.ApiOperations.get": "Microsoft.ApiManagement.ApiContracts.get", + "azure.mgmt.apimanagement.aio.operations.ApiOperations.get": "Microsoft.ApiManagement.ApiContracts.get", + "azure.mgmt.apimanagement.operations.ApiOperations.get_entity_tag": "Microsoft.ApiManagement.ApiContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiOperations.get_entity_tag": "Microsoft.ApiManagement.ApiContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiOperations.begin_create_or_update": "Microsoft.ApiManagement.ApiContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiOperations.begin_create_or_update": "Microsoft.ApiManagement.ApiContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiOperations.update": "Microsoft.ApiManagement.ApiContracts.update", + "azure.mgmt.apimanagement.aio.operations.ApiOperations.update": "Microsoft.ApiManagement.ApiContracts.update", + "azure.mgmt.apimanagement.operations.ApiOperations.begin_delete": "Microsoft.ApiManagement.ApiContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ApiOperations.begin_delete": "Microsoft.ApiManagement.ApiContracts.delete", + "azure.mgmt.apimanagement.operations.ApiOperations.list_by_service": "Microsoft.ApiManagement.ApiContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.ApiOperations.list_by_service": "Microsoft.ApiManagement.ApiContracts.listByService", + "azure.mgmt.apimanagement.operations.ApiOperations.list_by_tags": "Microsoft.ApiManagement.ApiManagementServiceResources.listByTags", + "azure.mgmt.apimanagement.aio.operations.ApiOperations.list_by_tags": "Microsoft.ApiManagement.ApiManagementServiceResources.listByTags", + "azure.mgmt.apimanagement.operations.ApiRevisionOperations.list_by_service": "Microsoft.ApiManagement.ApiContracts.apiRevisionListByService", + "azure.mgmt.apimanagement.aio.operations.ApiRevisionOperations.list_by_service": "Microsoft.ApiManagement.ApiContracts.apiRevisionListByService", + "azure.mgmt.apimanagement.operations.ApiProductOperations.list_by_apis": "Microsoft.ApiManagement.ApiContracts.listByApis", + "azure.mgmt.apimanagement.aio.operations.ApiProductOperations.list_by_apis": "Microsoft.ApiManagement.ApiContracts.listByApis", + "azure.mgmt.apimanagement.operations.OperationOperations.list_by_tags": "Microsoft.ApiManagement.ApiContracts.listByTags", + "azure.mgmt.apimanagement.aio.operations.OperationOperations.list_by_tags": "Microsoft.ApiManagement.ApiContracts.listByTags", + "azure.mgmt.apimanagement.operations.WorkspaceApiRevisionOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceApi.workspaceApiRevisionListByService", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiRevisionOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceApi.workspaceApiRevisionListByService", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.get": "Microsoft.ApiManagement.ApiManagementServiceResources.get", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.get": "Microsoft.ApiManagement.ApiManagementServiceResources.get", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_create_or_update": "Microsoft.ApiManagement.ApiManagementServiceResources.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_create_or_update": "Microsoft.ApiManagement.ApiManagementServiceResources.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_update": "Microsoft.ApiManagement.ApiManagementServiceResources.update", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_update": "Microsoft.ApiManagement.ApiManagementServiceResources.update", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_delete": "Microsoft.ApiManagement.ApiManagementServiceResources.delete", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_delete": "Microsoft.ApiManagement.ApiManagementServiceResources.delete", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.list_by_resource_group": "Microsoft.ApiManagement.ApiManagementServiceResources.listByResourceGroup", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.list_by_resource_group": "Microsoft.ApiManagement.ApiManagementServiceResources.listByResourceGroup", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.list": "Microsoft.ApiManagement.ApiManagementServiceResources.list", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.list": "Microsoft.ApiManagement.ApiManagementServiceResources.list", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_restore": "Microsoft.ApiManagement.ApiManagementServiceResources.restore", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_restore": "Microsoft.ApiManagement.ApiManagementServiceResources.restore", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_backup": "Microsoft.ApiManagement.ApiManagementServiceResources.backup", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_backup": "Microsoft.ApiManagement.ApiManagementServiceResources.backup", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_migrate_to_stv2": "Microsoft.ApiManagement.ApiManagementServiceResources.migrateToStv2", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_migrate_to_stv2": "Microsoft.ApiManagement.ApiManagementServiceResources.migrateToStv2", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.get_sso_token": "Microsoft.ApiManagement.ApiManagementServiceResources.getSsoToken", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.get_sso_token": "Microsoft.ApiManagement.ApiManagementServiceResources.getSsoToken", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_apply_network_configuration_updates": "Microsoft.ApiManagement.ApiManagementServiceResources.applyNetworkConfigurationUpdates", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_apply_network_configuration_updates": "Microsoft.ApiManagement.ApiManagementServiceResources.applyNetworkConfigurationUpdates", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.begin_refresh_hostnames": "Microsoft.ApiManagement.ApiManagementServiceResources.refreshHostnames", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.begin_refresh_hostnames": "Microsoft.ApiManagement.ApiManagementServiceResources.refreshHostnames", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.check_name_availability": "Microsoft.ApiManagement.ApiManagementServiceOperationGroup.checkNameAvailability", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.check_name_availability": "Microsoft.ApiManagement.ApiManagementServiceOperationGroup.checkNameAvailability", + "azure.mgmt.apimanagement.operations.ApiManagementServiceOperations.get_domain_ownership_identifier": "Microsoft.ApiManagement.ApiManagementServiceOperationGroup.getDomainOwnershipIdentifier", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations.get_domain_ownership_identifier": "Microsoft.ApiManagement.ApiManagementServiceOperationGroup.getDomainOwnershipIdentifier", + "azure.mgmt.apimanagement.operations.AllPoliciesOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.listByService", + "azure.mgmt.apimanagement.aio.operations.AllPoliciesOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.listByService", + "azure.mgmt.apimanagement.operations.ApiManagementServiceSkusOperations.list_available_service_skus": "Microsoft.ApiManagement.ApiManagementServiceResources.listAvailableServiceSkus", + "azure.mgmt.apimanagement.aio.operations.ApiManagementServiceSkusOperations.list_available_service_skus": "Microsoft.ApiManagement.ApiManagementServiceResources.listAvailableServiceSkus", + "azure.mgmt.apimanagement.operations.NetworkStatusOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.networkStatusListByService", + "azure.mgmt.apimanagement.aio.operations.NetworkStatusOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.networkStatusListByService", + "azure.mgmt.apimanagement.operations.NetworkStatusOperations.list_by_location": "Microsoft.ApiManagement.ApiManagementServiceResources.listByLocation", + "azure.mgmt.apimanagement.aio.operations.NetworkStatusOperations.list_by_location": "Microsoft.ApiManagement.ApiManagementServiceResources.listByLocation", + "azure.mgmt.apimanagement.operations.OutboundNetworkDependenciesEndpointsOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.outboundNetworkDependenciesEndpointsListByService", + "azure.mgmt.apimanagement.aio.operations.OutboundNetworkDependenciesEndpointsOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.outboundNetworkDependenciesEndpointsListByService", + "azure.mgmt.apimanagement.operations.PolicyDescriptionOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.policyDescriptionListByService", + "azure.mgmt.apimanagement.aio.operations.PolicyDescriptionOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.policyDescriptionListByService", + "azure.mgmt.apimanagement.operations.PolicyRestrictionValidationsOperations.begin_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.byService", + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionValidationsOperations.begin_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.byService", + "azure.mgmt.apimanagement.operations.PortalSettingsOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.portalSettingsListByService", + "azure.mgmt.apimanagement.aio.operations.PortalSettingsOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.portalSettingsListByService", + "azure.mgmt.apimanagement.operations.ProductOperations.list_by_tags": "Microsoft.ApiManagement.ApiManagementServiceResources.productListByTags", + "azure.mgmt.apimanagement.aio.operations.ProductOperations.list_by_tags": "Microsoft.ApiManagement.ApiManagementServiceResources.productListByTags", + "azure.mgmt.apimanagement.operations.ProductOperations.get": "Microsoft.ApiManagement.ProductContracts.get", + "azure.mgmt.apimanagement.aio.operations.ProductOperations.get": "Microsoft.ApiManagement.ProductContracts.get", + "azure.mgmt.apimanagement.operations.ProductOperations.get_entity_tag": "Microsoft.ApiManagement.ProductContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ProductOperations.get_entity_tag": "Microsoft.ApiManagement.ProductContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ProductOperations.create_or_update": "Microsoft.ApiManagement.ProductContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ProductOperations.create_or_update": "Microsoft.ApiManagement.ProductContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ProductOperations.update": "Microsoft.ApiManagement.ProductContracts.update", + "azure.mgmt.apimanagement.aio.operations.ProductOperations.update": "Microsoft.ApiManagement.ProductContracts.update", + "azure.mgmt.apimanagement.operations.ProductOperations.delete": "Microsoft.ApiManagement.ProductContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ProductOperations.delete": "Microsoft.ApiManagement.ProductContracts.delete", + "azure.mgmt.apimanagement.operations.ProductOperations.list_by_service": "Microsoft.ApiManagement.ProductContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.ProductOperations.list_by_service": "Microsoft.ApiManagement.ProductContracts.listByService", + "azure.mgmt.apimanagement.operations.QuotaByCounterKeysOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.quotaByCounterKeysListByService", + "azure.mgmt.apimanagement.aio.operations.QuotaByCounterKeysOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.quotaByCounterKeysListByService", + "azure.mgmt.apimanagement.operations.QuotaByCounterKeysOperations.update": "Microsoft.ApiManagement.ApiManagementServiceResources.quotaByCounterKeysUpdate", + "azure.mgmt.apimanagement.aio.operations.QuotaByCounterKeysOperations.update": "Microsoft.ApiManagement.ApiManagementServiceResources.quotaByCounterKeysUpdate", + "azure.mgmt.apimanagement.operations.QuotaByPeriodKeysOperations.get": "Microsoft.ApiManagement.ApiManagementServiceResources.quotaByPeriodKeysGet", + "azure.mgmt.apimanagement.aio.operations.QuotaByPeriodKeysOperations.get": "Microsoft.ApiManagement.ApiManagementServiceResources.quotaByPeriodKeysGet", + "azure.mgmt.apimanagement.operations.QuotaByPeriodKeysOperations.update": "Microsoft.ApiManagement.ApiManagementServiceResources.quotaByPeriodKeysUpdate", + "azure.mgmt.apimanagement.aio.operations.QuotaByPeriodKeysOperations.update": "Microsoft.ApiManagement.ApiManagementServiceResources.quotaByPeriodKeysUpdate", + "azure.mgmt.apimanagement.operations.RegionOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.regionListByService", + "azure.mgmt.apimanagement.aio.operations.RegionOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.regionListByService", + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_api": "Microsoft.ApiManagement.ApiManagementServiceResources.listByApi", + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_api": "Microsoft.ApiManagement.ApiManagementServiceResources.listByApi", + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_user": "Microsoft.ApiManagement.ApiManagementServiceResources.listByUser", + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_user": "Microsoft.ApiManagement.ApiManagementServiceResources.listByUser", + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_operation": "Microsoft.ApiManagement.ApiManagementServiceResources.listByOperation", + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_operation": "Microsoft.ApiManagement.ApiManagementServiceResources.listByOperation", + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_product": "Microsoft.ApiManagement.ApiManagementServiceResources.listByProduct", + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_product": "Microsoft.ApiManagement.ApiManagementServiceResources.listByProduct", + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_geo": "Microsoft.ApiManagement.ApiManagementServiceResources.listByGeo", + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_geo": "Microsoft.ApiManagement.ApiManagementServiceResources.listByGeo", + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_subscription": "Microsoft.ApiManagement.ApiManagementServiceResources.listBySubscription", + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_subscription": "Microsoft.ApiManagement.ApiManagementServiceResources.listBySubscription", + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_time": "Microsoft.ApiManagement.ApiManagementServiceResources.listByTime", + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_time": "Microsoft.ApiManagement.ApiManagementServiceResources.listByTime", + "azure.mgmt.apimanagement.operations.ReportsOperations.list_by_request": "Microsoft.ApiManagement.ApiManagementServiceResources.listByRequest", + "azure.mgmt.apimanagement.aio.operations.ReportsOperations.list_by_request": "Microsoft.ApiManagement.ApiManagementServiceResources.listByRequest", + "azure.mgmt.apimanagement.operations.TagResourceOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.tagResourceListByService", + "azure.mgmt.apimanagement.aio.operations.TagResourceOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementServiceResources.tagResourceListByService", + "azure.mgmt.apimanagement.operations.ApiReleaseOperations.get": "Microsoft.ApiManagement.ApiReleaseContracts.get", + "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.get": "Microsoft.ApiManagement.ApiReleaseContracts.get", + "azure.mgmt.apimanagement.operations.ApiReleaseOperations.get_entity_tag": "Microsoft.ApiManagement.ApiReleaseContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.get_entity_tag": "Microsoft.ApiManagement.ApiReleaseContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiReleaseOperations.create_or_update": "Microsoft.ApiManagement.ApiReleaseContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.create_or_update": "Microsoft.ApiManagement.ApiReleaseContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiReleaseOperations.update": "Microsoft.ApiManagement.ApiReleaseContracts.update", + "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.update": "Microsoft.ApiManagement.ApiReleaseContracts.update", + "azure.mgmt.apimanagement.operations.ApiReleaseOperations.delete": "Microsoft.ApiManagement.ApiReleaseContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.delete": "Microsoft.ApiManagement.ApiReleaseContracts.delete", + "azure.mgmt.apimanagement.operations.ApiReleaseOperations.list_by_service": "Microsoft.ApiManagement.ApiReleaseContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations.list_by_service": "Microsoft.ApiManagement.ApiReleaseContracts.listByService", + "azure.mgmt.apimanagement.operations.ApiOperationOperations.get": "Microsoft.ApiManagement.OperationContracts.get", + "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.get": "Microsoft.ApiManagement.OperationContracts.get", + "azure.mgmt.apimanagement.operations.ApiOperationOperations.get_entity_tag": "Microsoft.ApiManagement.OperationContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.get_entity_tag": "Microsoft.ApiManagement.OperationContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiOperationOperations.create_or_update": "Microsoft.ApiManagement.OperationContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.create_or_update": "Microsoft.ApiManagement.OperationContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiOperationOperations.update": "Microsoft.ApiManagement.OperationContracts.update", + "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.update": "Microsoft.ApiManagement.OperationContracts.update", + "azure.mgmt.apimanagement.operations.ApiOperationOperations.delete": "Microsoft.ApiManagement.OperationContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.delete": "Microsoft.ApiManagement.OperationContracts.delete", + "azure.mgmt.apimanagement.operations.ApiOperationOperations.list_by_api": "Microsoft.ApiManagement.OperationContracts.listByApi", + "azure.mgmt.apimanagement.aio.operations.ApiOperationOperations.list_by_api": "Microsoft.ApiManagement.OperationContracts.listByApi", + "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.get": "Microsoft.ApiManagement.PolicyContracts.get", + "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.get": "Microsoft.ApiManagement.PolicyContracts.get", + "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.PolicyContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.get_entity_tag": "Microsoft.ApiManagement.PolicyContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.create_or_update": "Microsoft.ApiManagement.PolicyContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.create_or_update": "Microsoft.ApiManagement.PolicyContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.delete": "Microsoft.ApiManagement.PolicyContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.delete": "Microsoft.ApiManagement.PolicyContracts.delete", + "azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations.list_by_operation": "Microsoft.ApiManagement.PolicyContracts.listByOperation", + "azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations.list_by_operation": "Microsoft.ApiManagement.PolicyContracts.listByOperation", + "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.get": "Microsoft.ApiManagement.ResolverContracts.get", + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.get": "Microsoft.ApiManagement.ResolverContracts.get", + "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.get_entity_tag": "Microsoft.ApiManagement.ResolverContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.get_entity_tag": "Microsoft.ApiManagement.ResolverContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.create_or_update": "Microsoft.ApiManagement.ResolverContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.create_or_update": "Microsoft.ApiManagement.ResolverContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.update": "Microsoft.ApiManagement.ResolverContracts.update", + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.update": "Microsoft.ApiManagement.ResolverContracts.update", + "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.delete": "Microsoft.ApiManagement.ResolverContracts.delete", + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.delete": "Microsoft.ApiManagement.ResolverContracts.delete", + "azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations.list_by_api": "Microsoft.ApiManagement.ResolverContracts.listByApi", + "azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations.list_by_api": "Microsoft.ApiManagement.ResolverContracts.listByApi", + "azure.mgmt.apimanagement.operations.ApiSchemaOperations.get": "Microsoft.ApiManagement.SchemaContracts.get", + "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.get": "Microsoft.ApiManagement.SchemaContracts.get", + "azure.mgmt.apimanagement.operations.ApiSchemaOperations.get_entity_tag": "Microsoft.ApiManagement.SchemaContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.get_entity_tag": "Microsoft.ApiManagement.SchemaContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiSchemaOperations.begin_create_or_update": "Microsoft.ApiManagement.SchemaContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.begin_create_or_update": "Microsoft.ApiManagement.SchemaContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiSchemaOperations.delete": "Microsoft.ApiManagement.SchemaContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.delete": "Microsoft.ApiManagement.SchemaContracts.delete", + "azure.mgmt.apimanagement.operations.ApiSchemaOperations.list_by_api": "Microsoft.ApiManagement.SchemaContracts.listByApi", + "azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations.list_by_api": "Microsoft.ApiManagement.SchemaContracts.listByApi", + "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.get": "Microsoft.ApiManagement.DiagnosticContracts.get", + "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.get": "Microsoft.ApiManagement.DiagnosticContracts.get", + "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.get_entity_tag": "Microsoft.ApiManagement.DiagnosticContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.get_entity_tag": "Microsoft.ApiManagement.DiagnosticContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.create_or_update": "Microsoft.ApiManagement.DiagnosticContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.create_or_update": "Microsoft.ApiManagement.DiagnosticContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.update": "Microsoft.ApiManagement.DiagnosticContracts.update", + "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.update": "Microsoft.ApiManagement.DiagnosticContracts.update", + "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.delete": "Microsoft.ApiManagement.DiagnosticContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.delete": "Microsoft.ApiManagement.DiagnosticContracts.delete", + "azure.mgmt.apimanagement.operations.ApiDiagnosticOperations.list_by_service": "Microsoft.ApiManagement.DiagnosticContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.ApiDiagnosticOperations.list_by_service": "Microsoft.ApiManagement.DiagnosticContracts.listByService", + "azure.mgmt.apimanagement.operations.ApiIssueOperations.get": "Microsoft.ApiManagement.IssueContracts.get", + "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.get": "Microsoft.ApiManagement.IssueContracts.get", + "azure.mgmt.apimanagement.operations.ApiIssueOperations.get_entity_tag": "Microsoft.ApiManagement.IssueContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.get_entity_tag": "Microsoft.ApiManagement.IssueContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiIssueOperations.create_or_update": "Microsoft.ApiManagement.IssueContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.create_or_update": "Microsoft.ApiManagement.IssueContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiIssueOperations.update": "Microsoft.ApiManagement.IssueContracts.update", + "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.update": "Microsoft.ApiManagement.IssueContracts.update", + "azure.mgmt.apimanagement.operations.ApiIssueOperations.delete": "Microsoft.ApiManagement.IssueContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.delete": "Microsoft.ApiManagement.IssueContracts.delete", + "azure.mgmt.apimanagement.operations.ApiIssueOperations.list_by_service": "Microsoft.ApiManagement.IssueContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.ApiIssueOperations.list_by_service": "Microsoft.ApiManagement.IssueContracts.listByService", + "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.get": "Microsoft.ApiManagement.IssueCommentContracts.get", + "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.get": "Microsoft.ApiManagement.IssueCommentContracts.get", + "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.get_entity_tag": "Microsoft.ApiManagement.IssueCommentContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.get_entity_tag": "Microsoft.ApiManagement.IssueCommentContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.create_or_update": "Microsoft.ApiManagement.IssueCommentContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.create_or_update": "Microsoft.ApiManagement.IssueCommentContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.delete": "Microsoft.ApiManagement.IssueCommentContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.delete": "Microsoft.ApiManagement.IssueCommentContracts.delete", + "azure.mgmt.apimanagement.operations.ApiIssueCommentOperations.list_by_service": "Microsoft.ApiManagement.IssueCommentContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.ApiIssueCommentOperations.list_by_service": "Microsoft.ApiManagement.IssueCommentContracts.listByService", + "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.get": "Microsoft.ApiManagement.IssueAttachmentContracts.get", + "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.get": "Microsoft.ApiManagement.IssueAttachmentContracts.get", + "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.get_entity_tag": "Microsoft.ApiManagement.IssueAttachmentContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.get_entity_tag": "Microsoft.ApiManagement.IssueAttachmentContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.create_or_update": "Microsoft.ApiManagement.IssueAttachmentContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.create_or_update": "Microsoft.ApiManagement.IssueAttachmentContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.delete": "Microsoft.ApiManagement.IssueAttachmentContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.delete": "Microsoft.ApiManagement.IssueAttachmentContracts.delete", + "azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations.list_by_service": "Microsoft.ApiManagement.IssueAttachmentContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.ApiIssueAttachmentOperations.list_by_service": "Microsoft.ApiManagement.IssueAttachmentContracts.listByService", + "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.get": "Microsoft.ApiManagement.TagDescriptionContracts.get", + "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.get": "Microsoft.ApiManagement.TagDescriptionContracts.get", + "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.get_entity_tag": "Microsoft.ApiManagement.TagDescriptionContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.get_entity_tag": "Microsoft.ApiManagement.TagDescriptionContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.create_or_update": "Microsoft.ApiManagement.TagDescriptionContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.create_or_update": "Microsoft.ApiManagement.TagDescriptionContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.delete": "Microsoft.ApiManagement.TagDescriptionContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.delete": "Microsoft.ApiManagement.TagDescriptionContracts.delete", + "azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations.list_by_service": "Microsoft.ApiManagement.TagDescriptionContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations.list_by_service": "Microsoft.ApiManagement.TagDescriptionContracts.listByService", + "azure.mgmt.apimanagement.operations.ApiWikiOperations.get": "Microsoft.ApiManagement.WikiContracts.get", + "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.get": "Microsoft.ApiManagement.WikiContracts.get", + "azure.mgmt.apimanagement.operations.ApiWikiOperations.get_entity_tag": "Microsoft.ApiManagement.WikiContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.get_entity_tag": "Microsoft.ApiManagement.WikiContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiWikiOperations.create_or_update": "Microsoft.ApiManagement.WikiContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.create_or_update": "Microsoft.ApiManagement.WikiContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiWikiOperations.update": "Microsoft.ApiManagement.WikiContracts.update", + "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.update": "Microsoft.ApiManagement.WikiContracts.update", + "azure.mgmt.apimanagement.operations.ApiWikiOperations.delete": "Microsoft.ApiManagement.WikiContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ApiWikiOperations.delete": "Microsoft.ApiManagement.WikiContracts.delete", + "azure.mgmt.apimanagement.operations.ApiWikisOperations.list": "Microsoft.ApiManagement.WikiContracts.list", + "azure.mgmt.apimanagement.aio.operations.ApiWikisOperations.list": "Microsoft.ApiManagement.WikiContracts.list", + "azure.mgmt.apimanagement.operations.ProductWikisOperations.list": "Microsoft.ApiManagement.ProductWiki.list", + "azure.mgmt.apimanagement.aio.operations.ProductWikisOperations.list": "Microsoft.ApiManagement.ProductWiki.list", + "azure.mgmt.apimanagement.operations.ApiToolOperations.get": "Microsoft.ApiManagement.ToolContracts.get", + "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.get": "Microsoft.ApiManagement.ToolContracts.get", + "azure.mgmt.apimanagement.operations.ApiToolOperations.get_entity_tag": "Microsoft.ApiManagement.ToolContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.get_entity_tag": "Microsoft.ApiManagement.ToolContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiToolOperations.create_or_update": "Microsoft.ApiManagement.ToolContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.create_or_update": "Microsoft.ApiManagement.ToolContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiToolOperations.update": "Microsoft.ApiManagement.ToolContracts.update", + "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.update": "Microsoft.ApiManagement.ToolContracts.update", + "azure.mgmt.apimanagement.operations.ApiToolOperations.delete": "Microsoft.ApiManagement.ToolContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.delete": "Microsoft.ApiManagement.ToolContracts.delete", + "azure.mgmt.apimanagement.operations.ApiToolOperations.list_by_api": "Microsoft.ApiManagement.ToolContracts.listByApi", + "azure.mgmt.apimanagement.aio.operations.ApiToolOperations.list_by_api": "Microsoft.ApiManagement.ToolContracts.listByApi", + "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.get": "Microsoft.ApiManagement.ApiVersionSetContracts.get", + "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.get": "Microsoft.ApiManagement.ApiVersionSetContracts.get", + "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.get_entity_tag": "Microsoft.ApiManagement.ApiVersionSetContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.get_entity_tag": "Microsoft.ApiManagement.ApiVersionSetContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.create_or_update": "Microsoft.ApiManagement.ApiVersionSetContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.create_or_update": "Microsoft.ApiManagement.ApiVersionSetContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.update": "Microsoft.ApiManagement.ApiVersionSetContracts.update", + "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.update": "Microsoft.ApiManagement.ApiVersionSetContracts.update", + "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.delete": "Microsoft.ApiManagement.ApiVersionSetContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.delete": "Microsoft.ApiManagement.ApiVersionSetContracts.delete", + "azure.mgmt.apimanagement.operations.ApiVersionSetOperations.list_by_service": "Microsoft.ApiManagement.ApiVersionSetContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations.list_by_service": "Microsoft.ApiManagement.ApiVersionSetContracts.listByService", + "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.get": "Microsoft.ApiManagement.AuthorizationProviderContracts.get", + "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.get": "Microsoft.ApiManagement.AuthorizationProviderContracts.get", + "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.create_or_update": "Microsoft.ApiManagement.AuthorizationProviderContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.create_or_update": "Microsoft.ApiManagement.AuthorizationProviderContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.delete": "Microsoft.ApiManagement.AuthorizationProviderContracts.delete", + "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.delete": "Microsoft.ApiManagement.AuthorizationProviderContracts.delete", + "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.list_by_service": "Microsoft.ApiManagement.AuthorizationProviderContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.list_by_service": "Microsoft.ApiManagement.AuthorizationProviderContracts.listByService", + "azure.mgmt.apimanagement.operations.AuthorizationProviderOperations.refresh_secret": "Microsoft.ApiManagement.AuthorizationProviderContracts.refreshSecret", + "azure.mgmt.apimanagement.aio.operations.AuthorizationProviderOperations.refresh_secret": "Microsoft.ApiManagement.AuthorizationProviderContracts.refreshSecret", + "azure.mgmt.apimanagement.operations.AuthorizationOperations.get": "Microsoft.ApiManagement.AuthorizationContracts.get", + "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.get": "Microsoft.ApiManagement.AuthorizationContracts.get", + "azure.mgmt.apimanagement.operations.AuthorizationOperations.create_or_update": "Microsoft.ApiManagement.AuthorizationContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.create_or_update": "Microsoft.ApiManagement.AuthorizationContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.AuthorizationOperations.delete": "Microsoft.ApiManagement.AuthorizationContracts.delete", + "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.delete": "Microsoft.ApiManagement.AuthorizationContracts.delete", + "azure.mgmt.apimanagement.operations.AuthorizationOperations.list_by_authorization_provider": "Microsoft.ApiManagement.AuthorizationContracts.listByAuthorizationProvider", + "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.list_by_authorization_provider": "Microsoft.ApiManagement.AuthorizationContracts.listByAuthorizationProvider", + "azure.mgmt.apimanagement.operations.AuthorizationOperations.confirm_consent_code": "Microsoft.ApiManagement.AuthorizationContracts.confirmConsentCode", + "azure.mgmt.apimanagement.aio.operations.AuthorizationOperations.confirm_consent_code": "Microsoft.ApiManagement.AuthorizationContracts.confirmConsentCode", + "azure.mgmt.apimanagement.operations.AuthorizationLoginLinksOperations.post": "Microsoft.ApiManagement.AuthorizationContracts.post", + "azure.mgmt.apimanagement.aio.operations.AuthorizationLoginLinksOperations.post": "Microsoft.ApiManagement.AuthorizationContracts.post", + "azure.mgmt.apimanagement.operations.AuthorizationAccessPolicyOperations.get": "Microsoft.ApiManagement.AuthorizationAccessPolicyContracts.get", + "azure.mgmt.apimanagement.aio.operations.AuthorizationAccessPolicyOperations.get": "Microsoft.ApiManagement.AuthorizationAccessPolicyContracts.get", + "azure.mgmt.apimanagement.operations.AuthorizationAccessPolicyOperations.create_or_update": "Microsoft.ApiManagement.AuthorizationAccessPolicyContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.AuthorizationAccessPolicyOperations.create_or_update": "Microsoft.ApiManagement.AuthorizationAccessPolicyContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.AuthorizationAccessPolicyOperations.delete": "Microsoft.ApiManagement.AuthorizationAccessPolicyContracts.delete", + "azure.mgmt.apimanagement.aio.operations.AuthorizationAccessPolicyOperations.delete": "Microsoft.ApiManagement.AuthorizationAccessPolicyContracts.delete", + "azure.mgmt.apimanagement.operations.AuthorizationAccessPolicyOperations.list_by_authorization": "Microsoft.ApiManagement.AuthorizationAccessPolicyContracts.listByAuthorization", + "azure.mgmt.apimanagement.aio.operations.AuthorizationAccessPolicyOperations.list_by_authorization": "Microsoft.ApiManagement.AuthorizationAccessPolicyContracts.listByAuthorization", + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.get": "Microsoft.ApiManagement.AuthorizationServerContracts.get", + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.get": "Microsoft.ApiManagement.AuthorizationServerContracts.get", + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.get_entity_tag": "Microsoft.ApiManagement.AuthorizationServerContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.get_entity_tag": "Microsoft.ApiManagement.AuthorizationServerContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.create_or_update": "Microsoft.ApiManagement.AuthorizationServerContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.create_or_update": "Microsoft.ApiManagement.AuthorizationServerContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.update": "Microsoft.ApiManagement.AuthorizationServerContracts.update", + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.update": "Microsoft.ApiManagement.AuthorizationServerContracts.update", + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.delete": "Microsoft.ApiManagement.AuthorizationServerContracts.delete", + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.delete": "Microsoft.ApiManagement.AuthorizationServerContracts.delete", + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.list_by_service": "Microsoft.ApiManagement.AuthorizationServerContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.list_by_service": "Microsoft.ApiManagement.AuthorizationServerContracts.listByService", + "azure.mgmt.apimanagement.operations.AuthorizationServerOperations.list_secrets": "Microsoft.ApiManagement.AuthorizationServerContracts.listSecrets", + "azure.mgmt.apimanagement.aio.operations.AuthorizationServerOperations.list_secrets": "Microsoft.ApiManagement.AuthorizationServerContracts.listSecrets", + "azure.mgmt.apimanagement.operations.BackendOperations.get": "Microsoft.ApiManagement.BackendContracts.get", + "azure.mgmt.apimanagement.aio.operations.BackendOperations.get": "Microsoft.ApiManagement.BackendContracts.get", + "azure.mgmt.apimanagement.operations.BackendOperations.get_entity_tag": "Microsoft.ApiManagement.BackendContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.BackendOperations.get_entity_tag": "Microsoft.ApiManagement.BackendContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.BackendOperations.create_or_update": "Microsoft.ApiManagement.BackendContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.BackendOperations.create_or_update": "Microsoft.ApiManagement.BackendContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.BackendOperations.update": "Microsoft.ApiManagement.BackendContracts.update", + "azure.mgmt.apimanagement.aio.operations.BackendOperations.update": "Microsoft.ApiManagement.BackendContracts.update", + "azure.mgmt.apimanagement.operations.BackendOperations.delete": "Microsoft.ApiManagement.BackendContracts.delete", + "azure.mgmt.apimanagement.aio.operations.BackendOperations.delete": "Microsoft.ApiManagement.BackendContracts.delete", + "azure.mgmt.apimanagement.operations.BackendOperations.list_by_service": "Microsoft.ApiManagement.BackendContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.BackendOperations.list_by_service": "Microsoft.ApiManagement.BackendContracts.listByService", + "azure.mgmt.apimanagement.operations.BackendOperations.reconnect": "Microsoft.ApiManagement.BackendContracts.reconnect", + "azure.mgmt.apimanagement.aio.operations.BackendOperations.reconnect": "Microsoft.ApiManagement.BackendContracts.reconnect", + "azure.mgmt.apimanagement.operations.CacheOperations.get": "Microsoft.ApiManagement.CacheContracts.get", + "azure.mgmt.apimanagement.aio.operations.CacheOperations.get": "Microsoft.ApiManagement.CacheContracts.get", + "azure.mgmt.apimanagement.operations.CacheOperations.get_entity_tag": "Microsoft.ApiManagement.CacheContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.CacheOperations.get_entity_tag": "Microsoft.ApiManagement.CacheContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.CacheOperations.create_or_update": "Microsoft.ApiManagement.CacheContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.CacheOperations.create_or_update": "Microsoft.ApiManagement.CacheContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.CacheOperations.update": "Microsoft.ApiManagement.CacheContracts.update", + "azure.mgmt.apimanagement.aio.operations.CacheOperations.update": "Microsoft.ApiManagement.CacheContracts.update", + "azure.mgmt.apimanagement.operations.CacheOperations.delete": "Microsoft.ApiManagement.CacheContracts.delete", + "azure.mgmt.apimanagement.aio.operations.CacheOperations.delete": "Microsoft.ApiManagement.CacheContracts.delete", + "azure.mgmt.apimanagement.operations.CacheOperations.list_by_service": "Microsoft.ApiManagement.CacheContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.CacheOperations.list_by_service": "Microsoft.ApiManagement.CacheContracts.listByService", + "azure.mgmt.apimanagement.operations.CertificateOperations.get": "Microsoft.ApiManagement.CertificateContracts.get", + "azure.mgmt.apimanagement.aio.operations.CertificateOperations.get": "Microsoft.ApiManagement.CertificateContracts.get", + "azure.mgmt.apimanagement.operations.CertificateOperations.get_entity_tag": "Microsoft.ApiManagement.CertificateContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.CertificateOperations.get_entity_tag": "Microsoft.ApiManagement.CertificateContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.CertificateOperations.create_or_update": "Microsoft.ApiManagement.CertificateContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.CertificateOperations.create_or_update": "Microsoft.ApiManagement.CertificateContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.CertificateOperations.delete": "Microsoft.ApiManagement.CertificateContracts.delete", + "azure.mgmt.apimanagement.aio.operations.CertificateOperations.delete": "Microsoft.ApiManagement.CertificateContracts.delete", + "azure.mgmt.apimanagement.operations.CertificateOperations.list_by_service": "Microsoft.ApiManagement.CertificateContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.CertificateOperations.list_by_service": "Microsoft.ApiManagement.CertificateContracts.listByService", + "azure.mgmt.apimanagement.operations.CertificateOperations.refresh_secret": "Microsoft.ApiManagement.CertificateContracts.refreshSecret", + "azure.mgmt.apimanagement.aio.operations.CertificateOperations.refresh_secret": "Microsoft.ApiManagement.CertificateContracts.refreshSecret", + "azure.mgmt.apimanagement.operations.ContentTypeOperations.get": "Microsoft.ApiManagement.ContentTypeContracts.get", + "azure.mgmt.apimanagement.aio.operations.ContentTypeOperations.get": "Microsoft.ApiManagement.ContentTypeContracts.get", + "azure.mgmt.apimanagement.operations.ContentTypeOperations.create_or_update": "Microsoft.ApiManagement.ContentTypeContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ContentTypeOperations.create_or_update": "Microsoft.ApiManagement.ContentTypeContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ContentTypeOperations.delete": "Microsoft.ApiManagement.ContentTypeContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ContentTypeOperations.delete": "Microsoft.ApiManagement.ContentTypeContracts.delete", + "azure.mgmt.apimanagement.operations.ContentTypeOperations.list_by_service": "Microsoft.ApiManagement.ContentTypeContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.ContentTypeOperations.list_by_service": "Microsoft.ApiManagement.ContentTypeContracts.listByService", + "azure.mgmt.apimanagement.operations.ContentItemOperations.get": "Microsoft.ApiManagement.ContentItemContracts.get", + "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.get": "Microsoft.ApiManagement.ContentItemContracts.get", + "azure.mgmt.apimanagement.operations.ContentItemOperations.get_entity_tag": "Microsoft.ApiManagement.ContentItemContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.get_entity_tag": "Microsoft.ApiManagement.ContentItemContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ContentItemOperations.create_or_update": "Microsoft.ApiManagement.ContentItemContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.create_or_update": "Microsoft.ApiManagement.ContentItemContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ContentItemOperations.delete": "Microsoft.ApiManagement.ContentItemContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.delete": "Microsoft.ApiManagement.ContentItemContracts.delete", + "azure.mgmt.apimanagement.operations.ContentItemOperations.list_by_service": "Microsoft.ApiManagement.ContentItemContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.ContentItemOperations.list_by_service": "Microsoft.ApiManagement.ContentItemContracts.listByService", + "azure.mgmt.apimanagement.operations.DeletedServicesOperations.get_by_name": "Microsoft.ApiManagement.DeletedServiceContracts.getByName", + "azure.mgmt.apimanagement.aio.operations.DeletedServicesOperations.get_by_name": "Microsoft.ApiManagement.DeletedServiceContracts.getByName", + "azure.mgmt.apimanagement.operations.DeletedServicesOperations.begin_purge": "Microsoft.ApiManagement.DeletedServiceContracts.purge", + "azure.mgmt.apimanagement.aio.operations.DeletedServicesOperations.begin_purge": "Microsoft.ApiManagement.DeletedServiceContracts.purge", + "azure.mgmt.apimanagement.operations.DeletedServicesOperations.list_by_subscription": "Microsoft.ApiManagement.DeletedServicesOperationGroup.listBySubscription", + "azure.mgmt.apimanagement.aio.operations.DeletedServicesOperations.list_by_subscription": "Microsoft.ApiManagement.DeletedServicesOperationGroup.listBySubscription", + "azure.mgmt.apimanagement.operations.DocumentationOperations.get": "Microsoft.ApiManagement.DocumentationContracts.get", + "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.get": "Microsoft.ApiManagement.DocumentationContracts.get", + "azure.mgmt.apimanagement.operations.DocumentationOperations.get_entity_tag": "Microsoft.ApiManagement.DocumentationContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.get_entity_tag": "Microsoft.ApiManagement.DocumentationContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.DocumentationOperations.create_or_update": "Microsoft.ApiManagement.DocumentationContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.create_or_update": "Microsoft.ApiManagement.DocumentationContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.DocumentationOperations.update": "Microsoft.ApiManagement.DocumentationContracts.update", + "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.update": "Microsoft.ApiManagement.DocumentationContracts.update", + "azure.mgmt.apimanagement.operations.DocumentationOperations.delete": "Microsoft.ApiManagement.DocumentationContracts.delete", + "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.delete": "Microsoft.ApiManagement.DocumentationContracts.delete", + "azure.mgmt.apimanagement.operations.DocumentationOperations.list_by_service": "Microsoft.ApiManagement.DocumentationContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.DocumentationOperations.list_by_service": "Microsoft.ApiManagement.DocumentationContracts.listByService", + "azure.mgmt.apimanagement.operations.EmailTemplateOperations.get": "Microsoft.ApiManagement.EmailTemplateContracts.get", + "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.get": "Microsoft.ApiManagement.EmailTemplateContracts.get", + "azure.mgmt.apimanagement.operations.EmailTemplateOperations.get_entity_tag": "Microsoft.ApiManagement.EmailTemplateContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.get_entity_tag": "Microsoft.ApiManagement.EmailTemplateContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.EmailTemplateOperations.create_or_update": "Microsoft.ApiManagement.EmailTemplateContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.create_or_update": "Microsoft.ApiManagement.EmailTemplateContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.EmailTemplateOperations.update": "Microsoft.ApiManagement.EmailTemplateContracts.update", + "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.update": "Microsoft.ApiManagement.EmailTemplateContracts.update", + "azure.mgmt.apimanagement.operations.EmailTemplateOperations.delete": "Microsoft.ApiManagement.EmailTemplateContracts.delete", + "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.delete": "Microsoft.ApiManagement.EmailTemplateContracts.delete", + "azure.mgmt.apimanagement.operations.EmailTemplateOperations.list_by_service": "Microsoft.ApiManagement.EmailTemplateContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.EmailTemplateOperations.list_by_service": "Microsoft.ApiManagement.EmailTemplateContracts.listByService", + "azure.mgmt.apimanagement.operations.ApiGatewayConfigConnectionOperations.get": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResources.get", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayConfigConnectionOperations.get": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResources.get", + "azure.mgmt.apimanagement.operations.ApiGatewayConfigConnectionOperations.begin_create_or_update": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResources.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayConfigConnectionOperations.begin_create_or_update": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResources.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiGatewayConfigConnectionOperations.begin_delete": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResources.delete", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayConfigConnectionOperations.begin_delete": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResources.delete", + "azure.mgmt.apimanagement.operations.ApiGatewayConfigConnectionOperations.list_by_gateway": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResources.listByGateway", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayConfigConnectionOperations.list_by_gateway": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResources.listByGateway", + "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.get": "Microsoft.ApiManagement.GatewayHostnameBindingResources.get", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.get": "Microsoft.ApiManagement.GatewayHostnameBindingResources.get", + "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.begin_create_or_update": "Microsoft.ApiManagement.GatewayHostnameBindingResources.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.begin_create_or_update": "Microsoft.ApiManagement.GatewayHostnameBindingResources.createOrUpdate", + "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.begin_delete": "Microsoft.ApiManagement.GatewayHostnameBindingResources.delete", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.begin_delete": "Microsoft.ApiManagement.GatewayHostnameBindingResources.delete", + "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.list_by_gateway": "Microsoft.ApiManagement.GatewayHostnameBindingResources.listByGateway", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.list_by_gateway": "Microsoft.ApiManagement.GatewayHostnameBindingResources.listByGateway", + "azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations.begin_refresh_secret": "Microsoft.ApiManagement.GatewayHostnameBindingResources.refreshSecret", + "azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations.begin_refresh_secret": "Microsoft.ApiManagement.GatewayHostnameBindingResources.refreshSecret", + "azure.mgmt.apimanagement.operations.GatewayOperations.get": "Microsoft.ApiManagement.GatewayContracts.get", + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.get": "Microsoft.ApiManagement.GatewayContracts.get", + "azure.mgmt.apimanagement.operations.GatewayOperations.get_entity_tag": "Microsoft.ApiManagement.GatewayContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.get_entity_tag": "Microsoft.ApiManagement.GatewayContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.GatewayOperations.create_or_update": "Microsoft.ApiManagement.GatewayContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.create_or_update": "Microsoft.ApiManagement.GatewayContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.GatewayOperations.update": "Microsoft.ApiManagement.GatewayContracts.update", + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.update": "Microsoft.ApiManagement.GatewayContracts.update", + "azure.mgmt.apimanagement.operations.GatewayOperations.delete": "Microsoft.ApiManagement.GatewayContracts.delete", + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.delete": "Microsoft.ApiManagement.GatewayContracts.delete", + "azure.mgmt.apimanagement.operations.GatewayOperations.list_by_service": "Microsoft.ApiManagement.GatewayContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.list_by_service": "Microsoft.ApiManagement.GatewayContracts.listByService", + "azure.mgmt.apimanagement.operations.GatewayOperations.list_keys": "Microsoft.ApiManagement.GatewayContracts.listKeys", + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.list_keys": "Microsoft.ApiManagement.GatewayContracts.listKeys", + "azure.mgmt.apimanagement.operations.GatewayOperations.regenerate_key": "Microsoft.ApiManagement.GatewayContracts.regenerateKey", + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.regenerate_key": "Microsoft.ApiManagement.GatewayContracts.regenerateKey", + "azure.mgmt.apimanagement.operations.GatewayOperations.generate_token": "Microsoft.ApiManagement.GatewayContracts.generateToken", + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.generate_token": "Microsoft.ApiManagement.GatewayContracts.generateToken", + "azure.mgmt.apimanagement.operations.GatewayOperations.invalidate_debug_credentials": "Microsoft.ApiManagement.GatewayContracts.invalidateDebugCredentials", + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.invalidate_debug_credentials": "Microsoft.ApiManagement.GatewayContracts.invalidateDebugCredentials", + "azure.mgmt.apimanagement.operations.GatewayOperations.list_debug_credentials": "Microsoft.ApiManagement.GatewayContracts.listDebugCredentials", + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.list_debug_credentials": "Microsoft.ApiManagement.GatewayContracts.listDebugCredentials", + "azure.mgmt.apimanagement.operations.GatewayOperations.list_trace": "Microsoft.ApiManagement.GatewayContracts.listTrace", + "azure.mgmt.apimanagement.aio.operations.GatewayOperations.list_trace": "Microsoft.ApiManagement.GatewayContracts.listTrace", + "azure.mgmt.apimanagement.operations.GatewayApiOperations.list_by_service": "Microsoft.ApiManagement.GatewayContracts.gatewayApiListByService", + "azure.mgmt.apimanagement.aio.operations.GatewayApiOperations.list_by_service": "Microsoft.ApiManagement.GatewayContracts.gatewayApiListByService", + "azure.mgmt.apimanagement.operations.GatewayApiOperations.get_entity_tag": "Microsoft.ApiManagement.GatewayContracts.gatewayApiGetEntityTag", + "azure.mgmt.apimanagement.aio.operations.GatewayApiOperations.get_entity_tag": "Microsoft.ApiManagement.GatewayContracts.gatewayApiGetEntityTag", + "azure.mgmt.apimanagement.operations.GatewayApiOperations.create_or_update": "Microsoft.ApiManagement.GatewayContracts.gatewayApiCreateOrUpdate", + "azure.mgmt.apimanagement.aio.operations.GatewayApiOperations.create_or_update": "Microsoft.ApiManagement.GatewayContracts.gatewayApiCreateOrUpdate", + "azure.mgmt.apimanagement.operations.GatewayApiOperations.delete": "Microsoft.ApiManagement.GatewayContracts.gatewayApiDelete", + "azure.mgmt.apimanagement.aio.operations.GatewayApiOperations.delete": "Microsoft.ApiManagement.GatewayContracts.gatewayApiDelete", + "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.get": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.get", + "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.get": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.get", + "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.get_entity_tag": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.get_entity_tag": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.create_or_update": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.create_or_update": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.delete": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.delete", + "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.delete": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.delete", + "azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations.list_by_service": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations.list_by_service": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.listByService", + "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.get": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.get", + "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.get": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.get", + "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.get_entity_tag": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.get_entity_tag": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.create_or_update": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.create_or_update": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.delete": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.delete", + "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.delete": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.delete", + "azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations.list_by_service": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations.list_by_service": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.listByService", + "azure.mgmt.apimanagement.operations.GroupOperations.get": "Microsoft.ApiManagement.GroupContracts.get", + "azure.mgmt.apimanagement.aio.operations.GroupOperations.get": "Microsoft.ApiManagement.GroupContracts.get", + "azure.mgmt.apimanagement.operations.GroupOperations.get_entity_tag": "Microsoft.ApiManagement.GroupContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.GroupOperations.get_entity_tag": "Microsoft.ApiManagement.GroupContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.GroupOperations.create_or_update": "Microsoft.ApiManagement.GroupContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.GroupOperations.create_or_update": "Microsoft.ApiManagement.GroupContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.GroupOperations.update": "Microsoft.ApiManagement.GroupContracts.update", + "azure.mgmt.apimanagement.aio.operations.GroupOperations.update": "Microsoft.ApiManagement.GroupContracts.update", + "azure.mgmt.apimanagement.operations.GroupOperations.delete": "Microsoft.ApiManagement.GroupContracts.delete", + "azure.mgmt.apimanagement.aio.operations.GroupOperations.delete": "Microsoft.ApiManagement.GroupContracts.delete", + "azure.mgmt.apimanagement.operations.GroupOperations.list_by_service": "Microsoft.ApiManagement.GroupContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.GroupOperations.list_by_service": "Microsoft.ApiManagement.GroupContracts.listByService", + "azure.mgmt.apimanagement.operations.GroupUserOperations.list": "Microsoft.ApiManagement.GroupContracts.list", + "azure.mgmt.apimanagement.aio.operations.GroupUserOperations.list": "Microsoft.ApiManagement.GroupContracts.list", + "azure.mgmt.apimanagement.operations.GroupUserOperations.check_entity_exists": "Microsoft.ApiManagement.GroupContracts.checkEntityExists", + "azure.mgmt.apimanagement.aio.operations.GroupUserOperations.check_entity_exists": "Microsoft.ApiManagement.GroupContracts.checkEntityExists", + "azure.mgmt.apimanagement.operations.GroupUserOperations.create": "Microsoft.ApiManagement.GroupContracts.create", + "azure.mgmt.apimanagement.aio.operations.GroupUserOperations.create": "Microsoft.ApiManagement.GroupContracts.create", + "azure.mgmt.apimanagement.operations.GroupUserOperations.delete": "Microsoft.ApiManagement.GroupContracts.groupUserDelete", + "azure.mgmt.apimanagement.aio.operations.GroupUserOperations.delete": "Microsoft.ApiManagement.GroupContracts.groupUserDelete", + "azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations.list": "Microsoft.ApiManagement.WorkspaceGroup.list", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations.list": "Microsoft.ApiManagement.WorkspaceGroup.list", + "azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations.check_entity_exists": "Microsoft.ApiManagement.WorkspaceGroup.checkEntityExists", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations.check_entity_exists": "Microsoft.ApiManagement.WorkspaceGroup.checkEntityExists", + "azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations.create": "Microsoft.ApiManagement.WorkspaceGroup.create", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations.create": "Microsoft.ApiManagement.WorkspaceGroup.create", + "azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations.delete": "Microsoft.ApiManagement.WorkspaceGroup.workspaceGroupUserDelete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations.delete": "Microsoft.ApiManagement.WorkspaceGroup.workspaceGroupUserDelete", + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.get": "Microsoft.ApiManagement.IdentityProviderContracts.get", + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.get": "Microsoft.ApiManagement.IdentityProviderContracts.get", + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.get_entity_tag": "Microsoft.ApiManagement.IdentityProviderContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.get_entity_tag": "Microsoft.ApiManagement.IdentityProviderContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.create_or_update": "Microsoft.ApiManagement.IdentityProviderContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.create_or_update": "Microsoft.ApiManagement.IdentityProviderContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.update": "Microsoft.ApiManagement.IdentityProviderContracts.update", + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.update": "Microsoft.ApiManagement.IdentityProviderContracts.update", + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.delete": "Microsoft.ApiManagement.IdentityProviderContracts.delete", + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.delete": "Microsoft.ApiManagement.IdentityProviderContracts.delete", + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.list_by_service": "Microsoft.ApiManagement.IdentityProviderContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.list_by_service": "Microsoft.ApiManagement.IdentityProviderContracts.listByService", + "azure.mgmt.apimanagement.operations.IdentityProviderOperations.list_secrets": "Microsoft.ApiManagement.IdentityProviderContracts.listSecrets", + "azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations.list_secrets": "Microsoft.ApiManagement.IdentityProviderContracts.listSecrets", + "azure.mgmt.apimanagement.operations.LoggerOperations.get": "Microsoft.ApiManagement.LoggerContracts.get", + "azure.mgmt.apimanagement.aio.operations.LoggerOperations.get": "Microsoft.ApiManagement.LoggerContracts.get", + "azure.mgmt.apimanagement.operations.LoggerOperations.get_entity_tag": "Microsoft.ApiManagement.LoggerContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.LoggerOperations.get_entity_tag": "Microsoft.ApiManagement.LoggerContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.LoggerOperations.create_or_update": "Microsoft.ApiManagement.LoggerContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.LoggerOperations.create_or_update": "Microsoft.ApiManagement.LoggerContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.LoggerOperations.update": "Microsoft.ApiManagement.LoggerContracts.update", + "azure.mgmt.apimanagement.aio.operations.LoggerOperations.update": "Microsoft.ApiManagement.LoggerContracts.update", + "azure.mgmt.apimanagement.operations.LoggerOperations.delete": "Microsoft.ApiManagement.LoggerContracts.delete", + "azure.mgmt.apimanagement.aio.operations.LoggerOperations.delete": "Microsoft.ApiManagement.LoggerContracts.delete", + "azure.mgmt.apimanagement.operations.LoggerOperations.list_by_service": "Microsoft.ApiManagement.LoggerContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.LoggerOperations.list_by_service": "Microsoft.ApiManagement.LoggerContracts.listByService", + "azure.mgmt.apimanagement.operations.NamedValueOperations.get": "Microsoft.ApiManagement.NamedValueContracts.get", + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.get": "Microsoft.ApiManagement.NamedValueContracts.get", + "azure.mgmt.apimanagement.operations.NamedValueOperations.get_entity_tag": "Microsoft.ApiManagement.NamedValueContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.get_entity_tag": "Microsoft.ApiManagement.NamedValueContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.NamedValueOperations.begin_create_or_update": "Microsoft.ApiManagement.NamedValueContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.begin_create_or_update": "Microsoft.ApiManagement.NamedValueContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.NamedValueOperations.begin_update": "Microsoft.ApiManagement.NamedValueContracts.update", + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.begin_update": "Microsoft.ApiManagement.NamedValueContracts.update", + "azure.mgmt.apimanagement.operations.NamedValueOperations.delete": "Microsoft.ApiManagement.NamedValueContracts.delete", + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.delete": "Microsoft.ApiManagement.NamedValueContracts.delete", + "azure.mgmt.apimanagement.operations.NamedValueOperations.list_by_service": "Microsoft.ApiManagement.NamedValueContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.list_by_service": "Microsoft.ApiManagement.NamedValueContracts.listByService", + "azure.mgmt.apimanagement.operations.NamedValueOperations.list_value": "Microsoft.ApiManagement.NamedValueContracts.listValue", + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.list_value": "Microsoft.ApiManagement.NamedValueContracts.listValue", + "azure.mgmt.apimanagement.operations.NamedValueOperations.begin_refresh_secret": "Microsoft.ApiManagement.NamedValueContracts.refreshSecret", + "azure.mgmt.apimanagement.aio.operations.NamedValueOperations.begin_refresh_secret": "Microsoft.ApiManagement.NamedValueContracts.refreshSecret", + "azure.mgmt.apimanagement.operations.NotificationOperations.get": "Microsoft.ApiManagement.NotificationContracts.get", + "azure.mgmt.apimanagement.aio.operations.NotificationOperations.get": "Microsoft.ApiManagement.NotificationContracts.get", + "azure.mgmt.apimanagement.operations.NotificationOperations.create_or_update": "Microsoft.ApiManagement.NotificationContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.NotificationOperations.create_or_update": "Microsoft.ApiManagement.NotificationContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.NotificationOperations.list_by_service": "Microsoft.ApiManagement.NotificationContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.NotificationOperations.list_by_service": "Microsoft.ApiManagement.NotificationContracts.listByService", + "azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations.list_by_notification": "Microsoft.ApiManagement.NotificationContracts.listByNotification", + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientUserOperations.list_by_notification": "Microsoft.ApiManagement.NotificationContracts.listByNotification", + "azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations.check_entity_exists": "Microsoft.ApiManagement.NotificationContracts.checkEntityExists", + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientUserOperations.check_entity_exists": "Microsoft.ApiManagement.NotificationContracts.checkEntityExists", + "azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations.create_or_update": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientUserCreateOrUpdate", + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientUserOperations.create_or_update": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientUserCreateOrUpdate", + "azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations.delete": "Microsoft.ApiManagement.NotificationContracts.delete", + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientUserOperations.delete": "Microsoft.ApiManagement.NotificationContracts.delete", + "azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations.list_by_notification": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientEmailListByNotification", + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations.list_by_notification": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientEmailListByNotification", + "azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations.check_entity_exists": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientEmailCheckEntityExists", + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations.check_entity_exists": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientEmailCheckEntityExists", + "azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations.create_or_update": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientEmailCreateOrUpdate", + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations.create_or_update": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientEmailCreateOrUpdate", + "azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations.delete": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientEmailDelete", + "azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations.delete": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientEmailDelete", + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations.list_by_notification": "Microsoft.ApiManagement.WorkspaceNotification.listByNotification", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations.list_by_notification": "Microsoft.ApiManagement.WorkspaceNotification.listByNotification", + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations.check_entity_exists": "Microsoft.ApiManagement.WorkspaceNotification.checkEntityExists", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations.check_entity_exists": "Microsoft.ApiManagement.WorkspaceNotification.checkEntityExists", + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientUserCreateOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientUserCreateOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations.delete": "Microsoft.ApiManagement.WorkspaceNotification.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations.delete": "Microsoft.ApiManagement.WorkspaceNotification.delete", + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations.list_by_notification": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientEmailListByNotification", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations.list_by_notification": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientEmailListByNotification", + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations.check_entity_exists": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientEmailCheckEntityExists", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations.check_entity_exists": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientEmailCheckEntityExists", + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientEmailCreateOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientEmailCreateOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations.delete": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientEmailDelete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations.delete": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientEmailDelete", + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.get": "Microsoft.ApiManagement.OpenidConnectProviderContracts.get", + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.get": "Microsoft.ApiManagement.OpenidConnectProviderContracts.get", + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.get_entity_tag": "Microsoft.ApiManagement.OpenidConnectProviderContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.get_entity_tag": "Microsoft.ApiManagement.OpenidConnectProviderContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.create_or_update": "Microsoft.ApiManagement.OpenidConnectProviderContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.create_or_update": "Microsoft.ApiManagement.OpenidConnectProviderContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.update": "Microsoft.ApiManagement.OpenidConnectProviderContracts.update", + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.update": "Microsoft.ApiManagement.OpenidConnectProviderContracts.update", + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.delete": "Microsoft.ApiManagement.OpenidConnectProviderContracts.delete", + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.delete": "Microsoft.ApiManagement.OpenidConnectProviderContracts.delete", + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.list_by_service": "Microsoft.ApiManagement.OpenidConnectProviderContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.list_by_service": "Microsoft.ApiManagement.OpenidConnectProviderContracts.listByService", + "azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations.list_secrets": "Microsoft.ApiManagement.OpenidConnectProviderContracts.listSecrets", + "azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations.list_secrets": "Microsoft.ApiManagement.OpenidConnectProviderContracts.listSecrets", + "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.get": "Microsoft.ApiManagement.PolicyFragmentContracts.get", + "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.get": "Microsoft.ApiManagement.PolicyFragmentContracts.get", + "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.get_entity_tag": "Microsoft.ApiManagement.PolicyFragmentContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.get_entity_tag": "Microsoft.ApiManagement.PolicyFragmentContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.begin_create_or_update": "Microsoft.ApiManagement.PolicyFragmentContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.begin_create_or_update": "Microsoft.ApiManagement.PolicyFragmentContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.delete": "Microsoft.ApiManagement.PolicyFragmentContracts.delete", + "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.delete": "Microsoft.ApiManagement.PolicyFragmentContracts.delete", + "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.list_by_service": "Microsoft.ApiManagement.PolicyFragmentContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.list_by_service": "Microsoft.ApiManagement.PolicyFragmentContracts.listByService", + "azure.mgmt.apimanagement.operations.PolicyFragmentOperations.list_references": "Microsoft.ApiManagement.PolicyFragmentContracts.listReferences", + "azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations.list_references": "Microsoft.ApiManagement.PolicyFragmentContracts.listReferences", + "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.get": "Microsoft.ApiManagement.PolicyRestrictionContracts.get", + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.get": "Microsoft.ApiManagement.PolicyRestrictionContracts.get", + "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.get_entity_tag": "Microsoft.ApiManagement.PolicyRestrictionContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.get_entity_tag": "Microsoft.ApiManagement.PolicyRestrictionContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.create_or_update": "Microsoft.ApiManagement.PolicyRestrictionContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.create_or_update": "Microsoft.ApiManagement.PolicyRestrictionContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.update": "Microsoft.ApiManagement.PolicyRestrictionContracts.update", + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.update": "Microsoft.ApiManagement.PolicyRestrictionContracts.update", + "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.delete": "Microsoft.ApiManagement.PolicyRestrictionContracts.delete", + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.delete": "Microsoft.ApiManagement.PolicyRestrictionContracts.delete", + "azure.mgmt.apimanagement.operations.PolicyRestrictionOperations.list_by_service": "Microsoft.ApiManagement.PolicyRestrictionContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations.list_by_service": "Microsoft.ApiManagement.PolicyRestrictionContracts.listByService", + "azure.mgmt.apimanagement.operations.PortalConfigOperations.get": "Microsoft.ApiManagement.PortalConfigContracts.get", + "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.get": "Microsoft.ApiManagement.PortalConfigContracts.get", + "azure.mgmt.apimanagement.operations.PortalConfigOperations.get_entity_tag": "Microsoft.ApiManagement.PortalConfigContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.get_entity_tag": "Microsoft.ApiManagement.PortalConfigContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.PortalConfigOperations.create_or_update": "Microsoft.ApiManagement.PortalConfigContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.create_or_update": "Microsoft.ApiManagement.PortalConfigContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.PortalConfigOperations.update": "Microsoft.ApiManagement.PortalConfigContracts.update", + "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.update": "Microsoft.ApiManagement.PortalConfigContracts.update", + "azure.mgmt.apimanagement.operations.PortalConfigOperations.list_by_service": "Microsoft.ApiManagement.PortalConfigContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.PortalConfigOperations.list_by_service": "Microsoft.ApiManagement.PortalConfigContracts.listByService", + "azure.mgmt.apimanagement.operations.ClientApplicationOperations.get": "Microsoft.ApiManagement.ClientApplicationContracts.get", + "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.get": "Microsoft.ApiManagement.ClientApplicationContracts.get", + "azure.mgmt.apimanagement.operations.ClientApplicationOperations.get_entity_tag": "Microsoft.ApiManagement.ClientApplicationContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.get_entity_tag": "Microsoft.ApiManagement.ClientApplicationContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.ClientApplicationOperations.create_or_update": "Microsoft.ApiManagement.ClientApplicationContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.create_or_update": "Microsoft.ApiManagement.ClientApplicationContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ClientApplicationOperations.delete": "Microsoft.ApiManagement.ClientApplicationContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.delete": "Microsoft.ApiManagement.ClientApplicationContracts.delete", + "azure.mgmt.apimanagement.operations.ClientApplicationOperations.list_by_service": "Microsoft.ApiManagement.ClientApplicationContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.list_by_service": "Microsoft.ApiManagement.ClientApplicationContracts.listByService", + "azure.mgmt.apimanagement.operations.ClientApplicationOperations.list_secrets": "Microsoft.ApiManagement.ClientApplicationContracts.listSecrets", + "azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations.list_secrets": "Microsoft.ApiManagement.ClientApplicationContracts.listSecrets", + "azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations.get": "Microsoft.ApiManagement.ClientApplicationProductLinkContracts.get", + "azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations.get": "Microsoft.ApiManagement.ClientApplicationProductLinkContracts.get", + "azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations.create": "Microsoft.ApiManagement.ClientApplicationProductLinkContracts.create", + "azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations.create": "Microsoft.ApiManagement.ClientApplicationProductLinkContracts.create", + "azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations.delete": "Microsoft.ApiManagement.ClientApplicationProductLinkContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations.delete": "Microsoft.ApiManagement.ClientApplicationProductLinkContracts.delete", + "azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations.list_by_client_applications": "Microsoft.ApiManagement.ClientApplicationProductLinkContracts.listByClientApplications", + "azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations.list_by_client_applications": "Microsoft.ApiManagement.ClientApplicationProductLinkContracts.listByClientApplications", + "azure.mgmt.apimanagement.operations.PortalRevisionOperations.get": "Microsoft.ApiManagement.PortalRevisionContracts.get", + "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.get": "Microsoft.ApiManagement.PortalRevisionContracts.get", + "azure.mgmt.apimanagement.operations.PortalRevisionOperations.get_entity_tag": "Microsoft.ApiManagement.PortalRevisionContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.get_entity_tag": "Microsoft.ApiManagement.PortalRevisionContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.PortalRevisionOperations.begin_create_or_update": "Microsoft.ApiManagement.PortalRevisionContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.begin_create_or_update": "Microsoft.ApiManagement.PortalRevisionContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.PortalRevisionOperations.begin_update": "Microsoft.ApiManagement.PortalRevisionContracts.update", + "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.begin_update": "Microsoft.ApiManagement.PortalRevisionContracts.update", + "azure.mgmt.apimanagement.operations.PortalRevisionOperations.list_by_service": "Microsoft.ApiManagement.PortalRevisionContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations.list_by_service": "Microsoft.ApiManagement.PortalRevisionContracts.listByService", + "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.get_by_name": "Microsoft.ApiManagement.PrivateEndpointConnections.getByName", + "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.get_by_name": "Microsoft.ApiManagement.PrivateEndpointConnections.getByName", + "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.begin_create_or_update": "Microsoft.ApiManagement.PrivateEndpointConnections.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.begin_create_or_update": "Microsoft.ApiManagement.PrivateEndpointConnections.createOrUpdate", + "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.begin_delete": "Microsoft.ApiManagement.PrivateEndpointConnections.delete", + "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.begin_delete": "Microsoft.ApiManagement.PrivateEndpointConnections.delete", + "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.list_by_service": "Microsoft.ApiManagement.PrivateEndpointConnections.listByService", + "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.list_by_service": "Microsoft.ApiManagement.PrivateEndpointConnections.listByService", + "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.get_private_link_resource": "Microsoft.ApiManagement.PrivateLinkResources.getPrivateLinkResource", + "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.get_private_link_resource": "Microsoft.ApiManagement.PrivateLinkResources.getPrivateLinkResource", + "azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations.list_private_link_resources": "Microsoft.ApiManagement.PrivateLinkResources.listPrivateLinkResources", + "azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations.list_private_link_resources": "Microsoft.ApiManagement.PrivateLinkResources.listPrivateLinkResources", + "azure.mgmt.apimanagement.operations.ProductApiOperations.list_by_product": "Microsoft.ApiManagement.ProductContracts.listByProduct", + "azure.mgmt.apimanagement.aio.operations.ProductApiOperations.list_by_product": "Microsoft.ApiManagement.ProductContracts.listByProduct", + "azure.mgmt.apimanagement.operations.ProductApiOperations.check_entity_exists": "Microsoft.ApiManagement.ProductContracts.checkEntityExists", + "azure.mgmt.apimanagement.aio.operations.ProductApiOperations.check_entity_exists": "Microsoft.ApiManagement.ProductContracts.checkEntityExists", + "azure.mgmt.apimanagement.operations.ProductApiOperations.create_or_update": "Microsoft.ApiManagement.ProductContracts.productApiCreateOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ProductApiOperations.create_or_update": "Microsoft.ApiManagement.ProductContracts.productApiCreateOrUpdate", + "azure.mgmt.apimanagement.operations.ProductApiOperations.delete": "Microsoft.ApiManagement.ProductContracts.productApiDelete", + "azure.mgmt.apimanagement.aio.operations.ProductApiOperations.delete": "Microsoft.ApiManagement.ProductContracts.productApiDelete", + "azure.mgmt.apimanagement.operations.ProductGroupOperations.list_by_product": "Microsoft.ApiManagement.ProductContracts.productGroupListByProduct", + "azure.mgmt.apimanagement.aio.operations.ProductGroupOperations.list_by_product": "Microsoft.ApiManagement.ProductContracts.productGroupListByProduct", + "azure.mgmt.apimanagement.operations.ProductGroupOperations.check_entity_exists": "Microsoft.ApiManagement.ProductContracts.productGroupCheckEntityExists", + "azure.mgmt.apimanagement.aio.operations.ProductGroupOperations.check_entity_exists": "Microsoft.ApiManagement.ProductContracts.productGroupCheckEntityExists", + "azure.mgmt.apimanagement.operations.ProductGroupOperations.create_or_update": "Microsoft.ApiManagement.ProductContracts.productGroupCreateOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ProductGroupOperations.create_or_update": "Microsoft.ApiManagement.ProductContracts.productGroupCreateOrUpdate", + "azure.mgmt.apimanagement.operations.ProductGroupOperations.delete": "Microsoft.ApiManagement.ProductContracts.productGroupDelete", + "azure.mgmt.apimanagement.aio.operations.ProductGroupOperations.delete": "Microsoft.ApiManagement.ProductContracts.productGroupDelete", + "azure.mgmt.apimanagement.operations.ProductSubscriptionsOperations.list": "Microsoft.ApiManagement.ProductContracts.list", + "azure.mgmt.apimanagement.aio.operations.ProductSubscriptionsOperations.list": "Microsoft.ApiManagement.ProductContracts.list", + "azure.mgmt.apimanagement.operations.ProductApiLinkOperations.get": "Microsoft.ApiManagement.ProductApiLinkContracts.get", + "azure.mgmt.apimanagement.aio.operations.ProductApiLinkOperations.get": "Microsoft.ApiManagement.ProductApiLinkContracts.get", + "azure.mgmt.apimanagement.operations.ProductApiLinkOperations.create_or_update": "Microsoft.ApiManagement.ProductApiLinkContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ProductApiLinkOperations.create_or_update": "Microsoft.ApiManagement.ProductApiLinkContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ProductApiLinkOperations.delete": "Microsoft.ApiManagement.ProductApiLinkContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ProductApiLinkOperations.delete": "Microsoft.ApiManagement.ProductApiLinkContracts.delete", + "azure.mgmt.apimanagement.operations.ProductApiLinkOperations.list_by_product": "Microsoft.ApiManagement.ProductApiLinkContracts.listByProduct", + "azure.mgmt.apimanagement.aio.operations.ProductApiLinkOperations.list_by_product": "Microsoft.ApiManagement.ProductApiLinkContracts.listByProduct", + "azure.mgmt.apimanagement.operations.ProductGroupLinkOperations.get": "Microsoft.ApiManagement.ProductGroupLinkContracts.get", + "azure.mgmt.apimanagement.aio.operations.ProductGroupLinkOperations.get": "Microsoft.ApiManagement.ProductGroupLinkContracts.get", + "azure.mgmt.apimanagement.operations.ProductGroupLinkOperations.create_or_update": "Microsoft.ApiManagement.ProductGroupLinkContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.ProductGroupLinkOperations.create_or_update": "Microsoft.ApiManagement.ProductGroupLinkContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.ProductGroupLinkOperations.delete": "Microsoft.ApiManagement.ProductGroupLinkContracts.delete", + "azure.mgmt.apimanagement.aio.operations.ProductGroupLinkOperations.delete": "Microsoft.ApiManagement.ProductGroupLinkContracts.delete", + "azure.mgmt.apimanagement.operations.ProductGroupLinkOperations.list_by_product": "Microsoft.ApiManagement.ProductGroupLinkContracts.listByProduct", + "azure.mgmt.apimanagement.aio.operations.ProductGroupLinkOperations.list_by_product": "Microsoft.ApiManagement.ProductGroupLinkContracts.listByProduct", + "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.get": "Microsoft.ApiManagement.GlobalSchemaContracts.get", + "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.get": "Microsoft.ApiManagement.GlobalSchemaContracts.get", + "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.get_entity_tag": "Microsoft.ApiManagement.GlobalSchemaContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.get_entity_tag": "Microsoft.ApiManagement.GlobalSchemaContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.begin_create_or_update": "Microsoft.ApiManagement.GlobalSchemaContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.begin_create_or_update": "Microsoft.ApiManagement.GlobalSchemaContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.delete": "Microsoft.ApiManagement.GlobalSchemaContracts.delete", + "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.delete": "Microsoft.ApiManagement.GlobalSchemaContracts.delete", + "azure.mgmt.apimanagement.operations.GlobalSchemaOperations.list_by_service": "Microsoft.ApiManagement.GlobalSchemaContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations.list_by_service": "Microsoft.ApiManagement.GlobalSchemaContracts.listByService", + "azure.mgmt.apimanagement.operations.TenantSettingsOperations.get": "Microsoft.ApiManagement.TenantSettingsContracts.get", + "azure.mgmt.apimanagement.aio.operations.TenantSettingsOperations.get": "Microsoft.ApiManagement.TenantSettingsContracts.get", + "azure.mgmt.apimanagement.operations.TenantSettingsOperations.list_by_service": "Microsoft.ApiManagement.TenantSettingsContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.TenantSettingsOperations.list_by_service": "Microsoft.ApiManagement.TenantSettingsContracts.listByService", + "azure.mgmt.apimanagement.operations.SubscriptionOperations.get": "Microsoft.ApiManagement.SubscriptionContracts.get", + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.get": "Microsoft.ApiManagement.SubscriptionContracts.get", + "azure.mgmt.apimanagement.operations.SubscriptionOperations.get_entity_tag": "Microsoft.ApiManagement.SubscriptionContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.get_entity_tag": "Microsoft.ApiManagement.SubscriptionContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.SubscriptionOperations.create_or_update": "Microsoft.ApiManagement.SubscriptionContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.create_or_update": "Microsoft.ApiManagement.SubscriptionContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.SubscriptionOperations.update": "Microsoft.ApiManagement.SubscriptionContracts.update", + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.update": "Microsoft.ApiManagement.SubscriptionContracts.update", + "azure.mgmt.apimanagement.operations.SubscriptionOperations.delete": "Microsoft.ApiManagement.SubscriptionContracts.delete", + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.delete": "Microsoft.ApiManagement.SubscriptionContracts.delete", + "azure.mgmt.apimanagement.operations.SubscriptionOperations.list": "Microsoft.ApiManagement.SubscriptionContracts.list", + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.list": "Microsoft.ApiManagement.SubscriptionContracts.list", + "azure.mgmt.apimanagement.operations.SubscriptionOperations.regenerate_primary_key": "Microsoft.ApiManagement.SubscriptionContracts.regeneratePrimaryKey", + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.regenerate_primary_key": "Microsoft.ApiManagement.SubscriptionContracts.regeneratePrimaryKey", + "azure.mgmt.apimanagement.operations.SubscriptionOperations.regenerate_secondary_key": "Microsoft.ApiManagement.SubscriptionContracts.regenerateSecondaryKey", + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.regenerate_secondary_key": "Microsoft.ApiManagement.SubscriptionContracts.regenerateSecondaryKey", + "azure.mgmt.apimanagement.operations.SubscriptionOperations.list_secrets": "Microsoft.ApiManagement.SubscriptionContracts.listSecrets", + "azure.mgmt.apimanagement.aio.operations.SubscriptionOperations.list_secrets": "Microsoft.ApiManagement.SubscriptionContracts.listSecrets", + "azure.mgmt.apimanagement.operations.TagApiLinkOperations.get": "Microsoft.ApiManagement.TagApiLinkContracts.get", + "azure.mgmt.apimanagement.aio.operations.TagApiLinkOperations.get": "Microsoft.ApiManagement.TagApiLinkContracts.get", + "azure.mgmt.apimanagement.operations.TagApiLinkOperations.create_or_update": "Microsoft.ApiManagement.TagApiLinkContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.TagApiLinkOperations.create_or_update": "Microsoft.ApiManagement.TagApiLinkContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.TagApiLinkOperations.delete": "Microsoft.ApiManagement.TagApiLinkContracts.delete", + "azure.mgmt.apimanagement.aio.operations.TagApiLinkOperations.delete": "Microsoft.ApiManagement.TagApiLinkContracts.delete", + "azure.mgmt.apimanagement.operations.TagApiLinkOperations.list_by_product": "Microsoft.ApiManagement.TagApiLinkContracts.listByProduct", + "azure.mgmt.apimanagement.aio.operations.TagApiLinkOperations.list_by_product": "Microsoft.ApiManagement.TagApiLinkContracts.listByProduct", + "azure.mgmt.apimanagement.operations.TagOperationLinkOperations.get": "Microsoft.ApiManagement.TagOperationLinkContracts.get", + "azure.mgmt.apimanagement.aio.operations.TagOperationLinkOperations.get": "Microsoft.ApiManagement.TagOperationLinkContracts.get", + "azure.mgmt.apimanagement.operations.TagOperationLinkOperations.create_or_update": "Microsoft.ApiManagement.TagOperationLinkContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.TagOperationLinkOperations.create_or_update": "Microsoft.ApiManagement.TagOperationLinkContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.TagOperationLinkOperations.delete": "Microsoft.ApiManagement.TagOperationLinkContracts.delete", + "azure.mgmt.apimanagement.aio.operations.TagOperationLinkOperations.delete": "Microsoft.ApiManagement.TagOperationLinkContracts.delete", + "azure.mgmt.apimanagement.operations.TagOperationLinkOperations.list_by_product": "Microsoft.ApiManagement.TagOperationLinkContracts.listByProduct", + "azure.mgmt.apimanagement.aio.operations.TagOperationLinkOperations.list_by_product": "Microsoft.ApiManagement.TagOperationLinkContracts.listByProduct", + "azure.mgmt.apimanagement.operations.TagProductLinkOperations.get": "Microsoft.ApiManagement.TagProductLinkContracts.get", + "azure.mgmt.apimanagement.aio.operations.TagProductLinkOperations.get": "Microsoft.ApiManagement.TagProductLinkContracts.get", + "azure.mgmt.apimanagement.operations.TagProductLinkOperations.create_or_update": "Microsoft.ApiManagement.TagProductLinkContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.TagProductLinkOperations.create_or_update": "Microsoft.ApiManagement.TagProductLinkContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.TagProductLinkOperations.delete": "Microsoft.ApiManagement.TagProductLinkContracts.delete", + "azure.mgmt.apimanagement.aio.operations.TagProductLinkOperations.delete": "Microsoft.ApiManagement.TagProductLinkContracts.delete", + "azure.mgmt.apimanagement.operations.TagProductLinkOperations.list_by_product": "Microsoft.ApiManagement.TagProductLinkContracts.listByProduct", + "azure.mgmt.apimanagement.aio.operations.TagProductLinkOperations.list_by_product": "Microsoft.ApiManagement.TagProductLinkContracts.listByProduct", + "azure.mgmt.apimanagement.operations.TenantAccessOperations.get": "Microsoft.ApiManagement.AccessInformationContracts.get", + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.get": "Microsoft.ApiManagement.AccessInformationContracts.get", + "azure.mgmt.apimanagement.operations.TenantAccessOperations.get_entity_tag": "Microsoft.ApiManagement.AccessInformationContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.get_entity_tag": "Microsoft.ApiManagement.AccessInformationContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.TenantAccessOperations.create": "Microsoft.ApiManagement.AccessInformationContracts.create", + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.create": "Microsoft.ApiManagement.AccessInformationContracts.create", + "azure.mgmt.apimanagement.operations.TenantAccessOperations.update": "Microsoft.ApiManagement.AccessInformationContracts.update", + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.update": "Microsoft.ApiManagement.AccessInformationContracts.update", + "azure.mgmt.apimanagement.operations.TenantAccessOperations.list_by_service": "Microsoft.ApiManagement.AccessInformationContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.list_by_service": "Microsoft.ApiManagement.AccessInformationContracts.listByService", + "azure.mgmt.apimanagement.operations.TenantAccessOperations.regenerate_primary_key": "Microsoft.ApiManagement.AccessInformationContracts.regeneratePrimaryKey", + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.regenerate_primary_key": "Microsoft.ApiManagement.AccessInformationContracts.regeneratePrimaryKey", + "azure.mgmt.apimanagement.operations.TenantAccessOperations.regenerate_secondary_key": "Microsoft.ApiManagement.AccessInformationContracts.regenerateSecondaryKey", + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.regenerate_secondary_key": "Microsoft.ApiManagement.AccessInformationContracts.regenerateSecondaryKey", + "azure.mgmt.apimanagement.operations.TenantAccessOperations.list_secrets": "Microsoft.ApiManagement.AccessInformationContracts.listSecrets", + "azure.mgmt.apimanagement.aio.operations.TenantAccessOperations.list_secrets": "Microsoft.ApiManagement.AccessInformationContracts.listSecrets", + "azure.mgmt.apimanagement.operations.TenantAccessGitOperations.regenerate_primary_key": "Microsoft.ApiManagement.AccessInformationContracts.tenantAccessGitRegeneratePrimaryKey", + "azure.mgmt.apimanagement.aio.operations.TenantAccessGitOperations.regenerate_primary_key": "Microsoft.ApiManagement.AccessInformationContracts.tenantAccessGitRegeneratePrimaryKey", + "azure.mgmt.apimanagement.operations.TenantAccessGitOperations.regenerate_secondary_key": "Microsoft.ApiManagement.AccessInformationContracts.tenantAccessGitRegenerateSecondaryKey", + "azure.mgmt.apimanagement.aio.operations.TenantAccessGitOperations.regenerate_secondary_key": "Microsoft.ApiManagement.AccessInformationContracts.tenantAccessGitRegenerateSecondaryKey", + "azure.mgmt.apimanagement.operations.TenantConfigurationOperations.begin_deploy": "Microsoft.ApiManagement.AccessInformationContracts.deploy", + "azure.mgmt.apimanagement.aio.operations.TenantConfigurationOperations.begin_deploy": "Microsoft.ApiManagement.AccessInformationContracts.deploy", + "azure.mgmt.apimanagement.operations.TenantConfigurationOperations.begin_save": "Microsoft.ApiManagement.AccessInformationContracts.save", + "azure.mgmt.apimanagement.aio.operations.TenantConfigurationOperations.begin_save": "Microsoft.ApiManagement.AccessInformationContracts.save", + "azure.mgmt.apimanagement.operations.TenantConfigurationOperations.begin_validate": "Microsoft.ApiManagement.AccessInformationContracts.validate", + "azure.mgmt.apimanagement.aio.operations.TenantConfigurationOperations.begin_validate": "Microsoft.ApiManagement.AccessInformationContracts.validate", + "azure.mgmt.apimanagement.operations.TenantConfigurationOperations.get_sync_state": "Microsoft.ApiManagement.AccessInformationContracts.getSyncState", + "azure.mgmt.apimanagement.aio.operations.TenantConfigurationOperations.get_sync_state": "Microsoft.ApiManagement.AccessInformationContracts.getSyncState", + "azure.mgmt.apimanagement.operations.UserOperations.get": "Microsoft.ApiManagement.UserContracts.get", + "azure.mgmt.apimanagement.aio.operations.UserOperations.get": "Microsoft.ApiManagement.UserContracts.get", + "azure.mgmt.apimanagement.operations.UserOperations.get_entity_tag": "Microsoft.ApiManagement.UserContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.UserOperations.get_entity_tag": "Microsoft.ApiManagement.UserContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.UserOperations.create_or_update": "Microsoft.ApiManagement.UserContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.UserOperations.create_or_update": "Microsoft.ApiManagement.UserContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.UserOperations.update": "Microsoft.ApiManagement.UserContracts.update", + "azure.mgmt.apimanagement.aio.operations.UserOperations.update": "Microsoft.ApiManagement.UserContracts.update", + "azure.mgmt.apimanagement.operations.UserOperations.begin_delete": "Microsoft.ApiManagement.UserContracts.delete", + "azure.mgmt.apimanagement.aio.operations.UserOperations.begin_delete": "Microsoft.ApiManagement.UserContracts.delete", + "azure.mgmt.apimanagement.operations.UserOperations.list_by_service": "Microsoft.ApiManagement.UserContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.UserOperations.list_by_service": "Microsoft.ApiManagement.UserContracts.listByService", + "azure.mgmt.apimanagement.operations.UserOperations.generate_sso_url": "Microsoft.ApiManagement.UserContracts.generateSsoUrl", + "azure.mgmt.apimanagement.aio.operations.UserOperations.generate_sso_url": "Microsoft.ApiManagement.UserContracts.generateSsoUrl", + "azure.mgmt.apimanagement.operations.UserOperations.get_shared_access_token": "Microsoft.ApiManagement.UserContracts.getSharedAccessToken", + "azure.mgmt.apimanagement.aio.operations.UserOperations.get_shared_access_token": "Microsoft.ApiManagement.UserContracts.getSharedAccessToken", + "azure.mgmt.apimanagement.operations.UserGroupOperations.list": "Microsoft.ApiManagement.UserContracts.list", + "azure.mgmt.apimanagement.aio.operations.UserGroupOperations.list": "Microsoft.ApiManagement.UserContracts.list", + "azure.mgmt.apimanagement.operations.UserIdentitiesOperations.list": "Microsoft.ApiManagement.UserContracts.userIdentitiesList", + "azure.mgmt.apimanagement.aio.operations.UserIdentitiesOperations.list": "Microsoft.ApiManagement.UserContracts.userIdentitiesList", + "azure.mgmt.apimanagement.operations.UserConfirmationPasswordOperations.send": "Microsoft.ApiManagement.UserContracts.send", + "azure.mgmt.apimanagement.aio.operations.UserConfirmationPasswordOperations.send": "Microsoft.ApiManagement.UserContracts.send", + "azure.mgmt.apimanagement.operations.ApiManagementWorkspaceLinkOperations.get": "Microsoft.ApiManagement.ApiManagementWorkspaceLinksResources.get", + "azure.mgmt.apimanagement.aio.operations.ApiManagementWorkspaceLinkOperations.get": "Microsoft.ApiManagement.ApiManagementWorkspaceLinksResources.get", + "azure.mgmt.apimanagement.operations.ApiManagementWorkspaceLinksOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementWorkspaceLinksResources.listByService", + "azure.mgmt.apimanagement.aio.operations.ApiManagementWorkspaceLinksOperations.list_by_service": "Microsoft.ApiManagement.ApiManagementWorkspaceLinksResources.listByService", + "azure.mgmt.apimanagement.operations.WorkspaceOperations.get": "Microsoft.ApiManagement.WorkspaceContracts.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.get": "Microsoft.ApiManagement.WorkspaceContracts.get", + "azure.mgmt.apimanagement.operations.WorkspaceOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceContracts.getEntityTag", + "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.get_entity_tag": "Microsoft.ApiManagement.WorkspaceContracts.getEntityTag", + "azure.mgmt.apimanagement.operations.WorkspaceOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceContracts.createOrUpdate", + "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.create_or_update": "Microsoft.ApiManagement.WorkspaceContracts.createOrUpdate", + "azure.mgmt.apimanagement.operations.WorkspaceOperations.update": "Microsoft.ApiManagement.WorkspaceContracts.update", + "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.update": "Microsoft.ApiManagement.WorkspaceContracts.update", + "azure.mgmt.apimanagement.operations.WorkspaceOperations.delete": "Microsoft.ApiManagement.WorkspaceContracts.delete", + "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.delete": "Microsoft.ApiManagement.WorkspaceContracts.delete", + "azure.mgmt.apimanagement.operations.WorkspaceOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceContracts.listByService", + "azure.mgmt.apimanagement.aio.operations.WorkspaceOperations.list_by_service": "Microsoft.ApiManagement.WorkspaceContracts.listByService", + "azure.mgmt.apimanagement.operations.ApiExportOperations.get": "Microsoft.ApiManagement.ApiExportOperationGroup.get", + "azure.mgmt.apimanagement.aio.operations.ApiExportOperations.get": "Microsoft.ApiManagement.ApiExportOperationGroup.get", + "azure.mgmt.apimanagement.operations.ApiManagementSkusOperations.list": "Microsoft.ApiManagement.ApiManagementSkusOperationGroup.list", + "azure.mgmt.apimanagement.aio.operations.ApiManagementSkusOperations.list": "Microsoft.ApiManagement.ApiManagementSkusOperationGroup.list", + "azure.mgmt.apimanagement.operations.WorkspaceApiExportOperations.get": "Microsoft.ApiManagement.WorkspaceApiExportOperationGroup.get", + "azure.mgmt.apimanagement.aio.operations.WorkspaceApiExportOperations.get": "Microsoft.ApiManagement.WorkspaceApiExportOperationGroup.get", + "azure.mgmt.apimanagement.operations.OperationStatusOperations.get": "Microsoft.ApiManagement.OperationStatusOperationGroup.get", + "azure.mgmt.apimanagement.aio.operations.OperationStatusOperations.get": "Microsoft.ApiManagement.OperationStatusOperationGroup.get", + "azure.mgmt.apimanagement.operations.OperationsResultsOperations.get": "Microsoft.ApiManagement.OperationsResultsOperationGroup.get", + "azure.mgmt.apimanagement.aio.operations.OperationsResultsOperations.get": "Microsoft.ApiManagement.OperationsResultsOperationGroup.get", + "azure.mgmt.apimanagement.ApiManagementClient.begin_perform_connectivity_check_async": "Microsoft.ApiManagement.ApiManagementServiceResources.performConnectivityCheckAsync", + "azure.mgmt.apimanagement.aio.ApiManagementClient.begin_perform_connectivity_check_async": "Microsoft.ApiManagement.ApiManagementServiceResources.performConnectivityCheckAsync" } } \ No newline at end of file diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/__init__.py index 84fc939c766a..a35a4a4310f4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._api_management_client import ApiManagementClient # type: ignore +from ._client import ApiManagementClient # type: ignore from ._version import VERSION __version__ = VERSION diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_client.py similarity index 98% rename from sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py rename to sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_client.py index 8a8b5da2dfc0..5e25ba7458a4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_client.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -17,7 +17,6 @@ from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy from azure.mgmt.core.tools import get_arm_endpoints -from . import models as _models from ._configuration import ApiManagementClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( @@ -170,37 +169,167 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes - """ApiManagement Client. + """Resource provider operation status. + :ivar workspace_api: WorkspaceApiOperations operations + :vartype workspace_api: azure.mgmt.apimanagement.operations.WorkspaceApiOperations + :ivar workspace_api_release: WorkspaceApiReleaseOperations operations + :vartype workspace_api_release: + azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations + :ivar workspace_api_operation: WorkspaceApiOperationOperations operations + :vartype workspace_api_operation: + azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations + :ivar graph_ql_api_resolver_policy: GraphQLApiResolverPolicyOperations operations + :vartype graph_ql_api_resolver_policy: + azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations + :ivar api_policy: ApiPolicyOperations operations + :vartype api_policy: azure.mgmt.apimanagement.operations.ApiPolicyOperations + :ivar policy: PolicyOperations operations + :vartype policy: azure.mgmt.apimanagement.operations.PolicyOperations + :ivar product_policy: ProductPolicyOperations operations + :vartype product_policy: azure.mgmt.apimanagement.operations.ProductPolicyOperations + :ivar workspace_policy: WorkspacePolicyOperations operations + :vartype workspace_policy: azure.mgmt.apimanagement.operations.WorkspacePolicyOperations + :ivar workspace_api_operation_policy: WorkspaceApiOperationPolicyOperations operations + :vartype workspace_api_operation_policy: + azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations + :ivar workspace_api_policy: WorkspaceApiPolicyOperations operations + :vartype workspace_api_policy: azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations + :ivar workspace_product_policy: WorkspaceProductPolicyOperations operations + :vartype workspace_product_policy: + azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations + :ivar tag: TagOperations operations + :vartype tag: azure.mgmt.apimanagement.operations.TagOperations + :ivar workspace_tag: WorkspaceTagOperations operations + :vartype workspace_tag: azure.mgmt.apimanagement.operations.WorkspaceTagOperations + :ivar workspace_api_schema: WorkspaceApiSchemaOperations operations + :vartype workspace_api_schema: azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations + :ivar diagnostic: DiagnosticOperations operations + :vartype diagnostic: azure.mgmt.apimanagement.operations.DiagnosticOperations + :ivar workspace_diagnostic: WorkspaceDiagnosticOperations operations + :vartype workspace_diagnostic: + azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations + :ivar workspace_api_diagnostic: WorkspaceApiDiagnosticOperations operations + :vartype workspace_api_diagnostic: + azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations + :ivar issue: IssueOperations operations + :vartype issue: azure.mgmt.apimanagement.operations.IssueOperations + :ivar product_wiki: ProductWikiOperations operations + :vartype product_wiki: azure.mgmt.apimanagement.operations.ProductWikiOperations + :ivar workspace_api_version_set: WorkspaceApiVersionSetOperations operations + :vartype workspace_api_version_set: + azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations + :ivar workspace_backend: WorkspaceBackendOperations operations + :vartype workspace_backend: azure.mgmt.apimanagement.operations.WorkspaceBackendOperations + :ivar workspace_certificate: WorkspaceCertificateOperations operations + :vartype workspace_certificate: + azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations + :ivar workspace_group: WorkspaceGroupOperations operations + :vartype workspace_group: azure.mgmt.apimanagement.operations.WorkspaceGroupOperations + :ivar workspace_logger: WorkspaceLoggerOperations operations + :vartype workspace_logger: azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations + :ivar workspace_named_value: WorkspaceNamedValueOperations operations + :vartype workspace_named_value: + azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations + :ivar workspace_notification: WorkspaceNotificationOperations operations + :vartype workspace_notification: + azure.mgmt.apimanagement.operations.WorkspaceNotificationOperations + :ivar workspace_policy_fragment: WorkspacePolicyFragmentOperations operations + :vartype workspace_policy_fragment: + azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations + :ivar sign_in_settings: SignInSettingsOperations operations + :vartype sign_in_settings: azure.mgmt.apimanagement.operations.SignInSettingsOperations + :ivar sign_up_settings: SignUpSettingsOperations operations + :vartype sign_up_settings: azure.mgmt.apimanagement.operations.SignUpSettingsOperations + :ivar delegation_settings: DelegationSettingsOperations operations + :vartype delegation_settings: azure.mgmt.apimanagement.operations.DelegationSettingsOperations + :ivar workspace_product: WorkspaceProductOperations operations + :vartype workspace_product: azure.mgmt.apimanagement.operations.WorkspaceProductOperations + :ivar workspace_product_api_link: WorkspaceProductApiLinkOperations operations + :vartype workspace_product_api_link: + azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations + :ivar workspace_product_group_link: WorkspaceProductGroupLinkOperations operations + :vartype workspace_product_group_link: + azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations + :ivar workspace_global_schema: WorkspaceGlobalSchemaOperations operations + :vartype workspace_global_schema: + azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations + :ivar user_subscription: UserSubscriptionOperations operations + :vartype user_subscription: azure.mgmt.apimanagement.operations.UserSubscriptionOperations + :ivar workspace_subscription: WorkspaceSubscriptionOperations operations + :vartype workspace_subscription: + azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations + :ivar workspace_tag_api_link: WorkspaceTagApiLinkOperations operations + :vartype workspace_tag_api_link: + azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations + :ivar workspace_tag_operation_link: WorkspaceTagOperationLinkOperations operations + :vartype workspace_tag_operation_link: + azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations + :ivar workspace_tag_product_link: WorkspaceTagProductLinkOperations operations + :vartype workspace_tag_product_link: + azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations + :ivar api_management_operations: ApiManagementOperationsOperations operations + :vartype api_management_operations: + azure.mgmt.apimanagement.operations.ApiManagementOperationsOperations :ivar api_gateway: ApiGatewayOperations operations :vartype api_gateway: azure.mgmt.apimanagement.operations.ApiGatewayOperations :ivar api_management_gateway_skus: ApiManagementGatewaySkusOperations operations :vartype api_management_gateway_skus: azure.mgmt.apimanagement.operations.ApiManagementGatewaySkusOperations - :ivar all_policies: AllPoliciesOperations operations - :vartype all_policies: azure.mgmt.apimanagement.operations.AllPoliciesOperations :ivar api: ApiOperations operations :vartype api: azure.mgmt.apimanagement.operations.ApiOperations :ivar api_revision: ApiRevisionOperations operations :vartype api_revision: azure.mgmt.apimanagement.operations.ApiRevisionOperations + :ivar api_product: ApiProductOperations operations + :vartype api_product: azure.mgmt.apimanagement.operations.ApiProductOperations + :ivar operation: OperationOperations operations + :vartype operation: azure.mgmt.apimanagement.operations.OperationOperations + :ivar workspace_api_revision: WorkspaceApiRevisionOperations operations + :vartype workspace_api_revision: + azure.mgmt.apimanagement.operations.WorkspaceApiRevisionOperations + :ivar api_management_service: ApiManagementServiceOperations operations + :vartype api_management_service: + azure.mgmt.apimanagement.operations.ApiManagementServiceOperations + :ivar all_policies: AllPoliciesOperations operations + :vartype all_policies: azure.mgmt.apimanagement.operations.AllPoliciesOperations + :ivar api_management_service_skus: ApiManagementServiceSkusOperations operations + :vartype api_management_service_skus: + azure.mgmt.apimanagement.operations.ApiManagementServiceSkusOperations + :ivar network_status: NetworkStatusOperations operations + :vartype network_status: azure.mgmt.apimanagement.operations.NetworkStatusOperations + :ivar outbound_network_dependencies_endpoints: OutboundNetworkDependenciesEndpointsOperations + operations + :vartype outbound_network_dependencies_endpoints: + azure.mgmt.apimanagement.operations.OutboundNetworkDependenciesEndpointsOperations + :ivar policy_description: PolicyDescriptionOperations operations + :vartype policy_description: azure.mgmt.apimanagement.operations.PolicyDescriptionOperations + :ivar policy_restriction_validations: PolicyRestrictionValidationsOperations operations + :vartype policy_restriction_validations: + azure.mgmt.apimanagement.operations.PolicyRestrictionValidationsOperations + :ivar portal_settings: PortalSettingsOperations operations + :vartype portal_settings: azure.mgmt.apimanagement.operations.PortalSettingsOperations + :ivar product: ProductOperations operations + :vartype product: azure.mgmt.apimanagement.operations.ProductOperations + :ivar quota_by_counter_keys: QuotaByCounterKeysOperations operations + :vartype quota_by_counter_keys: + azure.mgmt.apimanagement.operations.QuotaByCounterKeysOperations + :ivar quota_by_period_keys: QuotaByPeriodKeysOperations operations + :vartype quota_by_period_keys: azure.mgmt.apimanagement.operations.QuotaByPeriodKeysOperations + :ivar region: RegionOperations operations + :vartype region: azure.mgmt.apimanagement.operations.RegionOperations + :ivar reports: ReportsOperations operations + :vartype reports: azure.mgmt.apimanagement.operations.ReportsOperations + :ivar tag_resource: TagResourceOperations operations + :vartype tag_resource: azure.mgmt.apimanagement.operations.TagResourceOperations :ivar api_release: ApiReleaseOperations operations :vartype api_release: azure.mgmt.apimanagement.operations.ApiReleaseOperations :ivar api_operation: ApiOperationOperations operations :vartype api_operation: azure.mgmt.apimanagement.operations.ApiOperationOperations :ivar api_operation_policy: ApiOperationPolicyOperations operations :vartype api_operation_policy: azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations - :ivar tag: TagOperations operations - :vartype tag: azure.mgmt.apimanagement.operations.TagOperations :ivar graph_ql_api_resolver: GraphQLApiResolverOperations operations :vartype graph_ql_api_resolver: azure.mgmt.apimanagement.operations.GraphQLApiResolverOperations - :ivar graph_ql_api_resolver_policy: GraphQLApiResolverPolicyOperations operations - :vartype graph_ql_api_resolver_policy: - azure.mgmt.apimanagement.operations.GraphQLApiResolverPolicyOperations - :ivar api_product: ApiProductOperations operations - :vartype api_product: azure.mgmt.apimanagement.operations.ApiProductOperations - :ivar api_policy: ApiPolicyOperations operations - :vartype api_policy: azure.mgmt.apimanagement.operations.ApiPolicyOperations :ivar api_schema: ApiSchemaOperations operations :vartype api_schema: azure.mgmt.apimanagement.operations.ApiSchemaOperations :ivar api_diagnostic: ApiDiagnosticOperations operations @@ -213,16 +342,14 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :vartype api_issue_attachment: azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations :ivar api_tag_description: ApiTagDescriptionOperations operations :vartype api_tag_description: azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations - :ivar operation: OperationOperations operations - :vartype operation: azure.mgmt.apimanagement.operations.OperationOperations :ivar api_wiki: ApiWikiOperations operations :vartype api_wiki: azure.mgmt.apimanagement.operations.ApiWikiOperations :ivar api_wikis: ApiWikisOperations operations :vartype api_wikis: azure.mgmt.apimanagement.operations.ApiWikisOperations + :ivar product_wikis: ProductWikisOperations operations + :vartype product_wikis: azure.mgmt.apimanagement.operations.ProductWikisOperations :ivar api_tool: ApiToolOperations operations :vartype api_tool: azure.mgmt.apimanagement.operations.ApiToolOperations - :ivar api_export: ApiExportOperations operations - :vartype api_export: azure.mgmt.apimanagement.operations.ApiExportOperations :ivar api_version_set: ApiVersionSetOperations operations :vartype api_version_set: azure.mgmt.apimanagement.operations.ApiVersionSetOperations :ivar authorization_provider: AuthorizationProviderOperations operations @@ -245,28 +372,12 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :vartype cache: azure.mgmt.apimanagement.operations.CacheOperations :ivar certificate: CertificateOperations operations :vartype certificate: azure.mgmt.apimanagement.operations.CertificateOperations - :ivar client_application: ClientApplicationOperations operations - :vartype client_application: azure.mgmt.apimanagement.operations.ClientApplicationOperations - :ivar client_application_product_link: ClientApplicationProductLinkOperations operations - :vartype client_application_product_link: - azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations :ivar content_type: ContentTypeOperations operations :vartype content_type: azure.mgmt.apimanagement.operations.ContentTypeOperations :ivar content_item: ContentItemOperations operations :vartype content_item: azure.mgmt.apimanagement.operations.ContentItemOperations :ivar deleted_services: DeletedServicesOperations operations :vartype deleted_services: azure.mgmt.apimanagement.operations.DeletedServicesOperations - :ivar api_management_operations: ApiManagementOperationsOperations operations - :vartype api_management_operations: - azure.mgmt.apimanagement.operations.ApiManagementOperationsOperations - :ivar api_management_service_skus: ApiManagementServiceSkusOperations operations - :vartype api_management_service_skus: - azure.mgmt.apimanagement.operations.ApiManagementServiceSkusOperations - :ivar api_management_service: ApiManagementServiceOperations operations - :vartype api_management_service: - azure.mgmt.apimanagement.operations.ApiManagementServiceOperations - :ivar diagnostic: DiagnosticOperations operations - :vartype diagnostic: azure.mgmt.apimanagement.operations.DiagnosticOperations :ivar documentation: DocumentationOperations operations :vartype documentation: azure.mgmt.apimanagement.operations.DocumentationOperations :ivar email_template: EmailTemplateOperations operations @@ -279,11 +390,11 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab azure.mgmt.apimanagement.operations.ApiGatewayHostnameBindingOperations :ivar gateway: GatewayOperations operations :vartype gateway: azure.mgmt.apimanagement.operations.GatewayOperations + :ivar gateway_api: GatewayApiOperations operations + :vartype gateway_api: azure.mgmt.apimanagement.operations.GatewayApiOperations :ivar gateway_hostname_configuration: GatewayHostnameConfigurationOperations operations :vartype gateway_hostname_configuration: azure.mgmt.apimanagement.operations.GatewayHostnameConfigurationOperations - :ivar gateway_api: GatewayApiOperations operations - :vartype gateway_api: azure.mgmt.apimanagement.operations.GatewayApiOperations :ivar gateway_certificate_authority: GatewayCertificateAuthorityOperations operations :vartype gateway_certificate_authority: azure.mgmt.apimanagement.operations.GatewayCertificateAuthorityOperations @@ -291,16 +402,14 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :vartype group: azure.mgmt.apimanagement.operations.GroupOperations :ivar group_user: GroupUserOperations operations :vartype group_user: azure.mgmt.apimanagement.operations.GroupUserOperations + :ivar workspace_group_user: WorkspaceGroupUserOperations operations + :vartype workspace_group_user: azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations :ivar identity_provider: IdentityProviderOperations operations :vartype identity_provider: azure.mgmt.apimanagement.operations.IdentityProviderOperations - :ivar issue: IssueOperations operations - :vartype issue: azure.mgmt.apimanagement.operations.IssueOperations :ivar logger: LoggerOperations operations :vartype logger: azure.mgmt.apimanagement.operations.LoggerOperations :ivar named_value: NamedValueOperations operations :vartype named_value: azure.mgmt.apimanagement.operations.NamedValueOperations - :ivar network_status: NetworkStatusOperations operations - :vartype network_status: azure.mgmt.apimanagement.operations.NetworkStatusOperations :ivar notification: NotificationOperations operations :vartype notification: azure.mgmt.apimanagement.operations.NotificationOperations :ivar notification_recipient_user: NotificationRecipientUserOperations operations @@ -309,41 +418,33 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :ivar notification_recipient_email: NotificationRecipientEmailOperations operations :vartype notification_recipient_email: azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations + :ivar workspace_notification_recipient_user: WorkspaceNotificationRecipientUserOperations + operations + :vartype workspace_notification_recipient_user: + azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations + :ivar workspace_notification_recipient_email: WorkspaceNotificationRecipientEmailOperations + operations + :vartype workspace_notification_recipient_email: + azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations :ivar open_id_connect_provider: OpenIdConnectProviderOperations operations :vartype open_id_connect_provider: azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations - :ivar outbound_network_dependencies_endpoints: OutboundNetworkDependenciesEndpointsOperations - operations - :vartype outbound_network_dependencies_endpoints: - azure.mgmt.apimanagement.operations.OutboundNetworkDependenciesEndpointsOperations - :ivar policy: PolicyOperations operations - :vartype policy: azure.mgmt.apimanagement.operations.PolicyOperations - :ivar policy_description: PolicyDescriptionOperations operations - :vartype policy_description: azure.mgmt.apimanagement.operations.PolicyDescriptionOperations :ivar policy_fragment: PolicyFragmentOperations operations :vartype policy_fragment: azure.mgmt.apimanagement.operations.PolicyFragmentOperations :ivar policy_restriction: PolicyRestrictionOperations operations :vartype policy_restriction: azure.mgmt.apimanagement.operations.PolicyRestrictionOperations - :ivar policy_restriction_validations: PolicyRestrictionValidationsOperations operations - :vartype policy_restriction_validations: - azure.mgmt.apimanagement.operations.PolicyRestrictionValidationsOperations :ivar portal_config: PortalConfigOperations operations :vartype portal_config: azure.mgmt.apimanagement.operations.PortalConfigOperations + :ivar client_application: ClientApplicationOperations operations + :vartype client_application: azure.mgmt.apimanagement.operations.ClientApplicationOperations + :ivar client_application_product_link: ClientApplicationProductLinkOperations operations + :vartype client_application_product_link: + azure.mgmt.apimanagement.operations.ClientApplicationProductLinkOperations :ivar portal_revision: PortalRevisionOperations operations :vartype portal_revision: azure.mgmt.apimanagement.operations.PortalRevisionOperations - :ivar portal_settings: PortalSettingsOperations operations - :vartype portal_settings: azure.mgmt.apimanagement.operations.PortalSettingsOperations - :ivar sign_in_settings: SignInSettingsOperations operations - :vartype sign_in_settings: azure.mgmt.apimanagement.operations.SignInSettingsOperations - :ivar sign_up_settings: SignUpSettingsOperations operations - :vartype sign_up_settings: azure.mgmt.apimanagement.operations.SignUpSettingsOperations - :ivar delegation_settings: DelegationSettingsOperations operations - :vartype delegation_settings: azure.mgmt.apimanagement.operations.DelegationSettingsOperations :ivar private_endpoint_connection: PrivateEndpointConnectionOperations operations :vartype private_endpoint_connection: azure.mgmt.apimanagement.operations.PrivateEndpointConnectionOperations - :ivar product: ProductOperations operations - :vartype product: azure.mgmt.apimanagement.operations.ProductOperations :ivar product_api: ProductApiOperations operations :vartype product_api: azure.mgmt.apimanagement.operations.ProductApiOperations :ivar product_group: ProductGroupOperations operations @@ -351,35 +452,16 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :ivar product_subscriptions: ProductSubscriptionsOperations operations :vartype product_subscriptions: azure.mgmt.apimanagement.operations.ProductSubscriptionsOperations - :ivar product_policy: ProductPolicyOperations operations - :vartype product_policy: azure.mgmt.apimanagement.operations.ProductPolicyOperations - :ivar product_wiki: ProductWikiOperations operations - :vartype product_wiki: azure.mgmt.apimanagement.operations.ProductWikiOperations - :ivar product_wikis: ProductWikisOperations operations - :vartype product_wikis: azure.mgmt.apimanagement.operations.ProductWikisOperations :ivar product_api_link: ProductApiLinkOperations operations :vartype product_api_link: azure.mgmt.apimanagement.operations.ProductApiLinkOperations :ivar product_group_link: ProductGroupLinkOperations operations :vartype product_group_link: azure.mgmt.apimanagement.operations.ProductGroupLinkOperations - :ivar quota_by_counter_keys: QuotaByCounterKeysOperations operations - :vartype quota_by_counter_keys: - azure.mgmt.apimanagement.operations.QuotaByCounterKeysOperations - :ivar quota_by_period_keys: QuotaByPeriodKeysOperations operations - :vartype quota_by_period_keys: azure.mgmt.apimanagement.operations.QuotaByPeriodKeysOperations - :ivar region: RegionOperations operations - :vartype region: azure.mgmt.apimanagement.operations.RegionOperations - :ivar reports: ReportsOperations operations - :vartype reports: azure.mgmt.apimanagement.operations.ReportsOperations :ivar global_schema: GlobalSchemaOperations operations :vartype global_schema: azure.mgmt.apimanagement.operations.GlobalSchemaOperations :ivar tenant_settings: TenantSettingsOperations operations :vartype tenant_settings: azure.mgmt.apimanagement.operations.TenantSettingsOperations - :ivar api_management_skus: ApiManagementSkusOperations operations - :vartype api_management_skus: azure.mgmt.apimanagement.operations.ApiManagementSkusOperations :ivar subscription: SubscriptionOperations operations :vartype subscription: azure.mgmt.apimanagement.operations.SubscriptionOperations - :ivar tag_resource: TagResourceOperations operations - :vartype tag_resource: azure.mgmt.apimanagement.operations.TagResourceOperations :ivar tag_api_link: TagApiLinkOperations operations :vartype tag_api_link: azure.mgmt.apimanagement.operations.TagApiLinkOperations :ivar tag_operation_link: TagOperationLinkOperations operations @@ -397,123 +479,41 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :vartype user: azure.mgmt.apimanagement.operations.UserOperations :ivar user_group: UserGroupOperations operations :vartype user_group: azure.mgmt.apimanagement.operations.UserGroupOperations - :ivar user_subscription: UserSubscriptionOperations operations - :vartype user_subscription: azure.mgmt.apimanagement.operations.UserSubscriptionOperations :ivar user_identities: UserIdentitiesOperations operations :vartype user_identities: azure.mgmt.apimanagement.operations.UserIdentitiesOperations :ivar user_confirmation_password: UserConfirmationPasswordOperations operations :vartype user_confirmation_password: azure.mgmt.apimanagement.operations.UserConfirmationPasswordOperations - :ivar workspace_backend: WorkspaceBackendOperations operations - :vartype workspace_backend: azure.mgmt.apimanagement.operations.WorkspaceBackendOperations - :ivar workspace_certificate: WorkspaceCertificateOperations operations - :vartype workspace_certificate: - azure.mgmt.apimanagement.operations.WorkspaceCertificateOperations - :ivar workspace_diagnostic: WorkspaceDiagnosticOperations operations - :vartype workspace_diagnostic: - azure.mgmt.apimanagement.operations.WorkspaceDiagnosticOperations - :ivar workspace_api_diagnostic: WorkspaceApiDiagnosticOperations operations - :vartype workspace_api_diagnostic: - azure.mgmt.apimanagement.operations.WorkspaceApiDiagnosticOperations - :ivar api_management_workspace_links: ApiManagementWorkspaceLinksOperations operations - :vartype api_management_workspace_links: - azure.mgmt.apimanagement.operations.ApiManagementWorkspaceLinksOperations :ivar api_management_workspace_link: ApiManagementWorkspaceLinkOperations operations :vartype api_management_workspace_link: azure.mgmt.apimanagement.operations.ApiManagementWorkspaceLinkOperations - :ivar workspace_logger: WorkspaceLoggerOperations operations - :vartype workspace_logger: azure.mgmt.apimanagement.operations.WorkspaceLoggerOperations + :ivar api_management_workspace_links: ApiManagementWorkspaceLinksOperations operations + :vartype api_management_workspace_links: + azure.mgmt.apimanagement.operations.ApiManagementWorkspaceLinksOperations :ivar workspace: WorkspaceOperations operations :vartype workspace: azure.mgmt.apimanagement.operations.WorkspaceOperations - :ivar workspace_policy: WorkspacePolicyOperations operations - :vartype workspace_policy: azure.mgmt.apimanagement.operations.WorkspacePolicyOperations - :ivar workspace_named_value: WorkspaceNamedValueOperations operations - :vartype workspace_named_value: - azure.mgmt.apimanagement.operations.WorkspaceNamedValueOperations - :ivar workspace_global_schema: WorkspaceGlobalSchemaOperations operations - :vartype workspace_global_schema: - azure.mgmt.apimanagement.operations.WorkspaceGlobalSchemaOperations - :ivar workspace_notification: WorkspaceNotificationOperations operations - :vartype workspace_notification: - azure.mgmt.apimanagement.operations.WorkspaceNotificationOperations - :ivar workspace_notification_recipient_user: WorkspaceNotificationRecipientUserOperations - operations - :vartype workspace_notification_recipient_user: - azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientUserOperations - :ivar workspace_notification_recipient_email: WorkspaceNotificationRecipientEmailOperations - operations - :vartype workspace_notification_recipient_email: - azure.mgmt.apimanagement.operations.WorkspaceNotificationRecipientEmailOperations - :ivar workspace_policy_fragment: WorkspacePolicyFragmentOperations operations - :vartype workspace_policy_fragment: - azure.mgmt.apimanagement.operations.WorkspacePolicyFragmentOperations - :ivar workspace_group: WorkspaceGroupOperations operations - :vartype workspace_group: azure.mgmt.apimanagement.operations.WorkspaceGroupOperations - :ivar workspace_group_user: WorkspaceGroupUserOperations operations - :vartype workspace_group_user: azure.mgmt.apimanagement.operations.WorkspaceGroupUserOperations - :ivar workspace_subscription: WorkspaceSubscriptionOperations operations - :vartype workspace_subscription: - azure.mgmt.apimanagement.operations.WorkspaceSubscriptionOperations - :ivar workspace_api_version_set: WorkspaceApiVersionSetOperations operations - :vartype workspace_api_version_set: - azure.mgmt.apimanagement.operations.WorkspaceApiVersionSetOperations - :ivar workspace_api: WorkspaceApiOperations operations - :vartype workspace_api: azure.mgmt.apimanagement.operations.WorkspaceApiOperations - :ivar workspace_api_revision: WorkspaceApiRevisionOperations operations - :vartype workspace_api_revision: - azure.mgmt.apimanagement.operations.WorkspaceApiRevisionOperations - :ivar workspace_api_release: WorkspaceApiReleaseOperations operations - :vartype workspace_api_release: - azure.mgmt.apimanagement.operations.WorkspaceApiReleaseOperations - :ivar workspace_api_operation: WorkspaceApiOperationOperations operations - :vartype workspace_api_operation: - azure.mgmt.apimanagement.operations.WorkspaceApiOperationOperations - :ivar workspace_api_operation_policy: WorkspaceApiOperationPolicyOperations operations - :vartype workspace_api_operation_policy: - azure.mgmt.apimanagement.operations.WorkspaceApiOperationPolicyOperations - :ivar workspace_api_policy: WorkspaceApiPolicyOperations operations - :vartype workspace_api_policy: azure.mgmt.apimanagement.operations.WorkspaceApiPolicyOperations - :ivar workspace_api_schema: WorkspaceApiSchemaOperations operations - :vartype workspace_api_schema: azure.mgmt.apimanagement.operations.WorkspaceApiSchemaOperations - :ivar workspace_product: WorkspaceProductOperations operations - :vartype workspace_product: azure.mgmt.apimanagement.operations.WorkspaceProductOperations - :ivar workspace_product_api_link: WorkspaceProductApiLinkOperations operations - :vartype workspace_product_api_link: - azure.mgmt.apimanagement.operations.WorkspaceProductApiLinkOperations - :ivar workspace_product_group_link: WorkspaceProductGroupLinkOperations operations - :vartype workspace_product_group_link: - azure.mgmt.apimanagement.operations.WorkspaceProductGroupLinkOperations - :ivar workspace_product_policy: WorkspaceProductPolicyOperations operations - :vartype workspace_product_policy: - azure.mgmt.apimanagement.operations.WorkspaceProductPolicyOperations - :ivar workspace_tag: WorkspaceTagOperations operations - :vartype workspace_tag: azure.mgmt.apimanagement.operations.WorkspaceTagOperations - :ivar workspace_tag_api_link: WorkspaceTagApiLinkOperations operations - :vartype workspace_tag_api_link: - azure.mgmt.apimanagement.operations.WorkspaceTagApiLinkOperations - :ivar workspace_tag_operation_link: WorkspaceTagOperationLinkOperations operations - :vartype workspace_tag_operation_link: - azure.mgmt.apimanagement.operations.WorkspaceTagOperationLinkOperations - :ivar workspace_tag_product_link: WorkspaceTagProductLinkOperations operations - :vartype workspace_tag_product_link: - azure.mgmt.apimanagement.operations.WorkspaceTagProductLinkOperations + :ivar api_export: ApiExportOperations operations + :vartype api_export: azure.mgmt.apimanagement.operations.ApiExportOperations + :ivar api_management_skus: ApiManagementSkusOperations operations + :vartype api_management_skus: azure.mgmt.apimanagement.operations.ApiManagementSkusOperations :ivar workspace_api_export: WorkspaceApiExportOperations operations :vartype workspace_api_export: azure.mgmt.apimanagement.operations.WorkspaceApiExportOperations :ivar operation_status: OperationStatusOperations operations :vartype operation_status: azure.mgmt.apimanagement.operations.OperationStatusOperations :ivar operations_results: OperationsResultsOperations operations :vartype operations_results: azure.mgmt.apimanagement.operations.OperationsResultsOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is None. + :param base_url: Service host. Default value is None. :type base_url: str :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-03-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2025-03-01-preview". Default value is "2025-03-01-preview". Note that overriding this default + value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -528,6 +528,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _endpoint = "{endpoint}" _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: @@ -536,6 +537,7 @@ def __init__( self._config = ApiManagementClientConfiguration( credential=credential, subscription_id=subscription_id, + base_url=cast(str, base_url), cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs @@ -559,161 +561,137 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.api_gateway = ApiGatewayOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_management_gateway_skus = ApiManagementGatewaySkusOperations( + self.workspace_api = WorkspaceApiOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_api_release = WorkspaceApiReleaseOperations( self._client, self._config, self._serialize, self._deserialize ) - self.all_policies = AllPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) - self.api = ApiOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_revision = ApiRevisionOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_release = ApiReleaseOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_operation = ApiOperationOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_operation_policy = ApiOperationPolicyOperations( + self.workspace_api_operation = WorkspaceApiOperationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.graph_ql_api_resolver_policy = GraphQLApiResolverPolicyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.api_policy = ApiPolicyOperations(self._client, self._config, self._serialize, self._deserialize) + self.policy = PolicyOperations(self._client, self._config, self._serialize, self._deserialize) + self.product_policy = ProductPolicyOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_policy = WorkspacePolicyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.tag = TagOperations(self._client, self._config, self._serialize, self._deserialize) - self.graph_ql_api_resolver = GraphQLApiResolverOperations( + self.workspace_api_operation_policy = WorkspaceApiOperationPolicyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.graph_ql_api_resolver_policy = GraphQLApiResolverPolicyOperations( + self.workspace_api_policy = WorkspaceApiPolicyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_product = ApiProductOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_policy = ApiPolicyOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_schema = ApiSchemaOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_diagnostic = ApiDiagnosticOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_issue = ApiIssueOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_issue_comment = ApiIssueCommentOperations( + self.workspace_product_policy = WorkspaceProductPolicyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_issue_attachment = ApiIssueAttachmentOperations( + self.tag = TagOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_tag = WorkspaceTagOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_api_schema = WorkspaceApiSchemaOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_tag_description = ApiTagDescriptionOperations( + self.diagnostic = DiagnosticOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_diagnostic = WorkspaceDiagnosticOperations( self._client, self._config, self._serialize, self._deserialize ) - self.operation = OperationOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_wiki = ApiWikiOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_wikis = ApiWikisOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_tool = ApiToolOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_export = ApiExportOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_version_set = ApiVersionSetOperations(self._client, self._config, self._serialize, self._deserialize) - self.authorization_provider = AuthorizationProviderOperations( + self.workspace_api_diagnostic = WorkspaceApiDiagnosticOperations( self._client, self._config, self._serialize, self._deserialize ) - self.authorization = AuthorizationOperations(self._client, self._config, self._serialize, self._deserialize) - self.authorization_login_links = AuthorizationLoginLinksOperations( + self.issue = IssueOperations(self._client, self._config, self._serialize, self._deserialize) + self.product_wiki = ProductWikiOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_api_version_set = WorkspaceApiVersionSetOperations( self._client, self._config, self._serialize, self._deserialize ) - self.authorization_access_policy = AuthorizationAccessPolicyOperations( + self.workspace_backend = WorkspaceBackendOperations( self._client, self._config, self._serialize, self._deserialize ) - self.authorization_server = AuthorizationServerOperations( + self.workspace_certificate = WorkspaceCertificateOperations( self._client, self._config, self._serialize, self._deserialize ) - self.backend = BackendOperations(self._client, self._config, self._serialize, self._deserialize) - self.cache = CacheOperations(self._client, self._config, self._serialize, self._deserialize) - self.certificate = CertificateOperations(self._client, self._config, self._serialize, self._deserialize) - self.client_application = ClientApplicationOperations( + self.workspace_group = WorkspaceGroupOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_logger = WorkspaceLoggerOperations( self._client, self._config, self._serialize, self._deserialize ) - self.client_application_product_link = ClientApplicationProductLinkOperations( + self.workspace_named_value = WorkspaceNamedValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.content_type = ContentTypeOperations(self._client, self._config, self._serialize, self._deserialize) - self.content_item = ContentItemOperations(self._client, self._config, self._serialize, self._deserialize) - self.deleted_services = DeletedServicesOperations( + self.workspace_notification = WorkspaceNotificationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_management_operations = ApiManagementOperationsOperations( + self.workspace_policy_fragment = WorkspacePolicyFragmentOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_management_service_skus = ApiManagementServiceSkusOperations( + self.sign_in_settings = SignInSettingsOperations(self._client, self._config, self._serialize, self._deserialize) + self.sign_up_settings = SignUpSettingsOperations(self._client, self._config, self._serialize, self._deserialize) + self.delegation_settings = DelegationSettingsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_management_service = ApiManagementServiceOperations( + self.workspace_product = WorkspaceProductOperations( self._client, self._config, self._serialize, self._deserialize ) - self.diagnostic = DiagnosticOperations(self._client, self._config, self._serialize, self._deserialize) - self.documentation = DocumentationOperations(self._client, self._config, self._serialize, self._deserialize) - self.email_template = EmailTemplateOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_gateway_config_connection = ApiGatewayConfigConnectionOperations( + self.workspace_product_api_link = WorkspaceProductApiLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_gateway_hostname_binding = ApiGatewayHostnameBindingOperations( + self.workspace_product_group_link = WorkspaceProductGroupLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.gateway = GatewayOperations(self._client, self._config, self._serialize, self._deserialize) - self.gateway_hostname_configuration = GatewayHostnameConfigurationOperations( + self.workspace_global_schema = WorkspaceGlobalSchemaOperations( self._client, self._config, self._serialize, self._deserialize ) - self.gateway_api = GatewayApiOperations(self._client, self._config, self._serialize, self._deserialize) - self.gateway_certificate_authority = GatewayCertificateAuthorityOperations( + self.user_subscription = UserSubscriptionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.group = GroupOperations(self._client, self._config, self._serialize, self._deserialize) - self.group_user = GroupUserOperations(self._client, self._config, self._serialize, self._deserialize) - self.identity_provider = IdentityProviderOperations( + self.workspace_subscription = WorkspaceSubscriptionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.issue = IssueOperations(self._client, self._config, self._serialize, self._deserialize) - self.logger = LoggerOperations(self._client, self._config, self._serialize, self._deserialize) - self.named_value = NamedValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.network_status = NetworkStatusOperations(self._client, self._config, self._serialize, self._deserialize) - self.notification = NotificationOperations(self._client, self._config, self._serialize, self._deserialize) - self.notification_recipient_user = NotificationRecipientUserOperations( + self.workspace_tag_api_link = WorkspaceTagApiLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.notification_recipient_email = NotificationRecipientEmailOperations( + self.workspace_tag_operation_link = WorkspaceTagOperationLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.open_id_connect_provider = OpenIdConnectProviderOperations( + self.workspace_tag_product_link = WorkspaceTagProductLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.outbound_network_dependencies_endpoints = OutboundNetworkDependenciesEndpointsOperations( + self.api_management_operations = ApiManagementOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.policy = PolicyOperations(self._client, self._config, self._serialize, self._deserialize) - self.policy_description = PolicyDescriptionOperations( + self.api_gateway = ApiGatewayOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_management_gateway_skus = ApiManagementGatewaySkusOperations( self._client, self._config, self._serialize, self._deserialize ) - self.policy_fragment = PolicyFragmentOperations(self._client, self._config, self._serialize, self._deserialize) - self.policy_restriction = PolicyRestrictionOperations( + self.api = ApiOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_revision = ApiRevisionOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_product = ApiProductOperations(self._client, self._config, self._serialize, self._deserialize) + self.operation = OperationOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_api_revision = WorkspaceApiRevisionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.policy_restriction_validations = PolicyRestrictionValidationsOperations( + self.api_management_service = ApiManagementServiceOperations( self._client, self._config, self._serialize, self._deserialize ) - self.portal_config = PortalConfigOperations(self._client, self._config, self._serialize, self._deserialize) - self.portal_revision = PortalRevisionOperations(self._client, self._config, self._serialize, self._deserialize) - self.portal_settings = PortalSettingsOperations(self._client, self._config, self._serialize, self._deserialize) - self.sign_in_settings = SignInSettingsOperations(self._client, self._config, self._serialize, self._deserialize) - self.sign_up_settings = SignUpSettingsOperations(self._client, self._config, self._serialize, self._deserialize) - self.delegation_settings = DelegationSettingsOperations( + self.all_policies = AllPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_management_service_skus = ApiManagementServiceSkusOperations( self._client, self._config, self._serialize, self._deserialize ) - self.private_endpoint_connection = PrivateEndpointConnectionOperations( + self.network_status = NetworkStatusOperations(self._client, self._config, self._serialize, self._deserialize) + self.outbound_network_dependencies_endpoints = OutboundNetworkDependenciesEndpointsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.product = ProductOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_api = ProductApiOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_group = ProductGroupOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_subscriptions = ProductSubscriptionsOperations( + self.policy_description = PolicyDescriptionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.product_policy = ProductPolicyOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_wiki = ProductWikiOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_wikis = ProductWikisOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_api_link = ProductApiLinkOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_group_link = ProductGroupLinkOperations( + self.policy_restriction_validations = PolicyRestrictionValidationsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.portal_settings = PortalSettingsOperations(self._client, self._config, self._serialize, self._deserialize) + self.product = ProductOperations(self._client, self._config, self._serialize, self._deserialize) self.quota_by_counter_keys = QuotaByCounterKeysOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -722,126 +700,149 @@ def __init__( ) self.region = RegionOperations(self._client, self._config, self._serialize, self._deserialize) self.reports = ReportsOperations(self._client, self._config, self._serialize, self._deserialize) - self.global_schema = GlobalSchemaOperations(self._client, self._config, self._serialize, self._deserialize) - self.tenant_settings = TenantSettingsOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_management_skus = ApiManagementSkusOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.subscription = SubscriptionOperations(self._client, self._config, self._serialize, self._deserialize) self.tag_resource = TagResourceOperations(self._client, self._config, self._serialize, self._deserialize) - self.tag_api_link = TagApiLinkOperations(self._client, self._config, self._serialize, self._deserialize) - self.tag_operation_link = TagOperationLinkOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.tag_product_link = TagProductLinkOperations(self._client, self._config, self._serialize, self._deserialize) - self.tenant_access = TenantAccessOperations(self._client, self._config, self._serialize, self._deserialize) - self.tenant_access_git = TenantAccessGitOperations( + self.api_release = ApiReleaseOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_operation = ApiOperationOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_operation_policy = ApiOperationPolicyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.tenant_configuration = TenantConfigurationOperations( + self.graph_ql_api_resolver = GraphQLApiResolverOperations( self._client, self._config, self._serialize, self._deserialize ) - self.user = UserOperations(self._client, self._config, self._serialize, self._deserialize) - self.user_group = UserGroupOperations(self._client, self._config, self._serialize, self._deserialize) - self.user_subscription = UserSubscriptionOperations( + self.api_schema = ApiSchemaOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_diagnostic = ApiDiagnosticOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_issue = ApiIssueOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_issue_comment = ApiIssueCommentOperations( self._client, self._config, self._serialize, self._deserialize ) - self.user_identities = UserIdentitiesOperations(self._client, self._config, self._serialize, self._deserialize) - self.user_confirmation_password = UserConfirmationPasswordOperations( + self.api_issue_attachment = ApiIssueAttachmentOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_backend = WorkspaceBackendOperations( + self.api_tag_description = ApiTagDescriptionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_certificate = WorkspaceCertificateOperations( + self.api_wiki = ApiWikiOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_wikis = ApiWikisOperations(self._client, self._config, self._serialize, self._deserialize) + self.product_wikis = ProductWikisOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_tool = ApiToolOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_version_set = ApiVersionSetOperations(self._client, self._config, self._serialize, self._deserialize) + self.authorization_provider = AuthorizationProviderOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_diagnostic = WorkspaceDiagnosticOperations( + self.authorization = AuthorizationOperations(self._client, self._config, self._serialize, self._deserialize) + self.authorization_login_links = AuthorizationLoginLinksOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_diagnostic = WorkspaceApiDiagnosticOperations( + self.authorization_access_policy = AuthorizationAccessPolicyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_management_workspace_links = ApiManagementWorkspaceLinksOperations( + self.authorization_server = AuthorizationServerOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_management_workspace_link = ApiManagementWorkspaceLinkOperations( + self.backend = BackendOperations(self._client, self._config, self._serialize, self._deserialize) + self.cache = CacheOperations(self._client, self._config, self._serialize, self._deserialize) + self.certificate = CertificateOperations(self._client, self._config, self._serialize, self._deserialize) + self.content_type = ContentTypeOperations(self._client, self._config, self._serialize, self._deserialize) + self.content_item = ContentItemOperations(self._client, self._config, self._serialize, self._deserialize) + self.deleted_services = DeletedServicesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_logger = WorkspaceLoggerOperations( + self.documentation = DocumentationOperations(self._client, self._config, self._serialize, self._deserialize) + self.email_template = EmailTemplateOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_gateway_config_connection = ApiGatewayConfigConnectionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace = WorkspaceOperations(self._client, self._config, self._serialize, self._deserialize) - self.workspace_policy = WorkspacePolicyOperations( + self.api_gateway_hostname_binding = ApiGatewayHostnameBindingOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_named_value = WorkspaceNamedValueOperations( + self.gateway = GatewayOperations(self._client, self._config, self._serialize, self._deserialize) + self.gateway_api = GatewayApiOperations(self._client, self._config, self._serialize, self._deserialize) + self.gateway_hostname_configuration = GatewayHostnameConfigurationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_global_schema = WorkspaceGlobalSchemaOperations( + self.gateway_certificate_authority = GatewayCertificateAuthorityOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_notification = WorkspaceNotificationOperations( + self.group = GroupOperations(self._client, self._config, self._serialize, self._deserialize) + self.group_user = GroupUserOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_group_user = WorkspaceGroupUserOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_notification_recipient_user = WorkspaceNotificationRecipientUserOperations( + self.identity_provider = IdentityProviderOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_notification_recipient_email = WorkspaceNotificationRecipientEmailOperations( + self.logger = LoggerOperations(self._client, self._config, self._serialize, self._deserialize) + self.named_value = NamedValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.notification = NotificationOperations(self._client, self._config, self._serialize, self._deserialize) + self.notification_recipient_user = NotificationRecipientUserOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_policy_fragment = WorkspacePolicyFragmentOperations( + self.notification_recipient_email = NotificationRecipientEmailOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_group = WorkspaceGroupOperations(self._client, self._config, self._serialize, self._deserialize) - self.workspace_group_user = WorkspaceGroupUserOperations( + self.workspace_notification_recipient_user = WorkspaceNotificationRecipientUserOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_subscription = WorkspaceSubscriptionOperations( + self.workspace_notification_recipient_email = WorkspaceNotificationRecipientEmailOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_version_set = WorkspaceApiVersionSetOperations( + self.open_id_connect_provider = OpenIdConnectProviderOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api = WorkspaceApiOperations(self._client, self._config, self._serialize, self._deserialize) - self.workspace_api_revision = WorkspaceApiRevisionOperations( + self.policy_fragment = PolicyFragmentOperations(self._client, self._config, self._serialize, self._deserialize) + self.policy_restriction = PolicyRestrictionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_release = WorkspaceApiReleaseOperations( + self.portal_config = PortalConfigOperations(self._client, self._config, self._serialize, self._deserialize) + self.client_application = ClientApplicationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_operation = WorkspaceApiOperationOperations( + self.client_application_product_link = ClientApplicationProductLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_operation_policy = WorkspaceApiOperationPolicyOperations( + self.portal_revision = PortalRevisionOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connection = PrivateEndpointConnectionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_policy = WorkspaceApiPolicyOperations( + self.product_api = ProductApiOperations(self._client, self._config, self._serialize, self._deserialize) + self.product_group = ProductGroupOperations(self._client, self._config, self._serialize, self._deserialize) + self.product_subscriptions = ProductSubscriptionsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_schema = WorkspaceApiSchemaOperations( + self.product_api_link = ProductApiLinkOperations(self._client, self._config, self._serialize, self._deserialize) + self.product_group_link = ProductGroupLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_product = WorkspaceProductOperations( + self.global_schema = GlobalSchemaOperations(self._client, self._config, self._serialize, self._deserialize) + self.tenant_settings = TenantSettingsOperations(self._client, self._config, self._serialize, self._deserialize) + self.subscription = SubscriptionOperations(self._client, self._config, self._serialize, self._deserialize) + self.tag_api_link = TagApiLinkOperations(self._client, self._config, self._serialize, self._deserialize) + self.tag_operation_link = TagOperationLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_product_api_link = WorkspaceProductApiLinkOperations( + self.tag_product_link = TagProductLinkOperations(self._client, self._config, self._serialize, self._deserialize) + self.tenant_access = TenantAccessOperations(self._client, self._config, self._serialize, self._deserialize) + self.tenant_access_git = TenantAccessGitOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_product_group_link = WorkspaceProductGroupLinkOperations( + self.tenant_configuration = TenantConfigurationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_product_policy = WorkspaceProductPolicyOperations( + self.user = UserOperations(self._client, self._config, self._serialize, self._deserialize) + self.user_group = UserGroupOperations(self._client, self._config, self._serialize, self._deserialize) + self.user_identities = UserIdentitiesOperations(self._client, self._config, self._serialize, self._deserialize) + self.user_confirmation_password = UserConfirmationPasswordOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_tag = WorkspaceTagOperations(self._client, self._config, self._serialize, self._deserialize) - self.workspace_tag_api_link = WorkspaceTagApiLinkOperations( + self.api_management_workspace_link = ApiManagementWorkspaceLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_tag_operation_link = WorkspaceTagOperationLinkOperations( + self.api_management_workspace_links = ApiManagementWorkspaceLinksOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_tag_product_link = WorkspaceTagProductLinkOperations( + self.workspace = WorkspaceOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_export = ApiExportOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_management_skus = ApiManagementSkusOperations( self._client, self._config, self._serialize, self._deserialize ) self.workspace_api_export = WorkspaceApiExportOperations( @@ -854,13 +855,13 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) - def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = client._send_request(request) + >>> response = client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -873,7 +874,11 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore def close(self) -> None: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py index 6449d26f9220..5cead5f882b9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -24,15 +24,18 @@ class ApiManagementClientConfiguration: # pylint: disable=too-many-instance-att Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-03-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2025-03-01-preview". Default value is "2025-03-01-preview". Note that overriding this default + value may result in unsupported behavior. :paramtype api_version: str """ @@ -40,6 +43,7 @@ def __init__( self, credential: "TokenCredential", subscription_id: str, + base_url: str = "https://management.azure.com", cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: @@ -52,6 +56,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.base_url = base_url self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_patch.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_patch.py index d3be7c117232..87676c65a8f0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_patch.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_patch.py @@ -1,34 +1,21 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------- +"""Customize generated code here. +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): - pass + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/__init__.py index 0af9b28f6607..8026245c2abc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/__init__.py @@ -1,6 +1,6 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/model_base.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/model_base.py new file mode 100644 index 000000000000..a75a22adbb97 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/model_base.py @@ -0,0 +1,1368 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access, broad-except + +import copy +import calendar +import decimal +import functools +import sys +import logging +import base64 +import re +import typing +import enum +import email.utils +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import xml.etree.ElementTree as ET +from collections.abc import MutableMapping +from typing_extensions import Self +import isodate +from azure.core.exceptions import DeserializationError +from azure.core import CaseInsensitiveEnumMeta +from azure.core.pipeline import PipelineResponse +from azure.core.serialization import _Null +from azure.core.rest import HttpResponse + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] + +TZ_UTC = timezone.utc +_T = typing.TypeVar("_T") +_NONE_TYPE = type(None) + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + if hours or minutes or seconds: + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + else: + time_str = "" + + return "P" + date_str + time_str + + +def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: + encoded = base64.b64encode(o).decode() + if format == "base64url": + return encoded.strip("=").replace("+", "-").replace("/", "_") + return encoded + + +def _serialize_datetime(o, format: typing.Optional[str] = None): + if hasattr(o, "year") and hasattr(o, "hour"): + if format == "rfc7231": + return email.utils.format_datetime(o, usegmt=True) + if format == "unix-timestamp": + return int(calendar.timegm(o.utctimetuple())) + + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._visibility == ["read"] + except AttributeError: + return False + + +class SdkJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): + super().__init__(*args, **kwargs) + self.exclude_readonly = exclude_readonly + self.format = format + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + if self.exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + return {k: v for k, v in o.items() if k not in readonly_props} + return dict(o.items()) + try: + return super(SdkJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, _Null): + return None + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, self.format) + try: + # First try datetime.datetime + return _serialize_datetime(o, self.format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(SdkJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") +_VALID_RFC7231 = re.compile( + r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" + r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" +) + +_ARRAY_ENCODE_MAPPING = { + "pipeDelimited": "|", + "spaceDelimited": " ", + "commaDelimited": ",", + "newlineDelimited": "\n", +} + + +def _deserialize_array_encoded(delimit: str, attr): + if isinstance(attr, str): + if attr == "": + return [] + return attr.split(delimit) + return attr + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj # type: ignore[no-any-return] + + +def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize RFC7231 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + match = _VALID_RFC7231.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + return email.utils.parsedate_to_datetime(attr) + + +def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: + """Deserialize unix timestamp into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + return datetime.fromtimestamp(attr, TZ_UTC) + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) # type: ignore[no-any-return] + + +def _deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def _deserialize_bytes_base64(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return bytes(base64.b64decode(encoded)) + + +def _deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +def _deserialize_decimal(attr): + if isinstance(attr, decimal.Decimal): + return attr + return decimal.Decimal(str(attr)) + + +def _deserialize_int_as_str(attr): + if isinstance(attr, int): + return attr + return int(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: _deserialize_bytes, + bytearray: _deserialize_bytes, + timedelta: _deserialize_duration, + typing.Any: lambda x: x, + decimal.Decimal: _deserialize_decimal, +} + +_DESERIALIZE_MAPPING_WITHFORMAT = { + "rfc3339": _deserialize_datetime, + "rfc7231": _deserialize_datetime_rfc7231, + "unix-timestamp": _deserialize_datetime_unix_timestamp, + "base64": _deserialize_bytes, + "base64url": _deserialize_bytes_base64, +} + + +def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): + if annotation is int and rf and rf._format == "str": + return _deserialize_int_as_str + if annotation is str and rf and rf._format in _ARRAY_ENCODE_MAPPING: + return functools.partial(_deserialize_array_encoded, _ARRAY_ENCODE_MAPPING[rf._format]) + if rf and rf._format: + return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) + return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore + + +def _get_type_alias_type(module_name: str, alias_name: str): + types = { + k: v + for k, v in sys.modules[module_name].__dict__.items() + if isinstance(v, typing._GenericAlias) # type: ignore + } + if alias_name not in types: + return alias_name + return types[alias_name] + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): + def __init__(self, data: dict[str, typing.Any]) -> None: + self._data = data + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + # If this key has been deserialized (for mutable types), we need to handle serialization + if hasattr(self, "_attr_to_rest_field"): + cache_attr = f"_deserialized_{key}" + if hasattr(self, cache_attr): + rf = _get_rest_field(getattr(self, "_attr_to_rest_field"), key) + if rf: + value = self._data.get(key) + if isinstance(value, (dict, list, set)): + # For mutable types, serialize and return + # But also update _data with serialized form and clear flag + # so mutations via this returned value affect _data + serialized = _serialize(value, rf._format) + # If serialized form is same type (no transformation needed), + # return _data directly so mutations work + if isinstance(serialized, type(value)) and serialized == value: + return self._data.get(key) + # Otherwise return serialized copy and clear flag + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass + # Store serialized form back + self._data[key] = serialized + return serialized + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + # Clear any cached deserialized value when setting through dictionary access + cache_attr = f"_deserialized_{key}" + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ + try: + return self[key] + except KeyError: + return default + + @typing.overload + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ + + @typing.overload + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ + return self._data.popitem() + + def clear(self) -> None: + """ + Remove all items from D. + """ + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ + self._data.update(*args, **kwargs) + + @typing.overload + def setdefault(self, key: str, default: None = None) -> None: ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + if isinstance(other, _MyMutableMapping): + return self._data == other._data + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements + if isinstance(o, list): + if format in _ARRAY_ENCODE_MAPPING and all(isinstance(x, str) for x in o): + return _ARRAY_ENCODE_MAPPING[format].join(o) + return [_serialize(x, format) for x in o] + if isinstance(o, dict): + return {k: _serialize(v, format) for k, v in o.items()} + if isinstance(o, set): + return {_serialize(x, format) for x in o} + if isinstance(o, tuple): + return tuple(_serialize(x, format) for x in o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, format) + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, enum.Enum): + return o.value + if isinstance(o, int): + if format == "str": + return str(o) + return o + try: + # First try datetime.datetime + return _serialize_datetime(o, format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field(attr_to_rest_field: dict[str, "_RestField"], rest_name: str) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + if not rf: + return _serialize(value, None) + if rf._is_multipart_file_input: + return value + if rf._is_model: + return _deserialize(rf._type, value) + if isinstance(value, ET.Element): + value = _deserialize(rf._type, value) + return _serialize(value, rf._format) + + +class Model(_MyMutableMapping): + _is_model = True + # label whether current class's _attr_to_rest_field has been calculated + # could not see _attr_to_rest_field directly because subclass inherits it from parent class + _calculated: set[str] = set() + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass = { + rest_field._rest_name: rest_field._default + for rest_field in self._attr_to_rest_field.values() + if rest_field._default is not _UNSET + } + if args: # pylint: disable=too-many-nested-blocks + if isinstance(args[0], ET.Element): + existed_attr_keys = [] + model_meta = getattr(self, "_xml", {}) + + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + # unwrapped array could either use prop items meta/prop meta + if prop_meta.get("itemsName"): + xml_name = prop_meta.get("itemsName") + xml_ns = prop_meta.get("itemNs") + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = args[0].findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) + elif not rf._is_optional: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = [] + continue + + # text element is primitive type + if prop_meta.get("text", False): + if args[0].text is not None: + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) + continue + + # wrapped element could be normal property or array, it should only have one element + item = args[0].find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in args[0]: + if e.tag not in existed_attr_keys: + dict_to_pass[e.tag] = _convert_element(e) + else: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update( + { + self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) + for k, v in kwargs.items() + if v is not None + } + ) + super().__init__(dict_to_pass) + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: + if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: + # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', + # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' + mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order + attr_to_rest_field: dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: dict[str, _RestField] = dict(attr_to_rest_field.items()) + cls._backcompat_attr_to_rest_field: dict[str, _RestField] = { + Model._get_backcompat_attribute_name(cls._attr_to_rest_field, attr): rf + for attr, rf in cls._attr_to_rest_field.items() + } + cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") + + return super().__new__(cls) + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore + + @classmethod + def _get_backcompat_attribute_name(cls, attr_to_rest_field: dict[str, "_RestField"], attr_name: str) -> str: + rest_field_obj = attr_to_rest_field.get(attr_name) # pylint: disable=protected-access + if rest_field_obj is None: + return attr_name + original_tsp_name = getattr(rest_field_obj, "_original_tsp_name", None) # pylint: disable=protected-access + if original_tsp_name: + return original_tsp_name + return attr_name + + @classmethod + def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: + return v + return None + + @classmethod + def _deserialize(cls, data, exist_discriminators): + if not hasattr(cls, "__mapping__"): + return cls(data) + discriminator = cls._get_discriminator(exist_discriminators) + if discriminator is None: + return cls(data) + exist_discriminators.append(discriminator._rest_name) + if isinstance(data, ET.Element): + model_meta = getattr(cls, "_xml", {}) + prop_meta = getattr(discriminator, "_xml", {}) + xml_name = prop_meta.get("name", discriminator._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + if data.get(xml_name) is not None: + discriminator_value = data.get(xml_name) + else: + discriminator_value = data.find(xml_name).text # pyright: ignore + else: + discriminator_value = data.get(discriminator._rest_name) + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + return mapped_cls._deserialize(data, exist_discriminators) + + def as_dict(self, *, exclude_readonly: bool = False) -> dict[str, typing.Any]: + """Return a dict that can be turned into json using json.dump. + + :keyword bool exclude_readonly: Whether to remove the readonly properties. + :returns: A dict JSON compatible object + :rtype: dict + """ + + result = {} + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] + for k, v in self.items(): + if exclude_readonly and k in readonly_props: # pyright: ignore + continue + is_multipart_file_input = False + try: + is_multipart_file_input = next( + rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k + )._is_multipart_file_input + except StopIteration: + pass + result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) + return result + + @staticmethod + def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: + if v is None or isinstance(v, _Null): + return None + if isinstance(v, (list, tuple, set)): + return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) + if isinstance(v, dict): + return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} + return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v + + +def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + +def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + +def _deserialize_with_union(deserializers, obj): + for deserializer in deserializers: + try: + return _deserialize(deserializer, obj) + except DeserializationError: + pass + raise DeserializationError() + + +def _deserialize_dict( + value_deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj: dict[typing.Any, typing.Any], +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = {child.tag: child for child in obj} + return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} + + +def _deserialize_multiple_sequence( + entry_deserializers: list[typing.Optional[typing.Callable]], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) + + +def _is_array_encoded_deserializer(deserializer: functools.partial) -> bool: + return ( + isinstance(deserializer, functools.partial) + and isinstance(deserializer.args[0], functools.partial) + and deserializer.args[0].func == _deserialize_array_encoded # pylint: disable=comparison-with-callable + ) + + +def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = list(obj) + + # encoded string may be deserialized to sequence + if isinstance(obj, str) and isinstance(deserializer, functools.partial): + # for list[str] + if _is_array_encoded_deserializer(deserializer): + return deserializer(obj) + + # for list[Union[...]] + if isinstance(deserializer.args[0], list): + for sub_deserializer in deserializer.args[0]: + if _is_array_encoded_deserializer(sub_deserializer): + return sub_deserializer(obj) + + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + +def _sorted_annotations(types: list[typing.Any]) -> list[typing.Any]: + return sorted( + types, + key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), + ) + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-statements, too-many-branches + annotation: typing.Any, + module: typing.Optional[str], + rf: typing.Optional["_RestField"] = None, +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation: + return None + + # is it a type alias? + if isinstance(annotation, str): + if module is not None: + annotation = _get_type_alias_type(module, annotation) + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) # type: ignore + + try: + if module and _is_model(annotation): + if rf: + rf._is_model = True + + return functools.partial(_deserialize_model, annotation) # pyright: ignore + except Exception: + pass + + # is it a literal? + try: + if annotation.__origin__ is typing.Literal: # pyright: ignore + return None + except AttributeError: + pass + + # is it optional? + try: + if any(a is _NONE_TYPE for a in annotation.__args__): # pyright: ignore + if rf: + rf._is_optional = True + if len(annotation.__args__) <= 2: # pyright: ignore + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a is not _NONE_TYPE), module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + # the type is Optional[Union[...]], we need to remove the None type from the Union + annotation_copy = copy.copy(annotation) + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a is not _NONE_TYPE] # pyright: ignore + return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) + except AttributeError: + pass + + # is it union? + if getattr(annotation, "__origin__", None) is typing.Union: + # initial ordering is we make `string` the last deserialization option, because it is often them most generic + deserializers = [ + _get_deserialize_callable_from_annotation(arg, module, rf) + for arg in _sorted_annotations(annotation.__args__) # pyright: ignore + ] + + return functools.partial(_deserialize_with_union, deserializers) + + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() == "dict": + value_deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[1], module, rf # pyright: ignore + ) + + return functools.partial( + _deserialize_dict, + value_deserializer, + module, + ) + except (AttributeError, IndexError): + pass + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() in ["list", "set", "tuple", "sequence"]: + if len(annotation.__args__) > 1: # pyright: ignore + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) + for dt in annotation.__args__ # pyright: ignore + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) + deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[0], module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_sequence, deserializer, module) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + deserializer, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(deserializer, obj) + except Exception: + pass + return obj + + if get_deserializer(annotation, rf): + return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) + + return functools.partial(_deserialize_default, annotation) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], + value: typing.Any, +): # pylint: disable=too-many-return-statements + try: + if value is None or isinstance(value, _Null): + return None + if isinstance(value, ET.Element): + if deserializer is str: + return value.text or "" + if deserializer is int: + return int(value.text) if value.text else None + if deserializer is float: + return float(value.text) if value.text else None + if deserializer is bool: + return value.text == "true" if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING.values(): + return deserializer(value.text) if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING_WITHFORMAT.values(): + return deserializer(value.text) if value.text else None + if deserializer is None: + return value + if deserializer in [int, float, bool]: + return deserializer(value) + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value.text if isinstance(value, ET.Element) else value) + except ValueError: + # for unknown value, return raw value + return value.text if isinstance(value, ET.Element) else value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value, []) + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + if rf is None and format: + rf = _RestField(format=format) + if not isinstance(deserializer, functools.partial): + deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) + return _deserialize_with_callable(deserializer, value) + + +def _failsafe_deserialize( + deserializer: typing.Any, + response: HttpResponse, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, response.json(), module, rf, format) + except Exception: # pylint: disable=broad-except + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + response: HttpResponse, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, response.text()) + except Exception: # pylint: disable=broad-except + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +# pylint: disable=too-many-instance-attributes +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, + original_tsp_name: typing.Optional[str] = None, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._visibility = visibility + self._is_model = False + self._is_optional = False + self._default = default + self._format = format + self._is_multipart_file_input = is_multipart_file_input + self._xml = xml if xml is not None else {} + self._original_tsp_name = original_tsp_name + + @property + def _class_type(self) -> typing.Any: + result = getattr(self._type, "args", [None])[0] + # type may be wrapped by nested functools.partial so we need to check for that + if isinstance(result, functools.partial): + return getattr(result, "args", [None])[0] + return result + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + # Use _data.get() directly to avoid triggering __getitem__ which clears the cache + item = obj._data.get(self._rest_name) + if item is None: + return item + if self._is_model: + return item + + # For mutable types, we want mutations to directly affect _data + # Check if we've already deserialized this value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + # Return the value from _data directly (it's been deserialized in place) + return obj._data.get(self._rest_name) + + deserialized = _deserialize(self._type, _serialize(item, self._format), rf=self) + + # For mutable types, store the deserialized value back in _data + # so mutations directly affect _data + if isinstance(deserialized, (dict, list, set)): + obj._data[self._rest_name] = deserialized + object.__setattr__(obj, cache_attr, True) # Mark as deserialized + return deserialized + + return deserialized + + def __set__(self, obj: Model, value) -> None: + # Clear the cached deserialized object when setting a new value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + object.__delattr__(obj, cache_attr) + + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model: + if not _is_model(value): + value = _deserialize(self._type, value) + obj.__setitem__(self._rest_name, value) + return + obj.__setitem__(self._rest_name, _serialize(value, self._format)) + + def _get_deserialize_callable_from_annotation( + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, + original_tsp_name: typing.Optional[str] = None, +) -> typing.Any: + return _RestField( + name=name, + type=type, + visibility=visibility, + default=default, + format=format, + is_multipart_file_input=is_multipart_file_input, + xml=xml, + original_tsp_name=original_tsp_name, + ) + + +def rest_discriminator( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + xml: typing.Optional[dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) + + +def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: + """Serialize a model to XML. + + :param Model model: The model to serialize. + :param bool exclude_readonly: Whether to exclude readonly properties. + :returns: The XML representation of the model. + :rtype: str + """ + return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore + + +def _get_element( + o: typing.Any, + exclude_readonly: bool = False, + parent_meta: typing.Optional[dict[str, typing.Any]] = None, + wrapped_element: typing.Optional[ET.Element] = None, +) -> typing.Union[ET.Element, list[ET.Element]]: + if _is_model(o): + model_meta = getattr(o, "_xml", {}) + + # if prop is a model, then use the prop element directly, else generate a wrapper of model + if wrapped_element is None: + wrapped_element = _create_xml_element( + model_meta.get("name", o.__class__.__name__), + model_meta.get("prefix"), + model_meta.get("ns"), + ) + + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + + for k, v in o.items(): + # do not serialize readonly properties + if exclude_readonly and k in readonly_props: + continue + + prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) + if prop_rest_field: + prop_meta = getattr(prop_rest_field, "_xml").copy() + # use the wire name as xml name if no specific name is set + if prop_meta.get("name") is None: + prop_meta["name"] = k + else: + # additional properties will not have rest field, use the wire name as xml name + prop_meta = {"name": k} + + # if no ns for prop, use model's + if prop_meta.get("ns") is None and model_meta.get("ns"): + prop_meta["ns"] = model_meta.get("ns") + prop_meta["prefix"] = model_meta.get("prefix") + + if prop_meta.get("unwrapped", False): + # unwrapped could only set on array + wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) + elif prop_meta.get("text", False): + # text could only set on primitive type + wrapped_element.text = _get_primitive_type_value(v) + elif prop_meta.get("attribute", False): + xml_name = prop_meta.get("name", k) + if prop_meta.get("ns"): + ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore + xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore + # attribute should be primitive type + wrapped_element.set(xml_name, _get_primitive_type_value(v)) + else: + # other wrapped prop element + wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) + return wrapped_element + if isinstance(o, list): + return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore + if isinstance(o, dict): + result = [] + for k, v in o.items(): + result.append( + _get_wrapped_element( + v, + exclude_readonly, + { + "name": k, + "ns": parent_meta.get("ns") if parent_meta else None, + "prefix": parent_meta.get("prefix") if parent_meta else None, + }, + ) + ) + return result + + # primitive case need to create element based on parent_meta + if parent_meta: + return _get_wrapped_element( + o, + exclude_readonly, + { + "name": parent_meta.get("itemsName", parent_meta.get("name")), + "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), + "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), + }, + ) + + raise ValueError("Could not serialize value into xml: " + o) + + +def _get_wrapped_element( + v: typing.Any, + exclude_readonly: bool, + meta: typing.Optional[dict[str, typing.Any]], +) -> ET.Element: + wrapped_element = _create_xml_element( + meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None + ) + if isinstance(v, (dict, list)): + wrapped_element.extend(_get_element(v, exclude_readonly, meta)) + elif _is_model(v): + _get_element(v, exclude_readonly, meta, wrapped_element) + else: + wrapped_element.text = _get_primitive_type_value(v) + return wrapped_element # type: ignore[no-any-return] + + +def _get_primitive_type_value(v) -> str: + if v is True: + return "true" + if v is False: + return "false" + if isinstance(v, _Null): + return "" + return str(v) + + +def _create_xml_element( + tag: typing.Any, prefix: typing.Optional[str] = None, ns: typing.Optional[str] = None +) -> ET.Element: + if prefix and ns: + ET.register_namespace(prefix, ns) + if ns: + return ET.Element("{" + ns + "}" + tag) + return ET.Element(tag) + + +def _deserialize_xml( + deserializer: typing.Any, + value: str, +) -> typing.Any: + element = ET.fromstring(value) # nosec + return _deserialize(deserializer, element) + + +def _convert_element(e: ET.Element): + # dict case + if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: + dict_result: dict[str, typing.Any] = {} + for child in e: + if dict_result.get(child.tag) is not None: + if isinstance(dict_result[child.tag], list): + dict_result[child.tag].append(_convert_element(child)) + else: + dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] + else: + dict_result[child.tag] = _convert_element(child) + dict_result.update(e.attrib) + return dict_result + # array case + if len(e) > 0: + array_result: list[typing.Any] = [] + for child in e: + array_result.append(_convert_element(child)) + return array_result + # primitive case + return e.text diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/serialization.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/serialization.py index 6da830e0cf4a..81ec1de5922b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/serialization.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/serialization.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/utils.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/utils.py index 39b612f39a9b..927adb7c8ae2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/utils.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_utils/utils.py @@ -1,12 +1,14 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from abc import ABC -from typing import Generic, TYPE_CHECKING, TypeVar +from typing import Generic, Optional, TYPE_CHECKING, TypeVar + +from azure.core import MatchConditions if TYPE_CHECKING: from .serialization import Deserializer, Serializer @@ -23,3 +25,33 @@ class ClientMixinABC(ABC, Generic[TClient, TConfig]): _config: TConfig _serialize: "Serializer" _deserialize: "Deserializer" + + +def quote_etag(etag: Optional[str]) -> Optional[str]: + if not etag or etag == "*": + return etag + if etag.startswith("W/"): + return etag + if etag.startswith('"') and etag.endswith('"'): + return etag + if etag.startswith("'") and etag.endswith("'"): + return etag + return '"' + etag + '"' + + +def prep_if_match(etag: Optional[str], match_condition: Optional[MatchConditions]) -> Optional[str]: + if match_condition == MatchConditions.IfNotModified: + if_match = quote_etag(etag) if etag else None + return if_match + if match_condition == MatchConditions.IfPresent: + return "*" + return None + + +def prep_if_none_match(etag: Optional[str], match_condition: Optional[MatchConditions]) -> Optional[str]: + if match_condition == MatchConditions.IfModified: + if_none_match = quote_etag(etag) if etag else None + return if_none_match + if match_condition == MatchConditions.IfMissing: + return "*" + return None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py index 68f2cec05508..720813f2177b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py @@ -2,9 +2,8 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- - VERSION = "5.1.0b1" diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/__init__.py index 919785baa0ce..5dd77e4afbab 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._api_management_client import ApiManagementClient # type: ignore +from ._client import ApiManagementClient # type: ignore try: from ._patch import __all__ as _patch_all diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_client.py similarity index 98% rename from sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py rename to sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_client.py index 4405c8a41df1..97d657be1ca9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_client.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -17,7 +17,6 @@ from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy from azure.mgmt.core.tools import get_arm_endpoints -from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import ApiManagementClientConfiguration from .operations import ( @@ -170,19 +169,163 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes - """ApiManagement Client. + """Resource provider operation status. + :ivar workspace_api: WorkspaceApiOperations operations + :vartype workspace_api: azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations + :ivar workspace_api_release: WorkspaceApiReleaseOperations operations + :vartype workspace_api_release: + azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations + :ivar workspace_api_operation: WorkspaceApiOperationOperations operations + :vartype workspace_api_operation: + azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations + :ivar graph_ql_api_resolver_policy: GraphQLApiResolverPolicyOperations operations + :vartype graph_ql_api_resolver_policy: + azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations + :ivar api_policy: ApiPolicyOperations operations + :vartype api_policy: azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations + :ivar policy: PolicyOperations operations + :vartype policy: azure.mgmt.apimanagement.aio.operations.PolicyOperations + :ivar product_policy: ProductPolicyOperations operations + :vartype product_policy: azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations + :ivar workspace_policy: WorkspacePolicyOperations operations + :vartype workspace_policy: azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations + :ivar workspace_api_operation_policy: WorkspaceApiOperationPolicyOperations operations + :vartype workspace_api_operation_policy: + azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations + :ivar workspace_api_policy: WorkspaceApiPolicyOperations operations + :vartype workspace_api_policy: + azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations + :ivar workspace_product_policy: WorkspaceProductPolicyOperations operations + :vartype workspace_product_policy: + azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations + :ivar tag: TagOperations operations + :vartype tag: azure.mgmt.apimanagement.aio.operations.TagOperations + :ivar workspace_tag: WorkspaceTagOperations operations + :vartype workspace_tag: azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations + :ivar workspace_api_schema: WorkspaceApiSchemaOperations operations + :vartype workspace_api_schema: + azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations + :ivar diagnostic: DiagnosticOperations operations + :vartype diagnostic: azure.mgmt.apimanagement.aio.operations.DiagnosticOperations + :ivar workspace_diagnostic: WorkspaceDiagnosticOperations operations + :vartype workspace_diagnostic: + azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations + :ivar workspace_api_diagnostic: WorkspaceApiDiagnosticOperations operations + :vartype workspace_api_diagnostic: + azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations + :ivar issue: IssueOperations operations + :vartype issue: azure.mgmt.apimanagement.aio.operations.IssueOperations + :ivar product_wiki: ProductWikiOperations operations + :vartype product_wiki: azure.mgmt.apimanagement.aio.operations.ProductWikiOperations + :ivar workspace_api_version_set: WorkspaceApiVersionSetOperations operations + :vartype workspace_api_version_set: + azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations + :ivar workspace_backend: WorkspaceBackendOperations operations + :vartype workspace_backend: azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations + :ivar workspace_certificate: WorkspaceCertificateOperations operations + :vartype workspace_certificate: + azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations + :ivar workspace_group: WorkspaceGroupOperations operations + :vartype workspace_group: azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations + :ivar workspace_logger: WorkspaceLoggerOperations operations + :vartype workspace_logger: azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations + :ivar workspace_named_value: WorkspaceNamedValueOperations operations + :vartype workspace_named_value: + azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations + :ivar workspace_notification: WorkspaceNotificationOperations operations + :vartype workspace_notification: + azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationOperations + :ivar workspace_policy_fragment: WorkspacePolicyFragmentOperations operations + :vartype workspace_policy_fragment: + azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations + :ivar sign_in_settings: SignInSettingsOperations operations + :vartype sign_in_settings: azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations + :ivar sign_up_settings: SignUpSettingsOperations operations + :vartype sign_up_settings: azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations + :ivar delegation_settings: DelegationSettingsOperations operations + :vartype delegation_settings: + azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations + :ivar workspace_product: WorkspaceProductOperations operations + :vartype workspace_product: azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations + :ivar workspace_product_api_link: WorkspaceProductApiLinkOperations operations + :vartype workspace_product_api_link: + azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations + :ivar workspace_product_group_link: WorkspaceProductGroupLinkOperations operations + :vartype workspace_product_group_link: + azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations + :ivar workspace_global_schema: WorkspaceGlobalSchemaOperations operations + :vartype workspace_global_schema: + azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations + :ivar user_subscription: UserSubscriptionOperations operations + :vartype user_subscription: azure.mgmt.apimanagement.aio.operations.UserSubscriptionOperations + :ivar workspace_subscription: WorkspaceSubscriptionOperations operations + :vartype workspace_subscription: + azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations + :ivar workspace_tag_api_link: WorkspaceTagApiLinkOperations operations + :vartype workspace_tag_api_link: + azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations + :ivar workspace_tag_operation_link: WorkspaceTagOperationLinkOperations operations + :vartype workspace_tag_operation_link: + azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations + :ivar workspace_tag_product_link: WorkspaceTagProductLinkOperations operations + :vartype workspace_tag_product_link: + azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations + :ivar api_management_operations: ApiManagementOperationsOperations operations + :vartype api_management_operations: + azure.mgmt.apimanagement.aio.operations.ApiManagementOperationsOperations :ivar api_gateway: ApiGatewayOperations operations :vartype api_gateway: azure.mgmt.apimanagement.aio.operations.ApiGatewayOperations :ivar api_management_gateway_skus: ApiManagementGatewaySkusOperations operations :vartype api_management_gateway_skus: azure.mgmt.apimanagement.aio.operations.ApiManagementGatewaySkusOperations - :ivar all_policies: AllPoliciesOperations operations - :vartype all_policies: azure.mgmt.apimanagement.aio.operations.AllPoliciesOperations :ivar api: ApiOperations operations :vartype api: azure.mgmt.apimanagement.aio.operations.ApiOperations :ivar api_revision: ApiRevisionOperations operations :vartype api_revision: azure.mgmt.apimanagement.aio.operations.ApiRevisionOperations + :ivar api_product: ApiProductOperations operations + :vartype api_product: azure.mgmt.apimanagement.aio.operations.ApiProductOperations + :ivar operation: OperationOperations operations + :vartype operation: azure.mgmt.apimanagement.aio.operations.OperationOperations + :ivar workspace_api_revision: WorkspaceApiRevisionOperations operations + :vartype workspace_api_revision: + azure.mgmt.apimanagement.aio.operations.WorkspaceApiRevisionOperations + :ivar api_management_service: ApiManagementServiceOperations operations + :vartype api_management_service: + azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations + :ivar all_policies: AllPoliciesOperations operations + :vartype all_policies: azure.mgmt.apimanagement.aio.operations.AllPoliciesOperations + :ivar api_management_service_skus: ApiManagementServiceSkusOperations operations + :vartype api_management_service_skus: + azure.mgmt.apimanagement.aio.operations.ApiManagementServiceSkusOperations + :ivar network_status: NetworkStatusOperations operations + :vartype network_status: azure.mgmt.apimanagement.aio.operations.NetworkStatusOperations + :ivar outbound_network_dependencies_endpoints: OutboundNetworkDependenciesEndpointsOperations + operations + :vartype outbound_network_dependencies_endpoints: + azure.mgmt.apimanagement.aio.operations.OutboundNetworkDependenciesEndpointsOperations + :ivar policy_description: PolicyDescriptionOperations operations + :vartype policy_description: + azure.mgmt.apimanagement.aio.operations.PolicyDescriptionOperations + :ivar policy_restriction_validations: PolicyRestrictionValidationsOperations operations + :vartype policy_restriction_validations: + azure.mgmt.apimanagement.aio.operations.PolicyRestrictionValidationsOperations + :ivar portal_settings: PortalSettingsOperations operations + :vartype portal_settings: azure.mgmt.apimanagement.aio.operations.PortalSettingsOperations + :ivar product: ProductOperations operations + :vartype product: azure.mgmt.apimanagement.aio.operations.ProductOperations + :ivar quota_by_counter_keys: QuotaByCounterKeysOperations operations + :vartype quota_by_counter_keys: + azure.mgmt.apimanagement.aio.operations.QuotaByCounterKeysOperations + :ivar quota_by_period_keys: QuotaByPeriodKeysOperations operations + :vartype quota_by_period_keys: + azure.mgmt.apimanagement.aio.operations.QuotaByPeriodKeysOperations + :ivar region: RegionOperations operations + :vartype region: azure.mgmt.apimanagement.aio.operations.RegionOperations + :ivar reports: ReportsOperations operations + :vartype reports: azure.mgmt.apimanagement.aio.operations.ReportsOperations + :ivar tag_resource: TagResourceOperations operations + :vartype tag_resource: azure.mgmt.apimanagement.aio.operations.TagResourceOperations :ivar api_release: ApiReleaseOperations operations :vartype api_release: azure.mgmt.apimanagement.aio.operations.ApiReleaseOperations :ivar api_operation: ApiOperationOperations operations @@ -190,18 +333,9 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :ivar api_operation_policy: ApiOperationPolicyOperations operations :vartype api_operation_policy: azure.mgmt.apimanagement.aio.operations.ApiOperationPolicyOperations - :ivar tag: TagOperations operations - :vartype tag: azure.mgmt.apimanagement.aio.operations.TagOperations :ivar graph_ql_api_resolver: GraphQLApiResolverOperations operations :vartype graph_ql_api_resolver: azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverOperations - :ivar graph_ql_api_resolver_policy: GraphQLApiResolverPolicyOperations operations - :vartype graph_ql_api_resolver_policy: - azure.mgmt.apimanagement.aio.operations.GraphQLApiResolverPolicyOperations - :ivar api_product: ApiProductOperations operations - :vartype api_product: azure.mgmt.apimanagement.aio.operations.ApiProductOperations - :ivar api_policy: ApiPolicyOperations operations - :vartype api_policy: azure.mgmt.apimanagement.aio.operations.ApiPolicyOperations :ivar api_schema: ApiSchemaOperations operations :vartype api_schema: azure.mgmt.apimanagement.aio.operations.ApiSchemaOperations :ivar api_diagnostic: ApiDiagnosticOperations operations @@ -216,16 +350,14 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :ivar api_tag_description: ApiTagDescriptionOperations operations :vartype api_tag_description: azure.mgmt.apimanagement.aio.operations.ApiTagDescriptionOperations - :ivar operation: OperationOperations operations - :vartype operation: azure.mgmt.apimanagement.aio.operations.OperationOperations :ivar api_wiki: ApiWikiOperations operations :vartype api_wiki: azure.mgmt.apimanagement.aio.operations.ApiWikiOperations :ivar api_wikis: ApiWikisOperations operations :vartype api_wikis: azure.mgmt.apimanagement.aio.operations.ApiWikisOperations + :ivar product_wikis: ProductWikisOperations operations + :vartype product_wikis: azure.mgmt.apimanagement.aio.operations.ProductWikisOperations :ivar api_tool: ApiToolOperations operations :vartype api_tool: azure.mgmt.apimanagement.aio.operations.ApiToolOperations - :ivar api_export: ApiExportOperations operations - :vartype api_export: azure.mgmt.apimanagement.aio.operations.ApiExportOperations :ivar api_version_set: ApiVersionSetOperations operations :vartype api_version_set: azure.mgmt.apimanagement.aio.operations.ApiVersionSetOperations :ivar authorization_provider: AuthorizationProviderOperations operations @@ -248,29 +380,12 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :vartype cache: azure.mgmt.apimanagement.aio.operations.CacheOperations :ivar certificate: CertificateOperations operations :vartype certificate: azure.mgmt.apimanagement.aio.operations.CertificateOperations - :ivar client_application: ClientApplicationOperations operations - :vartype client_application: - azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations - :ivar client_application_product_link: ClientApplicationProductLinkOperations operations - :vartype client_application_product_link: - azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations :ivar content_type: ContentTypeOperations operations :vartype content_type: azure.mgmt.apimanagement.aio.operations.ContentTypeOperations :ivar content_item: ContentItemOperations operations :vartype content_item: azure.mgmt.apimanagement.aio.operations.ContentItemOperations :ivar deleted_services: DeletedServicesOperations operations :vartype deleted_services: azure.mgmt.apimanagement.aio.operations.DeletedServicesOperations - :ivar api_management_operations: ApiManagementOperationsOperations operations - :vartype api_management_operations: - azure.mgmt.apimanagement.aio.operations.ApiManagementOperationsOperations - :ivar api_management_service_skus: ApiManagementServiceSkusOperations operations - :vartype api_management_service_skus: - azure.mgmt.apimanagement.aio.operations.ApiManagementServiceSkusOperations - :ivar api_management_service: ApiManagementServiceOperations operations - :vartype api_management_service: - azure.mgmt.apimanagement.aio.operations.ApiManagementServiceOperations - :ivar diagnostic: DiagnosticOperations operations - :vartype diagnostic: azure.mgmt.apimanagement.aio.operations.DiagnosticOperations :ivar documentation: DocumentationOperations operations :vartype documentation: azure.mgmt.apimanagement.aio.operations.DocumentationOperations :ivar email_template: EmailTemplateOperations operations @@ -283,11 +398,11 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab azure.mgmt.apimanagement.aio.operations.ApiGatewayHostnameBindingOperations :ivar gateway: GatewayOperations operations :vartype gateway: azure.mgmt.apimanagement.aio.operations.GatewayOperations + :ivar gateway_api: GatewayApiOperations operations + :vartype gateway_api: azure.mgmt.apimanagement.aio.operations.GatewayApiOperations :ivar gateway_hostname_configuration: GatewayHostnameConfigurationOperations operations :vartype gateway_hostname_configuration: azure.mgmt.apimanagement.aio.operations.GatewayHostnameConfigurationOperations - :ivar gateway_api: GatewayApiOperations operations - :vartype gateway_api: azure.mgmt.apimanagement.aio.operations.GatewayApiOperations :ivar gateway_certificate_authority: GatewayCertificateAuthorityOperations operations :vartype gateway_certificate_authority: azure.mgmt.apimanagement.aio.operations.GatewayCertificateAuthorityOperations @@ -295,16 +410,15 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :vartype group: azure.mgmt.apimanagement.aio.operations.GroupOperations :ivar group_user: GroupUserOperations operations :vartype group_user: azure.mgmt.apimanagement.aio.operations.GroupUserOperations + :ivar workspace_group_user: WorkspaceGroupUserOperations operations + :vartype workspace_group_user: + azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations :ivar identity_provider: IdentityProviderOperations operations :vartype identity_provider: azure.mgmt.apimanagement.aio.operations.IdentityProviderOperations - :ivar issue: IssueOperations operations - :vartype issue: azure.mgmt.apimanagement.aio.operations.IssueOperations :ivar logger: LoggerOperations operations :vartype logger: azure.mgmt.apimanagement.aio.operations.LoggerOperations :ivar named_value: NamedValueOperations operations :vartype named_value: azure.mgmt.apimanagement.aio.operations.NamedValueOperations - :ivar network_status: NetworkStatusOperations operations - :vartype network_status: azure.mgmt.apimanagement.aio.operations.NetworkStatusOperations :ivar notification: NotificationOperations operations :vartype notification: azure.mgmt.apimanagement.aio.operations.NotificationOperations :ivar notification_recipient_user: NotificationRecipientUserOperations operations @@ -313,44 +427,35 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :ivar notification_recipient_email: NotificationRecipientEmailOperations operations :vartype notification_recipient_email: azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations + :ivar workspace_notification_recipient_user: WorkspaceNotificationRecipientUserOperations + operations + :vartype workspace_notification_recipient_user: + azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations + :ivar workspace_notification_recipient_email: WorkspaceNotificationRecipientEmailOperations + operations + :vartype workspace_notification_recipient_email: + azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations :ivar open_id_connect_provider: OpenIdConnectProviderOperations operations :vartype open_id_connect_provider: azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations - :ivar outbound_network_dependencies_endpoints: OutboundNetworkDependenciesEndpointsOperations - operations - :vartype outbound_network_dependencies_endpoints: - azure.mgmt.apimanagement.aio.operations.OutboundNetworkDependenciesEndpointsOperations - :ivar policy: PolicyOperations operations - :vartype policy: azure.mgmt.apimanagement.aio.operations.PolicyOperations - :ivar policy_description: PolicyDescriptionOperations operations - :vartype policy_description: - azure.mgmt.apimanagement.aio.operations.PolicyDescriptionOperations :ivar policy_fragment: PolicyFragmentOperations operations :vartype policy_fragment: azure.mgmt.apimanagement.aio.operations.PolicyFragmentOperations :ivar policy_restriction: PolicyRestrictionOperations operations :vartype policy_restriction: azure.mgmt.apimanagement.aio.operations.PolicyRestrictionOperations - :ivar policy_restriction_validations: PolicyRestrictionValidationsOperations operations - :vartype policy_restriction_validations: - azure.mgmt.apimanagement.aio.operations.PolicyRestrictionValidationsOperations :ivar portal_config: PortalConfigOperations operations :vartype portal_config: azure.mgmt.apimanagement.aio.operations.PortalConfigOperations + :ivar client_application: ClientApplicationOperations operations + :vartype client_application: + azure.mgmt.apimanagement.aio.operations.ClientApplicationOperations + :ivar client_application_product_link: ClientApplicationProductLinkOperations operations + :vartype client_application_product_link: + azure.mgmt.apimanagement.aio.operations.ClientApplicationProductLinkOperations :ivar portal_revision: PortalRevisionOperations operations :vartype portal_revision: azure.mgmt.apimanagement.aio.operations.PortalRevisionOperations - :ivar portal_settings: PortalSettingsOperations operations - :vartype portal_settings: azure.mgmt.apimanagement.aio.operations.PortalSettingsOperations - :ivar sign_in_settings: SignInSettingsOperations operations - :vartype sign_in_settings: azure.mgmt.apimanagement.aio.operations.SignInSettingsOperations - :ivar sign_up_settings: SignUpSettingsOperations operations - :vartype sign_up_settings: azure.mgmt.apimanagement.aio.operations.SignUpSettingsOperations - :ivar delegation_settings: DelegationSettingsOperations operations - :vartype delegation_settings: - azure.mgmt.apimanagement.aio.operations.DelegationSettingsOperations :ivar private_endpoint_connection: PrivateEndpointConnectionOperations operations :vartype private_endpoint_connection: azure.mgmt.apimanagement.aio.operations.PrivateEndpointConnectionOperations - :ivar product: ProductOperations operations - :vartype product: azure.mgmt.apimanagement.aio.operations.ProductOperations :ivar product_api: ProductApiOperations operations :vartype product_api: azure.mgmt.apimanagement.aio.operations.ProductApiOperations :ivar product_group: ProductGroupOperations operations @@ -358,37 +463,16 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :ivar product_subscriptions: ProductSubscriptionsOperations operations :vartype product_subscriptions: azure.mgmt.apimanagement.aio.operations.ProductSubscriptionsOperations - :ivar product_policy: ProductPolicyOperations operations - :vartype product_policy: azure.mgmt.apimanagement.aio.operations.ProductPolicyOperations - :ivar product_wiki: ProductWikiOperations operations - :vartype product_wiki: azure.mgmt.apimanagement.aio.operations.ProductWikiOperations - :ivar product_wikis: ProductWikisOperations operations - :vartype product_wikis: azure.mgmt.apimanagement.aio.operations.ProductWikisOperations :ivar product_api_link: ProductApiLinkOperations operations :vartype product_api_link: azure.mgmt.apimanagement.aio.operations.ProductApiLinkOperations :ivar product_group_link: ProductGroupLinkOperations operations :vartype product_group_link: azure.mgmt.apimanagement.aio.operations.ProductGroupLinkOperations - :ivar quota_by_counter_keys: QuotaByCounterKeysOperations operations - :vartype quota_by_counter_keys: - azure.mgmt.apimanagement.aio.operations.QuotaByCounterKeysOperations - :ivar quota_by_period_keys: QuotaByPeriodKeysOperations operations - :vartype quota_by_period_keys: - azure.mgmt.apimanagement.aio.operations.QuotaByPeriodKeysOperations - :ivar region: RegionOperations operations - :vartype region: azure.mgmt.apimanagement.aio.operations.RegionOperations - :ivar reports: ReportsOperations operations - :vartype reports: azure.mgmt.apimanagement.aio.operations.ReportsOperations :ivar global_schema: GlobalSchemaOperations operations :vartype global_schema: azure.mgmt.apimanagement.aio.operations.GlobalSchemaOperations :ivar tenant_settings: TenantSettingsOperations operations :vartype tenant_settings: azure.mgmt.apimanagement.aio.operations.TenantSettingsOperations - :ivar api_management_skus: ApiManagementSkusOperations operations - :vartype api_management_skus: - azure.mgmt.apimanagement.aio.operations.ApiManagementSkusOperations :ivar subscription: SubscriptionOperations operations :vartype subscription: azure.mgmt.apimanagement.aio.operations.SubscriptionOperations - :ivar tag_resource: TagResourceOperations operations - :vartype tag_resource: azure.mgmt.apimanagement.aio.operations.TagResourceOperations :ivar tag_api_link: TagApiLinkOperations operations :vartype tag_api_link: azure.mgmt.apimanagement.aio.operations.TagApiLinkOperations :ivar tag_operation_link: TagOperationLinkOperations operations @@ -406,109 +490,24 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :vartype user: azure.mgmt.apimanagement.aio.operations.UserOperations :ivar user_group: UserGroupOperations operations :vartype user_group: azure.mgmt.apimanagement.aio.operations.UserGroupOperations - :ivar user_subscription: UserSubscriptionOperations operations - :vartype user_subscription: azure.mgmt.apimanagement.aio.operations.UserSubscriptionOperations :ivar user_identities: UserIdentitiesOperations operations :vartype user_identities: azure.mgmt.apimanagement.aio.operations.UserIdentitiesOperations :ivar user_confirmation_password: UserConfirmationPasswordOperations operations :vartype user_confirmation_password: azure.mgmt.apimanagement.aio.operations.UserConfirmationPasswordOperations - :ivar workspace_backend: WorkspaceBackendOperations operations - :vartype workspace_backend: azure.mgmt.apimanagement.aio.operations.WorkspaceBackendOperations - :ivar workspace_certificate: WorkspaceCertificateOperations operations - :vartype workspace_certificate: - azure.mgmt.apimanagement.aio.operations.WorkspaceCertificateOperations - :ivar workspace_diagnostic: WorkspaceDiagnosticOperations operations - :vartype workspace_diagnostic: - azure.mgmt.apimanagement.aio.operations.WorkspaceDiagnosticOperations - :ivar workspace_api_diagnostic: WorkspaceApiDiagnosticOperations operations - :vartype workspace_api_diagnostic: - azure.mgmt.apimanagement.aio.operations.WorkspaceApiDiagnosticOperations - :ivar api_management_workspace_links: ApiManagementWorkspaceLinksOperations operations - :vartype api_management_workspace_links: - azure.mgmt.apimanagement.aio.operations.ApiManagementWorkspaceLinksOperations :ivar api_management_workspace_link: ApiManagementWorkspaceLinkOperations operations :vartype api_management_workspace_link: azure.mgmt.apimanagement.aio.operations.ApiManagementWorkspaceLinkOperations - :ivar workspace_logger: WorkspaceLoggerOperations operations - :vartype workspace_logger: azure.mgmt.apimanagement.aio.operations.WorkspaceLoggerOperations + :ivar api_management_workspace_links: ApiManagementWorkspaceLinksOperations operations + :vartype api_management_workspace_links: + azure.mgmt.apimanagement.aio.operations.ApiManagementWorkspaceLinksOperations :ivar workspace: WorkspaceOperations operations :vartype workspace: azure.mgmt.apimanagement.aio.operations.WorkspaceOperations - :ivar workspace_policy: WorkspacePolicyOperations operations - :vartype workspace_policy: azure.mgmt.apimanagement.aio.operations.WorkspacePolicyOperations - :ivar workspace_named_value: WorkspaceNamedValueOperations operations - :vartype workspace_named_value: - azure.mgmt.apimanagement.aio.operations.WorkspaceNamedValueOperations - :ivar workspace_global_schema: WorkspaceGlobalSchemaOperations operations - :vartype workspace_global_schema: - azure.mgmt.apimanagement.aio.operations.WorkspaceGlobalSchemaOperations - :ivar workspace_notification: WorkspaceNotificationOperations operations - :vartype workspace_notification: - azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationOperations - :ivar workspace_notification_recipient_user: WorkspaceNotificationRecipientUserOperations - operations - :vartype workspace_notification_recipient_user: - azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientUserOperations - :ivar workspace_notification_recipient_email: WorkspaceNotificationRecipientEmailOperations - operations - :vartype workspace_notification_recipient_email: - azure.mgmt.apimanagement.aio.operations.WorkspaceNotificationRecipientEmailOperations - :ivar workspace_policy_fragment: WorkspacePolicyFragmentOperations operations - :vartype workspace_policy_fragment: - azure.mgmt.apimanagement.aio.operations.WorkspacePolicyFragmentOperations - :ivar workspace_group: WorkspaceGroupOperations operations - :vartype workspace_group: azure.mgmt.apimanagement.aio.operations.WorkspaceGroupOperations - :ivar workspace_group_user: WorkspaceGroupUserOperations operations - :vartype workspace_group_user: - azure.mgmt.apimanagement.aio.operations.WorkspaceGroupUserOperations - :ivar workspace_subscription: WorkspaceSubscriptionOperations operations - :vartype workspace_subscription: - azure.mgmt.apimanagement.aio.operations.WorkspaceSubscriptionOperations - :ivar workspace_api_version_set: WorkspaceApiVersionSetOperations operations - :vartype workspace_api_version_set: - azure.mgmt.apimanagement.aio.operations.WorkspaceApiVersionSetOperations - :ivar workspace_api: WorkspaceApiOperations operations - :vartype workspace_api: azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperations - :ivar workspace_api_revision: WorkspaceApiRevisionOperations operations - :vartype workspace_api_revision: - azure.mgmt.apimanagement.aio.operations.WorkspaceApiRevisionOperations - :ivar workspace_api_release: WorkspaceApiReleaseOperations operations - :vartype workspace_api_release: - azure.mgmt.apimanagement.aio.operations.WorkspaceApiReleaseOperations - :ivar workspace_api_operation: WorkspaceApiOperationOperations operations - :vartype workspace_api_operation: - azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationOperations - :ivar workspace_api_operation_policy: WorkspaceApiOperationPolicyOperations operations - :vartype workspace_api_operation_policy: - azure.mgmt.apimanagement.aio.operations.WorkspaceApiOperationPolicyOperations - :ivar workspace_api_policy: WorkspaceApiPolicyOperations operations - :vartype workspace_api_policy: - azure.mgmt.apimanagement.aio.operations.WorkspaceApiPolicyOperations - :ivar workspace_api_schema: WorkspaceApiSchemaOperations operations - :vartype workspace_api_schema: - azure.mgmt.apimanagement.aio.operations.WorkspaceApiSchemaOperations - :ivar workspace_product: WorkspaceProductOperations operations - :vartype workspace_product: azure.mgmt.apimanagement.aio.operations.WorkspaceProductOperations - :ivar workspace_product_api_link: WorkspaceProductApiLinkOperations operations - :vartype workspace_product_api_link: - azure.mgmt.apimanagement.aio.operations.WorkspaceProductApiLinkOperations - :ivar workspace_product_group_link: WorkspaceProductGroupLinkOperations operations - :vartype workspace_product_group_link: - azure.mgmt.apimanagement.aio.operations.WorkspaceProductGroupLinkOperations - :ivar workspace_product_policy: WorkspaceProductPolicyOperations operations - :vartype workspace_product_policy: - azure.mgmt.apimanagement.aio.operations.WorkspaceProductPolicyOperations - :ivar workspace_tag: WorkspaceTagOperations operations - :vartype workspace_tag: azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperations - :ivar workspace_tag_api_link: WorkspaceTagApiLinkOperations operations - :vartype workspace_tag_api_link: - azure.mgmt.apimanagement.aio.operations.WorkspaceTagApiLinkOperations - :ivar workspace_tag_operation_link: WorkspaceTagOperationLinkOperations operations - :vartype workspace_tag_operation_link: - azure.mgmt.apimanagement.aio.operations.WorkspaceTagOperationLinkOperations - :ivar workspace_tag_product_link: WorkspaceTagProductLinkOperations operations - :vartype workspace_tag_product_link: - azure.mgmt.apimanagement.aio.operations.WorkspaceTagProductLinkOperations + :ivar api_export: ApiExportOperations operations + :vartype api_export: azure.mgmt.apimanagement.aio.operations.ApiExportOperations + :ivar api_management_skus: ApiManagementSkusOperations operations + :vartype api_management_skus: + azure.mgmt.apimanagement.aio.operations.ApiManagementSkusOperations :ivar workspace_api_export: WorkspaceApiExportOperations operations :vartype workspace_api_export: azure.mgmt.apimanagement.aio.operations.WorkspaceApiExportOperations @@ -517,17 +516,18 @@ class ApiManagementClient(_ApiManagementClientOperationsMixin): # pylint: disab :ivar operations_results: OperationsResultsOperations operations :vartype operations_results: azure.mgmt.apimanagement.aio.operations.OperationsResultsOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is None. + :param base_url: Service host. Default value is None. :type base_url: str :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-03-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2025-03-01-preview". Default value is "2025-03-01-preview". Note that overriding this default + value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -542,6 +542,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _endpoint = "{endpoint}" _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: @@ -550,6 +551,7 @@ def __init__( self._config = ApiManagementClientConfiguration( credential=credential, subscription_id=subscription_id, + base_url=cast(str, base_url), cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs @@ -574,162 +576,138 @@ def __init__( self._config.http_logging_policy, ] self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( - base_url=cast(str, base_url), policies=_policies, **kwargs + base_url=cast(str, _endpoint), policies=_policies, **kwargs ) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.api_gateway = ApiGatewayOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_management_gateway_skus = ApiManagementGatewaySkusOperations( + self.workspace_api = WorkspaceApiOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_api_release = WorkspaceApiReleaseOperations( self._client, self._config, self._serialize, self._deserialize ) - self.all_policies = AllPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) - self.api = ApiOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_revision = ApiRevisionOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_release = ApiReleaseOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_operation = ApiOperationOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_operation_policy = ApiOperationPolicyOperations( + self.workspace_api_operation = WorkspaceApiOperationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.graph_ql_api_resolver_policy = GraphQLApiResolverPolicyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.api_policy = ApiPolicyOperations(self._client, self._config, self._serialize, self._deserialize) + self.policy = PolicyOperations(self._client, self._config, self._serialize, self._deserialize) + self.product_policy = ProductPolicyOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_policy = WorkspacePolicyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.tag = TagOperations(self._client, self._config, self._serialize, self._deserialize) - self.graph_ql_api_resolver = GraphQLApiResolverOperations( + self.workspace_api_operation_policy = WorkspaceApiOperationPolicyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.graph_ql_api_resolver_policy = GraphQLApiResolverPolicyOperations( + self.workspace_api_policy = WorkspaceApiPolicyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_product = ApiProductOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_policy = ApiPolicyOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_schema = ApiSchemaOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_diagnostic = ApiDiagnosticOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_issue = ApiIssueOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_issue_comment = ApiIssueCommentOperations( + self.workspace_product_policy = WorkspaceProductPolicyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_issue_attachment = ApiIssueAttachmentOperations( + self.tag = TagOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_tag = WorkspaceTagOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_api_schema = WorkspaceApiSchemaOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_tag_description = ApiTagDescriptionOperations( + self.diagnostic = DiagnosticOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_diagnostic = WorkspaceDiagnosticOperations( self._client, self._config, self._serialize, self._deserialize ) - self.operation = OperationOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_wiki = ApiWikiOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_wikis = ApiWikisOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_tool = ApiToolOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_export = ApiExportOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_version_set = ApiVersionSetOperations(self._client, self._config, self._serialize, self._deserialize) - self.authorization_provider = AuthorizationProviderOperations( + self.workspace_api_diagnostic = WorkspaceApiDiagnosticOperations( self._client, self._config, self._serialize, self._deserialize ) - self.authorization = AuthorizationOperations(self._client, self._config, self._serialize, self._deserialize) - self.authorization_login_links = AuthorizationLoginLinksOperations( + self.issue = IssueOperations(self._client, self._config, self._serialize, self._deserialize) + self.product_wiki = ProductWikiOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_api_version_set = WorkspaceApiVersionSetOperations( self._client, self._config, self._serialize, self._deserialize ) - self.authorization_access_policy = AuthorizationAccessPolicyOperations( + self.workspace_backend = WorkspaceBackendOperations( self._client, self._config, self._serialize, self._deserialize ) - self.authorization_server = AuthorizationServerOperations( + self.workspace_certificate = WorkspaceCertificateOperations( self._client, self._config, self._serialize, self._deserialize ) - self.backend = BackendOperations(self._client, self._config, self._serialize, self._deserialize) - self.cache = CacheOperations(self._client, self._config, self._serialize, self._deserialize) - self.certificate = CertificateOperations(self._client, self._config, self._serialize, self._deserialize) - self.client_application = ClientApplicationOperations( + self.workspace_group = WorkspaceGroupOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_logger = WorkspaceLoggerOperations( self._client, self._config, self._serialize, self._deserialize ) - self.client_application_product_link = ClientApplicationProductLinkOperations( + self.workspace_named_value = WorkspaceNamedValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.content_type = ContentTypeOperations(self._client, self._config, self._serialize, self._deserialize) - self.content_item = ContentItemOperations(self._client, self._config, self._serialize, self._deserialize) - self.deleted_services = DeletedServicesOperations( + self.workspace_notification = WorkspaceNotificationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_management_operations = ApiManagementOperationsOperations( + self.workspace_policy_fragment = WorkspacePolicyFragmentOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_management_service_skus = ApiManagementServiceSkusOperations( + self.sign_in_settings = SignInSettingsOperations(self._client, self._config, self._serialize, self._deserialize) + self.sign_up_settings = SignUpSettingsOperations(self._client, self._config, self._serialize, self._deserialize) + self.delegation_settings = DelegationSettingsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_management_service = ApiManagementServiceOperations( + self.workspace_product = WorkspaceProductOperations( self._client, self._config, self._serialize, self._deserialize ) - self.diagnostic = DiagnosticOperations(self._client, self._config, self._serialize, self._deserialize) - self.documentation = DocumentationOperations(self._client, self._config, self._serialize, self._deserialize) - self.email_template = EmailTemplateOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_gateway_config_connection = ApiGatewayConfigConnectionOperations( + self.workspace_product_api_link = WorkspaceProductApiLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_gateway_hostname_binding = ApiGatewayHostnameBindingOperations( + self.workspace_product_group_link = WorkspaceProductGroupLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.gateway = GatewayOperations(self._client, self._config, self._serialize, self._deserialize) - self.gateway_hostname_configuration = GatewayHostnameConfigurationOperations( + self.workspace_global_schema = WorkspaceGlobalSchemaOperations( self._client, self._config, self._serialize, self._deserialize ) - self.gateway_api = GatewayApiOperations(self._client, self._config, self._serialize, self._deserialize) - self.gateway_certificate_authority = GatewayCertificateAuthorityOperations( + self.user_subscription = UserSubscriptionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.group = GroupOperations(self._client, self._config, self._serialize, self._deserialize) - self.group_user = GroupUserOperations(self._client, self._config, self._serialize, self._deserialize) - self.identity_provider = IdentityProviderOperations( + self.workspace_subscription = WorkspaceSubscriptionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.issue = IssueOperations(self._client, self._config, self._serialize, self._deserialize) - self.logger = LoggerOperations(self._client, self._config, self._serialize, self._deserialize) - self.named_value = NamedValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.network_status = NetworkStatusOperations(self._client, self._config, self._serialize, self._deserialize) - self.notification = NotificationOperations(self._client, self._config, self._serialize, self._deserialize) - self.notification_recipient_user = NotificationRecipientUserOperations( + self.workspace_tag_api_link = WorkspaceTagApiLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.notification_recipient_email = NotificationRecipientEmailOperations( + self.workspace_tag_operation_link = WorkspaceTagOperationLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.open_id_connect_provider = OpenIdConnectProviderOperations( + self.workspace_tag_product_link = WorkspaceTagProductLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.outbound_network_dependencies_endpoints = OutboundNetworkDependenciesEndpointsOperations( + self.api_management_operations = ApiManagementOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.policy = PolicyOperations(self._client, self._config, self._serialize, self._deserialize) - self.policy_description = PolicyDescriptionOperations( + self.api_gateway = ApiGatewayOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_management_gateway_skus = ApiManagementGatewaySkusOperations( self._client, self._config, self._serialize, self._deserialize ) - self.policy_fragment = PolicyFragmentOperations(self._client, self._config, self._serialize, self._deserialize) - self.policy_restriction = PolicyRestrictionOperations( + self.api = ApiOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_revision = ApiRevisionOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_product = ApiProductOperations(self._client, self._config, self._serialize, self._deserialize) + self.operation = OperationOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_api_revision = WorkspaceApiRevisionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.policy_restriction_validations = PolicyRestrictionValidationsOperations( + self.api_management_service = ApiManagementServiceOperations( self._client, self._config, self._serialize, self._deserialize ) - self.portal_config = PortalConfigOperations(self._client, self._config, self._serialize, self._deserialize) - self.portal_revision = PortalRevisionOperations(self._client, self._config, self._serialize, self._deserialize) - self.portal_settings = PortalSettingsOperations(self._client, self._config, self._serialize, self._deserialize) - self.sign_in_settings = SignInSettingsOperations(self._client, self._config, self._serialize, self._deserialize) - self.sign_up_settings = SignUpSettingsOperations(self._client, self._config, self._serialize, self._deserialize) - self.delegation_settings = DelegationSettingsOperations( + self.all_policies = AllPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_management_service_skus = ApiManagementServiceSkusOperations( self._client, self._config, self._serialize, self._deserialize ) - self.private_endpoint_connection = PrivateEndpointConnectionOperations( + self.network_status = NetworkStatusOperations(self._client, self._config, self._serialize, self._deserialize) + self.outbound_network_dependencies_endpoints = OutboundNetworkDependenciesEndpointsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.product = ProductOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_api = ProductApiOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_group = ProductGroupOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_subscriptions = ProductSubscriptionsOperations( + self.policy_description = PolicyDescriptionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.product_policy = ProductPolicyOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_wiki = ProductWikiOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_wikis = ProductWikisOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_api_link = ProductApiLinkOperations(self._client, self._config, self._serialize, self._deserialize) - self.product_group_link = ProductGroupLinkOperations( + self.policy_restriction_validations = PolicyRestrictionValidationsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.portal_settings = PortalSettingsOperations(self._client, self._config, self._serialize, self._deserialize) + self.product = ProductOperations(self._client, self._config, self._serialize, self._deserialize) self.quota_by_counter_keys = QuotaByCounterKeysOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -738,126 +716,149 @@ def __init__( ) self.region = RegionOperations(self._client, self._config, self._serialize, self._deserialize) self.reports = ReportsOperations(self._client, self._config, self._serialize, self._deserialize) - self.global_schema = GlobalSchemaOperations(self._client, self._config, self._serialize, self._deserialize) - self.tenant_settings = TenantSettingsOperations(self._client, self._config, self._serialize, self._deserialize) - self.api_management_skus = ApiManagementSkusOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.subscription = SubscriptionOperations(self._client, self._config, self._serialize, self._deserialize) self.tag_resource = TagResourceOperations(self._client, self._config, self._serialize, self._deserialize) - self.tag_api_link = TagApiLinkOperations(self._client, self._config, self._serialize, self._deserialize) - self.tag_operation_link = TagOperationLinkOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.tag_product_link = TagProductLinkOperations(self._client, self._config, self._serialize, self._deserialize) - self.tenant_access = TenantAccessOperations(self._client, self._config, self._serialize, self._deserialize) - self.tenant_access_git = TenantAccessGitOperations( + self.api_release = ApiReleaseOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_operation = ApiOperationOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_operation_policy = ApiOperationPolicyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.tenant_configuration = TenantConfigurationOperations( + self.graph_ql_api_resolver = GraphQLApiResolverOperations( self._client, self._config, self._serialize, self._deserialize ) - self.user = UserOperations(self._client, self._config, self._serialize, self._deserialize) - self.user_group = UserGroupOperations(self._client, self._config, self._serialize, self._deserialize) - self.user_subscription = UserSubscriptionOperations( + self.api_schema = ApiSchemaOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_diagnostic = ApiDiagnosticOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_issue = ApiIssueOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_issue_comment = ApiIssueCommentOperations( self._client, self._config, self._serialize, self._deserialize ) - self.user_identities = UserIdentitiesOperations(self._client, self._config, self._serialize, self._deserialize) - self.user_confirmation_password = UserConfirmationPasswordOperations( + self.api_issue_attachment = ApiIssueAttachmentOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_backend = WorkspaceBackendOperations( + self.api_tag_description = ApiTagDescriptionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_certificate = WorkspaceCertificateOperations( + self.api_wiki = ApiWikiOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_wikis = ApiWikisOperations(self._client, self._config, self._serialize, self._deserialize) + self.product_wikis = ProductWikisOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_tool = ApiToolOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_version_set = ApiVersionSetOperations(self._client, self._config, self._serialize, self._deserialize) + self.authorization_provider = AuthorizationProviderOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_diagnostic = WorkspaceDiagnosticOperations( + self.authorization = AuthorizationOperations(self._client, self._config, self._serialize, self._deserialize) + self.authorization_login_links = AuthorizationLoginLinksOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_diagnostic = WorkspaceApiDiagnosticOperations( + self.authorization_access_policy = AuthorizationAccessPolicyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_management_workspace_links = ApiManagementWorkspaceLinksOperations( + self.authorization_server = AuthorizationServerOperations( self._client, self._config, self._serialize, self._deserialize ) - self.api_management_workspace_link = ApiManagementWorkspaceLinkOperations( + self.backend = BackendOperations(self._client, self._config, self._serialize, self._deserialize) + self.cache = CacheOperations(self._client, self._config, self._serialize, self._deserialize) + self.certificate = CertificateOperations(self._client, self._config, self._serialize, self._deserialize) + self.content_type = ContentTypeOperations(self._client, self._config, self._serialize, self._deserialize) + self.content_item = ContentItemOperations(self._client, self._config, self._serialize, self._deserialize) + self.deleted_services = DeletedServicesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_logger = WorkspaceLoggerOperations( + self.documentation = DocumentationOperations(self._client, self._config, self._serialize, self._deserialize) + self.email_template = EmailTemplateOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_gateway_config_connection = ApiGatewayConfigConnectionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace = WorkspaceOperations(self._client, self._config, self._serialize, self._deserialize) - self.workspace_policy = WorkspacePolicyOperations( + self.api_gateway_hostname_binding = ApiGatewayHostnameBindingOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_named_value = WorkspaceNamedValueOperations( + self.gateway = GatewayOperations(self._client, self._config, self._serialize, self._deserialize) + self.gateway_api = GatewayApiOperations(self._client, self._config, self._serialize, self._deserialize) + self.gateway_hostname_configuration = GatewayHostnameConfigurationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_global_schema = WorkspaceGlobalSchemaOperations( + self.gateway_certificate_authority = GatewayCertificateAuthorityOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_notification = WorkspaceNotificationOperations( + self.group = GroupOperations(self._client, self._config, self._serialize, self._deserialize) + self.group_user = GroupUserOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_group_user = WorkspaceGroupUserOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_notification_recipient_user = WorkspaceNotificationRecipientUserOperations( + self.identity_provider = IdentityProviderOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_notification_recipient_email = WorkspaceNotificationRecipientEmailOperations( + self.logger = LoggerOperations(self._client, self._config, self._serialize, self._deserialize) + self.named_value = NamedValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.notification = NotificationOperations(self._client, self._config, self._serialize, self._deserialize) + self.notification_recipient_user = NotificationRecipientUserOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_policy_fragment = WorkspacePolicyFragmentOperations( + self.notification_recipient_email = NotificationRecipientEmailOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_group = WorkspaceGroupOperations(self._client, self._config, self._serialize, self._deserialize) - self.workspace_group_user = WorkspaceGroupUserOperations( + self.workspace_notification_recipient_user = WorkspaceNotificationRecipientUserOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_subscription = WorkspaceSubscriptionOperations( + self.workspace_notification_recipient_email = WorkspaceNotificationRecipientEmailOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_version_set = WorkspaceApiVersionSetOperations( + self.open_id_connect_provider = OpenIdConnectProviderOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api = WorkspaceApiOperations(self._client, self._config, self._serialize, self._deserialize) - self.workspace_api_revision = WorkspaceApiRevisionOperations( + self.policy_fragment = PolicyFragmentOperations(self._client, self._config, self._serialize, self._deserialize) + self.policy_restriction = PolicyRestrictionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_release = WorkspaceApiReleaseOperations( + self.portal_config = PortalConfigOperations(self._client, self._config, self._serialize, self._deserialize) + self.client_application = ClientApplicationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_operation = WorkspaceApiOperationOperations( + self.client_application_product_link = ClientApplicationProductLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_operation_policy = WorkspaceApiOperationPolicyOperations( + self.portal_revision = PortalRevisionOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connection = PrivateEndpointConnectionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_policy = WorkspaceApiPolicyOperations( + self.product_api = ProductApiOperations(self._client, self._config, self._serialize, self._deserialize) + self.product_group = ProductGroupOperations(self._client, self._config, self._serialize, self._deserialize) + self.product_subscriptions = ProductSubscriptionsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_api_schema = WorkspaceApiSchemaOperations( + self.product_api_link = ProductApiLinkOperations(self._client, self._config, self._serialize, self._deserialize) + self.product_group_link = ProductGroupLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_product = WorkspaceProductOperations( + self.global_schema = GlobalSchemaOperations(self._client, self._config, self._serialize, self._deserialize) + self.tenant_settings = TenantSettingsOperations(self._client, self._config, self._serialize, self._deserialize) + self.subscription = SubscriptionOperations(self._client, self._config, self._serialize, self._deserialize) + self.tag_api_link = TagApiLinkOperations(self._client, self._config, self._serialize, self._deserialize) + self.tag_operation_link = TagOperationLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_product_api_link = WorkspaceProductApiLinkOperations( + self.tag_product_link = TagProductLinkOperations(self._client, self._config, self._serialize, self._deserialize) + self.tenant_access = TenantAccessOperations(self._client, self._config, self._serialize, self._deserialize) + self.tenant_access_git = TenantAccessGitOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_product_group_link = WorkspaceProductGroupLinkOperations( + self.tenant_configuration = TenantConfigurationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_product_policy = WorkspaceProductPolicyOperations( + self.user = UserOperations(self._client, self._config, self._serialize, self._deserialize) + self.user_group = UserGroupOperations(self._client, self._config, self._serialize, self._deserialize) + self.user_identities = UserIdentitiesOperations(self._client, self._config, self._serialize, self._deserialize) + self.user_confirmation_password = UserConfirmationPasswordOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_tag = WorkspaceTagOperations(self._client, self._config, self._serialize, self._deserialize) - self.workspace_tag_api_link = WorkspaceTagApiLinkOperations( + self.api_management_workspace_link = ApiManagementWorkspaceLinkOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_tag_operation_link = WorkspaceTagOperationLinkOperations( + self.api_management_workspace_links = ApiManagementWorkspaceLinksOperations( self._client, self._config, self._serialize, self._deserialize ) - self.workspace_tag_product_link = WorkspaceTagProductLinkOperations( + self.workspace = WorkspaceOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_export = ApiExportOperations(self._client, self._config, self._serialize, self._deserialize) + self.api_management_skus = ApiManagementSkusOperations( self._client, self._config, self._serialize, self._deserialize ) self.workspace_api_export = WorkspaceApiExportOperations( @@ -870,7 +871,7 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) - def _send_request( + def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. @@ -878,7 +879,7 @@ def _send_request( >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = await client._send_request(request) + >>> response = await client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -891,7 +892,11 @@ def _send_request( """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore async def close(self) -> None: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_configuration.py index 81c540aca034..84e7b6bf4c8a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_configuration.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -24,15 +24,18 @@ class ApiManagementClientConfiguration: # pylint: disable=too-many-instance-att Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-03-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2025-03-01-preview". Default value is "2025-03-01-preview". Note that overriding this default + value may result in unsupported behavior. :paramtype api_version: str """ @@ -40,6 +43,7 @@ def __init__( self, credential: "AsyncTokenCredential", subscription_id: str, + base_url: str = "https://management.azure.com", cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: @@ -52,6 +56,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.base_url = base_url self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_patch.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_patch.py index d3be7c117232..87676c65a8f0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_patch.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_patch.py @@ -1,34 +1,21 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------- +"""Customize generated code here. +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): - pass + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/__init__.py index 22aa559c73b5..e3b8884a66e9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/__init__.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,177 +12,228 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._api_gateway_operations import ApiGatewayOperations # type: ignore -from ._api_management_gateway_skus_operations import ApiManagementGatewaySkusOperations # type: ignore -from ._all_policies_operations import AllPoliciesOperations # type: ignore -from ._api_operations import ApiOperations # type: ignore -from ._api_revision_operations import ApiRevisionOperations # type: ignore -from ._api_release_operations import ApiReleaseOperations # type: ignore -from ._api_operation_operations import ApiOperationOperations # type: ignore -from ._api_operation_policy_operations import ApiOperationPolicyOperations # type: ignore -from ._tag_operations import TagOperations # type: ignore -from ._graph_ql_api_resolver_operations import GraphQLApiResolverOperations # type: ignore -from ._graph_ql_api_resolver_policy_operations import GraphQLApiResolverPolicyOperations # type: ignore -from ._api_product_operations import ApiProductOperations # type: ignore -from ._api_policy_operations import ApiPolicyOperations # type: ignore -from ._api_schema_operations import ApiSchemaOperations # type: ignore -from ._api_diagnostic_operations import ApiDiagnosticOperations # type: ignore -from ._api_issue_operations import ApiIssueOperations # type: ignore -from ._api_issue_comment_operations import ApiIssueCommentOperations # type: ignore -from ._api_issue_attachment_operations import ApiIssueAttachmentOperations # type: ignore -from ._api_tag_description_operations import ApiTagDescriptionOperations # type: ignore -from ._operation_operations import OperationOperations # type: ignore -from ._api_wiki_operations import ApiWikiOperations # type: ignore -from ._api_wikis_operations import ApiWikisOperations # type: ignore -from ._api_tool_operations import ApiToolOperations # type: ignore -from ._api_export_operations import ApiExportOperations # type: ignore -from ._api_version_set_operations import ApiVersionSetOperations # type: ignore -from ._authorization_provider_operations import AuthorizationProviderOperations # type: ignore -from ._authorization_operations import AuthorizationOperations # type: ignore -from ._authorization_login_links_operations import AuthorizationLoginLinksOperations # type: ignore -from ._authorization_access_policy_operations import AuthorizationAccessPolicyOperations # type: ignore -from ._authorization_server_operations import AuthorizationServerOperations # type: ignore -from ._backend_operations import BackendOperations # type: ignore -from ._cache_operations import CacheOperations # type: ignore -from ._certificate_operations import CertificateOperations # type: ignore -from ._client_application_operations import ClientApplicationOperations # type: ignore -from ._client_application_product_link_operations import ClientApplicationProductLinkOperations # type: ignore -from ._api_management_client_operations import _ApiManagementClientOperationsMixin # type: ignore # pylint: disable=unused-import -from ._content_type_operations import ContentTypeOperations # type: ignore -from ._content_item_operations import ContentItemOperations # type: ignore -from ._deleted_services_operations import DeletedServicesOperations # type: ignore -from ._api_management_operations_operations import ApiManagementOperationsOperations # type: ignore -from ._api_management_service_skus_operations import ApiManagementServiceSkusOperations # type: ignore -from ._api_management_service_operations import ApiManagementServiceOperations # type: ignore -from ._diagnostic_operations import DiagnosticOperations # type: ignore -from ._documentation_operations import DocumentationOperations # type: ignore -from ._email_template_operations import EmailTemplateOperations # type: ignore -from ._api_gateway_config_connection_operations import ApiGatewayConfigConnectionOperations # type: ignore -from ._api_gateway_hostname_binding_operations import ApiGatewayHostnameBindingOperations # type: ignore -from ._gateway_operations import GatewayOperations # type: ignore -from ._gateway_hostname_configuration_operations import GatewayHostnameConfigurationOperations # type: ignore -from ._gateway_api_operations import GatewayApiOperations # type: ignore -from ._gateway_certificate_authority_operations import GatewayCertificateAuthorityOperations # type: ignore -from ._group_operations import GroupOperations # type: ignore -from ._group_user_operations import GroupUserOperations # type: ignore -from ._identity_provider_operations import IdentityProviderOperations # type: ignore -from ._issue_operations import IssueOperations # type: ignore -from ._logger_operations import LoggerOperations # type: ignore -from ._named_value_operations import NamedValueOperations # type: ignore -from ._network_status_operations import NetworkStatusOperations # type: ignore -from ._notification_operations import NotificationOperations # type: ignore -from ._notification_recipient_user_operations import NotificationRecipientUserOperations # type: ignore -from ._notification_recipient_email_operations import NotificationRecipientEmailOperations # type: ignore -from ._open_id_connect_provider_operations import OpenIdConnectProviderOperations # type: ignore -from ._outbound_network_dependencies_endpoints_operations import OutboundNetworkDependenciesEndpointsOperations # type: ignore -from ._policy_operations import PolicyOperations # type: ignore -from ._policy_description_operations import PolicyDescriptionOperations # type: ignore -from ._policy_fragment_operations import PolicyFragmentOperations # type: ignore -from ._policy_restriction_operations import PolicyRestrictionOperations # type: ignore -from ._policy_restriction_validations_operations import PolicyRestrictionValidationsOperations # type: ignore -from ._portal_config_operations import PortalConfigOperations # type: ignore -from ._portal_revision_operations import PortalRevisionOperations # type: ignore -from ._portal_settings_operations import PortalSettingsOperations # type: ignore -from ._sign_in_settings_operations import SignInSettingsOperations # type: ignore -from ._sign_up_settings_operations import SignUpSettingsOperations # type: ignore -from ._delegation_settings_operations import DelegationSettingsOperations # type: ignore -from ._private_endpoint_connection_operations import PrivateEndpointConnectionOperations # type: ignore -from ._product_operations import ProductOperations # type: ignore -from ._product_api_operations import ProductApiOperations # type: ignore -from ._product_group_operations import ProductGroupOperations # type: ignore -from ._product_subscriptions_operations import ProductSubscriptionsOperations # type: ignore -from ._product_policy_operations import ProductPolicyOperations # type: ignore -from ._product_wiki_operations import ProductWikiOperations # type: ignore -from ._product_wikis_operations import ProductWikisOperations # type: ignore -from ._product_api_link_operations import ProductApiLinkOperations # type: ignore -from ._product_group_link_operations import ProductGroupLinkOperations # type: ignore -from ._quota_by_counter_keys_operations import QuotaByCounterKeysOperations # type: ignore -from ._quota_by_period_keys_operations import QuotaByPeriodKeysOperations # type: ignore -from ._region_operations import RegionOperations # type: ignore -from ._reports_operations import ReportsOperations # type: ignore -from ._global_schema_operations import GlobalSchemaOperations # type: ignore -from ._tenant_settings_operations import TenantSettingsOperations # type: ignore -from ._api_management_skus_operations import ApiManagementSkusOperations # type: ignore -from ._subscription_operations import SubscriptionOperations # type: ignore -from ._tag_resource_operations import TagResourceOperations # type: ignore -from ._tag_api_link_operations import TagApiLinkOperations # type: ignore -from ._tag_operation_link_operations import TagOperationLinkOperations # type: ignore -from ._tag_product_link_operations import TagProductLinkOperations # type: ignore -from ._tenant_access_operations import TenantAccessOperations # type: ignore -from ._tenant_access_git_operations import TenantAccessGitOperations # type: ignore -from ._tenant_configuration_operations import TenantConfigurationOperations # type: ignore -from ._user_operations import UserOperations # type: ignore -from ._user_group_operations import UserGroupOperations # type: ignore -from ._user_subscription_operations import UserSubscriptionOperations # type: ignore -from ._user_identities_operations import UserIdentitiesOperations # type: ignore -from ._user_confirmation_password_operations import UserConfirmationPasswordOperations # type: ignore -from ._workspace_backend_operations import WorkspaceBackendOperations # type: ignore -from ._workspace_certificate_operations import WorkspaceCertificateOperations # type: ignore -from ._workspace_diagnostic_operations import WorkspaceDiagnosticOperations # type: ignore -from ._workspace_api_diagnostic_operations import WorkspaceApiDiagnosticOperations # type: ignore -from ._api_management_workspace_links_operations import ApiManagementWorkspaceLinksOperations # type: ignore -from ._api_management_workspace_link_operations import ApiManagementWorkspaceLinkOperations # type: ignore -from ._workspace_logger_operations import WorkspaceLoggerOperations # type: ignore -from ._workspace_operations import WorkspaceOperations # type: ignore -from ._workspace_policy_operations import WorkspacePolicyOperations # type: ignore -from ._workspace_named_value_operations import WorkspaceNamedValueOperations # type: ignore -from ._workspace_global_schema_operations import WorkspaceGlobalSchemaOperations # type: ignore -from ._workspace_notification_operations import WorkspaceNotificationOperations # type: ignore -from ._workspace_notification_recipient_user_operations import WorkspaceNotificationRecipientUserOperations # type: ignore -from ._workspace_notification_recipient_email_operations import WorkspaceNotificationRecipientEmailOperations # type: ignore -from ._workspace_policy_fragment_operations import WorkspacePolicyFragmentOperations # type: ignore -from ._workspace_group_operations import WorkspaceGroupOperations # type: ignore -from ._workspace_group_user_operations import WorkspaceGroupUserOperations # type: ignore -from ._workspace_subscription_operations import WorkspaceSubscriptionOperations # type: ignore -from ._workspace_api_version_set_operations import WorkspaceApiVersionSetOperations # type: ignore -from ._workspace_api_operations import WorkspaceApiOperations # type: ignore -from ._workspace_api_revision_operations import WorkspaceApiRevisionOperations # type: ignore -from ._workspace_api_release_operations import WorkspaceApiReleaseOperations # type: ignore -from ._workspace_api_operation_operations import WorkspaceApiOperationOperations # type: ignore -from ._workspace_api_operation_policy_operations import WorkspaceApiOperationPolicyOperations # type: ignore -from ._workspace_api_policy_operations import WorkspaceApiPolicyOperations # type: ignore -from ._workspace_api_schema_operations import WorkspaceApiSchemaOperations # type: ignore -from ._workspace_product_operations import WorkspaceProductOperations # type: ignore -from ._workspace_product_api_link_operations import WorkspaceProductApiLinkOperations # type: ignore -from ._workspace_product_group_link_operations import WorkspaceProductGroupLinkOperations # type: ignore -from ._workspace_product_policy_operations import WorkspaceProductPolicyOperations # type: ignore -from ._workspace_tag_operations import WorkspaceTagOperations # type: ignore -from ._workspace_tag_api_link_operations import WorkspaceTagApiLinkOperations # type: ignore -from ._workspace_tag_operation_link_operations import WorkspaceTagOperationLinkOperations # type: ignore -from ._workspace_tag_product_link_operations import WorkspaceTagProductLinkOperations # type: ignore -from ._workspace_api_export_operations import WorkspaceApiExportOperations # type: ignore -from ._operation_status_operations import OperationStatusOperations # type: ignore -from ._operations_results_operations import OperationsResultsOperations # type: ignore +from ._operations import WorkspaceApiOperations # type: ignore +from ._operations import WorkspaceApiReleaseOperations # type: ignore +from ._operations import WorkspaceApiOperationOperations # type: ignore +from ._operations import GraphQLApiResolverPolicyOperations # type: ignore +from ._operations import ApiPolicyOperations # type: ignore +from ._operations import PolicyOperations # type: ignore +from ._operations import ProductPolicyOperations # type: ignore +from ._operations import WorkspacePolicyOperations # type: ignore +from ._operations import WorkspaceApiOperationPolicyOperations # type: ignore +from ._operations import WorkspaceApiPolicyOperations # type: ignore +from ._operations import WorkspaceProductPolicyOperations # type: ignore +from ._operations import TagOperations # type: ignore +from ._operations import WorkspaceTagOperations # type: ignore +from ._operations import WorkspaceApiSchemaOperations # type: ignore +from ._operations import DiagnosticOperations # type: ignore +from ._operations import WorkspaceDiagnosticOperations # type: ignore +from ._operations import WorkspaceApiDiagnosticOperations # type: ignore +from ._operations import IssueOperations # type: ignore +from ._operations import ProductWikiOperations # type: ignore +from ._operations import WorkspaceApiVersionSetOperations # type: ignore +from ._operations import WorkspaceBackendOperations # type: ignore +from ._operations import WorkspaceCertificateOperations # type: ignore +from ._operations import WorkspaceGroupOperations # type: ignore +from ._operations import WorkspaceLoggerOperations # type: ignore +from ._operations import WorkspaceNamedValueOperations # type: ignore +from ._operations import WorkspaceNotificationOperations # type: ignore +from ._operations import WorkspacePolicyFragmentOperations # type: ignore +from ._operations import SignInSettingsOperations # type: ignore +from ._operations import SignUpSettingsOperations # type: ignore +from ._operations import DelegationSettingsOperations # type: ignore +from ._operations import WorkspaceProductOperations # type: ignore +from ._operations import WorkspaceProductApiLinkOperations # type: ignore +from ._operations import WorkspaceProductGroupLinkOperations # type: ignore +from ._operations import WorkspaceGlobalSchemaOperations # type: ignore +from ._operations import UserSubscriptionOperations # type: ignore +from ._operations import WorkspaceSubscriptionOperations # type: ignore +from ._operations import WorkspaceTagApiLinkOperations # type: ignore +from ._operations import WorkspaceTagOperationLinkOperations # type: ignore +from ._operations import WorkspaceTagProductLinkOperations # type: ignore +from ._operations import ApiManagementOperationsOperations # type: ignore +from ._operations import ApiGatewayOperations # type: ignore +from ._operations import ApiManagementGatewaySkusOperations # type: ignore +from ._operations import ApiOperations # type: ignore +from ._operations import ApiRevisionOperations # type: ignore +from ._operations import ApiProductOperations # type: ignore +from ._operations import OperationOperations # type: ignore +from ._operations import WorkspaceApiRevisionOperations # type: ignore +from ._operations import ApiManagementServiceOperations # type: ignore +from ._operations import AllPoliciesOperations # type: ignore +from ._operations import ApiManagementServiceSkusOperations # type: ignore +from ._operations import NetworkStatusOperations # type: ignore +from ._operations import OutboundNetworkDependenciesEndpointsOperations # type: ignore +from ._operations import PolicyDescriptionOperations # type: ignore +from ._operations import PolicyRestrictionValidationsOperations # type: ignore +from ._operations import PortalSettingsOperations # type: ignore +from ._operations import ProductOperations # type: ignore +from ._operations import QuotaByCounterKeysOperations # type: ignore +from ._operations import QuotaByPeriodKeysOperations # type: ignore +from ._operations import RegionOperations # type: ignore +from ._operations import ReportsOperations # type: ignore +from ._operations import TagResourceOperations # type: ignore +from ._operations import ApiReleaseOperations # type: ignore +from ._operations import ApiOperationOperations # type: ignore +from ._operations import ApiOperationPolicyOperations # type: ignore +from ._operations import GraphQLApiResolverOperations # type: ignore +from ._operations import ApiSchemaOperations # type: ignore +from ._operations import ApiDiagnosticOperations # type: ignore +from ._operations import ApiIssueOperations # type: ignore +from ._operations import ApiIssueCommentOperations # type: ignore +from ._operations import ApiIssueAttachmentOperations # type: ignore +from ._operations import ApiTagDescriptionOperations # type: ignore +from ._operations import ApiWikiOperations # type: ignore +from ._operations import ApiWikisOperations # type: ignore +from ._operations import ProductWikisOperations # type: ignore +from ._operations import ApiToolOperations # type: ignore +from ._operations import ApiVersionSetOperations # type: ignore +from ._operations import AuthorizationProviderOperations # type: ignore +from ._operations import AuthorizationOperations # type: ignore +from ._operations import AuthorizationLoginLinksOperations # type: ignore +from ._operations import AuthorizationAccessPolicyOperations # type: ignore +from ._operations import AuthorizationServerOperations # type: ignore +from ._operations import BackendOperations # type: ignore +from ._operations import CacheOperations # type: ignore +from ._operations import CertificateOperations # type: ignore +from ._operations import ContentTypeOperations # type: ignore +from ._operations import ContentItemOperations # type: ignore +from ._operations import DeletedServicesOperations # type: ignore +from ._operations import DocumentationOperations # type: ignore +from ._operations import EmailTemplateOperations # type: ignore +from ._operations import ApiGatewayConfigConnectionOperations # type: ignore +from ._operations import ApiGatewayHostnameBindingOperations # type: ignore +from ._operations import GatewayOperations # type: ignore +from ._operations import GatewayApiOperations # type: ignore +from ._operations import GatewayHostnameConfigurationOperations # type: ignore +from ._operations import GatewayCertificateAuthorityOperations # type: ignore +from ._operations import GroupOperations # type: ignore +from ._operations import GroupUserOperations # type: ignore +from ._operations import WorkspaceGroupUserOperations # type: ignore +from ._operations import IdentityProviderOperations # type: ignore +from ._operations import LoggerOperations # type: ignore +from ._operations import NamedValueOperations # type: ignore +from ._operations import NotificationOperations # type: ignore +from ._operations import NotificationRecipientUserOperations # type: ignore +from ._operations import NotificationRecipientEmailOperations # type: ignore +from ._operations import WorkspaceNotificationRecipientUserOperations # type: ignore +from ._operations import WorkspaceNotificationRecipientEmailOperations # type: ignore +from ._operations import OpenIdConnectProviderOperations # type: ignore +from ._operations import PolicyFragmentOperations # type: ignore +from ._operations import PolicyRestrictionOperations # type: ignore +from ._operations import PortalConfigOperations # type: ignore +from ._operations import ClientApplicationOperations # type: ignore +from ._operations import ClientApplicationProductLinkOperations # type: ignore +from ._operations import PortalRevisionOperations # type: ignore +from ._operations import PrivateEndpointConnectionOperations # type: ignore +from ._operations import ProductApiOperations # type: ignore +from ._operations import ProductGroupOperations # type: ignore +from ._operations import ProductSubscriptionsOperations # type: ignore +from ._operations import ProductApiLinkOperations # type: ignore +from ._operations import ProductGroupLinkOperations # type: ignore +from ._operations import GlobalSchemaOperations # type: ignore +from ._operations import TenantSettingsOperations # type: ignore +from ._operations import SubscriptionOperations # type: ignore +from ._operations import TagApiLinkOperations # type: ignore +from ._operations import TagOperationLinkOperations # type: ignore +from ._operations import TagProductLinkOperations # type: ignore +from ._operations import TenantAccessOperations # type: ignore +from ._operations import TenantAccessGitOperations # type: ignore +from ._operations import TenantConfigurationOperations # type: ignore +from ._operations import UserOperations # type: ignore +from ._operations import UserGroupOperations # type: ignore +from ._operations import UserIdentitiesOperations # type: ignore +from ._operations import UserConfirmationPasswordOperations # type: ignore +from ._operations import ApiManagementWorkspaceLinkOperations # type: ignore +from ._operations import ApiManagementWorkspaceLinksOperations # type: ignore +from ._operations import WorkspaceOperations # type: ignore +from ._operations import ApiExportOperations # type: ignore +from ._operations import ApiManagementSkusOperations # type: ignore +from ._operations import WorkspaceApiExportOperations # type: ignore +from ._operations import OperationStatusOperations # type: ignore +from ._operations import OperationsResultsOperations # type: ignore +from ._operations import _ApiManagementClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ + "WorkspaceApiOperations", + "WorkspaceApiReleaseOperations", + "WorkspaceApiOperationOperations", + "GraphQLApiResolverPolicyOperations", + "ApiPolicyOperations", + "PolicyOperations", + "ProductPolicyOperations", + "WorkspacePolicyOperations", + "WorkspaceApiOperationPolicyOperations", + "WorkspaceApiPolicyOperations", + "WorkspaceProductPolicyOperations", + "TagOperations", + "WorkspaceTagOperations", + "WorkspaceApiSchemaOperations", + "DiagnosticOperations", + "WorkspaceDiagnosticOperations", + "WorkspaceApiDiagnosticOperations", + "IssueOperations", + "ProductWikiOperations", + "WorkspaceApiVersionSetOperations", + "WorkspaceBackendOperations", + "WorkspaceCertificateOperations", + "WorkspaceGroupOperations", + "WorkspaceLoggerOperations", + "WorkspaceNamedValueOperations", + "WorkspaceNotificationOperations", + "WorkspacePolicyFragmentOperations", + "SignInSettingsOperations", + "SignUpSettingsOperations", + "DelegationSettingsOperations", + "WorkspaceProductOperations", + "WorkspaceProductApiLinkOperations", + "WorkspaceProductGroupLinkOperations", + "WorkspaceGlobalSchemaOperations", + "UserSubscriptionOperations", + "WorkspaceSubscriptionOperations", + "WorkspaceTagApiLinkOperations", + "WorkspaceTagOperationLinkOperations", + "WorkspaceTagProductLinkOperations", + "ApiManagementOperationsOperations", "ApiGatewayOperations", "ApiManagementGatewaySkusOperations", - "AllPoliciesOperations", "ApiOperations", "ApiRevisionOperations", + "ApiProductOperations", + "OperationOperations", + "WorkspaceApiRevisionOperations", + "ApiManagementServiceOperations", + "AllPoliciesOperations", + "ApiManagementServiceSkusOperations", + "NetworkStatusOperations", + "OutboundNetworkDependenciesEndpointsOperations", + "PolicyDescriptionOperations", + "PolicyRestrictionValidationsOperations", + "PortalSettingsOperations", + "ProductOperations", + "QuotaByCounterKeysOperations", + "QuotaByPeriodKeysOperations", + "RegionOperations", + "ReportsOperations", + "TagResourceOperations", "ApiReleaseOperations", "ApiOperationOperations", "ApiOperationPolicyOperations", - "TagOperations", "GraphQLApiResolverOperations", - "GraphQLApiResolverPolicyOperations", - "ApiProductOperations", - "ApiPolicyOperations", "ApiSchemaOperations", "ApiDiagnosticOperations", "ApiIssueOperations", "ApiIssueCommentOperations", "ApiIssueAttachmentOperations", "ApiTagDescriptionOperations", - "OperationOperations", "ApiWikiOperations", "ApiWikisOperations", + "ProductWikisOperations", "ApiToolOperations", - "ApiExportOperations", "ApiVersionSetOperations", "AuthorizationProviderOperations", "AuthorizationOperations", @@ -193,65 +243,44 @@ "BackendOperations", "CacheOperations", "CertificateOperations", - "ClientApplicationOperations", - "ClientApplicationProductLinkOperations", "ContentTypeOperations", "ContentItemOperations", "DeletedServicesOperations", - "ApiManagementOperationsOperations", - "ApiManagementServiceSkusOperations", - "ApiManagementServiceOperations", - "DiagnosticOperations", "DocumentationOperations", "EmailTemplateOperations", "ApiGatewayConfigConnectionOperations", "ApiGatewayHostnameBindingOperations", "GatewayOperations", - "GatewayHostnameConfigurationOperations", "GatewayApiOperations", + "GatewayHostnameConfigurationOperations", "GatewayCertificateAuthorityOperations", "GroupOperations", "GroupUserOperations", + "WorkspaceGroupUserOperations", "IdentityProviderOperations", - "IssueOperations", "LoggerOperations", "NamedValueOperations", - "NetworkStatusOperations", "NotificationOperations", "NotificationRecipientUserOperations", "NotificationRecipientEmailOperations", + "WorkspaceNotificationRecipientUserOperations", + "WorkspaceNotificationRecipientEmailOperations", "OpenIdConnectProviderOperations", - "OutboundNetworkDependenciesEndpointsOperations", - "PolicyOperations", - "PolicyDescriptionOperations", "PolicyFragmentOperations", "PolicyRestrictionOperations", - "PolicyRestrictionValidationsOperations", "PortalConfigOperations", + "ClientApplicationOperations", + "ClientApplicationProductLinkOperations", "PortalRevisionOperations", - "PortalSettingsOperations", - "SignInSettingsOperations", - "SignUpSettingsOperations", - "DelegationSettingsOperations", "PrivateEndpointConnectionOperations", - "ProductOperations", "ProductApiOperations", "ProductGroupOperations", "ProductSubscriptionsOperations", - "ProductPolicyOperations", - "ProductWikiOperations", - "ProductWikisOperations", "ProductApiLinkOperations", "ProductGroupLinkOperations", - "QuotaByCounterKeysOperations", - "QuotaByPeriodKeysOperations", - "RegionOperations", - "ReportsOperations", "GlobalSchemaOperations", "TenantSettingsOperations", - "ApiManagementSkusOperations", "SubscriptionOperations", - "TagResourceOperations", "TagApiLinkOperations", "TagOperationLinkOperations", "TagProductLinkOperations", @@ -260,43 +289,13 @@ "TenantConfigurationOperations", "UserOperations", "UserGroupOperations", - "UserSubscriptionOperations", "UserIdentitiesOperations", "UserConfirmationPasswordOperations", - "WorkspaceBackendOperations", - "WorkspaceCertificateOperations", - "WorkspaceDiagnosticOperations", - "WorkspaceApiDiagnosticOperations", - "ApiManagementWorkspaceLinksOperations", "ApiManagementWorkspaceLinkOperations", - "WorkspaceLoggerOperations", + "ApiManagementWorkspaceLinksOperations", "WorkspaceOperations", - "WorkspacePolicyOperations", - "WorkspaceNamedValueOperations", - "WorkspaceGlobalSchemaOperations", - "WorkspaceNotificationOperations", - "WorkspaceNotificationRecipientUserOperations", - "WorkspaceNotificationRecipientEmailOperations", - "WorkspacePolicyFragmentOperations", - "WorkspaceGroupOperations", - "WorkspaceGroupUserOperations", - "WorkspaceSubscriptionOperations", - "WorkspaceApiVersionSetOperations", - "WorkspaceApiOperations", - "WorkspaceApiRevisionOperations", - "WorkspaceApiReleaseOperations", - "WorkspaceApiOperationOperations", - "WorkspaceApiOperationPolicyOperations", - "WorkspaceApiPolicyOperations", - "WorkspaceApiSchemaOperations", - "WorkspaceProductOperations", - "WorkspaceProductApiLinkOperations", - "WorkspaceProductGroupLinkOperations", - "WorkspaceProductPolicyOperations", - "WorkspaceTagOperations", - "WorkspaceTagApiLinkOperations", - "WorkspaceTagOperationLinkOperations", - "WorkspaceTagProductLinkOperations", + "ApiExportOperations", + "ApiManagementSkusOperations", "WorkspaceApiExportOperations", "OperationStatusOperations", "OperationsResultsOperations", diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_all_policies_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_all_policies_operations.py deleted file mode 100644 index 235020b9ae16..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_all_policies_operations.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._all_policies_operations import build_list_by_service_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class AllPoliciesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`all_policies` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.AllPoliciesContract"]: - """Status of all policies of API Management services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either AllPoliciesContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.AllPoliciesContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AllPoliciesCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AllPoliciesCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py deleted file mode 100644 index fbcfbd4d8769..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py +++ /dev/null @@ -1,737 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_diagnostic_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiDiagnosticOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_diagnostic` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.DiagnosticContract"]: - """Lists all diagnostics of an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either DiagnosticContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DiagnosticCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, **kwargs: Any - ) -> _models.DiagnosticContract: - """Gets the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - parameters: _models.DiagnosticContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - parameters: Union[_models.DiagnosticContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Is either a DiagnosticContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - if_match: str, - parameters: _models.DiagnosticContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - if_match: str, - parameters: Union[_models.DiagnosticContract, IO[bytes]], - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Is either a DiagnosticContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or IO[bytes] - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified Diagnostic from an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py deleted file mode 100644 index c8384bfb656f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_export_operations import build_get_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiExportOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_export` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - api_id: str, - format: Union[str, _models.ExportFormat], - export: Union[str, _models.ExportApi], - **kwargs: Any - ) -> _models.ApiExportResult: - """Gets the details of the API specified by its identifier in the format specified to the Storage - Blob with SAS Key valid for 5 minutes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param format: Format in which to export the Api Details to the Storage Blob with Sas Key valid - for 5 minutes. New formats can be added in the future. Known values are: "swagger-link", - "wsdl-link", "wadl-link", "openapi-link", and "openapi+json-link". Required. - :type format: str or ~azure.mgmt.apimanagement.models.ExportFormat - :param export: Query parameter required to export the API details. "true" Required. - :type export: str or ~azure.mgmt.apimanagement.models.ExportApi - :return: ApiExportResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiExportResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiExportResult] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - format=format, - export=export, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiExportResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_config_connection_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_config_connection_operations.py deleted file mode 100644 index 9785bf119717..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_config_connection_operations.py +++ /dev/null @@ -1,572 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_gateway_config_connection_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_gateway_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiGatewayConfigConnectionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_gateway_config_connection` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_gateway( - self, resource_group_name: str, gateway_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ApiManagementGatewayConfigConnectionResource"]: - """List all API Management gateway config connections within a gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :return: An iterator like instance of either ApiManagementGatewayConfigConnectionResource or - the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementGatewayConfigConnectionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_gateway_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementGatewayConfigConnectionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, gateway_name: str, config_connection_name: str, **kwargs: Any - ) -> _models.ApiManagementGatewayConfigConnectionResource: - """Gets an API Management gateway config connection resource description. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param config_connection_name: The name of the API Management gateway config connection. - Required. - :type config_connection_name: str - :return: ApiManagementGatewayConfigConnectionResource or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementGatewayConfigConnectionResource] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - config_connection_name=config_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize( - "ApiManagementGatewayConfigConnectionResource", pipeline_response.http_response - ) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - gateway_name: str, - config_connection_name: str, - parameters: Union[_models.ApiManagementGatewayConfigConnectionResource, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementGatewayConfigConnectionResource") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - config_connection_name=config_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - config_connection_name: str, - parameters: _models.ApiManagementGatewayConfigConnectionResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource]: - """Creates or updates an API Management gateway config connection. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param config_connection_name: The name of the API Management gateway config connection. - Required. - :type config_connection_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config - connection operation. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - ApiManagementGatewayConfigConnectionResource or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - config_connection_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource]: - """Creates or updates an API Management gateway config connection. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param config_connection_name: The name of the API Management gateway config connection. - Required. - :type config_connection_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config - connection operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - ApiManagementGatewayConfigConnectionResource or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - config_connection_name: str, - parameters: Union[_models.ApiManagementGatewayConfigConnectionResource, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource]: - """Creates or updates an API Management gateway config connection. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param config_connection_name: The name of the API Management gateway config connection. - Required. - :type config_connection_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config - connection operation. Is either a ApiManagementGatewayConfigConnectionResource type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource - or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - ApiManagementGatewayConfigConnectionResource or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementGatewayConfigConnectionResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - config_connection_name=config_connection_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "ApiManagementGatewayConfigConnectionResource", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, gateway_name: str, config_connection_name: str, if_match: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - config_connection_name=config_connection_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, gateway_name: str, config_connection_name: str, if_match: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing API Management gateway config connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param config_connection_name: The name of the API Management gateway config connection. - Required. - :type config_connection_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - config_connection_name=config_connection_name, - if_match=if_match, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_hostname_binding_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_hostname_binding_operations.py deleted file mode 100644 index 1033b068a6b2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_hostname_binding_operations.py +++ /dev/null @@ -1,724 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_gateway_hostname_binding_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_gateway_request, - build_refresh_secret_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiGatewayHostnameBindingOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_gateway_hostname_binding` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_gateway( - self, resource_group_name: str, gateway_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.GatewayHostnameBindingResource"]: - """List all API Management gateway hostname bindings within a gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :return: An iterator like instance of either GatewayHostnameBindingResource or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayHostnameBindingListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_gateway_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("GatewayHostnameBindingListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any - ) -> _models.GatewayHostnameBindingResource: - """Gets an API Management gateway hostname binding resource description. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope - of parent Gateway entity. Required. - :type hostname_binding_name: str - :return: GatewayHostnameBindingResource or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayHostnameBindingResource] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GatewayHostnameBindingResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - gateway_name: str, - hostname_binding_name: str, - parameters: Union[_models.GatewayHostnameBindingResource, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayHostnameBindingResource") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - hostname_binding_name: str, - parameters: _models.GatewayHostnameBindingResource, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.GatewayHostnameBindingResource]: - """Creates or updates an API Management gateway hostname binding. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope - of parent Gateway entity. Required. - :type hostname_binding_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname - binding operation. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either GatewayHostnameBindingResource or - the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - hostname_binding_name: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.GatewayHostnameBindingResource]: - """Creates or updates an API Management gateway hostname binding. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope - of parent Gateway entity. Required. - :type hostname_binding_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname - binding operation. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either GatewayHostnameBindingResource or - the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - hostname_binding_name: str, - parameters: Union[_models.GatewayHostnameBindingResource, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.GatewayHostnameBindingResource]: - """Creates or updates an API Management gateway hostname binding. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope - of parent Gateway entity. Required. - :type hostname_binding_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname - binding operation. Is either a GatewayHostnameBindingResource type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either GatewayHostnameBindingResource or - the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayHostnameBindingResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("GatewayHostnameBindingResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.GatewayHostnameBindingResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.GatewayHostnameBindingResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, if_match: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, if_match: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing API Management gateway hostname binding. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope - of parent Gateway entity. Required. - :type hostname_binding_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - if_match=if_match, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _refresh_secret_initial( - self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_secret_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_refresh_secret( - self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Refresh the secret for an API Management gateway hostname binding. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope - of parent Gateway entity. Required. - :type hostname_binding_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._refresh_secret_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_operations.py deleted file mode 100644 index b88bac02f827..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_gateway_operations.py +++ /dev/null @@ -1,826 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_gateway_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiGatewayOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_gateway` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_or_update_initial( - self, - resource_group_name: str, - gateway_name: str, - parameters: Union[_models.ApiManagementGatewayResource, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementGatewayResource") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - parameters: _models.ApiManagementGatewayResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: - """Creates or updates an API Management gateway. This is long running operation and could take - several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: - """Creates or updates an API Management gateway. This is long running operation and could take - several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - parameters: Union[_models.ApiManagementGatewayResource, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: - """Creates or updates an API Management gateway. This is long running operation and could take - several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. - Is either a ApiManagementGatewayResource type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayResource or IO[bytes] - :return: An instance of AsyncLROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementGatewayResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiManagementGatewayResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiManagementGatewayResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - gateway_name: str, - parameters: Union[_models.ApiManagementGatewayUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementGatewayUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - gateway_name: str, - parameters: _models.ApiManagementGatewayUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: - """Updates an existing API Management gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - gateway_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: - """Updates an existing API Management gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - gateway_name: str, - parameters: Union[_models.ApiManagementGatewayUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: - """Updates an existing API Management gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. - Is either a ApiManagementGatewayUpdateParameters type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateParameters or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementGatewayResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiManagementGatewayResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiManagementGatewayResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get( - self, resource_group_name: str, gateway_name: str, **kwargs: Any - ) -> _models.ApiManagementGatewayResource: - """Gets an API Management gateway resource description. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :return: ApiManagementGatewayResource or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementGatewayResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiManagementGatewayResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _delete_initial(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, gateway_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: - """Deletes an existing API Management gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :return: An instance of AsyncLROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = self._deserialize("ApiManagementGatewayResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiManagementGatewayResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiManagementGatewayResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ApiManagementGatewayResource"]: - """List all API Management gateways within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either ApiManagementGatewayResource or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementGatewayListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementGatewayListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ApiManagementGatewayResource"]: - """List all API Management gateways within a subscription. - - :return: An iterator like instance of either ApiManagementGatewayResource or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementGatewayListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementGatewayListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py deleted file mode 100644 index d3815eada750..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py +++ /dev/null @@ -1,600 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_issue_attachment_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiIssueAttachmentOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_issue_attachment` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.IssueAttachmentContract"]: - """Lists all attachments for the Issue associated with the specified API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either IssueAttachmentContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.IssueAttachmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueAttachmentCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IssueAttachmentCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, attachment_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the issue Attachment for an API specified by its - identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be unique in the current - Issue. Required. - :type attachment_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - attachment_id=attachment_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, attachment_id: str, **kwargs: Any - ) -> _models.IssueAttachmentContract: - """Gets the details of the issue Attachment for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be unique in the current - Issue. Required. - :type attachment_id: str - :return: IssueAttachmentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueAttachmentContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - attachment_id=attachment_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueAttachmentContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - attachment_id: str, - parameters: _models.IssueAttachmentContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueAttachmentContract: - """Creates a new Attachment for the Issue in an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be unique in the current - Issue. Required. - :type attachment_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueAttachmentContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueAttachmentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - attachment_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueAttachmentContract: - """Creates a new Attachment for the Issue in an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be unique in the current - Issue. Required. - :type attachment_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueAttachmentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - attachment_id: str, - parameters: Union[_models.IssueAttachmentContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.IssueAttachmentContract: - """Creates a new Attachment for the Issue in an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be unique in the current - Issue. Required. - :type attachment_id: str - :param parameters: Create parameters. Is either a IssueAttachmentContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueAttachmentContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: IssueAttachmentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IssueAttachmentContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IssueAttachmentContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - attachment_id=attachment_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueAttachmentContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - attachment_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified comment from an Issue. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be unique in the current - Issue. Required. - :type attachment_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - attachment_id=attachment_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py deleted file mode 100644 index 66331cf76c7c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py +++ /dev/null @@ -1,600 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_issue_comment_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiIssueCommentOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_issue_comment` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.IssueCommentContract"]: - """Lists all comments for the Issue associated with the specified API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either IssueCommentContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.IssueCommentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueCommentCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IssueCommentCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, comment_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the issue Comment for an API specified by its - identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. - Required. - :type comment_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - comment_id=comment_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, comment_id: str, **kwargs: Any - ) -> _models.IssueCommentContract: - """Gets the details of the issue Comment for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. - Required. - :type comment_id: str - :return: IssueCommentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueCommentContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - comment_id=comment_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueCommentContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - comment_id: str, - parameters: _models.IssueCommentContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueCommentContract: - """Creates a new Comment for the Issue in an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. - Required. - :type comment_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueCommentContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueCommentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - comment_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueCommentContract: - """Creates a new Comment for the Issue in an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. - Required. - :type comment_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueCommentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - comment_id: str, - parameters: Union[_models.IssueCommentContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.IssueCommentContract: - """Creates a new Comment for the Issue in an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. - Required. - :type comment_id: str - :param parameters: Create parameters. Is either a IssueCommentContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueCommentContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: IssueCommentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IssueCommentContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IssueCommentContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - comment_id=comment_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueCommentContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - comment_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified comment from an Issue. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. - Required. - :type comment_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - comment_id=comment_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py deleted file mode 100644 index fe1ae2b169bc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py +++ /dev/null @@ -1,750 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_issue_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiIssueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_issue` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - expand_comments_attachments: Optional[bool] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.IssueContract"]: - """Lists all issues associated with the specified API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | - filter | eq | |
. Default value is None. - :type filter: str - :param expand_comments_attachments: Expand the comment attachments. Default value is None. - :type expand_comments_attachments: bool - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either IssueContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.IssueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - expand_comments_attachments=expand_comments_attachments, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IssueCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - expand_comments_attachments: Optional[bool] = None, - **kwargs: Any - ) -> _models.IssueContract: - """Gets the details of the Issue for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param expand_comments_attachments: Expand the comment attachments. Default value is None. - :type expand_comments_attachments: bool - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - expand_comments_attachments=expand_comments_attachments, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - parameters: _models.IssueContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueContract: - """Creates a new Issue for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueContract: - """Creates a new Issue for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - parameters: Union[_models.IssueContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.IssueContract: - """Creates a new Issue for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param parameters: Create parameters. Is either a IssueContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IssueContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - if_match: str, - parameters: _models.IssueUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueContract: - """Updates an existing issue for an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueContract: - """Updates an existing issue for an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - if_match: str, - parameters: Union[_models.IssueUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.IssueContract: - """Updates an existing issue for an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a IssueUpdateContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueUpdateContract or IO[bytes] - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IssueUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified Issue from an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_client_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_client_operations.py deleted file mode 100644 index 1ab13070b6d6..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_client_operations.py +++ /dev/null @@ -1,254 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.utils import ClientMixinABC -from ...operations._api_management_client_operations import build_perform_connectivity_check_async_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class _ApiManagementClientOperationsMixin( - ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], ApiManagementClientConfiguration] -): - - async def _perform_connectivity_check_async_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - service_name: str, - connectivity_check_request_params: Union[_models.ConnectivityCheckRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(connectivity_check_request_params, (IOBase, bytes)): - _content = connectivity_check_request_params - else: - _json = self._serialize.body(connectivity_check_request_params, "ConnectivityCheckRequest") - - _request = build_perform_connectivity_check_async_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_perform_connectivity_check_async( - self, - resource_group_name: str, - service_name: str, - connectivity_check_request_params: _models.ConnectivityCheckRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ConnectivityCheckResponse]: - """Performs a connectivity check between the API Management service and a given destination, and - returns metrics for the connection, as well as errors encountered while trying to establish it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param connectivity_check_request_params: Connectivity Check request parameters. Required. - :type connectivity_check_request_params: - ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ConnectivityCheckResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_perform_connectivity_check_async( - self, - resource_group_name: str, - service_name: str, - connectivity_check_request_params: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ConnectivityCheckResponse]: - """Performs a connectivity check between the API Management service and a given destination, and - returns metrics for the connection, as well as errors encountered while trying to establish it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param connectivity_check_request_params: Connectivity Check request parameters. Required. - :type connectivity_check_request_params: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ConnectivityCheckResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_perform_connectivity_check_async( - self, - resource_group_name: str, - service_name: str, - connectivity_check_request_params: Union[_models.ConnectivityCheckRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ConnectivityCheckResponse]: - """Performs a connectivity check between the API Management service and a given destination, and - returns metrics for the connection, as well as errors encountered while trying to establish it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param connectivity_check_request_params: Connectivity Check request parameters. Is either a - ConnectivityCheckRequest type or a IO[bytes] type. Required. - :type connectivity_check_request_params: - ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest or IO[bytes] - :return: An instance of AsyncLROPoller that returns either ConnectivityCheckResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ConnectivityCheckResponse] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._perform_connectivity_check_async_initial( - resource_group_name=resource_group_name, - service_name=service_name, - connectivity_check_request_params=connectivity_check_request_params, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ConnectivityCheckResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ConnectivityCheckResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ConnectivityCheckResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_gateway_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_gateway_skus_operations.py deleted file mode 100644 index 8488fb6094a8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_gateway_skus_operations.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_management_gateway_skus_operations import build_list_available_skus_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiManagementGatewaySkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_management_gateway_skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_available_skus( - self, resource_group_name: str, gateway_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.GatewayResourceSkuResult"]: - """Gets available SKUs for API Management gateway. - - Gets all available SKU for a given API Management gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :return: An iterator like instance of either GatewayResourceSkuResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GatewayResourceSkuResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayResourceSkuResults] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_available_skus_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("GatewayResourceSkuResults", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py deleted file mode 100644 index 2487f2da57c2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_management_operations_operations import build_list_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiManagementOperationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_management_operations` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: - """Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - - :return: An iterator like instance of either Operation or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.Operation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("OperationListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py deleted file mode 100644 index 8e3cdd6328fb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py +++ /dev/null @@ -1,2045 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_management_service_operations import ( - build_apply_network_configuration_updates_request, - build_backup_request, - build_check_name_availability_request, - build_create_or_update_request, - build_delete_request, - build_get_domain_ownership_identifier_request, - build_get_request, - build_get_sso_token_request, - build_list_by_resource_group_request, - build_list_request, - build_migrate_to_stv2_request, - build_refresh_hostnames_request, - build_restore_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiManagementServiceOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_management_service` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _restore_initial( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementServiceBackupRestoreParameters") - - _request = build_restore_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_restore( - self, - resource_group_name: str, - service_name: str, - parameters: _models.ApiManagementServiceBackupRestoreParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Restores a backup of an API Management service created using the ApiManagementService_Backup - operation on the current service. This is a long running operation and could take several - minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the Restore API Management service from backup - operation. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_restore( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Restores a backup of an API Management service created using the ApiManagementService_Backup - operation on the current service. This is a long running operation and could take several - minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the Restore API Management service from backup - operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_restore( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Restores a backup of an API Management service created using the ApiManagementService_Backup - operation on the current service. This is a long running operation and could take several - minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the Restore API Management service from backup - operation. Is either a ApiManagementServiceBackupRestoreParameters type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters - or IO[bytes] - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._restore_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _backup_initial( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementServiceBackupRestoreParameters") - - _request = build_backup_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_backup( - self, - resource_group_name: str, - service_name: str, - parameters: _models.ApiManagementServiceBackupRestoreParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Creates a backup of the API Management service to the given Azure Storage Account. This is long - running operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_backup( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Creates a backup of the API Management service to the given Azure Storage Account. This is long - running operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_backup( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Creates a backup of the API Management service to the given Azure Storage Account. This is long - running operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Is either - a ApiManagementServiceBackupRestoreParameters type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters - or IO[bytes] - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._backup_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceResource, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementServiceResource") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: _models.ApiManagementServiceResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Creates or updates an API Management service. This is long running operation and could take - several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Creates or updates an API Management service. This is long running operation and could take - several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceResource, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Creates or updates an API Management service. This is long running operation and could take - several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. - Is either a ApiManagementServiceResource type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource or IO[bytes] - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementServiceUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - service_name: str, - parameters: _models.ApiManagementServiceUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Updates an existing API Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Updates an existing API Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Updates an existing API Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. - Is either a ApiManagementServiceUpdateParameters type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> _models.ApiManagementServiceResource: - """Gets an API Management service resource description. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: ApiManagementServiceResource or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _delete_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Deletes an existing API Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - service_name=service_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _migrate_to_stv2_initial( - self, - resource_group_name: str, - service_name: str, - parameters: Optional[Union[_models.MigrateToStv2Contract, IO[bytes]]] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if parameters else None - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - if parameters is not None: - _json = self._serialize.body(parameters, "MigrateToStv2Contract") - else: - _json = None - - _request = build_migrate_to_stv2_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_migrate_to_stv2( - self, - resource_group_name: str, - service_name: str, - parameters: Optional[_models.MigrateToStv2Contract] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Upgrades an API Management service to the Stv2 platform. For details refer to - https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Optional parameters supplied to migrate service. Default value is None. - :type parameters: ~azure.mgmt.apimanagement.models.MigrateToStv2Contract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_migrate_to_stv2( - self, - resource_group_name: str, - service_name: str, - parameters: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Upgrades an API Management service to the Stv2 platform. For details refer to - https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Optional parameters supplied to migrate service. Default value is None. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_migrate_to_stv2( - self, - resource_group_name: str, - service_name: str, - parameters: Optional[Union[_models.MigrateToStv2Contract, IO[bytes]]] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Upgrades an API Management service to the Stv2 platform. For details refer to - https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Optional parameters supplied to migrate service. Is either a - MigrateToStv2Contract type or a IO[bytes] type. Default value is None. - :type parameters: ~azure.mgmt.apimanagement.models.MigrateToStv2Contract or IO[bytes] - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._migrate_to_stv2_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ApiManagementServiceResource"]: - """List all API Management services within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either ApiManagementServiceResource or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementServiceListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ApiManagementServiceResource"]: - """Lists all API Management services within an Azure subscription. - - :return: An iterator like instance of either ApiManagementServiceResource or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementServiceListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_sso_token( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> _models.ApiManagementServiceGetSsoTokenResult: - """Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: ApiManagementServiceGetSsoTokenResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceGetSsoTokenResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementServiceGetSsoTokenResult] = kwargs.pop("cls", None) - - _request = build_get_sso_token_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiManagementServiceGetSsoTokenResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def check_name_availability( - self, - parameters: _models.ApiManagementServiceCheckNameAvailabilityParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiManagementServiceNameAvailabilityResult: - """Checks availability and correctness of a name for an API Management service. - - :param parameters: Parameters supplied to the CheckNameAvailability operation. Required. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiManagementServiceCheckNameAvailabilityParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiManagementServiceNameAvailabilityResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ApiManagementServiceNameAvailabilityResult: - """Checks availability and correctness of a name for an API Management service. - - :param parameters: Parameters supplied to the CheckNameAvailability operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiManagementServiceNameAvailabilityResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, parameters: Union[_models.ApiManagementServiceCheckNameAvailabilityParameters, IO[bytes]], **kwargs: Any - ) -> _models.ApiManagementServiceNameAvailabilityResult: - """Checks availability and correctness of a name for an API Management service. - - :param parameters: Parameters supplied to the CheckNameAvailability operation. Is either a - ApiManagementServiceCheckNameAvailabilityParameters type or a IO[bytes] type. Required. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiManagementServiceCheckNameAvailabilityParameters or - IO[bytes] - :return: ApiManagementServiceNameAvailabilityResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementServiceNameAvailabilityResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementServiceCheckNameAvailabilityParameters") - - _request = build_check_name_availability_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiManagementServiceNameAvailabilityResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_domain_ownership_identifier( - self, **kwargs: Any - ) -> _models.ApiManagementServiceGetDomainOwnershipIdentifierResult: - """Get the custom domain ownership identifier for an API Management service. - - :return: ApiManagementServiceGetDomainOwnershipIdentifierResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceGetDomainOwnershipIdentifierResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementServiceGetDomainOwnershipIdentifierResult] = kwargs.pop("cls", None) - - _request = build_get_domain_ownership_identifier_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize( - "ApiManagementServiceGetDomainOwnershipIdentifierResult", pipeline_response.http_response - ) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _apply_network_configuration_updates_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - service_name: str, - parameters: Optional[Union[_models.ApiManagementServiceApplyNetworkConfigurationParameters, IO[bytes]]] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if parameters else None - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - if parameters is not None: - _json = self._serialize.body(parameters, "ApiManagementServiceApplyNetworkConfigurationParameters") - else: - _json = None - - _request = build_apply_network_configuration_updates_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_apply_network_configuration_updates( # pylint: disable=name-too-long - self, - resource_group_name: str, - service_name: str, - parameters: Optional[_models.ApiManagementServiceApplyNetworkConfigurationParameters] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated - DNS changes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the Apply Network Configuration operation. If the - parameters are empty, all the regions in which the Api Management service is deployed will be - updated sequentially without incurring downtime in the region. Default value is None. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_apply_network_configuration_updates( # pylint: disable=name-too-long - self, - resource_group_name: str, - service_name: str, - parameters: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated - DNS changes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the Apply Network Configuration operation. If the - parameters are empty, all the regions in which the Api Management service is deployed will be - updated sequentially without incurring downtime in the region. Default value is None. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_apply_network_configuration_updates( # pylint: disable=name-too-long - self, - resource_group_name: str, - service_name: str, - parameters: Optional[Union[_models.ApiManagementServiceApplyNetworkConfigurationParameters, IO[bytes]]] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated - DNS changes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the Apply Network Configuration operation. If the - parameters are empty, all the regions in which the Api Management service is deployed will be - updated sequentially without incurring downtime in the region. Is either a - ApiManagementServiceApplyNetworkConfigurationParameters type or a IO[bytes] type. Default value - is None. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._apply_network_configuration_updates_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _refresh_hostnames_initial( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_hostnames_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_refresh_hostnames( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: - """Force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from - KeyVault on the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An instance of AsyncLROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._refresh_hostnames_initial( - resource_group_name=resource_group_name, - service_name=service_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py deleted file mode 100644 index 63676f131c49..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_management_service_skus_operations import build_list_available_service_skus_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiManagementServiceSkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_management_service_skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_available_service_skus( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ResourceSkuResult"]: - """Gets available SKUs for API Management service. - - Gets all available SKU for a given API Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either ResourceSkuResult or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ResourceSkuResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourceSkuResults] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_available_service_skus_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ResourceSkuResults", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py deleted file mode 100644 index e9e994f397a1..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_management_skus_operations import build_list_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiManagementSkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_management_skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ApiManagementSku"]: - """Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - - :return: An iterator like instance of either ApiManagementSku or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementSku] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementSkusResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementSkusResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_link_operations.py deleted file mode 100644 index 724670ad95dc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_link_operations.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_management_workspace_link_operations import build_get_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiManagementWorkspaceLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_management_workspace_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any - ) -> _models.ApiManagementWorkspaceLinksResource: - """Gets an API Management WorkspaceLink resource description. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :return: ApiManagementWorkspaceLinksResource or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementWorkspaceLinksResource] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiManagementWorkspaceLinksResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_links_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_links_operations.py deleted file mode 100644 index 11ac4a1a4061..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_workspace_links_operations.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_management_workspace_links_operations import build_list_by_service_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiManagementWorkspaceLinksOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_management_workspace_links` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ApiManagementWorkspaceLinksResource"]: - """List all API Management workspaceLinks for a service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either ApiManagementWorkspaceLinksResource or the result - of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementWorkspaceLinksListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementWorkspaceLinksListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py deleted file mode 100644 index 03b80d1aa7a9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py +++ /dev/null @@ -1,745 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_operation_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_api_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiOperationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_operation` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - tags: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.OperationContract"]: - """Lists a collection of the operations for the specified API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param tags: Include tags in the response. Default value is None. - :type tags: str - :return: An iterator like instance of either OperationContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.OperationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - tags=tags, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("OperationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API operation specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, **kwargs: Any - ) -> _models.OperationContract: - """Gets the details of the API Operation specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OperationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - parameters: _models.OperationContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Creates a new operation in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Creates a new operation in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - parameters: Union[_models.OperationContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.OperationContract: - """Creates a new operation in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param parameters: Create parameters. Is either a OperationContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "OperationContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OperationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - if_match: str, - parameters: _models.OperationUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Updates the details of the operation in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Operation Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Updates the details of the operation in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Operation Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - if_match: str, - parameters: Union[_models.OperationUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.OperationContract: - """Updates the details of the operation in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Operation Update parameters. Is either a OperationUpdateContract type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract or IO[bytes] - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "OperationUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OperationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified operation in the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py deleted file mode 100644 index 6862ebd13bb8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py +++ /dev/null @@ -1,558 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_operation_policy_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_operation_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiOperationPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_operation_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list_by_operation( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, **kwargs: Any - ) -> _models.PolicyCollection: - """Get the list of policy configuration at the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :return: PolicyCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - _request = build_list_by_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PolicyCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API operation policy specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the Api Operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py deleted file mode 100644 index ce43396eaeb7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py +++ /dev/null @@ -1,985 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_list_by_tags_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - tags: Optional[str] = None, - expand_api_version_set: Optional[bool] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ApiContract"]: - """Lists all APIs of the API Management service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-apis - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| isCurrent | filter | eq, ne | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param tags: Include tags in the response. Default value is None. - :type tags: str - :param expand_api_version_set: Include full ApiVersionSet resource in response. Default value - is None. - :type expand_api_version_set: bool - :return: An iterator like instance of either ApiContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - tags=tags, - expand_api_version_set=expand_api_version_set, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> _models.ApiContract: - """Gets the details of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: Union[_models.ApiCreateOrUpdateParameter, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiCreateOrUpdateParameter") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: _models.ApiCreateOrUpdateParameter, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiContract]: - """Creates new or updates existing specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiContract]: - """Creates new or updates existing specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: Union[_models.ApiCreateOrUpdateParameter, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiContract]: - """Creates new or updates existing specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param parameters: Create or update parameters. Is either a ApiCreateOrUpdateParameter type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either ApiContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - parameters: _models.ApiUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiContract: - """Updates the specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Update Contract parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiContract: - """Updates the specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Update Contract parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - parameters: Union[_models.ApiUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.ApiContract: - """Updates the specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Update Contract parameters. Is either a ApiUpdateContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract or IO[bytes] - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - delete_revisions: Optional[bool] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - delete_revisions=delete_revisions, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - delete_revisions: Optional[bool] = None, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param delete_revisions: Delete all revisions of the Api. Default value is None. - :type delete_revisions: bool - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - if_match=if_match, - delete_revisions=delete_revisions, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_tags( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - include_not_tagged_apis: Optional[bool] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagResourceContract"]: - """Lists a collection of apis associated with tags. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| isCurrent | filter | eq | |
. Default value is - None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param include_not_tagged_apis: Include not tagged APIs. Default value is None. - :type include_not_tagged_apis: bool - :return: An iterator like instance of either TagResourceContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagResourceCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_tags_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - include_not_tagged_apis=include_not_tagged_apis, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagResourceCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py deleted file mode 100644 index dc6ec421cfef..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py +++ /dev/null @@ -1,526 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_policy_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_api_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list_by_api( - self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any - ) -> _models.PolicyCollection: - """Get the policy configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: PolicyCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PolicyCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API policy specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py deleted file mode 100644 index 1d5d3b16741f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_product_operations import build_list_by_apis_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiProductOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_product` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_apis( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ProductContract"]: - """Lists all Products, which the API is part of. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ProductContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_apis_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ProductCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py deleted file mode 100644 index 0be2bf72e494..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py +++ /dev/null @@ -1,739 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_release_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiReleaseOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_release` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ApiReleaseContract"]: - """Lists all releases of an API. An API release is created when making an API Revision current. - Releases are also used to rollback to previous revisions. Results will be paged and can be - constrained by the $top and $skip parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| notes | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiReleaseContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiReleaseContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiReleaseCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiReleaseCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, release_id: str, **kwargs: Any - ) -> bool: - """Returns the etag of an API release. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, api_id: str, release_id: str, **kwargs: Any - ) -> _models.ApiReleaseContract: - """Returns the details of an API release. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiReleaseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - parameters: _models.ApiReleaseContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Creates a new Release for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Creates a new Release for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - parameters: Union[_models.ApiReleaseContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Creates a new Release for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param parameters: Create parameters. Is either a ApiReleaseContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiReleaseContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiReleaseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - if_match: str, - parameters: _models.ApiReleaseContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Updates the details of the release of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Release Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Updates the details of the release of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Release Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - if_match: str, - parameters: Union[_models.ApiReleaseContract, IO[bytes]], - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Updates the details of the release of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Release Update parameters. Is either a ApiReleaseContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or IO[bytes] - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiReleaseContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiReleaseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, api_id: str, release_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified release in the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py deleted file mode 100644 index c5a832ad6fcb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_revision_operations import build_list_by_service_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiRevisionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_revision` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ApiRevisionContract"]: - """Lists all revisions of an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| apiRevision - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiRevisionContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiRevisionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiRevisionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py deleted file mode 100644 index ae66ad7c5dff..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py +++ /dev/null @@ -1,657 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_schema_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_api_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiSchemaOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_schema` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.SchemaContract"]: - """Get the schema configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| contentType - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either SchemaContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SchemaCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("SchemaCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, schema_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the schema specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, api_id: str, schema_id: str, **kwargs: Any - ) -> _models.SchemaContract: - """Get the schema configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: SchemaContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SchemaContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SchemaContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - api_id: str, - schema_id: str, - parameters: Union[_models.SchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SchemaContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - schema_id: str, - parameters: _models.SchemaContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.SchemaContract]: - """Creates or updates schema configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: The schema contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - schema_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.SchemaContract]: - """Creates or updates schema configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: The schema contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - schema_id: str, - parameters: Union[_models.SchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.SchemaContract]: - """Creates or updates schema configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: The schema contents to apply. Is either a SchemaContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either SchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - schema_id=schema_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("SchemaContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.SchemaContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.SchemaContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - api_id: str, - schema_id: str, - if_match: str, - force: Optional[bool] = None, - **kwargs: Any - ) -> None: - """Deletes the schema configuration at the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param force: If true removes all references to the schema before deleting it. Default value is - None. - :type force: bool - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - force=force, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py deleted file mode 100644 index 1314b30213de..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py +++ /dev/null @@ -1,569 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_tag_description_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiTagDescriptionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_tag_description` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagDescriptionContract"]: - """Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is - defined on API level but tag may be assigned to the Operations. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagDescriptionContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagDescriptionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagDescriptionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagDescriptionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, tag_description_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_description_id: Tag description identifier. Used when creating tagDescription for - API/Tag association. Based on API and Tag names. Required. - :type tag_description_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_description_id=tag_description_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, api_id: str, tag_description_id: str, **kwargs: Any - ) -> _models.TagDescriptionContract: - """Get Tag description in scope of API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_description_id: Tag description identifier. Used when creating tagDescription for - API/Tag association. Based on API and Tag names. Required. - :type tag_description_id: str - :return: TagDescriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagDescriptionContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_description_id=tag_description_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagDescriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tag_description_id: str, - parameters: _models.TagDescriptionCreateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagDescriptionContract: - """Create/Update tag description in scope of the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_description_id: Tag description identifier. Used when creating tagDescription for - API/Tag association. Based on API and Tag names. Required. - :type tag_description_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagDescriptionCreateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagDescriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tag_description_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagDescriptionContract: - """Create/Update tag description in scope of the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_description_id: Tag description identifier. Used when creating tagDescription for - API/Tag association. Based on API and Tag names. Required. - :type tag_description_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagDescriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tag_description_id: str, - parameters: Union[_models.TagDescriptionCreateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.TagDescriptionContract: - """Create/Update tag description in scope of the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_description_id: Tag description identifier. Used when creating tagDescription for - API/Tag association. Based on API and Tag names. Required. - :type tag_description_id: str - :param parameters: Create parameters. Is either a TagDescriptionCreateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagDescriptionCreateParameters or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: TagDescriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagDescriptionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagDescriptionCreateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_description_id=tag_description_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagDescriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tag_description_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Delete tag description for the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_description_id: Tag description identifier. Used when creating tagDescription for - API/Tag association. Based on API and Tag names. Required. - :type tag_description_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_description_id=tag_description_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tool_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tool_operations.py deleted file mode 100644 index a43851fc606a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tool_operations.py +++ /dev/null @@ -1,707 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_tool_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_api_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiToolOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_tool` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ToolContract"]: - """Lists a collection of the MCP tools for the specified API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ToolContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ToolContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ToolCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ToolCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API tool specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tool_id=tool_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any - ) -> _models.ToolContract: - """Gets the details of the API Tool specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tool_id=tool_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ToolContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tool_id: str, - parameters: _models.ToolContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ToolContract: - """Creates a new tool in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ToolContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tool_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ToolContract: - """Creates a new tool in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tool_id: str, - parameters: Union[_models.ToolContract, IO[bytes]], - **kwargs: Any - ) -> _models.ToolContract: - """Creates a new tool in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :param parameters: Create parameters. Is either a ToolContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ToolContract or IO[bytes] - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ToolContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tool_id=tool_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ToolContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tool_id: str, - parameters: _models.ToolContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ToolContract: - """Updates the details of the tool in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :param parameters: API Tool Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ToolContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tool_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ToolContract: - """Updates the details of the tool in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :param parameters: API Tool Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tool_id: str, - parameters: Union[_models.ToolContract, IO[bytes]], - **kwargs: Any - ) -> _models.ToolContract: - """Updates the details of the tool in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :param parameters: API Tool Update parameters. Is either a ToolContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ToolContract or IO[bytes] - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ToolContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tool_id=tool_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ToolContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any - ) -> None: - """Deletes the specified tool in the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tool_id=tool_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py deleted file mode 100644 index dc50a789a3d6..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py +++ /dev/null @@ -1,694 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_version_set_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiVersionSetOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_version_set` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ApiVersionSetContract"]: - """Lists a collection of API Version Sets in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiVersionSetContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiVersionSetContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiVersionSetCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiVersionSetCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, version_set_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, version_set_id: str, **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Gets the details of the Api Version Set specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiVersionSetContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - version_set_id: str, - parameters: _models.ApiVersionSetContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Creates or Updates a Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - version_set_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Creates or Updates a Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - version_set_id: str, - parameters: Union[_models.ApiVersionSetContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Creates or Updates a Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param parameters: Create or update parameters. Is either a ApiVersionSetContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiVersionSetContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiVersionSetContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - version_set_id: str, - if_match: str, - parameters: _models.ApiVersionSetUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Updates the details of the Api VersionSet specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - version_set_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Updates the details of the Api VersionSet specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - version_set_id: str, - if_match: str, - parameters: Union[_models.ApiVersionSetUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Updates the details of the Api VersionSet specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a ApiVersionSetUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters or IO[bytes] - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiVersionSetUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiVersionSetContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, version_set_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wiki_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wiki_operations.py deleted file mode 100644 index 7398f70aeebf..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wiki_operations.py +++ /dev/null @@ -1,582 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_wiki_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiWikiOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_wiki` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any - ) -> _models.WikiContract: - """Gets the details of the Wiki for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WikiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: _models.WikiContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Creates a new Wiki for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Creates a new Wiki for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: Union[_models.WikiContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.WikiContract: - """Creates a new Wiki for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param parameters: Create parameters. Is either a WikiContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "WikiContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WikiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - parameters: _models.WikiUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Updates the details of the Wiki for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Wiki Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Updates the details of the Wiki for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Wiki Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - parameters: Union[_models.WikiUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.WikiContract: - """Updates the details of the Wiki for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Wiki Update parameters. Is either a WikiUpdateContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract or IO[bytes] - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "WikiUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WikiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, api_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified Wiki from an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wikis_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wikis_operations.py deleted file mode 100644 index b298a422aa59..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_wikis_operations.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._api_wikis_operations import build_list_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ApiWikisOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`api_wikis` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.WikiContract"]: - """Gets the wikis for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | eq | contains |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either WikiContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.WikiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WikiCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("WikiCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_access_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_access_policy_operations.py deleted file mode 100644 index 5a3110d26f0d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_access_policy_operations.py +++ /dev/null @@ -1,515 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._authorization_access_policy_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_authorization_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class AuthorizationAccessPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`authorization_access_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_authorization( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.AuthorizationAccessPolicyContract"]: - """Lists a collection of authorization access policy defined within a authorization. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either AuthorizationAccessPolicyContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationAccessPolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_authorization_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AuthorizationAccessPolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - authorization_access_policy_id: str, - **kwargs: Any - ) -> _models.AuthorizationAccessPolicyContract: - """Gets the details of the authorization access policy specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param authorization_access_policy_id: Identifier of the authorization access policy. Required. - :type authorization_access_policy_id: str - :return: AuthorizationAccessPolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationAccessPolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - authorization_access_policy_id=authorization_access_policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationAccessPolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - authorization_access_policy_id: str, - parameters: _models.AuthorizationAccessPolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationAccessPolicyContract: - """Creates or updates Authorization Access Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param authorization_access_policy_id: Identifier of the authorization access policy. Required. - :type authorization_access_policy_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationAccessPolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - authorization_access_policy_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationAccessPolicyContract: - """Creates or updates Authorization Access Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param authorization_access_policy_id: Identifier of the authorization access policy. Required. - :type authorization_access_policy_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationAccessPolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - authorization_access_policy_id: str, - parameters: Union[_models.AuthorizationAccessPolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.AuthorizationAccessPolicyContract: - """Creates or updates Authorization Access Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param authorization_access_policy_id: Identifier of the authorization access policy. Required. - :type authorization_access_policy_id: str - :param parameters: Create parameters. Is either a AuthorizationAccessPolicyContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract or - IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: AuthorizationAccessPolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AuthorizationAccessPolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationAccessPolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - authorization_access_policy_id=authorization_access_policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationAccessPolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - authorization_access_policy_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific access policy from the Authorization. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param authorization_access_policy_id: Identifier of the authorization access policy. Required. - :type authorization_access_policy_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - authorization_access_policy_id=authorization_access_policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_login_links_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_login_links_operations.py deleted file mode 100644 index 0d845359ba91..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_login_links_operations.py +++ /dev/null @@ -1,212 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._authorization_login_links_operations import build_post_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class AuthorizationLoginLinksOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`authorization_login_links` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - async def post( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: _models.AuthorizationLoginRequestContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationLoginResponseContract: - """Gets authorization login links. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationLoginRequestContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationLoginResponseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def post( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationLoginResponseContract: - """Gets authorization login links. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationLoginResponseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def post( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: Union[_models.AuthorizationLoginRequestContract, IO[bytes]], - **kwargs: Any - ) -> _models.AuthorizationLoginResponseContract: - """Gets authorization login links. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Is either a AuthorizationLoginRequestContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationLoginRequestContract or - IO[bytes] - :return: AuthorizationLoginResponseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AuthorizationLoginResponseContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationLoginRequestContract") - - _request = build_post_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationLoginResponseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_operations.py deleted file mode 100644 index 464ff263c6de..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_operations.py +++ /dev/null @@ -1,648 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._authorization_operations import ( - build_confirm_consent_code_request, - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_authorization_provider_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class AuthorizationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`authorization` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_authorization_provider( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.AuthorizationContract"]: - """Lists a collection of authorization providers defined within a authorization provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either AuthorizationContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.AuthorizationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_authorization_provider_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AuthorizationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - **kwargs: Any - ) -> _models.AuthorizationContract: - """Gets the details of the authorization specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :return: AuthorizationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: _models.AuthorizationContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationContract: - """Creates or updates authorization. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationContract: - """Creates or updates authorization. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: Union[_models.AuthorizationContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.AuthorizationContract: - """Creates or updates authorization. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Is either a AuthorizationContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: AuthorizationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AuthorizationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific Authorization from the Authorization provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - async def confirm_consent_code( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: _models.AuthorizationConfirmConsentCodeRequestContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Confirm valid consent code to suppress Authorizations anti-phishing page. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Required. - :type parameters: - ~azure.mgmt.apimanagement.models.AuthorizationConfirmConsentCodeRequestContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def confirm_consent_code( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Confirm valid consent code to suppress Authorizations anti-phishing page. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def confirm_consent_code( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: Union[_models.AuthorizationConfirmConsentCodeRequestContract, IO[bytes]], - **kwargs: Any - ) -> None: - """Confirm valid consent code to suppress Authorizations anti-phishing page. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Is either a - AuthorizationConfirmConsentCodeRequestContract type or a IO[bytes] type. Required. - :type parameters: - ~azure.mgmt.apimanagement.models.AuthorizationConfirmConsentCodeRequestContract or IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationConfirmConsentCodeRequestContract") - - _request = build_confirm_consent_code_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_provider_operations.py deleted file mode 100644 index 6d18ec635a00..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_provider_operations.py +++ /dev/null @@ -1,529 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._authorization_provider_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_service_request, - build_refresh_secret_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class AuthorizationProviderOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`authorization_provider` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.AuthorizationProviderContract"]: - """Lists a collection of authorization providers defined within a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either AuthorizationProviderContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.AuthorizationProviderContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationProviderCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AuthorizationProviderCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, authorization_provider_id: str, **kwargs: Any - ) -> _models.AuthorizationProviderContract: - """Gets the details of the authorization provider specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :return: AuthorizationProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - parameters: _models.AuthorizationProviderContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationProviderContract: - """Creates or updates authorization provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationProviderContract: - """Creates or updates authorization provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - parameters: Union[_models.AuthorizationProviderContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.AuthorizationProviderContract: - """Creates or updates authorization provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param parameters: Create parameters. Is either a AuthorizationProviderContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: AuthorizationProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationProviderContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, authorization_provider_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific authorization provider from the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def refresh_secret( - self, resource_group_name: str, service_name: str, authorization_provider_id: str, **kwargs: Any - ) -> _models.AuthorizationProviderContract: - """Refreshes the Key Vault reference secret for the specified authorization provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :return: AuthorizationProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) - - _request = build_refresh_secret_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py deleted file mode 100644 index 84781ffa1b00..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py +++ /dev/null @@ -1,754 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._authorization_server_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_list_secrets_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class AuthorizationServerOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`authorization_server` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.AuthorizationServerContract"]: - """Lists a collection of authorization servers defined within a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either AuthorizationServerContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.AuthorizationServerContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationServerCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AuthorizationServerCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, authsid: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - authsid=authsid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, authsid: str, **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Gets the details of the authorization server specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationServerContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - authsid=authsid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationServerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - authsid: str, - parameters: _models.AuthorizationServerContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Creates new authorization server or updates an existing authorization server. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - authsid: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Creates new authorization server or updates an existing authorization server. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - authsid: str, - parameters: Union[_models.AuthorizationServerContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Creates new authorization server or updates an existing authorization server. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param parameters: Create or update parameters. Is either a AuthorizationServerContract type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AuthorizationServerContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationServerContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - authsid=authsid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationServerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - authsid: str, - if_match: str, - parameters: _models.AuthorizationServerUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Updates the details of the authorization server specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: OAuth2 Server settings Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - authsid: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Updates the details of the authorization server specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: OAuth2 Server settings Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - authsid: str, - if_match: str, - parameters: Union[_models.AuthorizationServerUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Updates the details of the authorization server specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: OAuth2 Server settings Update parameters. Is either a - AuthorizationServerUpdateContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerUpdateContract or - IO[bytes] - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AuthorizationServerContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationServerUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - authsid=authsid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationServerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, authsid: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific authorization server instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - authsid=authsid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def list_secrets( - self, resource_group_name: str, service_name: str, authsid: str, **kwargs: Any - ) -> _models.AuthorizationServerSecretsContract: - """Gets the client secret details of the authorization server. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :return: AuthorizationServerSecretsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerSecretsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationServerSecretsContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - authsid=authsid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationServerSecretsContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py deleted file mode 100644 index d79bc5489ea7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py +++ /dev/null @@ -1,845 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._backend_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_reconnect_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class BackendOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`backend` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.BackendContract"]: - """Lists a collection of backends in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either BackendContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.BackendContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BackendCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("BackendCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, backend_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the backend specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, backend_id: str, **kwargs: Any - ) -> _models.BackendContract: - """Gets the details of the backend specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("BackendContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - parameters: _models.BackendContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Creates or Updates a backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Creates or Updates a backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - parameters: Union[_models.BackendContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.BackendContract: - """Creates or Updates a backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Create parameters. Is either a BackendContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "BackendContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("BackendContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - if_match: str, - parameters: _models.BackendUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Updates an existing backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Updates an existing backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - if_match: str, - parameters: Union[_models.BackendUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.BackendContract: - """Updates an existing backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a BackendUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters or IO[bytes] - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "BackendUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("BackendContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, backend_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - async def reconnect( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - parameters: Optional[_models.BackendReconnectContract] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Notifies the API Management gateway to create a new connection to the backend after the - specified timeout. If no timeout was specified, timeout of 2 minutes is used. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Reconnect request parameters. Default value is None. - :type parameters: ~azure.mgmt.apimanagement.models.BackendReconnectContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def reconnect( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - parameters: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Notifies the API Management gateway to create a new connection to the backend after the - specified timeout. If no timeout was specified, timeout of 2 minutes is used. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Reconnect request parameters. Default value is None. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def reconnect( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - parameters: Optional[Union[_models.BackendReconnectContract, IO[bytes]]] = None, - **kwargs: Any - ) -> None: - """Notifies the API Management gateway to create a new connection to the backend after the - specified timeout. If no timeout was specified, timeout of 2 minutes is used. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Reconnect request parameters. Is either a BackendReconnectContract type or a - IO[bytes] type. Default value is None. - :type parameters: ~azure.mgmt.apimanagement.models.BackendReconnectContract or IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if parameters else None - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - if parameters is not None: - _json = self._serialize.body(parameters, "BackendReconnectContract") - else: - _json = None - - _request = build_reconnect_request( - resource_group_name=resource_group_name, - service_name=service_name, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py deleted file mode 100644 index d73e4f7fd7fd..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py +++ /dev/null @@ -1,693 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._cache_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class CacheOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`cache` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.CacheContract"]: - """Lists a collection of all external Caches in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either CacheContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.CacheContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CacheCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("CacheCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, cache_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the Cache specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - cache_id=cache_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, cache_id: str, **kwargs: Any - ) -> _models.CacheContract: - """Gets the details of the Cache specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CacheContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - cache_id=cache_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CacheContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - cache_id: str, - parameters: _models.CacheContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheContract: - """Creates or updates an External Cache to be used in Api Management instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-cache-external - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param parameters: Create or Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CacheContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - cache_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheContract: - """Creates or updates an External Cache to be used in Api Management instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-cache-external - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param parameters: Create or Update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - cache_id: str, - parameters: Union[_models.CacheContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.CacheContract: - """Creates or updates an External Cache to be used in Api Management instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-cache-external - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param parameters: Create or Update parameters. Is either a CacheContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CacheContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CacheContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "CacheContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - cache_id=cache_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CacheContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - cache_id: str, - if_match: str, - parameters: _models.CacheUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheContract: - """Updates the details of the cache specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CacheUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - cache_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheContract: - """Updates the details of the cache specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - cache_id: str, - if_match: str, - parameters: Union[_models.CacheUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.CacheContract: - """Updates the details of the cache specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a CacheUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CacheUpdateParameters or IO[bytes] - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CacheContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "CacheUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - cache_id=cache_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CacheContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, cache_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific Cache. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - cache_id=cache_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py deleted file mode 100644 index 8d4b2f51aa0b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py +++ /dev/null @@ -1,623 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._certificate_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_refresh_secret_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class CertificateOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`certificate` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - is_key_vault_refresh_failed: Optional[bool] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.CertificateContract"]: - """Lists a collection of all certificates in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param is_key_vault_refresh_failed: When set to true, the response contains only certificates - entities which failed refresh. Default value is None. - :type is_key_vault_refresh_failed: bool - :return: An iterator like instance of either CertificateContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.CertificateContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - is_key_vault_refresh_failed=is_key_vault_refresh_failed, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("CertificateCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, certificate_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the certificate specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, certificate_id: str, **kwargs: Any - ) -> _models.CertificateContract: - """Gets the details of the certificate specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CertificateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - certificate_id: str, - parameters: _models.CertificateCreateOrUpdateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateContract: - """Creates or updates the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Create or Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - certificate_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateContract: - """Creates or updates the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Create or Update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - certificate_id: str, - parameters: Union[_models.CertificateCreateOrUpdateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.CertificateContract: - """Creates or updates the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Create or Update parameters. Is either a CertificateCreateOrUpdateParameters - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters or - IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "CertificateCreateOrUpdateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CertificateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, certificate_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific certificate. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def refresh_secret( - self, resource_group_name: str, service_name: str, certificate_id: str, **kwargs: Any - ) -> _models.CertificateContract: - """From KeyVault, Refresh the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) - - _request = build_refresh_secret_request( - resource_group_name=resource_group_name, - service_name=service_name, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CertificateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_operations.py deleted file mode 100644 index 095f13c9b27e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_operations.py +++ /dev/null @@ -1,582 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._client_application_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_list_secrets_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ClientApplicationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`client_application` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ClientApplicationContract"]: - """Lists a collection of client applications in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
state | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
|. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ClientApplicationContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ClientApplicationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientApplicationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ClientApplicationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any - ) -> _models.ClientApplicationContract: - """Gets the details of the client application specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :return: ClientApplicationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientApplicationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ClientApplicationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - parameters: _models.ClientApplicationContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ClientApplicationContract: - """Creates or Updates a client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ClientApplicationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ClientApplicationContract: - """Creates or Updates a client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ClientApplicationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - parameters: Union[_models.ClientApplicationContract, IO[bytes]], - **kwargs: Any - ) -> _models.ClientApplicationContract: - """Creates or Updates a client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param parameters: Create or update parameters. Is either a ClientApplicationContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationContract or IO[bytes] - :return: ClientApplicationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ClientApplicationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ClientApplicationContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ClientApplicationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any - ) -> None: - """Delete client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def list_secrets( - self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any - ) -> _models.ClientApplicationSecretsContract: - """Retrived client application secrets. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :return: ClientApplicationSecretsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationSecretsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientApplicationSecretsContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ClientApplicationSecretsContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_product_link_operations.py deleted file mode 100644 index 59319a92f4fd..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_client_application_product_link_operations.py +++ /dev/null @@ -1,475 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._client_application_product_link_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_client_applications_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ClientApplicationProductLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`client_application_product_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_client_applications( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ClientApplicationProductLinkContract"]: - """Lists a collection of product links associated with the specified client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ClientApplicationProductLinkContract or the result - of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientApplicationProductLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_client_applications_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - subscription_id=self._config.subscription_id, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ClientApplicationProductLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - client_application_product_link_id: str, - **kwargs: Any - ) -> _models.ClientApplicationProductLinkContract: - """Gets the product link for the client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param client_application_product_link_id: Client Application Product Link identifier. Must be - unique in the current API Management service instance. Required. - :type client_application_product_link_id: str - :return: ClientApplicationProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientApplicationProductLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - client_application_product_link_id=client_application_product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ClientApplicationProductLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - client_application_product_link_id: str, - parameters: _models.ClientApplicationProductLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ClientApplicationProductLinkContract: - """Adds an Product to the specified Client Application via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param client_application_product_link_id: Client Application Product Link identifier. Must be - unique in the current API Management service instance. Required. - :type client_application_product_link_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ClientApplicationProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - client_application_product_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ClientApplicationProductLinkContract: - """Adds an Product to the specified Client Application via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param client_application_product_link_id: Client Application Product Link identifier. Must be - unique in the current API Management service instance. Required. - :type client_application_product_link_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ClientApplicationProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - client_application_product_link_id: str, - parameters: Union[_models.ClientApplicationProductLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.ClientApplicationProductLinkContract: - """Adds an Product to the specified Client Application via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param client_application_product_link_id: Client Application Product Link identifier. Must be - unique in the current API Management service instance. Required. - :type client_application_product_link_id: str - :param parameters: Create parameters. Is either a ClientApplicationProductLinkContract type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract or - IO[bytes] - :return: ClientApplicationProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ClientApplicationProductLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ClientApplicationProductLinkContract") - - _request = build_create_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - client_application_product_link_id=client_application_product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ClientApplicationProductLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - client_application_product_link_id: str, - **kwargs: Any - ) -> None: - """Deletes the specified Product from the specified client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param client_application_product_link_id: Client Application Product Link identifier. Must be - unique in the current API Management service instance. Required. - :type client_application_product_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - client_application_product_link_id=client_application_product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py deleted file mode 100644 index 46917f388fd6..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py +++ /dev/null @@ -1,535 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._content_item_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ContentItemOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`content_item` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, content_type_id: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ContentItemContract"]: - """Lists developer portal's content items specified by the provided content type. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :return: An iterator like instance of either ContentItemContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ContentItemContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ContentItemCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ContentItemCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, content_type_id: str, content_item_id: str, **kwargs: Any - ) -> bool: - """Returns the entity state (ETag) version of the developer portal's content item specified by its - identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param content_item_id: Content item identifier. Required. - :type content_item_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - content_item_id=content_item_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, content_type_id: str, content_item_id: str, **kwargs: Any - ) -> _models.ContentItemContract: - """Returns the developer portal's content item specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param content_item_id: Content item identifier. Required. - :type content_item_id: str - :return: ContentItemContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ContentItemContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - content_item_id=content_item_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ContentItemContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - content_item_id: str, - parameters: _models.ContentItemContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ContentItemContract: - """Creates a new developer portal's content item specified by the provided content type. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param content_item_id: Content item identifier. Required. - :type content_item_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ContentItemContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ContentItemContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - content_item_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ContentItemContract: - """Creates a new developer portal's content item specified by the provided content type. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param content_item_id: Content item identifier. Required. - :type content_item_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ContentItemContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - content_item_id: str, - parameters: Union[_models.ContentItemContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ContentItemContract: - """Creates a new developer portal's content item specified by the provided content type. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param content_item_id: Content item identifier. Required. - :type content_item_id: str - :param parameters: Create or update parameters. Is either a ContentItemContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ContentItemContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ContentItemContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ContentItemContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ContentItemContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - content_item_id=content_item_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ContentItemContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - content_item_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Removes the specified developer portal's content item. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param content_item_id: Content item identifier. Required. - :type content_item_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - content_item_id=content_item_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py deleted file mode 100644 index 9cb48ff15bed..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py +++ /dev/null @@ -1,451 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._content_type_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_service_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ContentTypeOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`content_type` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ContentTypeContract"]: - """Lists the developer portal's content types. Content types describe content items' properties, - validation rules, and constraints. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either ContentTypeContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ContentTypeContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ContentTypeCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ContentTypeCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, content_type_id: str, **kwargs: Any - ) -> _models.ContentTypeContract: - """Gets the details of the developer portal's content type. Content types describe content items' - properties, validation rules, and constraints. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :return: ContentTypeContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ContentTypeContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ContentTypeContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - parameters: _models.ContentTypeContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ContentTypeContract: - """Creates or updates the developer portal's content type. Content types describe content items' - properties, validation rules, and constraints. Custom content types' identifiers need to start - with the ``c-`` prefix. Built-in content types can't be modified. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ContentTypeContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ContentTypeContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ContentTypeContract: - """Creates or updates the developer portal's content type. Content types describe content items' - properties, validation rules, and constraints. Custom content types' identifiers need to start - with the ``c-`` prefix. Built-in content types can't be modified. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ContentTypeContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - parameters: Union[_models.ContentTypeContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ContentTypeContract: - """Creates or updates the developer portal's content type. Content types describe content items' - properties, validation rules, and constraints. Custom content types' identifiers need to start - with the ``c-`` prefix. Built-in content types can't be modified. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param parameters: Create or update parameters. Is either a ContentTypeContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ContentTypeContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ContentTypeContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ContentTypeContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ContentTypeContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ContentTypeContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, content_type_id: str, if_match: str, **kwargs: Any - ) -> None: - """Removes the specified developer portal's content type. Content types describe content items' - properties, validation rules, and constraints. Built-in content types (with identifiers - starting with the ``c-`` prefix) can't be removed. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py deleted file mode 100644 index 3d4d0e59bb98..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py +++ /dev/null @@ -1,532 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._delegation_settings_operations import ( - build_create_or_update_request, - build_get_entity_tag_request, - build_get_request, - build_list_secrets_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class DelegationSettingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`delegation_settings` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the DelegationSettings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.PortalDelegationSettings: - """Get Delegation Settings for the Portal. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: PortalDelegationSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalDelegationSettings] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PortalDelegationSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: _models.PortalDelegationSettings, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Update Delegation settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Delegation settings. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Update Delegation settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Delegation settings. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: Union[_models.PortalDelegationSettings, IO[bytes]], - **kwargs: Any - ) -> None: - """Update Delegation settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Delegation settings. Is either a PortalDelegationSettings type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings or IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalDelegationSettings") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: _models.PortalDelegationSettings, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalDelegationSettings: - """Create or Update Delegation settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalDelegationSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalDelegationSettings: - """Create or Update Delegation settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalDelegationSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.PortalDelegationSettings, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PortalDelegationSettings: - """Create or Update Delegation settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Is either a PortalDelegationSettings type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PortalDelegationSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalDelegationSettings] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalDelegationSettings") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalDelegationSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def list_secrets( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> _models.PortalSettingValidationKeyContract: - """Gets the secret validation key of the DelegationSettings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: PortalSettingValidationKeyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSettingValidationKeyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalSettingValidationKeyContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalSettingValidationKeyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py deleted file mode 100644 index 7dd1426dad94..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py +++ /dev/null @@ -1,324 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, AsyncIterator, Callable, Optional, TypeVar, Union, cast -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._deleted_services_operations import ( - build_get_by_name_request, - build_list_by_subscription_request, - build_purge_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class DeletedServicesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`deleted_services` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.DeletedServiceContract"]: - """Lists all soft-deleted services available for undelete for the given subscription. - - :return: An iterator like instance of either DeletedServiceContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.DeletedServiceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DeletedServicesCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DeletedServicesCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_by_name(self, service_name: str, location: str, **kwargs: Any) -> _models.DeletedServiceContract: - """Get soft-deleted Api Management Service by name. - - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param location: The location of the deleted API Management service. Required. - :type location: str - :return: DeletedServiceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DeletedServiceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DeletedServiceContract] = kwargs.pop("cls", None) - - _request = build_get_by_name_request( - service_name=service_name, - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DeletedServiceContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _purge_initial(self, service_name: str, location: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_purge_request( - service_name=service_name, - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_purge( - self, service_name: str, location: str, **kwargs: Any - ) -> AsyncLROPoller[_models.DeletedServiceContract]: - """Purges Api Management Service (deletes it with no option to undelete). - - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param location: The location of the deleted API Management service. Required. - :type location: str - :return: An instance of AsyncLROPoller that returns either DeletedServiceContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.DeletedServiceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._purge_initial( - service_name=service_name, - location=location, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = self._deserialize("DeletedServiceContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.DeletedServiceContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.DeletedServiceContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py deleted file mode 100644 index a7e315c48da4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py +++ /dev/null @@ -1,694 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._diagnostic_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class DiagnosticOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`diagnostic` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.DiagnosticContract"]: - """Lists all diagnostics of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either DiagnosticContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DiagnosticCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, diagnostic_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, diagnostic_id: str, **kwargs: Any - ) -> _models.DiagnosticContract: - """Gets the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - diagnostic_id: str, - parameters: _models.DiagnosticContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - diagnostic_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - diagnostic_id: str, - parameters: Union[_models.DiagnosticContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Is either a DiagnosticContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - diagnostic_id: str, - if_match: str, - parameters: _models.DiagnosticContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - diagnostic_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - diagnostic_id: str, - if_match: str, - parameters: Union[_models.DiagnosticContract, IO[bytes]], - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Is either a DiagnosticContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or IO[bytes] - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, diagnostic_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified Diagnostic. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_documentation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_documentation_operations.py deleted file mode 100644 index a313f5668d5c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_documentation_operations.py +++ /dev/null @@ -1,694 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._documentation_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class DocumentationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`documentation` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.DocumentationContract"]: - """Lists all Documentations of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | eq | contains |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either DocumentationContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.DocumentationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DocumentationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DocumentationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, documentation_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Documentation by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - documentation_id=documentation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, documentation_id: str, **kwargs: Any - ) -> _models.DocumentationContract: - """Gets the details of the Documentation specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DocumentationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - documentation_id=documentation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DocumentationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - documentation_id: str, - parameters: _models.DocumentationContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DocumentationContract: - """Creates a new Documentation or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DocumentationContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - documentation_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DocumentationContract: - """Creates a new Documentation or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - documentation_id: str, - parameters: Union[_models.DocumentationContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.DocumentationContract: - """Creates a new Documentation or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param parameters: Create parameters. Is either a DocumentationContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DocumentationContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DocumentationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DocumentationContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - documentation_id=documentation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DocumentationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - documentation_id: str, - if_match: str, - parameters: _models.DocumentationUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DocumentationContract: - """Updates the details of the Documentation for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Documentation Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DocumentationUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - documentation_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DocumentationContract: - """Updates the details of the Documentation for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Documentation Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - documentation_id: str, - if_match: str, - parameters: Union[_models.DocumentationUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.DocumentationContract: - """Updates the details of the Documentation for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Documentation Update parameters. Is either a DocumentationUpdateContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DocumentationUpdateContract or IO[bytes] - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DocumentationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DocumentationUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - documentation_id=documentation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DocumentationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, documentation_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified Documentation from an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - documentation_id=documentation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py deleted file mode 100644 index 4d4260c84ba4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py +++ /dev/null @@ -1,759 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._email_template_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class EmailTemplateOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`email_template` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.EmailTemplateContract"]: - """Gets all email templates. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either EmailTemplateContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.EmailTemplateContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EmailTemplateCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("EmailTemplateCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the email template specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - template_name=template_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Gets the details of the email template specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EmailTemplateContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - template_name=template_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("EmailTemplateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - parameters: _models.EmailTemplateUpdateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Updates an Email Template. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param parameters: Email Template update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Updates an Email Template. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param parameters: Email Template update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - parameters: Union[_models.EmailTemplateUpdateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Updates an Email Template. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param parameters: Email Template update parameters. Is either a EmailTemplateUpdateParameters - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.EmailTemplateContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "EmailTemplateUpdateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - template_name=template_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("EmailTemplateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - if_match: str, - parameters: _models.EmailTemplateUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Updates API Management email template. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Updates API Management email template. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - if_match: str, - parameters: Union[_models.EmailTemplateUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Updates API Management email template. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a EmailTemplateUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters or IO[bytes] - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.EmailTemplateContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "EmailTemplateUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - template_name=template_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("EmailTemplateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - if_match: str, - **kwargs: Any - ) -> None: - """Reset the Email Template to default template provided by the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - template_name=template_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py deleted file mode 100644 index 35809fecd96f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py +++ /dev/null @@ -1,470 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._gateway_api_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_list_by_service_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GatewayApiOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`gateway_api` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ApiContract"]: - """Lists a collection of the APIs associated with a gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, gateway_id: str, api_id: str, **kwargs: Any - ) -> bool: - """Checks that API entity specified by identifier is associated with the Gateway entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - api_id: str, - parameters: Optional[_models.AssociationContract] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiContract: - """Adds an API to the specified Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param parameters: Default value is None. - :type parameters: ~azure.mgmt.apimanagement.models.AssociationContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - api_id: str, - parameters: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiContract: - """Adds an API to the specified Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param parameters: Default value is None. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - api_id: str, - parameters: Optional[Union[_models.AssociationContract, IO[bytes]]] = None, - **kwargs: Any - ) -> _models.ApiContract: - """Adds an API to the specified Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param parameters: Is either a AssociationContract type or a IO[bytes] type. Default value is - None. - :type parameters: ~azure.mgmt.apimanagement.models.AssociationContract or IO[bytes] - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if parameters else None - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - if parameters is not None: - _json = self._serialize.body(parameters, "AssociationContract") - else: - _json = None - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, gateway_id: str, api_id: str, **kwargs: Any - ) -> None: - """Deletes the specified API from the specified Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py deleted file mode 100644 index 820e74760b3b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py +++ /dev/null @@ -1,567 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._gateway_certificate_authority_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GatewayCertificateAuthorityOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`gateway_certificate_authority` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.GatewayCertificateAuthorityContract"]: - """Lists the collection of Certificate Authorities for the specified Gateway entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | eq, ne | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GatewayCertificateAuthorityContract or the result - of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayCertificateAuthorityCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("GatewayCertificateAuthorityCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, gateway_id: str, certificate_id: str, **kwargs: Any - ) -> bool: - """Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, gateway_id: str, certificate_id: str, **kwargs: Any - ) -> _models.GatewayCertificateAuthorityContract: - """Get assigned Gateway Certificate Authority details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: GatewayCertificateAuthorityContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayCertificateAuthorityContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayCertificateAuthorityContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - certificate_id: str, - parameters: _models.GatewayCertificateAuthorityContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayCertificateAuthorityContract: - """Assign Certificate entity to Gateway entity as Certificate Authority. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayCertificateAuthorityContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - certificate_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayCertificateAuthorityContract: - """Assign Certificate entity to Gateway entity as Certificate Authority. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayCertificateAuthorityContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - certificate_id: str, - parameters: Union[_models.GatewayCertificateAuthorityContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.GatewayCertificateAuthorityContract: - """Assign Certificate entity to Gateway entity as Certificate Authority. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Is either a GatewayCertificateAuthorityContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract or - IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: GatewayCertificateAuthorityContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayCertificateAuthorityContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayCertificateAuthorityContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayCertificateAuthorityContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - certificate_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Remove relationship between Certificate Authority and Gateway entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py deleted file mode 100644 index 607f8c7d48ee..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py +++ /dev/null @@ -1,564 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._gateway_hostname_configuration_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GatewayHostnameConfigurationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`gateway_hostname_configuration` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.GatewayHostnameConfigurationContract"]: - """Lists the collection of hostname configurations for the specified gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| hostname - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GatewayHostnameConfigurationContract or the result - of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayHostnameConfigurationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("GatewayHostnameConfigurationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, **kwargs: Any - ) -> bool: - """Checks that hostname configuration entity specified by identifier exists for specified Gateway - entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent - Gateway entity. Required. - :type hc_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - hc_id=hc_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, **kwargs: Any - ) -> _models.GatewayHostnameConfigurationContract: - """Get details of a hostname configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent - Gateway entity. Required. - :type hc_id: str - :return: GatewayHostnameConfigurationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayHostnameConfigurationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - hc_id=hc_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayHostnameConfigurationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - hc_id: str, - parameters: _models.GatewayHostnameConfigurationContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayHostnameConfigurationContract: - """Creates of updates hostname configuration for a Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent - Gateway entity. Required. - :type hc_id: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayHostnameConfigurationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - hc_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayHostnameConfigurationContract: - """Creates of updates hostname configuration for a Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent - Gateway entity. Required. - :type hc_id: str - :param parameters: Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayHostnameConfigurationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - hc_id: str, - parameters: Union[_models.GatewayHostnameConfigurationContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.GatewayHostnameConfigurationContract: - """Creates of updates hostname configuration for a Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent - Gateway entity. Required. - :type hc_id: str - :param parameters: Is either a GatewayHostnameConfigurationContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract or - IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: GatewayHostnameConfigurationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayHostnameConfigurationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayHostnameConfigurationContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - hc_id=hc_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayHostnameConfigurationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified hostname configuration from the specified Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent - Gateway entity. Required. - :type hc_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - hc_id=hc_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py deleted file mode 100644 index 23f9f0327d55..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py +++ /dev/null @@ -1,1413 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._gateway_operations import ( - build_create_or_update_request, - build_delete_request, - build_generate_token_request, - build_get_entity_tag_request, - build_get_request, - build_invalidate_debug_credentials_request, - build_list_by_service_request, - build_list_debug_credentials_request, - build_list_keys_request, - build_list_trace_request, - build_regenerate_key_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GatewayOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`gateway` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.GatewayContract"]: - """Lists a collection of gateways registered with service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| region | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GatewayContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GatewayContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("GatewayCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the Gateway specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any - ) -> _models.GatewayContract: - """Gets the details of the Gateway specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: _models.GatewayContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayContract: - """Creates or updates a Gateway to be used in Api Management instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayContract: - """Creates or updates a Gateway to be used in Api Management instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: Union[_models.GatewayContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.GatewayContract: - """Creates or updates a Gateway to be used in Api Management instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Is either a GatewayContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - if_match: str, - parameters: _models.GatewayContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayContract: - """Updates the details of the gateway specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayContract: - """Updates the details of the gateway specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - if_match: str, - parameters: Union[_models.GatewayContract, IO[bytes]], - **kwargs: Any - ) -> _models.GatewayContract: - """Updates the details of the gateway specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Is either a GatewayContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract or IO[bytes] - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, gateway_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def list_keys( - self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any - ) -> _models.GatewayKeysContract: - """Retrieves gateway keys. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :return: GatewayKeysContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayKeysContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayKeysContract] = kwargs.pop("cls", None) - - _request = build_list_keys_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayKeysContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def regenerate_key( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: _models.GatewayKeyRegenerationRequestContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Regenerates specified gateway key invalidating any tokens created with it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayKeyRegenerationRequestContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def regenerate_key( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Regenerates specified gateway key invalidating any tokens created with it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def regenerate_key( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: Union[_models.GatewayKeyRegenerationRequestContract, IO[bytes]], - **kwargs: Any - ) -> None: - """Regenerates specified gateway key invalidating any tokens created with it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Is either a GatewayKeyRegenerationRequestContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayKeyRegenerationRequestContract or - IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayKeyRegenerationRequestContract") - - _request = build_regenerate_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - async def generate_token( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: _models.GatewayTokenRequestContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayTokenContract: - """Gets the Shared Access Authorization Token for the gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayTokenRequestContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayTokenContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def generate_token( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayTokenContract: - """Gets the Shared Access Authorization Token for the gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayTokenContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def generate_token( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: Union[_models.GatewayTokenRequestContract, IO[bytes]], - **kwargs: Any - ) -> _models.GatewayTokenContract: - """Gets the Shared Access Authorization Token for the gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Is either a GatewayTokenRequestContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayTokenRequestContract or IO[bytes] - :return: GatewayTokenContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayTokenContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayTokenRequestContract") - - _request = build_generate_token_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GatewayTokenContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def invalidate_debug_credentials( - self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any - ) -> None: - """Action is invalidating all debug credentials issued for gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_invalidate_debug_credentials_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - async def list_debug_credentials( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: _models.GatewayListDebugCredentialsContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayDebugCredentialsContract: - """Create new debug credentials for gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: List debug credentials properties. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayDebugCredentialsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def list_debug_credentials( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayDebugCredentialsContract: - """Create new debug credentials for gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: List debug credentials properties. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayDebugCredentialsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def list_debug_credentials( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: Union[_models.GatewayListDebugCredentialsContract, IO[bytes]], - **kwargs: Any - ) -> _models.GatewayDebugCredentialsContract: - """Create new debug credentials for gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: List debug credentials properties. Is either a - GatewayListDebugCredentialsContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContract or - IO[bytes] - :return: GatewayDebugCredentialsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayDebugCredentialsContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayListDebugCredentialsContract") - - _request = build_list_debug_credentials_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GatewayDebugCredentialsContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def list_trace( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: _models.GatewayListTraceContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> dict[str, Any]: - """Fetches trace collected by gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: List trace properties. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayListTraceContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: dict mapping str to any or the result of cls(response) - :rtype: dict[str, any] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def list_trace( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> dict[str, Any]: - """Fetches trace collected by gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: List trace properties. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: dict mapping str to any or the result of cls(response) - :rtype: dict[str, any] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def list_trace( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: Union[_models.GatewayListTraceContract, IO[bytes]], - **kwargs: Any - ) -> dict[str, Any]: - """Fetches trace collected by gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: List trace properties. Is either a GatewayListTraceContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayListTraceContract or IO[bytes] - :return: dict mapping str to any or the result of cls(response) - :rtype: dict[str, any] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[dict[str, Any]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayListTraceContract") - - _request = build_list_trace_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("{object}", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_global_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_global_schema_operations.py deleted file mode 100644 index f633e945d182..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_global_schema_operations.py +++ /dev/null @@ -1,616 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._global_schema_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GlobalSchemaOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`global_schema` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.GlobalSchemaContract"]: - """Lists a collection of schemas registered with service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GlobalSchemaContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GlobalSchemaCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("GlobalSchemaCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, schema_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the Schema specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, schema_id: str, **kwargs: Any - ) -> _models.GlobalSchemaContract: - """Gets the details of the Schema specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: GlobalSchemaContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GlobalSchemaContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GlobalSchemaContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - schema_id: str, - parameters: Union[_models.GlobalSchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GlobalSchemaContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - schema_id: str, - parameters: _models.GlobalSchemaContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.GlobalSchemaContract]: - """Creates new or updates existing specified Schema of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either GlobalSchemaContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - schema_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.GlobalSchemaContract]: - """Creates new or updates existing specified Schema of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either GlobalSchemaContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - schema_id: str, - parameters: Union[_models.GlobalSchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.GlobalSchemaContract]: - """Creates new or updates existing specified Schema of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: Create or update parameters. Is either a GlobalSchemaContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either GlobalSchemaContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - schema_id=schema_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("GlobalSchemaContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.GlobalSchemaContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.GlobalSchemaContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, schema_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific Schema. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_operations.py deleted file mode 100644 index d5e71327b687..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_operations.py +++ /dev/null @@ -1,740 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._graph_ql_api_resolver_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_api_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GraphQLApiResolverOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`graph_ql_api_resolver` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ResolverContract"]: - """Lists a collection of the resolvers for the specified GraphQL API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ResolverContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ResolverContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResolverCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ResolverCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any - ) -> _models.ResolverContract: - """Gets the details of the GraphQL API Resolver specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResolverContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ResolverContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - parameters: _models.ResolverContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ResolverContract: - """Creates a new resolver in the GraphQL API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ResolverContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ResolverContract: - """Creates a new resolver in the GraphQL API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - parameters: Union[_models.ResolverContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ResolverContract: - """Creates a new resolver in the GraphQL API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param parameters: Create parameters. Is either a ResolverContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ResolverContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ResolverContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ResolverContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ResolverContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - if_match: str, - parameters: _models.ResolverUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ResolverContract: - """Updates the details of the resolver in the GraphQL API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: GraphQL API Resolver Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ResolverUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ResolverContract: - """Updates the details of the resolver in the GraphQL API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: GraphQL API Resolver Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - if_match: str, - parameters: Union[_models.ResolverUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.ResolverContract: - """Updates the details of the resolver in the GraphQL API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: GraphQL API Resolver Update parameters. Is either a ResolverUpdateContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ResolverUpdateContract or IO[bytes] - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ResolverContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ResolverUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ResolverContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified resolver in the GraphQL API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_policy_operations.py deleted file mode 100644 index beb00c6d3d00..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_graph_ql_api_resolver_policy_operations.py +++ /dev/null @@ -1,589 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._graph_ql_api_resolver_policy_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_resolver_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GraphQLApiResolverPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`graph_ql_api_resolver_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_resolver( - self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any - ) -> AsyncItemPaged["_models.PolicyContract"]: - """Get the list of policy configuration at the GraphQL API Resolver level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :return: An iterator like instance of either PolicyContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resolver_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its - identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the GraphQL API Resolver level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the GraphQL API Resolver level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the GraphQL API Resolver level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the GraphQL API Resolver level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the GraphQL Api Resolver. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py deleted file mode 100644 index d81ed5030bbc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py +++ /dev/null @@ -1,696 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._group_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GroupOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`group` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.GroupContract"]: - """Lists a collection of groups defined within a service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-groups - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| externalId | filter | eq | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GroupContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GroupContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("GroupCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, group_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, group_id: str, **kwargs: Any - ) -> _models.GroupContract: - """Gets the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - group_id: str, - parameters: _models.GroupCreateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Creates or Updates a group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - group_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Creates or Updates a group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - group_id: str, - parameters: Union[_models.GroupCreateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.GroupContract: - """Creates or Updates a group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param parameters: Create parameters. Is either a GroupCreateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GroupCreateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - group_id: str, - if_match: str, - parameters: _models.GroupUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Updates the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - group_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Updates the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - group_id: str, - if_match: str, - parameters: Union[_models.GroupUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.GroupContract: - """Updates the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a GroupUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters or IO[bytes] - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GroupUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, group_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific group of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py deleted file mode 100644 index 8fd24f3e63a8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._group_user_operations import ( - build_check_entity_exists_request, - build_create_request, - build_delete_request, - build_list_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GroupUserOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`group_user` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - group_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.UserContract"]: - """Lists a collection of user entities associated with the group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, - le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either UserContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.UserContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("UserCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def check_entity_exists( - self, resource_group_name: str, service_name: str, group_id: str, user_id: str, **kwargs: Any - ) -> bool: - """Checks that user entity specified by identifier is associated with the group entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def create( - self, resource_group_name: str, service_name: str, group_id: str, user_id: str, **kwargs: Any - ) -> _models.UserContract: - """Add existing user to existing group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) - - _request = build_create_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("UserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, group_id: str, user_id: str, **kwargs: Any - ) -> None: - """Remove existing user from existing group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py deleted file mode 100644 index 131b5902851b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py +++ /dev/null @@ -1,770 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._identity_provider_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_list_secrets_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class IdentityProviderOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`identity_provider` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.IdentityProviderContract"]: - """Lists a collection of Identity Provider configured in the specified service instance. - - .. seealso:: - - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-aad#how-to-authorize-developer-accounts-using-azure-active-directory - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either IdentityProviderContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.IdentityProviderContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IdentityProviderList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IdentityProviderList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the identityProvider specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - identity_provider_name=identity_provider_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Gets the configuration details of the identity Provider configured in specified service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IdentityProviderContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - identity_provider_name=identity_provider_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IdentityProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - parameters: _models.IdentityProviderCreateContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Creates or Updates the IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderCreateContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Creates or Updates the IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - parameters: Union[_models.IdentityProviderCreateContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Creates or Updates the IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param parameters: Create parameters. Is either a IdentityProviderCreateContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderCreateContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IdentityProviderContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IdentityProviderCreateContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - identity_provider_name=identity_provider_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IdentityProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - if_match: str, - parameters: _models.IdentityProviderUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Updates an existing IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Updates an existing IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - if_match: str, - parameters: Union[_models.IdentityProviderUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Updates an existing IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a IdentityProviderUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderUpdateParameters or - IO[bytes] - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IdentityProviderContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IdentityProviderUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - identity_provider_name=identity_provider_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IdentityProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified identity provider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - identity_provider_name=identity_provider_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def list_secrets( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - **kwargs: Any - ) -> _models.ClientSecretContract: - """Gets the client secret details of the Identity Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :return: ClientSecretContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientSecretContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientSecretContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - identity_provider_name=identity_provider_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ClientSecretContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py deleted file mode 100644 index eff273462529..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py +++ /dev/null @@ -1,233 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._issue_operations import build_get_request, build_list_by_service_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class IssueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`issue` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.IssueContract"]: - """Lists a collection of issues in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| state | filter | eq | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either IssueContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.IssueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IssueCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, issue_id: str, **kwargs: Any - ) -> _models.IssueContract: - """Gets API Management issue details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py deleted file mode 100644 index 3f68508840a5..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py +++ /dev/null @@ -1,697 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._logger_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class LoggerOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`logger` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.LoggerContract"]: - """Lists a collection of loggers in the specified service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-log-event-hubs - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either LoggerContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.LoggerContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LoggerCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("LoggerCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, logger_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the logger specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, logger_id: str, **kwargs: Any - ) -> _models.LoggerContract: - """Gets the details of the logger specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("LoggerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - logger_id: str, - parameters: _models.LoggerContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Creates or Updates a logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - logger_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Creates or Updates a logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - logger_id: str, - parameters: Union[_models.LoggerContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.LoggerContract: - """Creates or Updates a logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param parameters: Create parameters. Is either a LoggerContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "LoggerContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("LoggerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - logger_id: str, - if_match: str, - parameters: _models.LoggerUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Updates an existing logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - logger_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Updates an existing logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - logger_id: str, - if_match: str, - parameters: Union[_models.LoggerUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.LoggerContract: - """Updates an existing logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a LoggerUpdateContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract or IO[bytes] - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "LoggerUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("LoggerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, logger_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py deleted file mode 100644 index 8a8849c4d3c8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py +++ /dev/null @@ -1,1061 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._named_value_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_list_value_request, - build_refresh_secret_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NamedValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`named_value` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - is_key_vault_refresh_failed: Optional[bool] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.NamedValueContract"]: - """Lists a collection of named values defined within a service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-properties - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| tags | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param is_key_vault_refresh_failed: When set to true, the response contains only named value - entities which failed refresh. Default value is None. - :type is_key_vault_refresh_failed: bool - :return: An iterator like instance of either NamedValueContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - is_key_vault_refresh_failed=is_key_vault_refresh_failed, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NamedValueCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any - ) -> _models.NamedValueContract: - """Gets the details of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: NamedValueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NamedValueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - parameters: Union[_models.NamedValueCreateContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NamedValueCreateContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - parameters: _models.NamedValueCreateContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Creates or updates named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Creates or updates named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - parameters: Union[_models.NamedValueCreateContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Creates or updates named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param parameters: Create parameters. Is either a NamedValueCreateContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NamedValueContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NamedValueContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - if_match: str, - parameters: Union[_models.NamedValueUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NamedValueUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 200: - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - if_match: str, - parameters: _models.NamedValueUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Updates the specific named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Updates the specific named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - if_match: str, - parameters: Union[_models.NamedValueUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Updates the specific named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a NamedValueUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - if_match=if_match, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NamedValueContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NamedValueContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, named_value_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific named value from the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def list_value( - self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any - ) -> _models.NamedValueSecretContract: - """Gets the secret of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: NamedValueSecretContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NamedValueSecretContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueSecretContract] = kwargs.pop("cls", None) - - _request = build_list_value_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueSecretContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _refresh_secret_initial( - self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_secret_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 200: - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_refresh_secret( - self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Refresh the secret of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._refresh_secret_initial( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NamedValueContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NamedValueContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py deleted file mode 100644 index ed9d44afd7e8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py +++ /dev/null @@ -1,183 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._network_status_operations import build_list_by_location_request, build_list_by_service_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NetworkStatusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`network_status` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> List[_models.NetworkStatusContractByLocation]: - """Gets the Connectivity Status to the external resources on which the Api Management service - depends from inside the Cloud Service. This also returns the DNS Servers as visible to the - CloudService. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: list of NetworkStatusContractByLocation or the result of cls(response) - :rtype: list[~azure.mgmt.apimanagement.models.NetworkStatusContractByLocation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[List[_models.NetworkStatusContractByLocation]] = kwargs.pop("cls", None) - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("[NetworkStatusContractByLocation]", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def list_by_location( - self, resource_group_name: str, service_name: str, location_name: str, **kwargs: Any - ) -> _models.NetworkStatusContract: - """Gets the Connectivity Status to the external resources on which the Api Management service - depends from inside the Cloud Service. This also returns the DNS Servers as visible to the - CloudService. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param location_name: Location in which the API Management service is deployed. This is one of - the Azure Regions like West US, East US, South Central US. Required. - :type location_name: str - :return: NetworkStatusContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NetworkStatusContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkStatusContract] = kwargs.pop("cls", None) - - _request = build_list_by_location_request( - resource_group_name=resource_group_name, - service_name=service_name, - location_name=location_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkStatusContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py deleted file mode 100644 index bf9592081b87..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py +++ /dev/null @@ -1,307 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._notification_operations import ( - build_create_or_update_request, - build_get_request, - build_list_by_service_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NotificationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`notification` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.NotificationContract"]: - """Lists a collection of properties defined within a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either NotificationContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.NotificationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NotificationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NotificationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - **kwargs: Any - ) -> _models.NotificationContract: - """Gets the details of the Notification specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :return: NotificationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NotificationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.NotificationContract: - """Create or Update API Management publisher notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: NotificationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NotificationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py deleted file mode 100644 index 5225c1245dc2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._notification_recipient_email_operations import ( - build_check_entity_exists_request, - build_create_or_update_request, - build_delete_request, - build_list_by_notification_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NotificationRecipientEmailOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`notification_recipient_email` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list_by_notification( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - **kwargs: Any - ) -> _models.RecipientEmailCollection: - """Gets the list of the Notification Recipient Emails subscribed to a notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :return: RecipientEmailCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientEmailCollection] = kwargs.pop("cls", None) - - _request = build_list_by_notification_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientEmailCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def check_entity_exists( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - email: str, - **kwargs: Any - ) -> bool: - """Determine if Notification Recipient Email subscribed to the notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. Required. - :type email: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - email=email, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - email: str, - **kwargs: Any - ) -> _models.RecipientEmailContract: - """Adds the Email address to the list of Recipients for the Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. Required. - :type email: str - :return: RecipientEmailContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientEmailContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - email=email, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientEmailContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - email: str, - **kwargs: Any - ) -> None: - """Removes the email from the list of Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. Required. - :type email: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - email=email, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py deleted file mode 100644 index 2f691ded6bf9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py +++ /dev/null @@ -1,350 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._notification_recipient_user_operations import ( - build_check_entity_exists_request, - build_create_or_update_request, - build_delete_request, - build_list_by_notification_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NotificationRecipientUserOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`notification_recipient_user` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list_by_notification( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - **kwargs: Any - ) -> _models.RecipientUserCollection: - """Gets the list of the Notification Recipient User subscribed to the notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :return: RecipientUserCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientUserCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientUserCollection] = kwargs.pop("cls", None) - - _request = build_list_by_notification_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientUserCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def check_entity_exists( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - **kwargs: Any - ) -> bool: - """Determine if the Notification Recipient User is subscribed to the notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - **kwargs: Any - ) -> _models.RecipientUserContract: - """Adds the API Management User to the list of Recipients for the Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: RecipientUserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientUserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientUserContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientUserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - **kwargs: Any - ) -> None: - """Removes the API Management user from the list of Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py deleted file mode 100644 index 2209a30df5bf..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py +++ /dev/null @@ -1,754 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._open_id_connect_provider_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_list_secrets_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class OpenIdConnectProviderOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`open_id_connect_provider` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.OpenidConnectProviderContract"]: - """Lists of all the OpenId Connect Providers. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either OpenidConnectProviderContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.OpenidConnectProviderContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OpenIdConnectProviderCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("OpenIdConnectProviderCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, opid: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - opid=opid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, opid: str, **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Gets specific OpenID Connect Provider without secrets. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OpenidConnectProviderContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - opid=opid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OpenidConnectProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - opid: str, - parameters: _models.OpenidConnectProviderContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Creates or updates the OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - opid: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Creates or updates the OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - opid: str, - parameters: Union[_models.OpenidConnectProviderContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Creates or updates the OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param parameters: Create parameters. Is either a OpenidConnectProviderContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OpenidConnectProviderContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "OpenidConnectProviderContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - opid=opid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OpenidConnectProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - opid: str, - if_match: str, - parameters: _models.OpenidConnectProviderUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Updates the specific OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - opid: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Updates the specific OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - opid: str, - if_match: str, - parameters: Union[_models.OpenidConnectProviderUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Updates the specific OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a OpenidConnectProviderUpdateContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContract or - IO[bytes] - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OpenidConnectProviderContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "OpenidConnectProviderUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - opid=opid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OpenidConnectProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, opid: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific OpenID Connect Provider of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - opid=opid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def list_secrets( - self, resource_group_name: str, service_name: str, opid: str, **kwargs: Any - ) -> _models.ClientSecretContract: - """Gets the client secret details of the OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :return: ClientSecretContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientSecretContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientSecretContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - opid=opid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ClientSecretContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py deleted file mode 100644 index 924610da6cd0..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._operation_operations import build_list_by_tags_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class OperationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`operation` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_tags( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - include_not_tagged_operations: Optional[bool] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagResourceContract"]: - """Lists a collection of operations associated with tags. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param include_not_tagged_operations: Include not tagged Operations. Default value is None. - :type include_not_tagged_operations: bool - :return: An iterator like instance of either TagResourceContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagResourceCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_tags_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - include_not_tagged_operations=include_not_tagged_operations, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagResourceCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_status_operations.py deleted file mode 100644 index da0dd713baed..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_status_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._operation_status_operations import build_get_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class OperationStatusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`operation_status` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationStatusResult: - """Returns the current status of an async operation. - - :param location: The name of the Azure region. Required. - :type location: str - :param operation_id: The ID of an ongoing async operation. Required. - :type operation_id: str - :return: OperationStatusResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationStatusResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) - - _request = build_get_request( - location=location, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("OperationStatusResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operations.py new file mode 100644 index 000000000000..878e77d80e32 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operations.py @@ -0,0 +1,85220 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +import datetime +from io import IOBase +import json +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core import AsyncPipelineClient, MatchConditions +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceModifiedError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from ..._utils.serialization import Deserializer, Serializer +from ..._utils.utils import ClientMixinABC +from ...operations._operations import ( + build_all_policies_list_by_service_request, + build_api_create_or_update_request, + build_api_delete_request, + build_api_diagnostic_create_or_update_request, + build_api_diagnostic_delete_request, + build_api_diagnostic_get_entity_tag_request, + build_api_diagnostic_get_request, + build_api_diagnostic_list_by_service_request, + build_api_diagnostic_update_request, + build_api_export_get_request, + build_api_gateway_config_connection_create_or_update_request, + build_api_gateway_config_connection_delete_request, + build_api_gateway_config_connection_get_request, + build_api_gateway_config_connection_list_by_gateway_request, + build_api_gateway_create_or_update_request, + build_api_gateway_delete_request, + build_api_gateway_get_request, + build_api_gateway_hostname_binding_create_or_update_request, + build_api_gateway_hostname_binding_delete_request, + build_api_gateway_hostname_binding_get_request, + build_api_gateway_hostname_binding_list_by_gateway_request, + build_api_gateway_hostname_binding_refresh_secret_request, + build_api_gateway_list_by_resource_group_request, + build_api_gateway_list_request, + build_api_gateway_update_request, + build_api_get_entity_tag_request, + build_api_get_request, + build_api_issue_attachment_create_or_update_request, + build_api_issue_attachment_delete_request, + build_api_issue_attachment_get_entity_tag_request, + build_api_issue_attachment_get_request, + build_api_issue_attachment_list_by_service_request, + build_api_issue_comment_create_or_update_request, + build_api_issue_comment_delete_request, + build_api_issue_comment_get_entity_tag_request, + build_api_issue_comment_get_request, + build_api_issue_comment_list_by_service_request, + build_api_issue_create_or_update_request, + build_api_issue_delete_request, + build_api_issue_get_entity_tag_request, + build_api_issue_get_request, + build_api_issue_list_by_service_request, + build_api_issue_update_request, + build_api_list_by_service_request, + build_api_list_by_tags_request, + build_api_management_gateway_skus_list_available_skus_request, + build_api_management_operations_list_request, + build_api_management_perform_connectivity_check_async_request, + build_api_management_service_apply_network_configuration_updates_request, + build_api_management_service_backup_request, + build_api_management_service_check_name_availability_request, + build_api_management_service_create_or_update_request, + build_api_management_service_delete_request, + build_api_management_service_get_domain_ownership_identifier_request, + build_api_management_service_get_request, + build_api_management_service_get_sso_token_request, + build_api_management_service_list_by_resource_group_request, + build_api_management_service_list_request, + build_api_management_service_migrate_to_stv2_request, + build_api_management_service_refresh_hostnames_request, + build_api_management_service_restore_request, + build_api_management_service_skus_list_available_service_skus_request, + build_api_management_service_update_request, + build_api_management_skus_list_request, + build_api_management_workspace_link_get_request, + build_api_management_workspace_links_list_by_service_request, + build_api_operation_create_or_update_request, + build_api_operation_delete_request, + build_api_operation_get_entity_tag_request, + build_api_operation_get_request, + build_api_operation_list_by_api_request, + build_api_operation_policy_create_or_update_request, + build_api_operation_policy_delete_request, + build_api_operation_policy_get_entity_tag_request, + build_api_operation_policy_get_request, + build_api_operation_policy_list_by_operation_request, + build_api_operation_update_request, + build_api_policy_create_or_update_request, + build_api_policy_delete_request, + build_api_policy_get_entity_tag_request, + build_api_policy_get_request, + build_api_policy_list_by_api_request, + build_api_product_list_by_apis_request, + build_api_release_create_or_update_request, + build_api_release_delete_request, + build_api_release_get_entity_tag_request, + build_api_release_get_request, + build_api_release_list_by_service_request, + build_api_release_update_request, + build_api_revision_list_by_service_request, + build_api_schema_create_or_update_request, + build_api_schema_delete_request, + build_api_schema_get_entity_tag_request, + build_api_schema_get_request, + build_api_schema_list_by_api_request, + build_api_tag_description_create_or_update_request, + build_api_tag_description_delete_request, + build_api_tag_description_get_entity_tag_request, + build_api_tag_description_get_request, + build_api_tag_description_list_by_service_request, + build_api_tool_create_or_update_request, + build_api_tool_delete_request, + build_api_tool_get_entity_tag_request, + build_api_tool_get_request, + build_api_tool_list_by_api_request, + build_api_tool_update_request, + build_api_update_request, + build_api_version_set_create_or_update_request, + build_api_version_set_delete_request, + build_api_version_set_get_entity_tag_request, + build_api_version_set_get_request, + build_api_version_set_list_by_service_request, + build_api_version_set_update_request, + build_api_wiki_create_or_update_request, + build_api_wiki_delete_request, + build_api_wiki_get_entity_tag_request, + build_api_wiki_get_request, + build_api_wiki_update_request, + build_api_wikis_list_request, + build_authorization_access_policy_create_or_update_request, + build_authorization_access_policy_delete_request, + build_authorization_access_policy_get_request, + build_authorization_access_policy_list_by_authorization_request, + build_authorization_confirm_consent_code_request, + build_authorization_create_or_update_request, + build_authorization_delete_request, + build_authorization_get_request, + build_authorization_list_by_authorization_provider_request, + build_authorization_login_links_post_request, + build_authorization_provider_create_or_update_request, + build_authorization_provider_delete_request, + build_authorization_provider_get_request, + build_authorization_provider_list_by_service_request, + build_authorization_provider_refresh_secret_request, + build_authorization_server_create_or_update_request, + build_authorization_server_delete_request, + build_authorization_server_get_entity_tag_request, + build_authorization_server_get_request, + build_authorization_server_list_by_service_request, + build_authorization_server_list_secrets_request, + build_authorization_server_update_request, + build_backend_create_or_update_request, + build_backend_delete_request, + build_backend_get_entity_tag_request, + build_backend_get_request, + build_backend_list_by_service_request, + build_backend_reconnect_request, + build_backend_update_request, + build_cache_create_or_update_request, + build_cache_delete_request, + build_cache_get_entity_tag_request, + build_cache_get_request, + build_cache_list_by_service_request, + build_cache_update_request, + build_certificate_create_or_update_request, + build_certificate_delete_request, + build_certificate_get_entity_tag_request, + build_certificate_get_request, + build_certificate_list_by_service_request, + build_certificate_refresh_secret_request, + build_client_application_create_or_update_request, + build_client_application_delete_request, + build_client_application_get_entity_tag_request, + build_client_application_get_request, + build_client_application_list_by_service_request, + build_client_application_list_secrets_request, + build_client_application_product_link_create_request, + build_client_application_product_link_delete_request, + build_client_application_product_link_get_request, + build_client_application_product_link_list_by_client_applications_request, + build_content_item_create_or_update_request, + build_content_item_delete_request, + build_content_item_get_entity_tag_request, + build_content_item_get_request, + build_content_item_list_by_service_request, + build_content_type_create_or_update_request, + build_content_type_delete_request, + build_content_type_get_request, + build_content_type_list_by_service_request, + build_delegation_settings_create_or_update_request, + build_delegation_settings_get_entity_tag_request, + build_delegation_settings_get_request, + build_delegation_settings_list_secrets_request, + build_delegation_settings_update_request, + build_deleted_services_get_by_name_request, + build_deleted_services_list_by_subscription_request, + build_deleted_services_purge_request, + build_diagnostic_create_or_update_request, + build_diagnostic_delete_request, + build_diagnostic_get_entity_tag_request, + build_diagnostic_get_request, + build_diagnostic_list_by_service_request, + build_diagnostic_update_request, + build_documentation_create_or_update_request, + build_documentation_delete_request, + build_documentation_get_entity_tag_request, + build_documentation_get_request, + build_documentation_list_by_service_request, + build_documentation_update_request, + build_email_template_create_or_update_request, + build_email_template_delete_request, + build_email_template_get_entity_tag_request, + build_email_template_get_request, + build_email_template_list_by_service_request, + build_email_template_update_request, + build_gateway_api_create_or_update_request, + build_gateway_api_delete_request, + build_gateway_api_get_entity_tag_request, + build_gateway_api_list_by_service_request, + build_gateway_certificate_authority_create_or_update_request, + build_gateway_certificate_authority_delete_request, + build_gateway_certificate_authority_get_entity_tag_request, + build_gateway_certificate_authority_get_request, + build_gateway_certificate_authority_list_by_service_request, + build_gateway_create_or_update_request, + build_gateway_delete_request, + build_gateway_generate_token_request, + build_gateway_get_entity_tag_request, + build_gateway_get_request, + build_gateway_hostname_configuration_create_or_update_request, + build_gateway_hostname_configuration_delete_request, + build_gateway_hostname_configuration_get_entity_tag_request, + build_gateway_hostname_configuration_get_request, + build_gateway_hostname_configuration_list_by_service_request, + build_gateway_invalidate_debug_credentials_request, + build_gateway_list_by_service_request, + build_gateway_list_debug_credentials_request, + build_gateway_list_keys_request, + build_gateway_list_trace_request, + build_gateway_regenerate_key_request, + build_gateway_update_request, + build_global_schema_create_or_update_request, + build_global_schema_delete_request, + build_global_schema_get_entity_tag_request, + build_global_schema_get_request, + build_global_schema_list_by_service_request, + build_graph_ql_api_resolver_create_or_update_request, + build_graph_ql_api_resolver_delete_request, + build_graph_ql_api_resolver_get_entity_tag_request, + build_graph_ql_api_resolver_get_request, + build_graph_ql_api_resolver_list_by_api_request, + build_graph_ql_api_resolver_policy_create_or_update_request, + build_graph_ql_api_resolver_policy_delete_request, + build_graph_ql_api_resolver_policy_get_entity_tag_request, + build_graph_ql_api_resolver_policy_get_request, + build_graph_ql_api_resolver_policy_list_by_resolver_request, + build_graph_ql_api_resolver_update_request, + build_group_create_or_update_request, + build_group_delete_request, + build_group_get_entity_tag_request, + build_group_get_request, + build_group_list_by_service_request, + build_group_update_request, + build_group_user_check_entity_exists_request, + build_group_user_create_request, + build_group_user_delete_request, + build_group_user_list_request, + build_identity_provider_create_or_update_request, + build_identity_provider_delete_request, + build_identity_provider_get_entity_tag_request, + build_identity_provider_get_request, + build_identity_provider_list_by_service_request, + build_identity_provider_list_secrets_request, + build_identity_provider_update_request, + build_issue_get_request, + build_issue_list_by_service_request, + build_logger_create_or_update_request, + build_logger_delete_request, + build_logger_get_entity_tag_request, + build_logger_get_request, + build_logger_list_by_service_request, + build_logger_update_request, + build_named_value_create_or_update_request, + build_named_value_delete_request, + build_named_value_get_entity_tag_request, + build_named_value_get_request, + build_named_value_list_by_service_request, + build_named_value_list_value_request, + build_named_value_refresh_secret_request, + build_named_value_update_request, + build_network_status_list_by_location_request, + build_network_status_list_by_service_request, + build_notification_create_or_update_request, + build_notification_get_request, + build_notification_list_by_service_request, + build_notification_recipient_email_check_entity_exists_request, + build_notification_recipient_email_create_or_update_request, + build_notification_recipient_email_delete_request, + build_notification_recipient_email_list_by_notification_request, + build_notification_recipient_user_check_entity_exists_request, + build_notification_recipient_user_create_or_update_request, + build_notification_recipient_user_delete_request, + build_notification_recipient_user_list_by_notification_request, + build_open_id_connect_provider_create_or_update_request, + build_open_id_connect_provider_delete_request, + build_open_id_connect_provider_get_entity_tag_request, + build_open_id_connect_provider_get_request, + build_open_id_connect_provider_list_by_service_request, + build_open_id_connect_provider_list_secrets_request, + build_open_id_connect_provider_update_request, + build_operation_list_by_tags_request, + build_operation_status_get_request, + build_operations_results_get_request, + build_outbound_network_dependencies_endpoints_list_by_service_request, + build_policy_create_or_update_request, + build_policy_delete_request, + build_policy_description_list_by_service_request, + build_policy_fragment_create_or_update_request, + build_policy_fragment_delete_request, + build_policy_fragment_get_entity_tag_request, + build_policy_fragment_get_request, + build_policy_fragment_list_by_service_request, + build_policy_fragment_list_references_request, + build_policy_get_entity_tag_request, + build_policy_get_request, + build_policy_list_by_service_request, + build_policy_restriction_create_or_update_request, + build_policy_restriction_delete_request, + build_policy_restriction_get_entity_tag_request, + build_policy_restriction_get_request, + build_policy_restriction_list_by_service_request, + build_policy_restriction_update_request, + build_policy_restriction_validations_by_service_request, + build_portal_config_create_or_update_request, + build_portal_config_get_entity_tag_request, + build_portal_config_get_request, + build_portal_config_list_by_service_request, + build_portal_config_update_request, + build_portal_revision_create_or_update_request, + build_portal_revision_get_entity_tag_request, + build_portal_revision_get_request, + build_portal_revision_list_by_service_request, + build_portal_revision_update_request, + build_portal_settings_list_by_service_request, + build_private_endpoint_connection_create_or_update_request, + build_private_endpoint_connection_delete_request, + build_private_endpoint_connection_get_by_name_request, + build_private_endpoint_connection_get_private_link_resource_request, + build_private_endpoint_connection_list_by_service_request, + build_private_endpoint_connection_list_private_link_resources_request, + build_product_api_check_entity_exists_request, + build_product_api_create_or_update_request, + build_product_api_delete_request, + build_product_api_link_create_or_update_request, + build_product_api_link_delete_request, + build_product_api_link_get_request, + build_product_api_link_list_by_product_request, + build_product_api_list_by_product_request, + build_product_create_or_update_request, + build_product_delete_request, + build_product_get_entity_tag_request, + build_product_get_request, + build_product_group_check_entity_exists_request, + build_product_group_create_or_update_request, + build_product_group_delete_request, + build_product_group_link_create_or_update_request, + build_product_group_link_delete_request, + build_product_group_link_get_request, + build_product_group_link_list_by_product_request, + build_product_group_list_by_product_request, + build_product_list_by_service_request, + build_product_list_by_tags_request, + build_product_policy_create_or_update_request, + build_product_policy_delete_request, + build_product_policy_get_entity_tag_request, + build_product_policy_get_request, + build_product_policy_list_by_product_request, + build_product_subscriptions_list_request, + build_product_update_request, + build_product_wiki_create_or_update_request, + build_product_wiki_delete_request, + build_product_wiki_get_entity_tag_request, + build_product_wiki_get_request, + build_product_wiki_update_request, + build_product_wikis_list_request, + build_quota_by_counter_keys_list_by_service_request, + build_quota_by_counter_keys_update_request, + build_quota_by_period_keys_get_request, + build_quota_by_period_keys_update_request, + build_region_list_by_service_request, + build_reports_list_by_api_request, + build_reports_list_by_geo_request, + build_reports_list_by_operation_request, + build_reports_list_by_product_request, + build_reports_list_by_request_request, + build_reports_list_by_subscription_request, + build_reports_list_by_time_request, + build_reports_list_by_user_request, + build_sign_in_settings_create_or_update_request, + build_sign_in_settings_get_entity_tag_request, + build_sign_in_settings_get_request, + build_sign_in_settings_update_request, + build_sign_up_settings_create_or_update_request, + build_sign_up_settings_get_entity_tag_request, + build_sign_up_settings_get_request, + build_sign_up_settings_update_request, + build_subscription_create_or_update_request, + build_subscription_delete_request, + build_subscription_get_entity_tag_request, + build_subscription_get_request, + build_subscription_list_request, + build_subscription_list_secrets_request, + build_subscription_regenerate_primary_key_request, + build_subscription_regenerate_secondary_key_request, + build_subscription_update_request, + build_tag_api_link_create_or_update_request, + build_tag_api_link_delete_request, + build_tag_api_link_get_request, + build_tag_api_link_list_by_product_request, + build_tag_assign_to_api_request, + build_tag_assign_to_operation_request, + build_tag_assign_to_product_request, + build_tag_create_or_update_request, + build_tag_delete_request, + build_tag_detach_from_api_request, + build_tag_detach_from_operation_request, + build_tag_detach_from_product_request, + build_tag_get_by_api_request, + build_tag_get_by_operation_request, + build_tag_get_by_product_request, + build_tag_get_entity_state_by_api_request, + build_tag_get_entity_state_by_operation_request, + build_tag_get_entity_state_by_product_request, + build_tag_get_entity_state_request, + build_tag_get_request, + build_tag_list_by_api_request, + build_tag_list_by_operation_request, + build_tag_list_by_product_request, + build_tag_list_by_service_request, + build_tag_operation_link_create_or_update_request, + build_tag_operation_link_delete_request, + build_tag_operation_link_get_request, + build_tag_operation_link_list_by_product_request, + build_tag_product_link_create_or_update_request, + build_tag_product_link_delete_request, + build_tag_product_link_get_request, + build_tag_product_link_list_by_product_request, + build_tag_resource_list_by_service_request, + build_tag_update_request, + build_tenant_access_create_request, + build_tenant_access_get_entity_tag_request, + build_tenant_access_get_request, + build_tenant_access_git_regenerate_primary_key_request, + build_tenant_access_git_regenerate_secondary_key_request, + build_tenant_access_list_by_service_request, + build_tenant_access_list_secrets_request, + build_tenant_access_regenerate_primary_key_request, + build_tenant_access_regenerate_secondary_key_request, + build_tenant_access_update_request, + build_tenant_configuration_deploy_request, + build_tenant_configuration_get_sync_state_request, + build_tenant_configuration_save_request, + build_tenant_configuration_validate_request, + build_tenant_settings_get_request, + build_tenant_settings_list_by_service_request, + build_user_confirmation_password_send_request, + build_user_create_or_update_request, + build_user_delete_request, + build_user_generate_sso_url_request, + build_user_get_entity_tag_request, + build_user_get_request, + build_user_get_shared_access_token_request, + build_user_group_list_request, + build_user_identities_list_request, + build_user_list_by_service_request, + build_user_subscription_get_request, + build_user_subscription_list_request, + build_user_update_request, + build_workspace_api_create_or_update_request, + build_workspace_api_delete_request, + build_workspace_api_diagnostic_create_or_update_request, + build_workspace_api_diagnostic_delete_request, + build_workspace_api_diagnostic_get_entity_tag_request, + build_workspace_api_diagnostic_get_request, + build_workspace_api_diagnostic_list_by_workspace_request, + build_workspace_api_diagnostic_update_request, + build_workspace_api_export_get_request, + build_workspace_api_get_entity_tag_request, + build_workspace_api_get_request, + build_workspace_api_list_by_service_request, + build_workspace_api_operation_create_or_update_request, + build_workspace_api_operation_delete_request, + build_workspace_api_operation_get_entity_tag_request, + build_workspace_api_operation_get_request, + build_workspace_api_operation_list_by_api_request, + build_workspace_api_operation_policy_create_or_update_request, + build_workspace_api_operation_policy_delete_request, + build_workspace_api_operation_policy_get_entity_tag_request, + build_workspace_api_operation_policy_get_request, + build_workspace_api_operation_policy_list_by_operation_request, + build_workspace_api_operation_update_request, + build_workspace_api_policy_create_or_update_request, + build_workspace_api_policy_delete_request, + build_workspace_api_policy_get_entity_tag_request, + build_workspace_api_policy_get_request, + build_workspace_api_policy_list_by_api_request, + build_workspace_api_release_create_or_update_request, + build_workspace_api_release_delete_request, + build_workspace_api_release_get_entity_tag_request, + build_workspace_api_release_get_request, + build_workspace_api_release_list_by_service_request, + build_workspace_api_release_update_request, + build_workspace_api_revision_list_by_service_request, + build_workspace_api_schema_create_or_update_request, + build_workspace_api_schema_delete_request, + build_workspace_api_schema_get_entity_tag_request, + build_workspace_api_schema_get_request, + build_workspace_api_schema_list_by_api_request, + build_workspace_api_update_request, + build_workspace_api_version_set_create_or_update_request, + build_workspace_api_version_set_delete_request, + build_workspace_api_version_set_get_entity_tag_request, + build_workspace_api_version_set_get_request, + build_workspace_api_version_set_list_by_service_request, + build_workspace_api_version_set_update_request, + build_workspace_backend_create_or_update_request, + build_workspace_backend_delete_request, + build_workspace_backend_get_entity_tag_request, + build_workspace_backend_get_request, + build_workspace_backend_list_by_workspace_request, + build_workspace_backend_update_request, + build_workspace_certificate_create_or_update_request, + build_workspace_certificate_delete_request, + build_workspace_certificate_get_entity_tag_request, + build_workspace_certificate_get_request, + build_workspace_certificate_list_by_workspace_request, + build_workspace_certificate_refresh_secret_request, + build_workspace_create_or_update_request, + build_workspace_delete_request, + build_workspace_diagnostic_create_or_update_request, + build_workspace_diagnostic_delete_request, + build_workspace_diagnostic_get_entity_tag_request, + build_workspace_diagnostic_get_request, + build_workspace_diagnostic_list_by_workspace_request, + build_workspace_diagnostic_update_request, + build_workspace_get_entity_tag_request, + build_workspace_get_request, + build_workspace_global_schema_create_or_update_request, + build_workspace_global_schema_delete_request, + build_workspace_global_schema_get_entity_tag_request, + build_workspace_global_schema_get_request, + build_workspace_global_schema_list_by_service_request, + build_workspace_group_create_or_update_request, + build_workspace_group_delete_request, + build_workspace_group_get_entity_tag_request, + build_workspace_group_get_request, + build_workspace_group_list_by_service_request, + build_workspace_group_update_request, + build_workspace_group_user_check_entity_exists_request, + build_workspace_group_user_create_request, + build_workspace_group_user_delete_request, + build_workspace_group_user_list_request, + build_workspace_list_by_service_request, + build_workspace_logger_create_or_update_request, + build_workspace_logger_delete_request, + build_workspace_logger_get_entity_tag_request, + build_workspace_logger_get_request, + build_workspace_logger_list_by_workspace_request, + build_workspace_logger_update_request, + build_workspace_named_value_create_or_update_request, + build_workspace_named_value_delete_request, + build_workspace_named_value_get_entity_tag_request, + build_workspace_named_value_get_request, + build_workspace_named_value_list_by_service_request, + build_workspace_named_value_list_value_request, + build_workspace_named_value_refresh_secret_request, + build_workspace_named_value_update_request, + build_workspace_notification_create_or_update_request, + build_workspace_notification_get_request, + build_workspace_notification_list_by_service_request, + build_workspace_notification_recipient_email_check_entity_exists_request, + build_workspace_notification_recipient_email_create_or_update_request, + build_workspace_notification_recipient_email_delete_request, + build_workspace_notification_recipient_email_list_by_notification_request, + build_workspace_notification_recipient_user_check_entity_exists_request, + build_workspace_notification_recipient_user_create_or_update_request, + build_workspace_notification_recipient_user_delete_request, + build_workspace_notification_recipient_user_list_by_notification_request, + build_workspace_policy_create_or_update_request, + build_workspace_policy_delete_request, + build_workspace_policy_fragment_create_or_update_request, + build_workspace_policy_fragment_delete_request, + build_workspace_policy_fragment_get_entity_tag_request, + build_workspace_policy_fragment_get_request, + build_workspace_policy_fragment_list_by_service_request, + build_workspace_policy_fragment_list_references_request, + build_workspace_policy_get_entity_tag_request, + build_workspace_policy_get_request, + build_workspace_policy_list_by_api_request, + build_workspace_product_api_link_create_or_update_request, + build_workspace_product_api_link_delete_request, + build_workspace_product_api_link_get_request, + build_workspace_product_api_link_list_by_product_request, + build_workspace_product_create_or_update_request, + build_workspace_product_delete_request, + build_workspace_product_get_entity_tag_request, + build_workspace_product_get_request, + build_workspace_product_group_link_create_or_update_request, + build_workspace_product_group_link_delete_request, + build_workspace_product_group_link_get_request, + build_workspace_product_group_link_list_by_product_request, + build_workspace_product_list_by_service_request, + build_workspace_product_policy_create_or_update_request, + build_workspace_product_policy_delete_request, + build_workspace_product_policy_get_entity_tag_request, + build_workspace_product_policy_get_request, + build_workspace_product_policy_list_by_product_request, + build_workspace_product_update_request, + build_workspace_subscription_create_or_update_request, + build_workspace_subscription_delete_request, + build_workspace_subscription_get_entity_tag_request, + build_workspace_subscription_get_request, + build_workspace_subscription_list_request, + build_workspace_subscription_list_secrets_request, + build_workspace_subscription_regenerate_primary_key_request, + build_workspace_subscription_regenerate_secondary_key_request, + build_workspace_subscription_update_request, + build_workspace_tag_api_link_create_or_update_request, + build_workspace_tag_api_link_delete_request, + build_workspace_tag_api_link_get_request, + build_workspace_tag_api_link_list_by_product_request, + build_workspace_tag_create_or_update_request, + build_workspace_tag_delete_request, + build_workspace_tag_get_entity_state_request, + build_workspace_tag_get_request, + build_workspace_tag_list_by_service_request, + build_workspace_tag_operation_link_create_or_update_request, + build_workspace_tag_operation_link_delete_request, + build_workspace_tag_operation_link_get_request, + build_workspace_tag_operation_link_list_by_product_request, + build_workspace_tag_product_link_create_or_update_request, + build_workspace_tag_product_link_delete_request, + build_workspace_tag_product_link_get_request, + build_workspace_tag_product_link_list_by_product_request, + build_workspace_tag_update_request, + build_workspace_update_request, +) +from .._configuration import ApiManagementClientConfiguration + +JSON = MutableMapping[str, Any] +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list + + +class WorkspaceApiOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_api` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any + ) -> _models.ApiContract: + """Gets the details of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: Union[_models.ApiCreateOrUpdateParameter, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: _models.ApiCreateOrUpdateParameter, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns ApiContract. The ApiContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns ApiContract. The ApiContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns ApiContract. The ApiContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: Union[_models.ApiCreateOrUpdateParameter, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Is one of the following types: + ApiCreateOrUpdateParameter, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns ApiContract. The ApiContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.ApiContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: _models.ApiUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: Union[_models.ApiUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Is one of the following types: + ApiUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_revisions: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Deletes the specified API of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword delete_revisions: Delete all revisions of the Api. Default value is None. + :paramtype delete_revisions: bool + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + delete_revisions=delete_revisions, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + tags: Optional[str] = None, + expand_api_version_set: Optional[bool] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ApiContract"]: + """Lists all APIs of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| isCurrent | filter | eq, ne | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword tags: Include tags in the response. Default value is None. + :paramtype tags: str + :keyword expand_api_version_set: Include full ApiVersionSet resource in response. Default value + is None. + :paramtype expand_api_version_set: bool + :return: An iterator like instance of ApiContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + tags=tags, + expand_api_version_set=expand_api_version_set, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceApiReleaseOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_api_release` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Returns the details of an API release. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_release_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiReleaseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + **kwargs: Any + ) -> bool: + """Returns the etag of an API release. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_release_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: _models.ApiReleaseContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: Union[_models.ApiReleaseContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Is one of the following types: ApiReleaseContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_release_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiReleaseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: _models.ApiReleaseContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: Union[_models.ApiReleaseContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Is one of the following types: + ApiReleaseContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_release_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiReleaseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified release in the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_release_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ApiReleaseContract"]: + """Lists all releases of an API. An API release is created when making an API Revision current. + Releases are also used to rollback to previous revisions. Results will be paged and can be + constrained by the $top and $skip parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| notes | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiReleaseContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiReleaseContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiReleaseContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_release_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiReleaseContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceApiOperationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_api_operation` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + **kwargs: Any + ) -> _models.OperationContract: + """Gets the details of the API Operation specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_operation_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API operation specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_operation_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: _models.OperationContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: Union[_models.OperationContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Is one of the following types: OperationContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_operation_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: _models.OperationUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: Union[_models.OperationUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Is one of the following types: + OperationUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_operation_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified operation in the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_operation_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + tags: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.OperationContract"]: + """Lists a collection of the operations for the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword tags: Include tags in the response. Default value is None. + :paramtype tags: str + :return: An iterator like instance of OperationContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.OperationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OperationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_operation_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + tags=tags, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OperationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class GraphQLApiResolverPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`graph_ql_api_resolver_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the GraphQL API Resolver level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_graph_ql_api_resolver_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its + identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_graph_ql_api_resolver_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the GraphQL API Resolver level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the GraphQL API Resolver level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the GraphQL API Resolver level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the GraphQL API Resolver level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_graph_ql_api_resolver_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the GraphQL Api Resolver. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_graph_ql_api_resolver_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_resolver( + self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any + ) -> AsyncItemPaged["_models.PolicyContract"]: + """Get the list of policy configuration at the GraphQL API Resolver level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :return: An iterator like instance of PolicyContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_graph_ql_api_resolver_policy_list_by_resolver_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_api_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API policy specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def list_by_api( + self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any + ) -> _models.PolicyCollection: + """Get the policy configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: PolicyCollection. The PolicyCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) + + _request = build_api_policy_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the Global policy definition of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, policy_id: Union[str, _models.PolicyIdName], **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Global policy definition in the Api Management + service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates the global policy configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates the global policy configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates the global policy configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates the global policy configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the global policy configuration of the Api Management Service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.PolicyContract"]: + """Lists all the Global Policy definitions of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of PolicyContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_policy_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ProductPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`product_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_product_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Get the ETag of the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any + ) -> AsyncItemPaged["_models.PolicyContract"]: + """Get the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: An iterator like instance of PolicyContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_policy_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspacePolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_workspace_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the workspace policy specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any + ) -> AsyncItemPaged["_models.PolicyContract"]: + """Get the policy configuration at the workspace level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :return: An iterator like instance of PolicyContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_policy_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceApiOperationPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_api_operation_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_operation_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API operation policy specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_operation_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_operation_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the Api Operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_operation_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_operation( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + **kwargs: Any + ) -> AsyncItemPaged["_models.PolicyContract"]: + """Get the list of policy configuration at the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :return: An iterator like instance of PolicyContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_operation_policy_list_by_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceApiPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_api_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API policy specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any + ) -> AsyncItemPaged["_models.PolicyContract"]: + """Get the policy configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: An iterator like instance of PolicyContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_policy_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceProductPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_product_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_workspace_product_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Get the ETag of the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_product_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_product_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_product_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def list_by_product( + self, resource_group_name: str, service_name: str, workspace_id: str, product_id: str, **kwargs: Any + ) -> _models.PolicyCollection: + """Get the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: PolicyCollection. The PolicyCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) + + _request = build_workspace_product_policy_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class TagOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`tag` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get_by_api( + self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Get tag associated with the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_get_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_state_by_api( + self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_get_entity_state_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace_async + async def assign_to_api( + self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Assign tag to the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_assign_to_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def detach_from_api( + self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any + ) -> None: + """Detach the tag from the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_detach_from_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagContract"]: + """Lists all Tags associated with the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get_by_operation( + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Get tag associated with the Operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_get_by_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_state_by_operation( + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_get_entity_state_by_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace_async + async def assign_to_operation( + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Assign tag to the Operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_assign_to_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def detach_from_operation( + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any + ) -> None: + """Detach the tag from the Operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_detach_from_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_operation( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagContract"]: + """Lists all Tags associated with the Operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_list_by_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get_by_product( + self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Get tag associated with the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_get_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_state_by_product( + self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_get_entity_state_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace_async + async def assign_to_product( + self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Assign tag to the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_assign_to_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def detach_from_product( + self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any + ) -> None: + """Detach the tag from the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_detach_from_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagContract"]: + """Lists all Tags associated with the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get(self, resource_group_name: str, service_name: str, tag_id: str, **kwargs: Any) -> _models.TagContract: + """Gets the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_state(self, resource_group_name: str, service_name: str, tag_id: str, **kwargs: Any) -> bool: + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_get_entity_state_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: _models.TagCreateUpdateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: Union[_models.TagCreateUpdateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Is one of the following types: TagCreateUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tag_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: _models.TagCreateUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: Union[_models.TagCreateUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Is one of the following types: TagCreateUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tag_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific tag of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + scope: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagContract"]: + """Lists a collection of tags defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword scope: Scope like 'apis', 'products' or 'apis/{apiId}. Default value is None. + :paramtype scope: str + :return: An iterator like instance of TagContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceTagOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_tag` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Gets the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_workspace_tag_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_state( + self, resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_tag_get_entity_state_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: _models.TagCreateUpdateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: Union[_models.TagCreateUpdateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Is one of the following types: TagCreateUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_tag_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: _models.TagCreateUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: Union[_models.TagCreateUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Is one of the following types: TagCreateUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_tag_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific tag of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_tag_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + scope: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagContract"]: + """Lists a collection of tags defined within a workspace in a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword scope: Scope like 'apis', 'products' or 'apis/{apiId}. Default value is None. + :paramtype scope: str + :return: An iterator like instance of TagContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_tag_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceApiSchemaOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_api_schema` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, schema_id: str, **kwargs: Any + ) -> _models.SchemaContract: + """Get the schema configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: SchemaContract. The SchemaContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SchemaContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_schema_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SchemaContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, schema_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the schema specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_schema_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + parameters: Union[_models.SchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_schema_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + parameters: _models.SchemaContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns SchemaContract. The SchemaContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns SchemaContract. The SchemaContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns SchemaContract. The SchemaContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + parameters: Union[_models.SchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Is one of the following types: SchemaContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns SchemaContract. The SchemaContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + schema_id=schema_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.SchemaContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.SchemaContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.SchemaContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + *, + etag: str, + match_condition: MatchConditions, + force: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Deletes the schema configuration at the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword force: If true removes all references to the schema before deleting it. Default value + is None. + :paramtype force: bool + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_schema_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + force=force, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.SchemaContract"]: + """Get the schema configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| contentType + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of SchemaContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SchemaContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_schema_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SchemaContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class DiagnosticOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`diagnostic` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, diagnostic_id: str, **kwargs: Any + ) -> _models.DiagnosticContract: + """Gets the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + _request = build_diagnostic_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, diagnostic_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_diagnostic_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: _models.DiagnosticContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Is one of the following types: DiagnosticContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_diagnostic_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: _models.DiagnosticContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Is one of the following types: + DiagnosticContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_diagnostic_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Diagnostic. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_diagnostic_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.DiagnosticContract"]: + """Lists all diagnostics of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of DiagnosticContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DiagnosticContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_diagnostic_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DiagnosticContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceDiagnosticOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_diagnostic` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, diagnostic_id: str, **kwargs: Any + ) -> _models.DiagnosticContract: + """Gets the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + _request = build_workspace_diagnostic_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, diagnostic_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_diagnostic_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: _models.DiagnosticContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Is one of the following types: DiagnosticContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_diagnostic_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: _models.DiagnosticUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Is one of the following types: + DiagnosticUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_diagnostic_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Diagnostic. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_diagnostic_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_workspace( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.DiagnosticContract"]: + """Lists all diagnostics in the specified workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of DiagnosticContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DiagnosticContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_diagnostic_list_by_workspace_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DiagnosticContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceApiDiagnosticOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_api_diagnostic` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Gets the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_diagnostic_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_diagnostic_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: _models.DiagnosticContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Is one of the following types: DiagnosticContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_diagnostic_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: _models.DiagnosticUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Is one of the following types: + DiagnosticUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_diagnostic_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Diagnostic from an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_diagnostic_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_workspace( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.DiagnosticContract"]: + """Lists all diagnostics of an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of DiagnosticContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DiagnosticContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_diagnostic_list_by_workspace_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DiagnosticContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class IssueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`issue` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, issue_id: str, **kwargs: Any + ) -> _models.IssueContract: + """Gets API Management issue details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) + + _request = build_issue_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.IssueContract"]: + """Lists a collection of issues in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| state | filter | eq | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of IssueContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.IssueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IssueContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_issue_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IssueContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ProductWikiOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`product_wiki` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any + ) -> _models.WikiContract: + """Gets the details of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) + + _request = build_product_wiki_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WikiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_wiki_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: _models.WikiContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for a Product or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for a Product or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for a Product or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: Union[_models.WikiContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for a Product or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create parameters. Is one of the following types: WikiContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_wiki_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WikiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: _models.WikiUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Wiki Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Wiki Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Wiki Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: Union[_models.WikiUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Wiki Update parameters. Is one of the following types: WikiUpdateContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_wiki_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WikiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Wiki from a Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_wiki_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class WorkspaceApiVersionSetOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_api_version_set` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, version_set_id: str, **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Gets the details of the Api Version Set specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_version_set_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiVersionSetContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, version_set_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Api Version Set specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_version_set_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: _models.ApiVersionSetContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: Union[_models.ApiVersionSetContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Is one of the following types: + ApiVersionSetContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_version_set_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiVersionSetContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: _models.ApiVersionSetUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: Union[_models.ApiVersionSetUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Is one of the following types: + ApiVersionSetUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_version_set_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiVersionSetContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_version_set_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ApiVersionSetContract"]: + """Lists a collection of API Version Sets in the specified workspace with a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiVersionSetContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiVersionSetContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiVersionSetContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_version_set_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiVersionSetContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceBackendOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_backend` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, backend_id: str, **kwargs: Any + ) -> _models.BackendContract: + """Gets the details of the backend specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) + + _request = build_workspace_backend_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.BackendContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, backend_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the backend specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_backend_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: _models.BackendContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: Union[_models.BackendContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Is one of the following types: BackendContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_backend_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.BackendContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: _models.BackendUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: Union[_models.BackendUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Is one of the following types: BackendUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_backend_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.BackendContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_backend_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_workspace( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.BackendContract"]: + """Lists a collection of backends in the specified workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of BackendContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.BackendContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BackendContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_backend_list_by_workspace_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BackendContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceCertificateOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_certificate` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, certificate_id: str, **kwargs: Any + ) -> _models.CertificateContract: + """Gets the details of the certificate specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) + + _request = build_workspace_certificate_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, certificate_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the certificate specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_certificate_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + parameters: _models.CertificateCreateOrUpdateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + parameters: Union[_models.CertificateCreateOrUpdateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Is one of the following types: + CertificateCreateOrUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters or JSON + or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_certificate_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_certificate_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_workspace( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + is_key_vault_refresh_failed: Optional[bool] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.CertificateContract"]: + """Lists a collection of all certificates in the specified workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword is_key_vault_refresh_failed: When set to true, the response contains only certificates + entities which failed refresh. Default value is None. + :paramtype is_key_vault_refresh_failed: bool + :return: An iterator like instance of CertificateContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.CertificateContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CertificateContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_certificate_list_by_workspace_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + is_key_vault_refresh_failed=is_key_vault_refresh_failed, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CertificateContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def refresh_secret( + self, resource_group_name: str, service_name: str, workspace_id: str, certificate_id: str, **kwargs: Any + ) -> _models.CertificateContract: + """From KeyVault, Refresh the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) + + _request = build_workspace_certificate_refresh_secret_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class WorkspaceGroupOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_group` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, **kwargs: Any + ) -> _models.GroupContract: + """Gets the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + _request = build_workspace_group_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_group_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: _models.GroupCreateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: Union[_models.GroupCreateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Is one of the following types: GroupCreateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_group_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: _models.GroupUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: Union[_models.GroupUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Is one of the following types: GroupUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_group_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific group of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_group_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.GroupContract"]: + """Lists a collection of groups defined within a workspace in a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| externalId | filter | eq | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GroupContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GroupContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GroupContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_group_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GroupContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceLoggerOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_logger` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, logger_id: str, **kwargs: Any + ) -> _models.LoggerContract: + """Gets the details of the logger specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) + + _request = build_workspace_logger_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoggerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, logger_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the logger specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_logger_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: _models.LoggerContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: Union[_models.LoggerContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Is one of the following types: LoggerContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_logger_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoggerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: _models.LoggerUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: Union[_models.LoggerUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Is one of the following types: LoggerUpdateContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_logger_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoggerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_logger_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_workspace( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.LoggerContract"]: + """Lists a collection of loggers in the specified workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of LoggerContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.LoggerContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LoggerContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_logger_list_by_workspace_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LoggerContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceNamedValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_named_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any + ) -> _models.NamedValueContract: + """Gets the details of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: NamedValueContract. The NamedValueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NamedValueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + + _request = build_workspace_named_value_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NamedValueContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_named_value_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: Union[_models.NamedValueCreateContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_named_value_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: _models.NamedValueCreateContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: Union[_models.NamedValueCreateContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Is one of the following types: NamedValueCreateContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.NamedValueContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NamedValueContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NamedValueContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: Union[_models.NamedValueUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_named_value_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: _models.NamedValueUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: Union[_models.NamedValueUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Is one of the following types: + NamedValueUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.NamedValueContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NamedValueContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NamedValueContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific named value from the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_named_value_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + is_key_vault_refresh_failed: Optional[Union[str, _models.KeyVaultRefreshState]] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.NamedValueContract"]: + """Lists a collection of named values defined within a workspace in a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| tags | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword is_key_vault_refresh_failed: Query parameter to fetch named value entities based on + refresh status. Known values are: "true" and "false". Default value is None. + :paramtype is_key_vault_refresh_failed: str or + ~azure.mgmt.apimanagement.models.KeyVaultRefreshState + :return: An iterator like instance of NamedValueContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NamedValueContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_named_value_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + is_key_vault_refresh_failed=is_key_vault_refresh_failed, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NamedValueContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def list_value( + self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any + ) -> _models.NamedValueSecretContract: + """Gets the secret of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: NamedValueSecretContract. The NamedValueSecretContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NamedValueSecretContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NamedValueSecretContract] = kwargs.pop("cls", None) + + _request = build_workspace_named_value_list_value_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NamedValueSecretContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + async def _refresh_secret_initial( + self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_workspace_named_value_refresh_secret_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_refresh_secret( + self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Refresh the secret of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._refresh_secret_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.NamedValueContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NamedValueContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NamedValueContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class WorkspaceNotificationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_notification` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + **kwargs: Any + ) -> _models.NotificationContract: + """Gets the details of the Notification specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :return: NotificationContract. The NotificationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NotificationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) + + _request = build_workspace_notification_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NotificationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.NotificationContract: + """Create or Update API Management publisher notification for the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: NotificationContract. The NotificationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NotificationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) + + _request = build_workspace_notification_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NotificationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.NotificationContract"]: + """Lists a collection of properties defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of NotificationContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.NotificationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NotificationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_notification_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NotificationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspacePolicyFragmentOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_policy_fragment` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + *, + format: Optional[Union[str, _models.PolicyFragmentContentFormat]] = None, + **kwargs: Any + ) -> _models.PolicyFragmentContract: + """Gets a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :keyword format: Policy fragment content format. Known values are: "xml" and "rawxml". Default + value is None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyFragmentContentFormat + :return: PolicyFragmentContract. The PolicyFragmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyFragmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) + + _request = build_workspace_policy_fragment_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + id=id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyFragmentContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_policy_fragment_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + id=id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + parameters: Union[_models.PolicyFragmentContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_policy_fragment_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + id=id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + parameters: _models.PolicyFragmentContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + parameters: Union[_models.PolicyFragmentContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Is one of the following types: + PolicyFragmentContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + id=id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.PolicyFragmentContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.PolicyFragmentContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.PolicyFragmentContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_policy_fragment_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + id=id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + orderby: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.PolicyFragmentContract"]: + """Gets all policy fragments defined within a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of PolicyFragmentContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyFragmentContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_policy_fragment_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + orderby=orderby, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyFragmentContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def list_references( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> _models.ResourceCollection: + """Lists policy resources that reference the policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: ResourceCollection. The ResourceCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResourceCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ResourceCollection] = kwargs.pop("cls", None) + + _request = build_workspace_policy_fragment_list_references_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + id=id, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ResourceCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class SignInSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`sign_in_settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.PortalSigninSettings: + """Get Sign In Settings for the Portal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: PortalSigninSettings. The PortalSigninSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalSigninSettings] = kwargs.pop("cls", None) + + _request = build_sign_in_settings_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalSigninSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the SignInSettings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_sign_in_settings_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.PortalSigninSettings, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSigninSettings: + """Create or Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSigninSettings. The PortalSigninSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSigninSettings: + """Create or Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSigninSettings. The PortalSigninSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSigninSettings: + """Create or Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSigninSettings. The PortalSigninSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.PortalSigninSettings, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSigninSettings: + """Create or Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Is one of the following types: + PortalSigninSettings, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSigninSettings. The PortalSigninSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalSigninSettings] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sign_in_settings_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalSigninSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.PortalSigninSettings, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-In settings. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-In settings. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-In settings. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.PortalSigninSettings, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-In settings. Is one of the following types: + PortalSigninSettings, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sign_in_settings_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class SignUpSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`sign_up_settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.PortalSignupSettings: + """Get Sign Up Settings for the Portal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: PortalSignupSettings. The PortalSignupSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalSignupSettings] = kwargs.pop("cls", None) + + _request = build_sign_up_settings_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalSignupSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the SignUpSettings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_sign_up_settings_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.PortalSignupSettings, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSignupSettings: + """Create or Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSignupSettings. The PortalSignupSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSignupSettings: + """Create or Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSignupSettings. The PortalSignupSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSignupSettings: + """Create or Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSignupSettings. The PortalSignupSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.PortalSignupSettings, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSignupSettings: + """Create or Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Is one of the following types: + PortalSignupSettings, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSignupSettings. The PortalSignupSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalSignupSettings] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sign_up_settings_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalSignupSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.PortalSignupSettings, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-Up settings. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-Up settings. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-Up settings. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.PortalSignupSettings, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-Up settings. Is one of the following types: + PortalSignupSettings, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sign_up_settings_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class DelegationSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`delegation_settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.PortalDelegationSettings: + """Get Delegation Settings for the Portal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: PortalDelegationSettings. The PortalDelegationSettings is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalDelegationSettings] = kwargs.pop("cls", None) + + _request = build_delegation_settings_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalDelegationSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the DelegationSettings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delegation_settings_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.PortalDelegationSettings, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalDelegationSettings: + """Create or Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalDelegationSettings. The PortalDelegationSettings is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalDelegationSettings: + """Create or Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalDelegationSettings. The PortalDelegationSettings is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalDelegationSettings: + """Create or Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalDelegationSettings. The PortalDelegationSettings is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.PortalDelegationSettings, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalDelegationSettings: + """Create or Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Is one of the following types: + PortalDelegationSettings, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalDelegationSettings. The PortalDelegationSettings is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalDelegationSettings] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_delegation_settings_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalDelegationSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.PortalDelegationSettings, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Delegation settings. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Delegation settings. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Delegation settings. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.PortalDelegationSettings, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Delegation settings. Is one of the following types: + PortalDelegationSettings, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_delegation_settings_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def list_secrets( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> _models.PortalSettingValidationKeyContract: + """Gets the secret validation key of the DelegationSettings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: PortalSettingValidationKeyContract. The PortalSettingValidationKeyContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSettingValidationKeyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalSettingValidationKeyContract] = kwargs.pop("cls", None) + + _request = build_delegation_settings_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalSettingValidationKeyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class WorkspaceProductOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_product` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, product_id: str, **kwargs: Any + ) -> _models.ProductContract: + """Gets the details of the product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) + + _request = build_workspace_product_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, product_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_product_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: _models.ProductContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: Union[_models.ProductContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Is one of the following types: ProductContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_product_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: _models.ProductUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: Union[_models.ProductUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Is one of the following types: ProductUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_product_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_subscriptions: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Delete product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword delete_subscriptions: Delete existing subscriptions associated with the product or + not. Default value is None. + :paramtype delete_subscriptions: bool + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_product_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + delete_subscriptions=delete_subscriptions, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + expand_groups: Optional[bool] = None, + tags: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ProductContract"]: + """Lists a collection of products in the specified workspace in a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| state | filter | eq | |
| groups | expand | | |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword expand_groups: When set to true, the response contains an array of groups that have + visibility to the product. The default is false. Default value is None. + :paramtype expand_groups: bool + :keyword tags: Products which are part of a specific tag. Default value is None. + :paramtype tags: str + :return: An iterator like instance of ProductContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_product_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + expand_groups=expand_groups, + tags=tags, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceProductApiLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_product_api_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Gets the API link for the product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) + + _request = build_workspace_product_api_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + parameters: _models.ProductApiLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + parameters: Union[_models.ProductApiLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + ProductApiLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract or JSON or IO[bytes] + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_product_api_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified API from the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_product_api_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ProductApiLinkContract"]: + """Lists a collection of the API links associated with a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| apiId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ProductApiLinkContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductApiLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductApiLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_product_api_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductApiLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceProductGroupLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_product_group_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Gets the group link for the product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) + + _request = build_workspace_product_group_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + group_link_id=group_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductGroupLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + parameters: _models.ProductGroupLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + parameters: Union[_models.ProductGroupLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + ProductGroupLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract or JSON or + IO[bytes] + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_product_group_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + group_link_id=group_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductGroupLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified group from the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_product_group_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + group_link_id=group_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ProductGroupLinkContract"]: + """Lists a collection of the group links associated with a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| groupId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ProductGroupLinkContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductGroupLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductGroupLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_product_group_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductGroupLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceGlobalSchemaOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_global_schema` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, schema_id: str, **kwargs: Any + ) -> _models.GlobalSchemaContract: + """Gets the details of the Schema specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: GlobalSchemaContract. The GlobalSchemaContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GlobalSchemaContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) + + _request = build_workspace_global_schema_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GlobalSchemaContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, schema_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Schema specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_global_schema_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + parameters: Union[_models.GlobalSchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_global_schema_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + parameters: _models.GlobalSchemaContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns GlobalSchemaContract. The + GlobalSchemaContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns GlobalSchemaContract. The + GlobalSchemaContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns GlobalSchemaContract. The + GlobalSchemaContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + parameters: Union[_models.GlobalSchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Is one of the following types: + GlobalSchemaContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns GlobalSchemaContract. The + GlobalSchemaContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + schema_id=schema_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.GlobalSchemaContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.GlobalSchemaContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.GlobalSchemaContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Schema. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_global_schema_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.GlobalSchemaContract"]: + """Lists a collection of schemas registered with workspace in a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GlobalSchemaContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GlobalSchemaContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_global_schema_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GlobalSchemaContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class UserSubscriptionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`user_subscription` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, user_id: str, sid: str, **kwargs: Any + ) -> _models.SubscriptionContract: + """Gets the specified Subscription entity associated with a particular user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + _request = build_user_subscription_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + user_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.SubscriptionContract"]: + """Lists the collection of subscriptions of the specified user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :keyword filter: | Field | Usage | Supported operators | Supported functions + |
|-------------|------------------------|-----------------------------------|
|name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
|productId | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of SubscriptionContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SubscriptionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_user_subscription_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SubscriptionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceSubscriptionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_subscription` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any + ) -> _models.SubscriptionContract: + """Gets the specified Subscription entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + _request = build_workspace_subscription_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the apimanagement subscription specified by its + identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_subscription_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: _models.SubscriptionCreateParameters, + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: JSON, + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: IO[bytes], + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: Union[_models.SubscriptionCreateParameters, JSON, IO[bytes]], + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Is one of the following types: + SubscriptionCreateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters or JSON or + IO[bytes] + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_subscription_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + notify=notify, + app_type=app_type, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: _models.SubscriptionUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: Union[_models.SubscriptionUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Is one of the following types: + SubscriptionUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_subscription_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + notify=notify, + app_type=app_type, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified subscription. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_subscription_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.SubscriptionContract"]: + """Lists all subscriptions of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| state | filter | eq | |
| user | expand | | + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of SubscriptionContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SubscriptionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_subscription_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SubscriptionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def regenerate_primary_key( + self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any + ) -> None: + """Regenerates primary key of existing subscription of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_subscription_regenerate_primary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def regenerate_secondary_key( + self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any + ) -> None: + """Regenerates secondary key of existing subscription of the workspace in an API Management + service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_subscription_regenerate_secondary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def list_secrets( + self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any + ) -> _models.SubscriptionKeysContract: + """Gets the specified Subscription keys. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: SubscriptionKeysContract. The SubscriptionKeysContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionKeysContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SubscriptionKeysContract] = kwargs.pop("cls", None) + + _request = build_workspace_subscription_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionKeysContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class WorkspaceTagApiLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_tag_api_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Gets the API link for the tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) + + _request = build_workspace_tag_api_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + parameters: _models.TagApiLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + parameters: Union[_models.TagApiLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + TagApiLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract or JSON or IO[bytes] + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_tag_api_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified API from the specified tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_tag_api_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagApiLinkContract"]: + """Lists a collection of the API links associated with a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| apiId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagApiLinkContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagApiLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagApiLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_tag_api_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagApiLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceTagOperationLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_tag_operation_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Gets the operation link for the tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) + + _request = build_workspace_tag_operation_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + operation_link_id=operation_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagOperationLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + parameters: _models.TagOperationLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + parameters: Union[_models.TagOperationLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + TagOperationLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract or JSON or + IO[bytes] + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_tag_operation_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + operation_link_id=operation_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagOperationLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified operation from the specified tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_tag_operation_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + operation_link_id=operation_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagOperationLinkContract"]: + """Lists a collection of the operation links associated with a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| operationId + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagOperationLinkContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagOperationLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagOperationLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_tag_operation_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagOperationLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceTagProductLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_tag_product_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Gets the product link for the tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) + + _request = build_workspace_tag_product_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + product_link_id=product_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagProductLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + parameters: _models.TagProductLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + parameters: Union[_models.TagProductLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + TagProductLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract or JSON or IO[bytes] + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_tag_product_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + product_link_id=product_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagProductLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified product from the specified tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_tag_product_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + product_link_id=product_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagProductLinkContract"]: + """Lists a collection of the product links associated with a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| productId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagProductLinkContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagProductLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagProductLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_tag_product_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagProductLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiManagementOperationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_management_operations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: + """Lists all of the available REST API operations of the Microsoft.ApiManagement provider. + + :return: An iterator like instance of Operation + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Operation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiGatewayOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_gateway` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, gateway_name: str, **kwargs: Any + ) -> _models.ApiManagementGatewayResource: + """Gets an API Management gateway resource description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :return: ApiManagementGatewayResource. The ApiManagementGatewayResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementGatewayResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) + + _request = build_api_gateway_get_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementGatewayResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + parameters: Union[_models.ApiManagementGatewayResource, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_gateway_create_or_update_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: _models.ApiManagementGatewayResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: + """Creates or updates an API Management gateway. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: + """Creates or updates an API Management gateway. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: + """Creates or updates an API Management gateway. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: Union[_models.ApiManagementGatewayResource, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: + """Creates or updates an API Management gateway. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Is one of the following types: ApiManagementGatewayResource, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayResource or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ApiManagementGatewayResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiManagementGatewayResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiManagementGatewayResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + gateway_name: str, + parameters: Union[_models.ApiManagementGatewayUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_gateway_update_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: _models.ApiManagementGatewayUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: + """Updates an existing API Management gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: + """Updates an existing API Management gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: + """Updates an existing API Management gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: Union[_models.ApiManagementGatewayUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: + """Updates an existing API Management gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Is one of the following types: ApiManagementGatewayUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateParameters or JSON + or IO[bytes] + :return: An instance of AsyncLROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ApiManagementGatewayResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiManagementGatewayResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiManagementGatewayResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_gateway_delete_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, gateway_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementGatewayResource]: + """Deletes an existing API Management gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :return: An instance of AsyncLROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = _deserialize(_models.ApiManagementGatewayResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiManagementGatewayResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiManagementGatewayResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ApiManagementGatewayResource"]: + """List all API Management gateways within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of ApiManagementGatewayResource + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementGatewayResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_gateway_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementGatewayResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ApiManagementGatewayResource"]: + """List all API Management gateways within a subscription. + + :return: An iterator like instance of ApiManagementGatewayResource + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementGatewayResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_gateway_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementGatewayResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiManagementGatewaySkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_management_gateway_skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_available_skus( + self, resource_group_name: str, gateway_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.GatewayResourceSkuResult"]: + """Gets available SKUs for API Management gateway. + + Gets all available SKU for a given API Management gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :return: An iterator like instance of GatewayResourceSkuResult + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GatewayResourceSkuResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GatewayResourceSkuResult]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_gateway_skus_list_available_skus_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GatewayResourceSkuResult], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> _models.ApiContract: + """Gets the details of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + + _request = build_api_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: Union[_models.ApiCreateOrUpdateParameter, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: _models.ApiCreateOrUpdateParameter, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns ApiContract. The ApiContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns ApiContract. The ApiContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns ApiContract. The ApiContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: Union[_models.ApiCreateOrUpdateParameter, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Is one of the following types: + ApiCreateOrUpdateParameter, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns ApiContract. The ApiContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.ApiContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: _models.ApiUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: Union[_models.ApiUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Is one of the following types: + ApiUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_revisions: Optional[bool] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + delete_revisions=delete_revisions, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_revisions: Optional[bool] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword delete_revisions: Delete all revisions of the Api. Default value is None. + :paramtype delete_revisions: bool + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + etag=etag, + match_condition=match_condition, + delete_revisions=delete_revisions, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + tags: Optional[str] = None, + expand_api_version_set: Optional[bool] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ApiContract"]: + """Lists all APIs of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| isCurrent | filter | eq, ne | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword tags: Include tags in the response. Default value is None. + :paramtype tags: str + :keyword expand_api_version_set: Include full ApiVersionSet resource in response. Default value + is None. + :paramtype expand_api_version_set: bool + :return: An iterator like instance of ApiContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + tags=tags, + expand_api_version_set=expand_api_version_set, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_tags( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + include_not_tagged_apis: Optional[bool] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagResourceContract"]: + """Lists a collection of apis associated with tags. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| isCurrent | filter | eq | |
. Default value is + None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword include_not_tagged_apis: Include not tagged APIs. Default value is None. + :paramtype include_not_tagged_apis: bool + :return: An iterator like instance of TagResourceContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagResourceContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_list_by_tags_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + include_not_tagged_apis=include_not_tagged_apis, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagResourceContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiRevisionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_revision` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ApiRevisionContract"]: + """Lists all revisions of an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| apiRevision + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiRevisionContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiRevisionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_revision_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiRevisionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiProductOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_product` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_apis( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ProductContract"]: + """Lists all Products, which the API is part of. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ProductContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_product_list_by_apis_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class OperationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`operation` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_tags( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + include_not_tagged_operations: Optional[bool] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagResourceContract"]: + """Lists a collection of operations associated with tags. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword include_not_tagged_operations: Include not tagged Operations. Default value is None. + :paramtype include_not_tagged_operations: bool + :return: An iterator like instance of TagResourceContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagResourceContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operation_list_by_tags_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + include_not_tagged_operations=include_not_tagged_operations, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagResourceContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceApiRevisionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_api_revision` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ApiRevisionContract"]: + """Lists all revisions of an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| apiRevision + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiRevisionContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiRevisionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_revision_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiRevisionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiManagementServiceOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_management_service` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> _models.ApiManagementServiceResource: + """Gets an API Management service resource description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: ApiManagementServiceResource. The ApiManagementServiceResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + + _request = build_api_management_service_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceResource, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_management_service_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.ApiManagementServiceResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Creates or updates an API Management service. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Creates or updates an API Management service. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Creates or updates an API Management service. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceResource, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Creates or updates an API Management service. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Is one of the following types: ApiManagementServiceResource, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_management_service_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.ApiManagementServiceUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Updates an existing API Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Updates an existing API Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Updates an existing API Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Updates an existing API Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Is one of the following types: ApiManagementServiceUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters or JSON + or IO[bytes] + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_management_service_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Deletes an existing API Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ApiManagementServiceResource"]: + """List all API Management services within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of ApiManagementServiceResource + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementServiceResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_service_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementServiceResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ApiManagementServiceResource"]: + """Lists all API Management services within an Azure subscription. + + :return: An iterator like instance of ApiManagementServiceResource + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementServiceResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_service_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementServiceResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _restore_initial( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_management_service_restore_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_restore( + self, + resource_group_name: str, + service_name: str, + parameters: _models.ApiManagementServiceBackupRestoreParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Restores a backup of an API Management service created using the ApiManagementService_Backup + operation on the current service. This is a long running operation and could take several + minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Restore API Management service from backup + operation. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_restore( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Restores a backup of an API Management service created using the ApiManagementService_Backup + operation on the current service. This is a long running operation and could take several + minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Restore API Management service from backup + operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_restore( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Restores a backup of an API Management service created using the ApiManagementService_Backup + operation on the current service. This is a long running operation and could take several + minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Restore API Management service from backup + operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_restore( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Restores a backup of an API Management service created using the ApiManagementService_Backup + operation on the current service. This is a long running operation and could take several + minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Restore API Management service from backup + operation. Is one of the following types: ApiManagementServiceBackupRestoreParameters, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters + or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._restore_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _backup_initial( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_management_service_backup_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_backup( + self, + resource_group_name: str, + service_name: str, + parameters: _models.ApiManagementServiceBackupRestoreParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Creates a backup of the API Management service to the given Azure Storage Account. This is long + running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_backup( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Creates a backup of the API Management service to the given Azure Storage Account. This is long + running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_backup( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Creates a backup of the API Management service to the given Azure Storage Account. This is long + running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_backup( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Creates a backup of the API Management service to the given Azure Storage Account. This is long + running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Is one of + the following types: ApiManagementServiceBackupRestoreParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters + or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._backup_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _migrate_to_stv2_initial( + self, + resource_group_name: str, + service_name: str, + parameters: Optional[Union[_models.MigrateToStv2Contract, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if parameters else None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_api_management_service_migrate_to_stv2_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_migrate_to_stv2( + self, + resource_group_name: str, + service_name: str, + parameters: Optional[_models.MigrateToStv2Contract] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Upgrades an API Management service to the Stv2 platform. For details refer to + `https://aka.ms/apim-migrate-stv2 `_. This change is not + reversible. This is long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Optional parameters supplied to migrate service. Default value is None. + :type parameters: ~azure.mgmt.apimanagement.models.MigrateToStv2Contract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_migrate_to_stv2( + self, + resource_group_name: str, + service_name: str, + parameters: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Upgrades an API Management service to the Stv2 platform. For details refer to + `https://aka.ms/apim-migrate-stv2 `_. This change is not + reversible. This is long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Optional parameters supplied to migrate service. Default value is None. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_migrate_to_stv2( + self, + resource_group_name: str, + service_name: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Upgrades an API Management service to the Stv2 platform. For details refer to + `https://aka.ms/apim-migrate-stv2 `_. This change is not + reversible. This is long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Optional parameters supplied to migrate service. Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_migrate_to_stv2( + self, + resource_group_name: str, + service_name: str, + parameters: Optional[Union[_models.MigrateToStv2Contract, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Upgrades an API Management service to the Stv2 platform. For details refer to + `https://aka.ms/apim-migrate-stv2 `_. This change is not + reversible. This is long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Optional parameters supplied to migrate service. Is one of the following + types: MigrateToStv2Contract, JSON, IO[bytes] Default value is None. + :type parameters: ~azure.mgmt.apimanagement.models.MigrateToStv2Contract or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._migrate_to_stv2_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def get_sso_token( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> _models.ApiManagementServiceGetSsoTokenResult: + """Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: ApiManagementServiceGetSsoTokenResult. The ApiManagementServiceGetSsoTokenResult is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceGetSsoTokenResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementServiceGetSsoTokenResult] = kwargs.pop("cls", None) + + _request = build_api_management_service_get_sso_token_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementServiceGetSsoTokenResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _apply_network_configuration_updates_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + service_name: str, + parameters: Optional[ + Union[_models.ApiManagementServiceApplyNetworkConfigurationParameters, JSON, IO[bytes]] + ] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if parameters else None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_api_management_service_apply_network_configuration_updates_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_apply_network_configuration_updates( # pylint: disable=name-too-long + self, + resource_group_name: str, + service_name: str, + parameters: Optional[_models.ApiManagementServiceApplyNetworkConfigurationParameters] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated + DNS changes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Apply Network Configuration operation. If the + parameters are empty, all the regions in which the Api Management service is deployed will be + updated sequentially without incurring downtime in the region. Default value is None. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_apply_network_configuration_updates( # pylint: disable=name-too-long + self, + resource_group_name: str, + service_name: str, + parameters: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated + DNS changes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Apply Network Configuration operation. If the + parameters are empty, all the regions in which the Api Management service is deployed will be + updated sequentially without incurring downtime in the region. Default value is None. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_apply_network_configuration_updates( # pylint: disable=name-too-long + self, + resource_group_name: str, + service_name: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated + DNS changes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Apply Network Configuration operation. If the + parameters are empty, all the regions in which the Api Management service is deployed will be + updated sequentially without incurring downtime in the region. Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_apply_network_configuration_updates( # pylint: disable=name-too-long + self, + resource_group_name: str, + service_name: str, + parameters: Optional[ + Union[_models.ApiManagementServiceApplyNetworkConfigurationParameters, JSON, IO[bytes]] + ] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated + DNS changes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Apply Network Configuration operation. If the + parameters are empty, all the regions in which the Api Management service is deployed will be + updated sequentially without incurring downtime in the region. Is one of the following types: + ApiManagementServiceApplyNetworkConfigurationParameters, JSON, IO[bytes] Default value is None. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters or + JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._apply_network_configuration_updates_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _refresh_hostnames_initial( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_management_service_refresh_hostnames_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_refresh_hostnames( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementServiceResource]: + """Force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from + KeyVault on the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An instance of AsyncLROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._refresh_hostnames_initial( + resource_group_name=resource_group_name, + service_name=service_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @overload + async def check_name_availability( + self, + parameters: _models.ApiManagementServiceCheckNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiManagementServiceNameAvailabilityResult: + """Checks availability and correctness of a name for an API Management service. + + :param parameters: The request body. Required. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiManagementServiceCheckNameAvailabilityParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiManagementServiceNameAvailabilityResult. The + ApiManagementServiceNameAvailabilityResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ApiManagementServiceNameAvailabilityResult: + """Checks availability and correctness of a name for an API Management service. + + :param parameters: The request body. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiManagementServiceNameAvailabilityResult. The + ApiManagementServiceNameAvailabilityResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ApiManagementServiceNameAvailabilityResult: + """Checks availability and correctness of a name for an API Management service. + + :param parameters: The request body. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiManagementServiceNameAvailabilityResult. The + ApiManagementServiceNameAvailabilityResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, + parameters: Union[_models.ApiManagementServiceCheckNameAvailabilityParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ApiManagementServiceNameAvailabilityResult: + """Checks availability and correctness of a name for an API Management service. + + :param parameters: The request body. Is one of the following types: + ApiManagementServiceCheckNameAvailabilityParameters, JSON, IO[bytes] Required. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiManagementServiceCheckNameAvailabilityParameters or JSON or + IO[bytes] + :return: ApiManagementServiceNameAvailabilityResult. The + ApiManagementServiceNameAvailabilityResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementServiceNameAvailabilityResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_management_service_check_name_availability_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementServiceNameAvailabilityResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_domain_ownership_identifier( + self, **kwargs: Any + ) -> _models.ApiManagementServiceGetDomainOwnershipIdentifierResult: + """Get the custom domain ownership identifier for an API Management service. + + :return: ApiManagementServiceGetDomainOwnershipIdentifierResult. The + ApiManagementServiceGetDomainOwnershipIdentifierResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceGetDomainOwnershipIdentifierResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementServiceGetDomainOwnershipIdentifierResult] = kwargs.pop("cls", None) + + _request = build_api_management_service_get_domain_ownership_identifier_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementServiceGetDomainOwnershipIdentifierResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class AllPoliciesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`all_policies` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.AllPoliciesContract"]: + """Status of all policies of API Management services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of AllPoliciesContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.AllPoliciesContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AllPoliciesContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_all_policies_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AllPoliciesContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiManagementServiceSkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_management_service_skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_available_service_skus( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ResourceSkuResult"]: + """Gets all available SKU for a given API Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of ResourceSkuResult + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ResourceSkuResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceSkuResult]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_service_skus_list_available_service_skus_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResourceSkuResult], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class NetworkStatusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`network_status` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> List[_models.NetworkStatusContractByLocation]: + """Gets the Connectivity Status to the external resources on which the Api Management service + depends from inside the Cloud Service. This also returns the DNS Servers as visible to the + CloudService. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: list of NetworkStatusContractByLocation + :rtype: list[~azure.mgmt.apimanagement.models.NetworkStatusContractByLocation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkStatusContractByLocation]] = kwargs.pop("cls", None) + + _request = build_network_status_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(List[_models.NetworkStatusContractByLocation], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def list_by_location( + self, resource_group_name: str, service_name: str, location_name: str, **kwargs: Any + ) -> _models.NetworkStatusContract: + """Gets the Connectivity Status to the external resources on which the Api Management service + depends from inside the Cloud Service. This also returns the DNS Servers as visible to the + CloudService. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param location_name: Location in which the API Management service is deployed. This is one of + the Azure Regions like West US, East US, South Central US. Required. + :type location_name: str + :return: NetworkStatusContract. The NetworkStatusContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NetworkStatusContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkStatusContract] = kwargs.pop("cls", None) + + _request = build_network_status_list_by_location_request( + resource_group_name=resource_group_name, + service_name=service_name, + location_name=location_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkStatusContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class OutboundNetworkDependenciesEndpointsOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`outbound_network_dependencies_endpoints` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> _models.OutboundEnvironmentEndpointList: + """Gets the network endpoints of all outbound dependencies of a ApiManagement service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: OutboundEnvironmentEndpointList. The OutboundEnvironmentEndpointList is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OutboundEnvironmentEndpointList + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OutboundEnvironmentEndpointList] = kwargs.pop("cls", None) + + _request = build_outbound_network_dependencies_endpoints_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OutboundEnvironmentEndpointList, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PolicyDescriptionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`policy_description` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + scope: Optional[Union[str, _models.PolicyScopeContract]] = None, + **kwargs: Any + ) -> _models.PolicyDescriptionCollection: + """Lists all policy descriptions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword scope: Policy scope. Known values are: "Tenant", "Product", "Api", "Operation", and + "All". Default value is None. + :paramtype scope: str or ~azure.mgmt.apimanagement.models.PolicyScopeContract + :return: PolicyDescriptionCollection. The PolicyDescriptionCollection is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyDescriptionCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyDescriptionCollection] = kwargs.pop("cls", None) + + _request = build_policy_description_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyDescriptionCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PolicyRestrictionValidationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`policy_restriction_validations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _by_service_initial( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_policy_restriction_validations_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.OperationResultContract]: + """Validate all policies of API Management services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An instance of AsyncLROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._by_service_initial( + resource_group_name=resource_group_name, + service_name=service_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.OperationResultContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationResultContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationResultContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class PortalSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`portal_settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> _models.PortalSettingsCollection: + """Lists a collection of portalsettings defined within a service instance.. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: PortalSettingsCollection. The PortalSettingsCollection is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSettingsCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalSettingsCollection] = kwargs.pop("cls", None) + + _request = build_portal_settings_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalSettingsCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ProductOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`product` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_tags( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + include_not_tagged_products: Optional[bool] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagResourceContract"]: + """Lists a collection of products associated with tags. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| state | filter | eq | substringof, contains, startswith, endswith |
. + Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword include_not_tagged_products: Include not tagged Products. Default value is None. + :paramtype include_not_tagged_products: bool + :return: An iterator like instance of TagResourceContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagResourceContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_list_by_tags_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + include_not_tagged_products=include_not_tagged_products, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagResourceContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any + ) -> _models.ProductContract: + """Gets the details of the product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) + + _request = build_product_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: _models.ProductContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: Union[_models.ProductContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Is one of the following types: ProductContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: _models.ProductUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: Union[_models.ProductUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Is one of the following types: ProductUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_subscriptions: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Delete product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword delete_subscriptions: Delete existing subscriptions associated with the product or + not. Default value is None. + :paramtype delete_subscriptions: bool + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + delete_subscriptions=delete_subscriptions, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + expand_groups: Optional[bool] = None, + tags: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ProductContract"]: + """Lists a collection of products in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| state | filter | eq | |
| groups | expand | | |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword expand_groups: When set to true, the response contains an array of groups that have + visibility to the product. The default is false. Default value is None. + :paramtype expand_groups: bool + :keyword tags: Products which are part of a specific tag. Default value is None. + :paramtype tags: str + :return: An iterator like instance of ProductContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + expand_groups=expand_groups, + tags=tags, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class QuotaByCounterKeysOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`quota_by_counter_keys` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list_by_service( + self, resource_group_name: str, service_name: str, quota_counter_key: str, **kwargs: Any + ) -> _models.QuotaCounterCollection: + """Lists a collection of current quota counter periods associated with the counter-key configured + in the policy on the specified service instance. The api does not support paging yet. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :return: QuotaCounterCollection. The QuotaCounterCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.QuotaCounterCollection] = kwargs.pop("cls", None) + + _request = build_quota_by_counter_keys_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + quota_counter_key=quota_counter_key, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.QuotaCounterCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + parameters: _models.QuotaCounterValueUpdateContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QuotaCounterCollection: + """Updates all the quota counter values specified with the existing quota counter key to a value + in the specified service instance. This should be used for reset of the quota counter values. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param parameters: The value of the quota counter to be applied to all quota counter periods. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QuotaCounterCollection. The QuotaCounterCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QuotaCounterCollection: + """Updates all the quota counter values specified with the existing quota counter key to a value + in the specified service instance. This should be used for reset of the quota counter values. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param parameters: The value of the quota counter to be applied to all quota counter periods. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QuotaCounterCollection. The QuotaCounterCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QuotaCounterCollection: + """Updates all the quota counter values specified with the existing quota counter key to a value + in the specified service instance. This should be used for reset of the quota counter values. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param parameters: The value of the quota counter to be applied to all quota counter periods. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: QuotaCounterCollection. The QuotaCounterCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + parameters: Union[_models.QuotaCounterValueUpdateContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.QuotaCounterCollection: + """Updates all the quota counter values specified with the existing quota counter key to a value + in the specified service instance. This should be used for reset of the quota counter values. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param parameters: The value of the quota counter to be applied to all quota counter periods. + Is one of the following types: QuotaCounterValueUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract or JSON or + IO[bytes] + :return: QuotaCounterCollection. The QuotaCounterCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.QuotaCounterCollection] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_quota_by_counter_keys_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + quota_counter_key=quota_counter_key, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.QuotaCounterCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class QuotaByPeriodKeysOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`quota_by_period_keys` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, quota_counter_key: str, quota_period_key: str, **kwargs: Any + ) -> _models.QuotaCounterContract: + """Gets the value of the quota counter associated with the counter-key in the policy for the + specific period in service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param quota_period_key: Quota period key identifier. Required. + :type quota_period_key: str + :return: QuotaCounterContract. The QuotaCounterContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.QuotaCounterContract] = kwargs.pop("cls", None) + + _request = build_quota_by_period_keys_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + quota_counter_key=quota_counter_key, + quota_period_key=quota_period_key, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.QuotaCounterContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + quota_period_key: str, + parameters: _models.QuotaCounterValueUpdateContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QuotaCounterContract: + """Updates an existing quota counter value in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param quota_period_key: Quota period key identifier. Required. + :type quota_period_key: str + :param parameters: The value of the Quota counter to be applied on the specified period. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QuotaCounterContract. The QuotaCounterContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + quota_period_key: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QuotaCounterContract: + """Updates an existing quota counter value in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param quota_period_key: Quota period key identifier. Required. + :type quota_period_key: str + :param parameters: The value of the Quota counter to be applied on the specified period. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QuotaCounterContract. The QuotaCounterContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + quota_period_key: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QuotaCounterContract: + """Updates an existing quota counter value in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param quota_period_key: Quota period key identifier. Required. + :type quota_period_key: str + :param parameters: The value of the Quota counter to be applied on the specified period. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: QuotaCounterContract. The QuotaCounterContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + quota_period_key: str, + parameters: Union[_models.QuotaCounterValueUpdateContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.QuotaCounterContract: + """Updates an existing quota counter value in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param quota_period_key: Quota period key identifier. Required. + :type quota_period_key: str + :param parameters: The value of the Quota counter to be applied on the specified period. Is one + of the following types: QuotaCounterValueUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract or JSON or + IO[bytes] + :return: QuotaCounterContract. The QuotaCounterContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.QuotaCounterContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_quota_by_period_keys_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + quota_counter_key=quota_counter_key, + quota_period_key=quota_period_key, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.QuotaCounterContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class RegionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`region` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.RegionContract"]: + """Lists all azure regions in which the service exists. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of RegionContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.RegionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.RegionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_region_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.RegionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ReportsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`reports` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ReportRecordContract"]: + """Lists report records by API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: The filter to apply on the operation. Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + orderby=orderby, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_user( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ReportRecordContract"]: + """Lists report records by User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter | ge, le | |
| displayName | select, orderBy | | |
| userId | + select, filter | eq | |
| apiRegion | filter | eq | |
| productId | filter | + eq | |
| subscriptionId | filter | eq | |
| apiId | filter | eq | | +
| operationId | filter | eq | |
| callCountSuccess | select, orderBy | | + |
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, + orderBy | | |
| callCountOther | select, orderBy | | |
| + callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | select | | | +
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | +
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. + Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_user_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + orderby=orderby, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_operation( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ReportRecordContract"]: + """Lists report records by API Operations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter | ge, le | |
| displayName | select, orderBy | | |
| apiRegion | + filter | eq | |
| userId | filter | eq | |
| productId | filter | eq | | +
| subscriptionId | filter | eq | |
| apiId | filter | eq | |
| + operationId | select, filter | eq | |
| callCountSuccess | select, orderBy | | + |
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, + orderBy | | |
| callCountOther | select, orderBy | | |
| + callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | select | | | +
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | +
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. + Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + orderby=orderby, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ReportRecordContract"]: + """Lists report records by Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter | ge, le | |
| displayName | select, orderBy | | |
| apiRegion | + filter | eq | |
| userId | filter | eq | |
| productId | select, filter | eq + | |
| subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | + | |
| callCountBlocked | select, orderBy | | |
| callCountFailed | + select, orderBy | | |
| callCountOther | select, orderBy | | |
| + callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | select | | | +
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | +
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. + Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + orderby=orderby, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_geo( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ReportRecordContract"]: + """Lists report records by geography. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter | ge, le | |
| country | select | | |
| region | select | | + |
| zip | select | | |
| apiRegion | filter | eq | |
| userId | + filter | eq | |
| productId | filter | eq | |
| subscriptionId | filter | eq + | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| + callCountSuccess | select | | |
| callCountBlocked | select | | |
| + callCountFailed | select | | |
| callCountOther | select | | |
| + bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| + cacheMissCount | select | | |
| apiTimeAvg | select | | |
| + apiTimeMin | select | | |
| apiTimeMax | select | | |
| + serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + serviceTimeMax | select | | |
. Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_geo_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ReportRecordContract"]: + """Lists report records by subscription. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter | ge, le | |
| displayName | select, orderBy | | |
| apiRegion | + filter | eq | |
| userId | select, filter | eq | |
| productId | select, + filter | eq | |
| subscriptionId | select, filter | eq | |
| callCountSuccess + | select, orderBy | | |
| callCountBlocked | select, orderBy | | |
| + callCountFailed | select, orderBy | | |
| callCountOther | select, orderBy | | + |
| callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | + | |
| cacheHitsCount | select | | |
| cacheMissCount | select | | + |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | +
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. + Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_subscription_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + orderby=orderby, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_time( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + interval: datetime.timedelta, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ReportRecordContract"]: + """Lists report records by Time. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter, select | ge, le | |
| interval | select | | |
| apiRegion | + filter | eq | |
| userId | filter | eq | |
| productId | filter | eq | | +
| subscriptionId | filter | eq | |
| apiId | filter | eq | |
| + operationId | filter | eq | |
| callCountSuccess | select | | |
| + callCountBlocked | select | | |
| callCountFailed | select | | |
| + callCountOther | select | | |
| bandwidth | select, orderBy | | |
| + cacheHitsCount | select | | |
| cacheMissCount | select | | |
| + apiTimeAvg | select | | |
| apiTimeMin | select | | |
| apiTimeMax | + select | | |
| serviceTimeAvg | select | | |
| serviceTimeMin | + select | | |
| serviceTimeMax | select | | |
. Required. + :paramtype filter: str + :keyword interval: By time interval. Interval must be multiple of 15 minutes and may not be + zero. The value should be in ISO 8601 format + (`http://en.wikipedia.org/wiki/ISO_8601#Durations).This + `_ code can be used to convert TimeSpan + to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). + Required. + :paramtype interval: ~datetime.timedelta + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_time_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + interval=interval, + top=top, + skip=skip, + orderby=orderby, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_request( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.RequestReportRecordContract"]: + """Lists report records by Request. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter | ge, le | |
| apiId | filter | eq | |
| operationId | filter | eq | + |
| productId | filter | eq | |
| userId | filter | eq | |
| apiRegion | + filter | eq | |
| subscriptionId | filter | eq | |
. Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of RequestReportRecordContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.RequestReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.RequestReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_request_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.RequestReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class TagResourceOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`tag_resource` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagResourceContract"]: + """Lists a collection of resources associated with tags. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| aid | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| state | filter | eq | |
| isCurrent + | filter | eq | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagResourceContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagResourceContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_resource_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagResourceContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiReleaseOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_release` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, api_id: str, release_id: str, **kwargs: Any + ) -> _models.ApiReleaseContract: + """Returns the details of an API release. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) + + _request = build_api_release_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiReleaseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, release_id: str, **kwargs: Any + ) -> bool: + """Returns the etag of an API release. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_release_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: _models.ApiReleaseContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: Union[_models.ApiReleaseContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Is one of the following types: ApiReleaseContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_release_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiReleaseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: _models.ApiReleaseContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: Union[_models.ApiReleaseContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Is one of the following types: + ApiReleaseContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_release_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiReleaseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified release in the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_release_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ApiReleaseContract"]: + """Lists all releases of an API. An API release is created when making an API Revision current. + Releases are also used to rollback to previous revisions. Results will be paged and can be + constrained by the $top and $skip parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| notes | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiReleaseContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiReleaseContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiReleaseContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_release_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiReleaseContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiOperationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_operation` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, **kwargs: Any + ) -> _models.OperationContract: + """Gets the details of the API Operation specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) + + _request = build_api_operation_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API operation specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_operation_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: _models.OperationContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: Union[_models.OperationContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Is one of the following types: OperationContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_operation_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: _models.OperationUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: Union[_models.OperationUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Is one of the following types: + OperationUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_operation_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified operation in the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_operation_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + tags: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.OperationContract"]: + """Lists a collection of the operations for the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword tags: Include tags in the response. Default value is None. + :paramtype tags: str + :return: An iterator like instance of OperationContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.OperationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OperationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_operation_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + tags=tags, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OperationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiOperationPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_operation_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_api_operation_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API operation policy specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_operation_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_operation_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the Api Operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_operation_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def list_by_operation( + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, **kwargs: Any + ) -> _models.PolicyCollection: + """Get the list of policy configuration at the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :return: PolicyCollection. The PolicyCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) + + _request = build_api_operation_policy_list_by_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class GraphQLApiResolverOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`graph_ql_api_resolver` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any + ) -> _models.ResolverContract: + """Gets the details of the GraphQL API Resolver specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ResolverContract] = kwargs.pop("cls", None) + + _request = build_graph_ql_api_resolver_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ResolverContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_graph_ql_api_resolver_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: _models.ResolverContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ResolverContract: + """Creates a new resolver in the GraphQL API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ResolverContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ResolverContract: + """Creates a new resolver in the GraphQL API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ResolverContract: + """Creates a new resolver in the GraphQL API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: Union[_models.ResolverContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ResolverContract: + """Creates a new resolver in the GraphQL API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: Create parameters. Is one of the following types: ResolverContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ResolverContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ResolverContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_graph_ql_api_resolver_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ResolverContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: _models.ResolverUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResolverContract: + """Updates the details of the resolver in the GraphQL API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: GraphQL API Resolver Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ResolverUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResolverContract: + """Updates the details of the resolver in the GraphQL API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: GraphQL API Resolver Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResolverContract: + """Updates the details of the resolver in the GraphQL API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: GraphQL API Resolver Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: Union[_models.ResolverUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ResolverContract: + """Updates the details of the resolver in the GraphQL API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: GraphQL API Resolver Update parameters. Is one of the following types: + ResolverUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ResolverUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ResolverContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_graph_ql_api_resolver_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ResolverContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified resolver in the GraphQL API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_graph_ql_api_resolver_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ResolverContract"]: + """Lists a collection of the resolvers for the specified GraphQL API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ResolverContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ResolverContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResolverContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_graph_ql_api_resolver_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResolverContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiSchemaOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_schema` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, api_id: str, schema_id: str, **kwargs: Any + ) -> _models.SchemaContract: + """Get the schema configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: SchemaContract. The SchemaContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SchemaContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) + + _request = build_api_schema_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SchemaContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, schema_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the schema specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_schema_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + parameters: Union[_models.SchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_schema_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + parameters: _models.SchemaContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns SchemaContract. The SchemaContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns SchemaContract. The SchemaContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns SchemaContract. The SchemaContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + parameters: Union[_models.SchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Is one of the following types: SchemaContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns SchemaContract. The SchemaContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + schema_id=schema_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.SchemaContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.SchemaContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.SchemaContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + *, + etag: str, + match_condition: MatchConditions, + force: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Deletes the schema configuration at the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword force: If true removes all references to the schema before deleting it. Default value + is None. + :paramtype force: bool + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_schema_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + force=force, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.SchemaContract"]: + """Get the schema configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| contentType + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of SchemaContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SchemaContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_schema_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SchemaContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiDiagnosticOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_diagnostic` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, **kwargs: Any + ) -> _models.DiagnosticContract: + """Gets the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + _request = build_api_diagnostic_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_diagnostic_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: _models.DiagnosticContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Is one of the following types: DiagnosticContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_diagnostic_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: _models.DiagnosticContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Is one of the following types: + DiagnosticContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_diagnostic_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Diagnostic from an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_diagnostic_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.DiagnosticContract"]: + """Lists all diagnostics of an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of DiagnosticContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DiagnosticContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_diagnostic_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DiagnosticContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiIssueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_issue` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + *, + expand_comments_attachments: Optional[bool] = None, + **kwargs: Any + ) -> _models.IssueContract: + """Gets the details of the Issue for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :keyword expand_comments_attachments: Expand the comment attachments. Default value is None. + :paramtype expand_comments_attachments: bool + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) + + _request = build_api_issue_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + expand_comments_attachments=expand_comments_attachments, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Issue for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_issue_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: _models.IssueContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueContract: + """Creates a new Issue for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueContract: + """Creates a new Issue for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueContract: + """Creates a new Issue for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: Union[_models.IssueContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueContract: + """Creates a new Issue for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Create parameters. Is one of the following types: IssueContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_issue_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: _models.IssueUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.IssueContract: + """Updates an existing issue for an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.IssueContract: + """Updates an existing issue for an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.IssueContract: + """Updates an existing issue for an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: Union[_models.IssueUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.IssueContract: + """Updates an existing issue for an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Update parameters. Is one of the following types: IssueUpdateContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_issue_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Issue from an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_issue_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + expand_comments_attachments: Optional[bool] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.IssueContract"]: + """Lists all issues associated with the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | + filter | eq | |
. Default value is None. + :paramtype filter: str + :keyword expand_comments_attachments: Expand the comment attachments. Default value is None. + :paramtype expand_comments_attachments: bool + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of IssueContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.IssueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IssueContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_issue_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + expand_comments_attachments=expand_comments_attachments, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IssueContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiIssueCommentOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_issue_comment` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, comment_id: str, **kwargs: Any + ) -> _models.IssueCommentContract: + """Gets the details of the issue Comment for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :return: IssueCommentContract. The IssueCommentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IssueCommentContract] = kwargs.pop("cls", None) + + _request = build_api_issue_comment_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + comment_id=comment_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueCommentContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, comment_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the issue Comment for an API specified by its + identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_issue_comment_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + comment_id=comment_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + parameters: _models.IssueCommentContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueCommentContract: + """Creates a new Comment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueCommentContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueCommentContract. The IssueCommentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueCommentContract: + """Creates a new Comment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueCommentContract. The IssueCommentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueCommentContract: + """Creates a new Comment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueCommentContract. The IssueCommentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + parameters: Union[_models.IssueCommentContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueCommentContract: + """Creates a new Comment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :param parameters: Create parameters. Is one of the following types: IssueCommentContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueCommentContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueCommentContract. The IssueCommentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IssueCommentContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_issue_comment_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + comment_id=comment_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueCommentContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified comment from an Issue. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_issue_comment_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + comment_id=comment_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.IssueCommentContract"]: + """Lists all comments for the Issue associated with the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of IssueCommentContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.IssueCommentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IssueCommentContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_issue_comment_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IssueCommentContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiIssueAttachmentOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_issue_attachment` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, attachment_id: str, **kwargs: Any + ) -> _models.IssueAttachmentContract: + """Gets the details of the issue Attachment for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :return: IssueAttachmentContract. The IssueAttachmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IssueAttachmentContract] = kwargs.pop("cls", None) + + _request = build_api_issue_attachment_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + attachment_id=attachment_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueAttachmentContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, attachment_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the issue Attachment for an API specified by its + identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_issue_attachment_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + attachment_id=attachment_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + parameters: _models.IssueAttachmentContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueAttachmentContract: + """Creates a new Attachment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueAttachmentContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueAttachmentContract. The IssueAttachmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueAttachmentContract: + """Creates a new Attachment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueAttachmentContract. The IssueAttachmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueAttachmentContract: + """Creates a new Attachment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueAttachmentContract. The IssueAttachmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + parameters: Union[_models.IssueAttachmentContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueAttachmentContract: + """Creates a new Attachment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :param parameters: Create parameters. Is one of the following types: IssueAttachmentContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueAttachmentContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueAttachmentContract. The IssueAttachmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IssueAttachmentContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_issue_attachment_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + attachment_id=attachment_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueAttachmentContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified comment from an Issue. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_issue_attachment_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + attachment_id=attachment_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.IssueAttachmentContract"]: + """Lists all attachments for the Issue associated with the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of IssueAttachmentContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.IssueAttachmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IssueAttachmentContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_issue_attachment_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IssueAttachmentContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiTagDescriptionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_tag_description` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, api_id: str, tag_description_id: str, **kwargs: Any + ) -> _models.TagDescriptionContract: + """Get Tag description in scope of API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :return: TagDescriptionContract. The TagDescriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagDescriptionContract] = kwargs.pop("cls", None) + + _request = build_api_tag_description_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_description_id=tag_description_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagDescriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, tag_description_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_tag_description_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_description_id=tag_description_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + parameters: _models.TagDescriptionCreateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagDescriptionContract: + """Create/Update tag description in scope of the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagDescriptionCreateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagDescriptionContract. The TagDescriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagDescriptionContract: + """Create/Update tag description in scope of the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagDescriptionContract. The TagDescriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagDescriptionContract: + """Create/Update tag description in scope of the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagDescriptionContract. The TagDescriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + parameters: Union[_models.TagDescriptionCreateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagDescriptionContract: + """Create/Update tag description in scope of the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :param parameters: Create parameters. Is one of the following types: + TagDescriptionCreateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagDescriptionCreateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagDescriptionContract. The TagDescriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagDescriptionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_tag_description_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_description_id=tag_description_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagDescriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Delete tag description for the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_tag_description_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_description_id=tag_description_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagDescriptionContract"]: + """Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is + defined on API level but tag may be assigned to the Operations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagDescriptionContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagDescriptionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagDescriptionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_tag_description_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagDescriptionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiWikiOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_wiki` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any + ) -> _models.WikiContract: + """Gets the details of the Wiki for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) + + _request = build_api_wiki_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WikiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_wiki_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: _models.WikiContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: Union[_models.WikiContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Create parameters. Is one of the following types: WikiContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_wiki_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WikiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: _models.WikiUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Wiki Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Wiki Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Wiki Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: Union[_models.WikiUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Wiki Update parameters. Is one of the following types: WikiUpdateContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_wiki_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WikiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Wiki from an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_wiki_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class ApiWikisOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_wikis` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.WikiContract"]: + """Gets the wikis for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | eq | contains |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of WikiContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.WikiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.WikiContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_wikis_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.WikiContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ProductWikisOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`product_wikis` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.WikiContract"]: + """Gets the details of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | eq | contains |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of WikiContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.WikiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.WikiContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_wikis_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.WikiContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiToolOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_tool` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any + ) -> _models.ToolContract: + """Gets the details of the API Tool specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) + + _request = build_api_tool_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ToolContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API tool specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_tool_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: _models.ToolContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: Union[_models.ToolContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Is one of the following types: ToolContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract or JSON or IO[bytes] + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_tool_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ToolContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: _models.ToolContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: Union[_models.ToolContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Is one of the following types: ToolContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract or JSON or IO[bytes] + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_tool_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ToolContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any + ) -> None: + """Deletes the specified tool in the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_tool_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ToolContract"]: + """Lists a collection of the MCP tools for the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ToolContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ToolContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ToolContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_tool_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ToolContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiVersionSetOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_version_set` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, version_set_id: str, **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Gets the details of the Api Version Set specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) + + _request = build_api_version_set_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiVersionSetContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, version_set_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Api Version Set specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_version_set_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: _models.ApiVersionSetContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: Union[_models.ApiVersionSetContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Is one of the following types: + ApiVersionSetContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_version_set_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiVersionSetContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: _models.ApiVersionSetUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: Union[_models.ApiVersionSetUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Is one of the following types: + ApiVersionSetUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_version_set_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiVersionSetContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_version_set_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ApiVersionSetContract"]: + """Lists a collection of API Version Sets in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiVersionSetContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiVersionSetContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiVersionSetContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_version_set_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiVersionSetContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class AuthorizationProviderOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`authorization_provider` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, authorization_provider_id: str, **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Gets the details of the authorization provider specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :return: AuthorizationProviderContract. The AuthorizationProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) + + _request = build_authorization_provider_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + parameters: _models.AuthorizationProviderContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Creates or updates authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationProviderContract. The AuthorizationProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Creates or updates authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationProviderContract. The AuthorizationProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Creates or updates authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationProviderContract. The AuthorizationProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + parameters: Union[_models.AuthorizationProviderContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Creates or updates authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param parameters: Create parameters. Is one of the following types: + AuthorizationProviderContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationProviderContract. The AuthorizationProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_provider_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific authorization provider from the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_authorization_provider_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.AuthorizationProviderContract"]: + """Lists a collection of authorization providers defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of AuthorizationProviderContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.AuthorizationProviderContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AuthorizationProviderContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_authorization_provider_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AuthorizationProviderContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def refresh_secret( + self, resource_group_name: str, service_name: str, authorization_provider_id: str, **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Refreshes the Key Vault reference secret for the specified authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :return: AuthorizationProviderContract. The AuthorizationProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) + + _request = build_authorization_provider_refresh_secret_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class AuthorizationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`authorization` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + **kwargs: Any + ) -> _models.AuthorizationContract: + """Gets the details of the authorization specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :return: AuthorizationContract. The AuthorizationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AuthorizationContract] = kwargs.pop("cls", None) + + _request = build_authorization_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: _models.AuthorizationContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationContract: + """Creates or updates authorization. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationContract. The AuthorizationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationContract: + """Creates or updates authorization. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationContract. The AuthorizationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationContract: + """Creates or updates authorization. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationContract. The AuthorizationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: Union[_models.AuthorizationContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationContract: + """Creates or updates authorization. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Is one of the following types: AuthorizationContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationContract. The AuthorizationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AuthorizationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Authorization from the Authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_authorization_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_authorization_provider( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.AuthorizationContract"]: + """Lists a collection of authorization providers defined within a authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of AuthorizationContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.AuthorizationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AuthorizationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_authorization_list_by_authorization_provider_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AuthorizationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def confirm_consent_code( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: _models.AuthorizationConfirmConsentCodeRequestContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Confirm valid consent code to suppress Authorizations anti-phishing page. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: + ~azure.mgmt.apimanagement.models.AuthorizationConfirmConsentCodeRequestContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def confirm_consent_code( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Confirm valid consent code to suppress Authorizations anti-phishing page. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def confirm_consent_code( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Confirm valid consent code to suppress Authorizations anti-phishing page. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def confirm_consent_code( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: Union[_models.AuthorizationConfirmConsentCodeRequestContract, JSON, IO[bytes]], + **kwargs: Any + ) -> None: + """Confirm valid consent code to suppress Authorizations anti-phishing page. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Is one of the following types: + AuthorizationConfirmConsentCodeRequestContract, JSON, IO[bytes] Required. + :type parameters: + ~azure.mgmt.apimanagement.models.AuthorizationConfirmConsentCodeRequestContract or JSON or + IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_confirm_consent_code_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + + +class AuthorizationLoginLinksOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`authorization_login_links` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + async def post( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: _models.AuthorizationLoginRequestContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AuthorizationLoginResponseContract: + """Gets authorization login links. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationLoginRequestContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AuthorizationLoginResponseContract. The AuthorizationLoginResponseContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def post( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AuthorizationLoginResponseContract: + """Gets authorization login links. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AuthorizationLoginResponseContract. The AuthorizationLoginResponseContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def post( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AuthorizationLoginResponseContract: + """Gets authorization login links. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: AuthorizationLoginResponseContract. The AuthorizationLoginResponseContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def post( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: Union[_models.AuthorizationLoginRequestContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.AuthorizationLoginResponseContract: + """Gets authorization login links. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Is one of the following types: + AuthorizationLoginRequestContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationLoginRequestContract or JSON or + IO[bytes] + :return: AuthorizationLoginResponseContract. The AuthorizationLoginResponseContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AuthorizationLoginResponseContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_login_links_post_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationLoginResponseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class AuthorizationAccessPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`authorization_access_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + **kwargs: Any + ) -> _models.AuthorizationAccessPolicyContract: + """Gets the details of the authorization access policy specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param authorization_access_policy_id: Identifier of the authorization access policy. Required. + :type authorization_access_policy_id: str + :return: AuthorizationAccessPolicyContract. The AuthorizationAccessPolicyContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AuthorizationAccessPolicyContract] = kwargs.pop("cls", None) + + _request = build_authorization_access_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + authorization_access_policy_id=authorization_access_policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationAccessPolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + parameters: _models.AuthorizationAccessPolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationAccessPolicyContract: + """Creates or updates Authorization Access Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param authorization_access_policy_id: Identifier of the authorization access policy. Required. + :type authorization_access_policy_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationAccessPolicyContract. The AuthorizationAccessPolicyContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationAccessPolicyContract: + """Creates or updates Authorization Access Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param authorization_access_policy_id: Identifier of the authorization access policy. Required. + :type authorization_access_policy_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationAccessPolicyContract. The AuthorizationAccessPolicyContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationAccessPolicyContract: + """Creates or updates Authorization Access Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param authorization_access_policy_id: Identifier of the authorization access policy. Required. + :type authorization_access_policy_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationAccessPolicyContract. The AuthorizationAccessPolicyContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + parameters: Union[_models.AuthorizationAccessPolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationAccessPolicyContract: + """Creates or updates Authorization Access Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param authorization_access_policy_id: Identifier of the authorization access policy. Required. + :type authorization_access_policy_id: str + :param parameters: Create parameters. Is one of the following types: + AuthorizationAccessPolicyContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationAccessPolicyContract. The AuthorizationAccessPolicyContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AuthorizationAccessPolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_access_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + authorization_access_policy_id=authorization_access_policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationAccessPolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific access policy from the Authorization. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param authorization_access_policy_id: Identifier of the authorization access policy. Required. + :type authorization_access_policy_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_authorization_access_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + authorization_access_policy_id=authorization_access_policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_authorization( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.AuthorizationAccessPolicyContract"]: + """Lists a collection of authorization access policy defined within a authorization. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of AuthorizationAccessPolicyContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AuthorizationAccessPolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_authorization_access_policy_list_by_authorization_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AuthorizationAccessPolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class AuthorizationServerOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`authorization_server` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, authsid: str, **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Gets the details of the authorization server specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AuthorizationServerContract] = kwargs.pop("cls", None) + + _request = build_authorization_server_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + authsid=authsid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationServerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, authsid: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the authorizationServer specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_authorization_server_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + authsid=authsid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: _models.AuthorizationServerContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Creates new authorization server or updates an existing authorization server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Creates new authorization server or updates an existing authorization server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Creates new authorization server or updates an existing authorization server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: Union[_models.AuthorizationServerContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Creates new authorization server or updates an existing authorization server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: Create or update parameters. Is one of the following types: + AuthorizationServerContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AuthorizationServerContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_server_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + authsid=authsid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationServerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: _models.AuthorizationServerUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Updates the details of the authorization server specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: OAuth2 Server settings Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Updates the details of the authorization server specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: OAuth2 Server settings Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Updates the details of the authorization server specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: OAuth2 Server settings Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: Union[_models.AuthorizationServerUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Updates the details of the authorization server specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: OAuth2 Server settings Update parameters. Is one of the following types: + AuthorizationServerUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerUpdateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AuthorizationServerContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_server_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + authsid=authsid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationServerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + authsid: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific authorization server instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_authorization_server_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + authsid=authsid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.AuthorizationServerContract"]: + """Lists a collection of authorization servers defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of AuthorizationServerContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.AuthorizationServerContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AuthorizationServerContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_authorization_server_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AuthorizationServerContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def list_secrets( + self, resource_group_name: str, service_name: str, authsid: str, **kwargs: Any + ) -> _models.AuthorizationServerSecretsContract: + """Gets the client secret details of the authorization server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :return: AuthorizationServerSecretsContract. The AuthorizationServerSecretsContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerSecretsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AuthorizationServerSecretsContract] = kwargs.pop("cls", None) + + _request = build_authorization_server_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + authsid=authsid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationServerSecretsContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class BackendOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`backend` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, backend_id: str, **kwargs: Any + ) -> _models.BackendContract: + """Gets the details of the backend specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) + + _request = build_backend_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.BackendContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, backend_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the backend specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_backend_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: _models.BackendContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: Union[_models.BackendContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Is one of the following types: BackendContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_backend_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.BackendContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: _models.BackendUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: Union[_models.BackendUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Is one of the following types: BackendUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_backend_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.BackendContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_backend_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.BackendContract"]: + """Lists a collection of backends in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of BackendContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.BackendContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BackendContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_backend_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BackendContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def reconnect( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: Optional[_models.BackendReconnectContract] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Notifies the API Management gateway to create a new connection to the backend after the + specified timeout. If no timeout was specified, timeout of 2 minutes is used. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Reconnect request parameters. Default value is None. + :type parameters: ~azure.mgmt.apimanagement.models.BackendReconnectContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def reconnect( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Notifies the API Management gateway to create a new connection to the backend after the + specified timeout. If no timeout was specified, timeout of 2 minutes is used. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Reconnect request parameters. Default value is None. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def reconnect( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Notifies the API Management gateway to create a new connection to the backend after the + specified timeout. If no timeout was specified, timeout of 2 minutes is used. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Reconnect request parameters. Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def reconnect( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: Optional[Union[_models.BackendReconnectContract, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> None: + """Notifies the API Management gateway to create a new connection to the backend after the + specified timeout. If no timeout was specified, timeout of 2 minutes is used. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Reconnect request parameters. Is one of the following types: + BackendReconnectContract, JSON, IO[bytes] Default value is None. + :type parameters: ~azure.mgmt.apimanagement.models.BackendReconnectContract or JSON or + IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if parameters else None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_backend_reconnect_request( + resource_group_name=resource_group_name, + service_name=service_name, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class CacheOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`cache` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, cache_id: str, **kwargs: Any + ) -> _models.CacheContract: + """Gets the details of the Cache specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CacheContract] = kwargs.pop("cls", None) + + _request = build_cache_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + cache_id=cache_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CacheContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, cache_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the Cache specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_cache_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + cache_id=cache_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: _models.CacheContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CacheContract: + """Creates or updates an External Cache to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.CacheContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CacheContract: + """Creates or updates an External Cache to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CacheContract: + """Creates or updates an External Cache to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: Union[_models.CacheContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CacheContract: + """Creates or updates an External Cache to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Create or Update parameters. Is one of the following types: CacheContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.CacheContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CacheContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cache_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + cache_id=cache_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CacheContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: _models.CacheUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CacheContract: + """Updates the details of the cache specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.CacheUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CacheContract: + """Updates the details of the cache specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CacheContract: + """Updates the details of the cache specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: Union[_models.CacheUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.CacheContract: + """Updates the details of the cache specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Update parameters. Is one of the following types: CacheUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.CacheUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CacheContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cache_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + cache_id=cache_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CacheContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Cache. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_cache_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + cache_id=cache_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.CacheContract"]: + """Lists a collection of all external Caches in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of CacheContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.CacheContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CacheContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_cache_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CacheContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class CertificateOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`certificate` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, certificate_id: str, **kwargs: Any + ) -> _models.CertificateContract: + """Gets the details of the certificate specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) + + _request = build_certificate_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, certificate_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the certificate specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_certificate_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + certificate_id: str, + parameters: _models.CertificateCreateOrUpdateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + certificate_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + certificate_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + certificate_id: str, + parameters: Union[_models.CertificateCreateOrUpdateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Is one of the following types: + CertificateCreateOrUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters or JSON + or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_certificate_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + certificate_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_certificate_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + is_key_vault_refresh_failed: Optional[bool] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.CertificateContract"]: + """Lists a collection of all certificates in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword is_key_vault_refresh_failed: When set to true, the response contains only certificates + entities which failed refresh. Default value is None. + :paramtype is_key_vault_refresh_failed: bool + :return: An iterator like instance of CertificateContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.CertificateContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CertificateContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_certificate_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + is_key_vault_refresh_failed=is_key_vault_refresh_failed, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CertificateContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def refresh_secret( + self, resource_group_name: str, service_name: str, certificate_id: str, **kwargs: Any + ) -> _models.CertificateContract: + """From KeyVault, Refresh the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) + + _request = build_certificate_refresh_secret_request( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class ContentTypeOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`content_type` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, content_type_id: str, **kwargs: Any + ) -> _models.ContentTypeContract: + """Gets the details of the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :return: ContentTypeContract. The ContentTypeContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ContentTypeContract] = kwargs.pop("cls", None) + + _request = build_content_type_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ContentTypeContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + parameters: _models.ContentTypeContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentTypeContract: + """Creates or updates the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Custom content types' identifiers need to start + with the ``c-`` prefix. Built-in content types can't be modified. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ContentTypeContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentTypeContract. The ContentTypeContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentTypeContract: + """Creates or updates the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Custom content types' identifiers need to start + with the ``c-`` prefix. Built-in content types can't be modified. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentTypeContract. The ContentTypeContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentTypeContract: + """Creates or updates the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Custom content types' identifiers need to start + with the ``c-`` prefix. Built-in content types can't be modified. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentTypeContract. The ContentTypeContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + parameters: Union[_models.ContentTypeContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentTypeContract: + """Creates or updates the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Custom content types' identifiers need to start + with the ``c-`` prefix. Built-in content types can't be modified. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param parameters: Create or update parameters. Is one of the following types: + ContentTypeContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ContentTypeContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentTypeContract. The ContentTypeContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ContentTypeContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_content_type_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ContentTypeContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Removes the specified developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Built-in content types (with identifiers + starting with the ``c-`` prefix) can't be removed. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_content_type_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ContentTypeContract"]: + """Lists the developer portal's content types. Content types describe content items' properties, + validation rules, and constraints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of ContentTypeContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ContentTypeContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ContentTypeContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_content_type_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ContentTypeContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ContentItemOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`content_item` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, content_type_id: str, content_item_id: str, **kwargs: Any + ) -> _models.ContentItemContract: + """Returns the developer portal's content item specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :return: ContentItemContract. The ContentItemContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ContentItemContract] = kwargs.pop("cls", None) + + _request = build_content_item_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + content_item_id=content_item_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ContentItemContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, content_type_id: str, content_item_id: str, **kwargs: Any + ) -> bool: + """Returns the entity state (ETag) version of the developer portal's content item specified by its + identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_content_item_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + content_item_id=content_item_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + parameters: _models.ContentItemContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentItemContract: + """Creates a new developer portal's content item specified by the provided content type. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ContentItemContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentItemContract. The ContentItemContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentItemContract: + """Creates a new developer portal's content item specified by the provided content type. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentItemContract. The ContentItemContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentItemContract: + """Creates a new developer portal's content item specified by the provided content type. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentItemContract. The ContentItemContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + parameters: Union[_models.ContentItemContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentItemContract: + """Creates a new developer portal's content item specified by the provided content type. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :param parameters: Create or update parameters. Is one of the following types: + ContentItemContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ContentItemContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentItemContract. The ContentItemContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ContentItemContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_content_item_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + content_item_id=content_item_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ContentItemContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Removes the specified developer portal's content item. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_content_item_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + content_item_id=content_item_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, content_type_id: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ContentItemContract"]: + """Lists developer portal's content items specified by the provided content type. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :return: An iterator like instance of ContentItemContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ContentItemContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ContentItemContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_content_item_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ContentItemContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class DeletedServicesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`deleted_services` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get_by_name(self, location: str, service_name: str, **kwargs: Any) -> _models.DeletedServiceContract: + """Get soft-deleted Api Management Service by name. + + :param location: The name of the Azure region. Required. + :type location: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: DeletedServiceContract. The DeletedServiceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DeletedServiceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DeletedServiceContract] = kwargs.pop("cls", None) + + _request = build_deleted_services_get_by_name_request( + location=location, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DeletedServiceContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _purge_initial(self, location: str, service_name: str, **kwargs: Any) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_deleted_services_purge_request( + location=location, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_purge( + self, location: str, service_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.DeletedServiceContract]: + """Purges Api Management Service (deletes it with no option to undelete). + + :param location: The name of the Azure region. Required. + :type location: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An instance of AsyncLROPoller that returns DeletedServiceContract. The + DeletedServiceContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.DeletedServiceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DeletedServiceContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._purge_initial( + location=location, + service_name=service_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DeletedServiceContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.DeletedServiceContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.DeletedServiceContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.DeletedServiceContract"]: + """Lists all soft-deleted services available for undelete for the given subscription. + + :return: An iterator like instance of DeletedServiceContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.DeletedServiceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DeletedServiceContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_deleted_services_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DeletedServiceContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class DocumentationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`documentation` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, documentation_id: str, **kwargs: Any + ) -> _models.DocumentationContract: + """Gets the details of the Documentation specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DocumentationContract] = kwargs.pop("cls", None) + + _request = build_documentation_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + documentation_id=documentation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DocumentationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, documentation_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Documentation by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_documentation_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + documentation_id=documentation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: _models.DocumentationContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DocumentationContract: + """Creates a new Documentation or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DocumentationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DocumentationContract: + """Creates a new Documentation or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DocumentationContract: + """Creates a new Documentation or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: Union[_models.DocumentationContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DocumentationContract: + """Creates a new Documentation or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Create parameters. Is one of the following types: DocumentationContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DocumentationContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DocumentationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_documentation_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + documentation_id=documentation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DocumentationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: _models.DocumentationUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DocumentationContract: + """Updates the details of the Documentation for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Documentation Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DocumentationUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DocumentationContract: + """Updates the details of the Documentation for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Documentation Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DocumentationContract: + """Updates the details of the Documentation for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Documentation Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: Union[_models.DocumentationUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.DocumentationContract: + """Updates the details of the Documentation for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Documentation Update parameters. Is one of the following types: + DocumentationUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DocumentationUpdateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DocumentationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_documentation_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + documentation_id=documentation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DocumentationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Documentation from an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_documentation_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + documentation_id=documentation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.DocumentationContract"]: + """Lists all Documentations of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | eq | contains |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of DocumentationContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.DocumentationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DocumentationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_documentation_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DocumentationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class EmailTemplateOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`email_template` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Gets the details of the email template specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.EmailTemplateContract] = kwargs.pop("cls", None) + + _request = build_email_template_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + template_name=template_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.EmailTemplateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the email template specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_email_template_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + template_name=template_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: _models.EmailTemplateUpdateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates an Email Template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: API revision identifier. Must be unique in the current API Management + service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + Known values are: "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Email Template update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates an Email Template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: API revision identifier. Must be unique in the current API Management + service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + Known values are: "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Email Template update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates an Email Template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: API revision identifier. Must be unique in the current API Management + service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + Known values are: "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Email Template update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: Union[_models.EmailTemplateUpdateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates an Email Template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: API revision identifier. Must be unique in the current API Management + service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + Known values are: "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Email Template update parameters. Is one of the following types: + EmailTemplateUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.EmailTemplateContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_email_template_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + template_name=template_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.EmailTemplateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: _models.EmailTemplateUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates API Management email template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates API Management email template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates API Management email template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: Union[_models.EmailTemplateUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates API Management email template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Update parameters. Is one of the following types: + EmailTemplateUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.EmailTemplateContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_email_template_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + template_name=template_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.EmailTemplateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Reset the Email Template to default template provided by the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_email_template_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + template_name=template_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.EmailTemplateContract"]: + """Gets all email templates. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of EmailTemplateContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.EmailTemplateContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.EmailTemplateContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_email_template_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.EmailTemplateContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiGatewayConfigConnectionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_gateway_config_connection` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, gateway_name: str, config_connection_name: str, **kwargs: Any + ) -> _models.ApiManagementGatewayConfigConnectionResource: + """Gets an API Management gateway config connection resource description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param config_connection_name: The name of the API Management gateway config connection. + Required. + :type config_connection_name: str + :return: ApiManagementGatewayConfigConnectionResource. The + ApiManagementGatewayConfigConnectionResource is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementGatewayConfigConnectionResource] = kwargs.pop("cls", None) + + _request = build_api_gateway_config_connection_get_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + config_connection_name=config_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementGatewayConfigConnectionResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + parameters: Union[_models.ApiManagementGatewayConfigConnectionResource, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_gateway_config_connection_create_or_update_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + config_connection_name=config_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + parameters: _models.ApiManagementGatewayConfigConnectionResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource]: + """Creates or updates an API Management gateway config connection. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param config_connection_name: The name of the API Management gateway config connection. + Required. + :type config_connection_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config + connection operation. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + ApiManagementGatewayConfigConnectionResource. The ApiManagementGatewayConfigConnectionResource + is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource]: + """Creates or updates an API Management gateway config connection. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param config_connection_name: The name of the API Management gateway config connection. + Required. + :type config_connection_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config + connection operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + ApiManagementGatewayConfigConnectionResource. The ApiManagementGatewayConfigConnectionResource + is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource]: + """Creates or updates an API Management gateway config connection. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param config_connection_name: The name of the API Management gateway config connection. + Required. + :type config_connection_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config + connection operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + ApiManagementGatewayConfigConnectionResource. The ApiManagementGatewayConfigConnectionResource + is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + parameters: Union[_models.ApiManagementGatewayConfigConnectionResource, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource]: + """Creates or updates an API Management gateway config connection. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param config_connection_name: The name of the API Management gateway config connection. + Required. + :type config_connection_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config + connection operation. Is one of the following types: + ApiManagementGatewayConfigConnectionResource, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource + or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns + ApiManagementGatewayConfigConnectionResource. The ApiManagementGatewayConfigConnectionResource + is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementGatewayConfigConnectionResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + config_connection_name=config_connection_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ApiManagementGatewayConfigConnectionResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ApiManagementGatewayConfigConnectionResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_gateway_config_connection_delete_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + config_connection_name=config_connection_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing API Management gateway config connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param config_connection_name: The name of the API Management gateway config connection. + Required. + :type config_connection_name: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + config_connection_name=config_connection_name, + etag=etag, + match_condition=match_condition, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_gateway( + self, resource_group_name: str, gateway_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ApiManagementGatewayConfigConnectionResource"]: + """List all API Management gateway config connections within a gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :return: An iterator like instance of ApiManagementGatewayConfigConnectionResource + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementGatewayConfigConnectionResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_gateway_config_connection_list_by_gateway_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementGatewayConfigConnectionResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiGatewayHostnameBindingOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_gateway_hostname_binding` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any + ) -> _models.GatewayHostnameBindingResource: + """Gets an API Management gateway hostname binding resource description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :return: GatewayHostnameBindingResource. The GatewayHostnameBindingResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GatewayHostnameBindingResource] = kwargs.pop("cls", None) + + _request = build_api_gateway_hostname_binding_get_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayHostnameBindingResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: Union[_models.GatewayHostnameBindingResource, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_gateway_hostname_binding_create_or_update_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: _models.GatewayHostnameBindingResource, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns GatewayHostnameBindingResource. The + GatewayHostnameBindingResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns GatewayHostnameBindingResource. The + GatewayHostnameBindingResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns GatewayHostnameBindingResource. The + GatewayHostnameBindingResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: Union[_models.GatewayHostnameBindingResource, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Is one of the following types: GatewayHostnameBindingResource, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns GatewayHostnameBindingResource. The + GatewayHostnameBindingResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayHostnameBindingResource] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = _deserialize(_models.GatewayHostnameBindingResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.GatewayHostnameBindingResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.GatewayHostnameBindingResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_gateway_hostname_binding_delete_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing API Management gateway hostname binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + etag=etag, + match_condition=match_condition, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_gateway( + self, resource_group_name: str, gateway_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.GatewayHostnameBindingResource"]: + """List all API Management gateway hostname bindings within a gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :return: An iterator like instance of GatewayHostnameBindingResource + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GatewayHostnameBindingResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_gateway_hostname_binding_list_by_gateway_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GatewayHostnameBindingResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _refresh_secret_initial( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_gateway_hostname_binding_refresh_secret_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_refresh_secret( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Refresh the secret for an API Management gateway hostname binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._refresh_secret_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class GatewayOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`gateway` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any + ) -> _models.GatewayContract: + """Gets the details of the Gateway specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GatewayContract] = kwargs.pop("cls", None) + + _request = build_gateway_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the Gateway specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: _models.GatewayContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayContract: + """Creates or updates a Gateway to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayContract: + """Creates or updates a Gateway to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayContract: + """Creates or updates a Gateway to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: Union[_models.GatewayContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayContract: + """Creates or updates a Gateway to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Is one of the following types: GatewayContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: _models.GatewayContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayContract: + """Updates the details of the gateway specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayContract: + """Updates the details of the gateway specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayContract: + """Updates the details of the gateway specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: Union[_models.GatewayContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.GatewayContract: + """Updates the details of the gateway specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Is one of the following types: GatewayContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.GatewayContract"]: + """Lists a collection of gateways registered with service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| region | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GatewayContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GatewayContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GatewayContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_gateway_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GatewayContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def list_keys( + self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any + ) -> _models.GatewayKeysContract: + """Retrieves gateway keys. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :return: GatewayKeysContract. The GatewayKeysContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayKeysContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GatewayKeysContract] = kwargs.pop("cls", None) + + _request = build_gateway_list_keys_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayKeysContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def regenerate_key( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: _models.GatewayKeyRegenerationRequestContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Regenerates specified gateway key invalidating any tokens created with it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayKeyRegenerationRequestContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def regenerate_key( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Regenerates specified gateway key invalidating any tokens created with it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def regenerate_key( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Regenerates specified gateway key invalidating any tokens created with it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def regenerate_key( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: Union[_models.GatewayKeyRegenerationRequestContract, JSON, IO[bytes]], + **kwargs: Any + ) -> None: + """Regenerates specified gateway key invalidating any tokens created with it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Is one of the following types: GatewayKeyRegenerationRequestContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayKeyRegenerationRequestContract or + JSON or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_regenerate_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @overload + async def generate_token( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: _models.GatewayTokenRequestContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayTokenContract: + """Gets the Shared Access Authorization Token for the gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayTokenRequestContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayTokenContract. The GatewayTokenContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def generate_token( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayTokenContract: + """Gets the Shared Access Authorization Token for the gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayTokenContract. The GatewayTokenContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def generate_token( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayTokenContract: + """Gets the Shared Access Authorization Token for the gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayTokenContract. The GatewayTokenContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def generate_token( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: Union[_models.GatewayTokenRequestContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.GatewayTokenContract: + """Gets the Shared Access Authorization Token for the gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Is one of the following types: GatewayTokenRequestContract, JSON, IO[bytes] + Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayTokenRequestContract or JSON or + IO[bytes] + :return: GatewayTokenContract. The GatewayTokenContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayTokenContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_generate_token_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayTokenContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def invalidate_debug_credentials( + self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any + ) -> None: + """Action is invalidating all debug credentials issued for gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_invalidate_debug_credentials_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @overload + async def list_debug_credentials( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: _models.GatewayListDebugCredentialsContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayDebugCredentialsContract: + """Create new debug credentials for gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List debug credentials properties. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayDebugCredentialsContract. The GatewayDebugCredentialsContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def list_debug_credentials( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayDebugCredentialsContract: + """Create new debug credentials for gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List debug credentials properties. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayDebugCredentialsContract. The GatewayDebugCredentialsContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def list_debug_credentials( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayDebugCredentialsContract: + """Create new debug credentials for gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List debug credentials properties. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayDebugCredentialsContract. The GatewayDebugCredentialsContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def list_debug_credentials( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: Union[_models.GatewayListDebugCredentialsContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.GatewayDebugCredentialsContract: + """Create new debug credentials for gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List debug credentials properties. Is one of the following types: + GatewayListDebugCredentialsContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContract or JSON + or IO[bytes] + :return: GatewayDebugCredentialsContract. The GatewayDebugCredentialsContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayDebugCredentialsContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_list_debug_credentials_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayDebugCredentialsContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def list_trace( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: _models.GatewayListTraceContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> dict[str, Any]: + """Fetches trace collected by gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List trace properties. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayListTraceContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: dict mapping str to any + :rtype: dict[str, any] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def list_trace( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> dict[str, Any]: + """Fetches trace collected by gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List trace properties. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: dict mapping str to any + :rtype: dict[str, any] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def list_trace( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> dict[str, Any]: + """Fetches trace collected by gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List trace properties. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: dict mapping str to any + :rtype: dict[str, any] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def list_trace( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: Union[_models.GatewayListTraceContract, JSON, IO[bytes]], + **kwargs: Any + ) -> dict[str, Any]: + """Fetches trace collected by gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List trace properties. Is one of the following types: + GatewayListTraceContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayListTraceContract or JSON or + IO[bytes] + :return: dict mapping str to any + :rtype: dict[str, any] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[dict[str, Any]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_list_trace_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(dict[str, Any], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class GatewayApiOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`gateway_api` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ApiContract"]: + """Lists a collection of the APIs associated with a gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_gateway_api_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, gateway_id: str, api_id: str, **kwargs: Any + ) -> bool: + """Checks that API entity specified by identifier is associated with the Gateway entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_api_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + api_id: str, + parameters: Optional[_models.AssociationContract] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Adds an API to the specified Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Default value is None. + :type parameters: ~azure.mgmt.apimanagement.models.AssociationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + api_id: str, + parameters: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Adds an API to the specified Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Default value is None. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + api_id: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Adds an API to the specified Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + api_id: str, + parameters: Optional[Union[_models.AssociationContract, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> _models.ApiContract: + """Adds an API to the specified Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Is one of the following types: AssociationContract, JSON, IO[bytes] Default + value is None. + :type parameters: ~azure.mgmt.apimanagement.models.AssociationContract or JSON or IO[bytes] + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if parameters else None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_gateway_api_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, gateway_id: str, api_id: str, **kwargs: Any + ) -> None: + """Deletes the specified API from the specified Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_api_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class GatewayHostnameConfigurationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`gateway_hostname_configuration` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, **kwargs: Any + ) -> _models.GatewayHostnameConfigurationContract: + """Get details of a hostname configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :return: GatewayHostnameConfigurationContract. The GatewayHostnameConfigurationContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GatewayHostnameConfigurationContract] = kwargs.pop("cls", None) + + _request = build_gateway_hostname_configuration_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + hc_id=hc_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayHostnameConfigurationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, **kwargs: Any + ) -> bool: + """Checks that hostname configuration entity specified by identifier exists for specified Gateway + entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_hostname_configuration_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + hc_id=hc_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + hc_id: str, + parameters: _models.GatewayHostnameConfigurationContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayHostnameConfigurationContract: + """Creates of updates hostname configuration for a Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayHostnameConfigurationContract. The GatewayHostnameConfigurationContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + hc_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayHostnameConfigurationContract: + """Creates of updates hostname configuration for a Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayHostnameConfigurationContract. The GatewayHostnameConfigurationContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + hc_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayHostnameConfigurationContract: + """Creates of updates hostname configuration for a Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayHostnameConfigurationContract. The GatewayHostnameConfigurationContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + hc_id: str, + parameters: Union[_models.GatewayHostnameConfigurationContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayHostnameConfigurationContract: + """Creates of updates hostname configuration for a Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :param parameters: Is one of the following types: GatewayHostnameConfigurationContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract or JSON + or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayHostnameConfigurationContract. The GatewayHostnameConfigurationContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayHostnameConfigurationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_hostname_configuration_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + hc_id=hc_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayHostnameConfigurationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + hc_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified hostname configuration from the specified Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_hostname_configuration_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + hc_id=hc_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.GatewayHostnameConfigurationContract"]: + """Lists the collection of hostname configurations for the specified gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| hostname + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GatewayHostnameConfigurationContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GatewayHostnameConfigurationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_gateway_hostname_configuration_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GatewayHostnameConfigurationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class GatewayCertificateAuthorityOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`gateway_certificate_authority` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, gateway_id: str, certificate_id: str, **kwargs: Any + ) -> _models.GatewayCertificateAuthorityContract: + """Get assigned Gateway Certificate Authority details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: GatewayCertificateAuthorityContract. The GatewayCertificateAuthorityContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GatewayCertificateAuthorityContract] = kwargs.pop("cls", None) + + _request = build_gateway_certificate_authority_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayCertificateAuthorityContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, gateway_id: str, certificate_id: str, **kwargs: Any + ) -> bool: + """Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_certificate_authority_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + parameters: _models.GatewayCertificateAuthorityContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayCertificateAuthorityContract: + """Assign Certificate entity to Gateway entity as Certificate Authority. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayCertificateAuthorityContract. The GatewayCertificateAuthorityContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayCertificateAuthorityContract: + """Assign Certificate entity to Gateway entity as Certificate Authority. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayCertificateAuthorityContract. The GatewayCertificateAuthorityContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayCertificateAuthorityContract: + """Assign Certificate entity to Gateway entity as Certificate Authority. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayCertificateAuthorityContract. The GatewayCertificateAuthorityContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + parameters: Union[_models.GatewayCertificateAuthorityContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayCertificateAuthorityContract: + """Assign Certificate entity to Gateway entity as Certificate Authority. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Is one of the following types: GatewayCertificateAuthorityContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract or JSON + or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayCertificateAuthorityContract. The GatewayCertificateAuthorityContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayCertificateAuthorityContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_certificate_authority_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayCertificateAuthorityContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Remove relationship between Certificate Authority and Gateway entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_certificate_authority_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.GatewayCertificateAuthorityContract"]: + """Lists the collection of Certificate Authorities for the specified Gateway entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | eq, ne | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GatewayCertificateAuthorityContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GatewayCertificateAuthorityContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_gateway_certificate_authority_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GatewayCertificateAuthorityContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class GroupOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`group` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, group_id: str, **kwargs: Any + ) -> _models.GroupContract: + """Gets the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + _request = build_group_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, group_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_group_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: _models.GroupCreateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: Union[_models.GroupCreateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Is one of the following types: GroupCreateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_group_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: _models.GroupUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: Union[_models.GroupUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Is one of the following types: GroupUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_group_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + group_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific group of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_group_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.GroupContract"]: + """Lists a collection of groups defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| externalId | filter | eq | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GroupContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GroupContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GroupContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_group_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GroupContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class GroupUserOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`group_user` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + group_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.UserContract"]: + """Lists a collection of user entities associated with the group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, + le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of UserContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.UserContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.UserContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_group_user_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.UserContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def check_entity_exists( + self, resource_group_name: str, service_name: str, group_id: str, user_id: str, **kwargs: Any + ) -> bool: + """Checks that user entity specified by identifier is associated with the group entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_group_user_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace_async + async def create( + self, resource_group_name: str, service_name: str, group_id: str, user_id: str, **kwargs: Any + ) -> _models.UserContract: + """Add existing user to existing group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) + + _request = build_group_user_create_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, group_id: str, user_id: str, **kwargs: Any + ) -> None: + """Remove existing user from existing group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_group_user_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class WorkspaceGroupUserOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_group_user` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.UserContract"]: + """Lists a collection of user entities associated with the group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, + le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of UserContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.UserContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.UserContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_group_user_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.UserContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def check_entity_exists( + self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, user_id: str, **kwargs: Any + ) -> bool: + """Checks that user entity specified by identifier is associated with the group entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_group_user_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace_async + async def create( + self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, user_id: str, **kwargs: Any + ) -> _models.UserContract: + """Add existing user to existing group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) + + _request = build_workspace_group_user_create_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, user_id: str, **kwargs: Any + ) -> None: + """Remove existing user from existing group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_group_user_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class IdentityProviderOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`identity_provider` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Gets the configuration details of the identity Provider configured in specified service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IdentityProviderContract] = kwargs.pop("cls", None) + + _request = build_identity_provider_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + identity_provider_name=identity_provider_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IdentityProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the identityProvider specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_identity_provider_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + identity_provider_name=identity_provider_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: _models.IdentityProviderCreateContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Creates or Updates the IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderCreateContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Creates or Updates the IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Creates or Updates the IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: Union[_models.IdentityProviderCreateContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Creates or Updates the IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Create parameters. Is one of the following types: + IdentityProviderCreateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderCreateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IdentityProviderContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_identity_provider_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + identity_provider_name=identity_provider_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IdentityProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: _models.IdentityProviderUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Updates an existing IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Updates an existing IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Updates an existing IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: Union[_models.IdentityProviderUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Updates an existing IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Update parameters. Is one of the following types: + IdentityProviderUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IdentityProviderContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_identity_provider_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + identity_provider_name=identity_provider_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IdentityProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified identity provider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_identity_provider_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + identity_provider_name=identity_provider_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.IdentityProviderContract"]: + """Lists a collection of Identity Provider configured in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of IdentityProviderContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.IdentityProviderContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IdentityProviderContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_identity_provider_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IdentityProviderContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def list_secrets( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + **kwargs: Any + ) -> _models.ClientSecretContract: + """Gets the client secret details of the Identity Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :return: ClientSecretContract. The ClientSecretContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientSecretContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ClientSecretContract] = kwargs.pop("cls", None) + + _request = build_identity_provider_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + identity_provider_name=identity_provider_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientSecretContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class LoggerOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`logger` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, logger_id: str, **kwargs: Any + ) -> _models.LoggerContract: + """Gets the details of the logger specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) + + _request = build_logger_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoggerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, logger_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the logger specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_logger_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: _models.LoggerContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: Union[_models.LoggerContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Is one of the following types: LoggerContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_logger_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoggerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: _models.LoggerUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: Union[_models.LoggerUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Is one of the following types: LoggerUpdateContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_logger_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoggerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_logger_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.LoggerContract"]: + """Lists a collection of loggers in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of LoggerContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.LoggerContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LoggerContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_logger_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LoggerContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class NamedValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`named_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any + ) -> _models.NamedValueContract: + """Gets the details of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: NamedValueContract. The NamedValueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NamedValueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + + _request = build_named_value_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NamedValueContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_named_value_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: Union[_models.NamedValueCreateContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_named_value_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: _models.NamedValueCreateContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: Union[_models.NamedValueCreateContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Is one of the following types: NamedValueCreateContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.NamedValueContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NamedValueContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NamedValueContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: Union[_models.NamedValueUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_named_value_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: _models.NamedValueUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: Union[_models.NamedValueUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Is one of the following types: + NamedValueUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.NamedValueContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NamedValueContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NamedValueContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific named value from the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_named_value_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + is_key_vault_refresh_failed: Optional[bool] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.NamedValueContract"]: + """Lists a collection of named values defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| tags | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword is_key_vault_refresh_failed: When set to true, the response contains only named value + entities which failed refresh. Default value is None. + :paramtype is_key_vault_refresh_failed: bool + :return: An iterator like instance of NamedValueContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NamedValueContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_named_value_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + is_key_vault_refresh_failed=is_key_vault_refresh_failed, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NamedValueContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def list_value( + self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any + ) -> _models.NamedValueSecretContract: + """Gets the secret of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: NamedValueSecretContract. The NamedValueSecretContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NamedValueSecretContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NamedValueSecretContract] = kwargs.pop("cls", None) + + _request = build_named_value_list_value_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NamedValueSecretContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + async def _refresh_secret_initial( + self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_named_value_refresh_secret_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_refresh_secret( + self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NamedValueContract]: + """Refresh the secret of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: An instance of AsyncLROPoller that returns NamedValueContract. The NamedValueContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._refresh_secret_initial( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.NamedValueContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NamedValueContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NamedValueContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NotificationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`notification` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + **kwargs: Any + ) -> _models.NotificationContract: + """Gets the details of the Notification specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :return: NotificationContract. The NotificationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NotificationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) + + _request = build_notification_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NotificationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.NotificationContract: + """Create or Update API Management publisher notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: NotificationContract. The NotificationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NotificationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) + + _request = build_notification_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NotificationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.NotificationContract"]: + """Lists a collection of properties defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of NotificationContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.NotificationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NotificationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_notification_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NotificationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class NotificationRecipientUserOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`notification_recipient_user` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list_by_notification( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + **kwargs: Any + ) -> _models.RecipientUserCollection: + """Gets the list of the Notification Recipient User subscribed to the notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :return: RecipientUserCollection. The RecipientUserCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientUserCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientUserCollection] = kwargs.pop("cls", None) + + _request = build_notification_recipient_user_list_by_notification_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientUserCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def check_entity_exists( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + **kwargs: Any + ) -> bool: + """Determine if the Notification Recipient User is subscribed to the notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_notification_recipient_user_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + **kwargs: Any + ) -> _models.RecipientUserContract: + """Adds the API Management User to the list of Recipients for the Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: RecipientUserContract. The RecipientUserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientUserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientUserContract] = kwargs.pop("cls", None) + + _request = build_notification_recipient_user_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientUserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + **kwargs: Any + ) -> None: + """Removes the API Management user from the list of Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_notification_recipient_user_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class NotificationRecipientEmailOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`notification_recipient_email` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list_by_notification( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + **kwargs: Any + ) -> _models.RecipientEmailCollection: + """Gets the list of the Notification Recipient Emails subscribed to a notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :return: RecipientEmailCollection. The RecipientEmailCollection is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientEmailCollection] = kwargs.pop("cls", None) + + _request = build_notification_recipient_email_list_by_notification_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientEmailCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def check_entity_exists( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + email: str, + **kwargs: Any + ) -> bool: + """Determine if Notification Recipient Email subscribed to the notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. Required. + :type email: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_notification_recipient_email_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + email=email, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + email: str, + **kwargs: Any + ) -> _models.RecipientEmailContract: + """Adds the Email address to the list of Recipients for the Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. Required. + :type email: str + :return: RecipientEmailContract. The RecipientEmailContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientEmailContract] = kwargs.pop("cls", None) + + _request = build_notification_recipient_email_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + email=email, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientEmailContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + email: str, + **kwargs: Any + ) -> None: + """Removes the email from the list of Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. Required. + :type email: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_notification_recipient_email_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + email=email, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class WorkspaceNotificationRecipientUserOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_notification_recipient_user` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list_by_notification( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + **kwargs: Any + ) -> _models.RecipientUserCollection: + """Gets the list of the Notification Recipient User subscribed to the notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :return: RecipientUserCollection. The RecipientUserCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientUserCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientUserCollection] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_user_list_by_notification_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientUserCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def check_entity_exists( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + **kwargs: Any + ) -> bool: + """Determine if the Notification Recipient User is subscribed to the notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Workspace identifier. Must be unique in the current API Management + service instance. Known values are: "RequestPublisherNotificationMessage", + "PurchasePublisherNotificationMessage", "NewApplicationNotificationMessage", "BCC", + "NewIssuePublisherNotificationMessage", "AccountClosedPublisher", and + "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_user_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + **kwargs: Any + ) -> _models.RecipientUserContract: + """Adds the API Management User to the list of Recipients for the Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: RecipientUserContract. The RecipientUserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientUserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientUserContract] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_user_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientUserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + **kwargs: Any + ) -> None: + """Removes the API Management user from the list of Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Workspace identifier. Must be unique in the current API Management + service instance. Known values are: "RequestPublisherNotificationMessage", + "PurchasePublisherNotificationMessage", "NewApplicationNotificationMessage", "BCC", + "NewIssuePublisherNotificationMessage", "AccountClosedPublisher", and + "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_user_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class WorkspaceNotificationRecipientEmailOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_notification_recipient_email` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list_by_notification( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + **kwargs: Any + ) -> _models.RecipientEmailCollection: + """Gets the list of the Notification Recipient Emails subscribed to a notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :return: RecipientEmailCollection. The RecipientEmailCollection is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientEmailCollection] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_email_list_by_notification_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientEmailCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def check_entity_exists( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + email: str, + **kwargs: Any + ) -> bool: + """Determine if Notification Recipient Email subscribed to the notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Workspace identifier. Must be unique in the current API Management + service instance. Known values are: "RequestPublisherNotificationMessage", + "PurchasePublisherNotificationMessage", "NewApplicationNotificationMessage", "BCC", + "NewIssuePublisherNotificationMessage", "AccountClosedPublisher", and + "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. Required. + :type email: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_email_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + email=email, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + email: str, + **kwargs: Any + ) -> _models.RecipientEmailContract: + """Adds the Email address to the list of Recipients for the Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. Required. + :type email: str + :return: RecipientEmailContract. The RecipientEmailContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientEmailContract] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_email_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + email=email, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientEmailContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + email: str, + **kwargs: Any + ) -> None: + """Removes the email from the list of Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Workspace identifier. Must be unique in the current API Management + service instance. Known values are: "RequestPublisherNotificationMessage", + "PurchasePublisherNotificationMessage", "NewApplicationNotificationMessage", "BCC", + "NewIssuePublisherNotificationMessage", "AccountClosedPublisher", and + "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. Required. + :type email: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_email_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + email=email, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class OpenIdConnectProviderOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`open_id_connect_provider` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, opid: str, **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Gets specific OpenID Connect Provider without secrets. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OpenidConnectProviderContract] = kwargs.pop("cls", None) + + _request = build_open_id_connect_provider_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + opid=opid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OpenidConnectProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, opid: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_open_id_connect_provider_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + opid=opid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: _models.OpenidConnectProviderContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Creates or updates the OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Creates or updates the OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Creates or updates the OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: Union[_models.OpenidConnectProviderContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Creates or updates the OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Create parameters. Is one of the following types: + OpenidConnectProviderContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OpenidConnectProviderContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_open_id_connect_provider_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + opid=opid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OpenidConnectProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: _models.OpenidConnectProviderUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Updates the specific OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Updates the specific OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Updates the specific OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: Union[_models.OpenidConnectProviderUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Updates the specific OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Update parameters. Is one of the following types: + OpenidConnectProviderUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContract or JSON + or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OpenidConnectProviderContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_open_id_connect_provider_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + opid=opid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OpenidConnectProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + opid: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific OpenID Connect Provider of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_open_id_connect_provider_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + opid=opid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.OpenidConnectProviderContract"]: + """Lists of all the OpenId Connect Providers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of OpenidConnectProviderContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.OpenidConnectProviderContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OpenidConnectProviderContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_open_id_connect_provider_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OpenidConnectProviderContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def list_secrets( + self, resource_group_name: str, service_name: str, opid: str, **kwargs: Any + ) -> _models.ClientSecretContract: + """Gets the client secret details of the OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :return: ClientSecretContract. The ClientSecretContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientSecretContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ClientSecretContract] = kwargs.pop("cls", None) + + _request = build_open_id_connect_provider_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + opid=opid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientSecretContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class PolicyFragmentOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`policy_fragment` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + id: str, + *, + format: Optional[Union[str, _models.PolicyFragmentContentFormat]] = None, + **kwargs: Any + ) -> _models.PolicyFragmentContract: + """Gets a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :keyword format: Policy fragment content format. Known values are: "xml" and "rawxml". Default + value is None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyFragmentContentFormat + :return: PolicyFragmentContract. The PolicyFragmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyFragmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) + + _request = build_policy_fragment_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + id=id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyFragmentContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policy_fragment_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + id=id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + id: str, + parameters: Union[_models.PolicyFragmentContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_policy_fragment_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + id=id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + id: str, + parameters: _models.PolicyFragmentContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + id: str, + parameters: Union[_models.PolicyFragmentContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Is one of the following types: + PolicyFragmentContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + id=id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.PolicyFragmentContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.PolicyFragmentContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.PolicyFragmentContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policy_fragment_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + id=id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + orderby: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.PolicyFragmentContract"]: + """Gets all policy fragments. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of PolicyFragmentContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyFragmentContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_policy_fragment_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + orderby=orderby, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyFragmentContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def list_references( + self, + resource_group_name: str, + service_name: str, + id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> _models.ResourceCollection: + """Lists policy resources that reference the policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: ResourceCollection. The ResourceCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResourceCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ResourceCollection] = kwargs.pop("cls", None) + + _request = build_policy_fragment_list_references_request( + resource_group_name=resource_group_name, + service_name=service_name, + id=id, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ResourceCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PolicyRestrictionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`policy_restriction` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, policy_restriction_id: str, **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Get the policy restriction of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyRestrictionContract] = kwargs.pop("cls", None) + + _request = build_policy_restriction_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_restriction_id=policy_restriction_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyRestrictionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, policy_restriction_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the policy restriction in the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policy_restriction_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_restriction_id=policy_restriction_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: _models.PolicyRestrictionContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Creates or updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Creates or updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Creates or updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: Union[_models.PolicyRestrictionContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Creates or updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Is one of the following types: + PolicyRestrictionContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyRestrictionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_policy_restriction_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_restriction_id=policy_restriction_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyRestrictionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: _models.PolicyRestrictionUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: Union[_models.PolicyRestrictionUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Is one of the following types: + PolicyRestrictionUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionUpdateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyRestrictionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_policy_restriction_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_restriction_id=policy_restriction_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyRestrictionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> None: + """Deletes the policy restriction configuration of the Api Management Service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policy_restriction_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_restriction_id=policy_restriction_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.PolicyRestrictionContract"]: + """Gets all policy restrictions of API Management services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of PolicyRestrictionContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyRestrictionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyRestrictionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_policy_restriction_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyRestrictionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class PortalConfigOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`portal_config` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, portal_config_id: str, **kwargs: Any + ) -> _models.PortalConfigContract: + """Get the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalConfigContract] = kwargs.pop("cls", None) + + _request = build_portal_config_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_config_id=portal_config_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalConfigContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, portal_config_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_portal_config_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_config_id=portal_config_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: _models.PortalConfigContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PortalConfigContract: + """Create or update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PortalConfigContract: + """Create or update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PortalConfigContract: + """Create or update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: Union[_models.PortalConfigContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.PortalConfigContract: + """Create or update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Is one of the following types: + PortalConfigContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalConfigContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_portal_config_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_config_id=portal_config_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalConfigContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: _models.PortalConfigContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PortalConfigContract: + """Update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PortalConfigContract: + """Update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PortalConfigContract: + """Update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: Union[_models.PortalConfigContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.PortalConfigContract: + """Update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Is one of the following types: + PortalConfigContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalConfigContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_portal_config_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_config_id=portal_config_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalConfigContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.PortalConfigContract"]: + """Lists the developer portal configurations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of PortalConfigContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PortalConfigContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PortalConfigContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_portal_config_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PortalConfigContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ClientApplicationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`client_application` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> _models.ClientApplicationContract: + """Gets the details of the client application specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: ClientApplicationContract. The ClientApplicationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ClientApplicationContract] = kwargs.pop("cls", None) + + _request = build_client_application_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientApplicationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_client_application_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: _models.ClientApplicationContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationContract. The ClientApplicationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationContract. The ClientApplicationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationContract. The ClientApplicationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: Union[_models.ClientApplicationContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Is one of the following types: + ClientApplicationContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationContract or JSON or + IO[bytes] + :return: ClientApplicationContract. The ClientApplicationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ClientApplicationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_client_application_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientApplicationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> None: + """Delete client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_client_application_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ClientApplicationContract"]: + """Lists a collection of client applications in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
state | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
|. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ClientApplicationContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ClientApplicationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ClientApplicationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_client_application_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ClientApplicationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def list_secrets( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> _models.ClientApplicationSecretsContract: + """Retrived client application secrets. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: ClientApplicationSecretsContract. The ClientApplicationSecretsContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationSecretsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ClientApplicationSecretsContract] = kwargs.pop("cls", None) + + _request = build_client_application_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientApplicationSecretsContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ClientApplicationProductLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`client_application_product_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Gets the product link for the client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :return: ClientApplicationProductLinkContract. The ClientApplicationProductLinkContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ClientApplicationProductLinkContract] = kwargs.pop("cls", None) + + _request = build_client_application_product_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + client_application_product_link_id=client_application_product_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientApplicationProductLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: _models.ClientApplicationProductLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationProductLinkContract. The ClientApplicationProductLinkContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationProductLinkContract. The ClientApplicationProductLinkContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationProductLinkContract. The ClientApplicationProductLinkContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: Union[_models.ClientApplicationProductLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Is one of the following types: + ClientApplicationProductLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract or JSON + or IO[bytes] + :return: ClientApplicationProductLinkContract. The ClientApplicationProductLinkContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ClientApplicationProductLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_client_application_product_link_create_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + client_application_product_link_id=client_application_product_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientApplicationProductLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified Product from the specified client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_client_application_product_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + client_application_product_link_id=client_application_product_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_client_applications( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ClientApplicationProductLinkContract"]: + """Lists a collection of product links associated with the specified client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ClientApplicationProductLinkContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ClientApplicationProductLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_client_application_product_link_list_by_client_applications_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ClientApplicationProductLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class PortalRevisionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`portal_revision` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, portal_revision_id: str, **kwargs: Any + ) -> _models.PortalRevisionContract: + """Gets the developer portal's revision specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :return: PortalRevisionContract. The PortalRevisionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalRevisionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalRevisionContract] = kwargs.pop("cls", None) + + _request = build_portal_revision_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_revision_id=portal_revision_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalRevisionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, portal_revision_id: str, **kwargs: Any + ) -> bool: + """Gets the developer portal revision specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_portal_revision_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_revision_id=portal_revision_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: Union[_models.PortalRevisionContract, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_portal_revision_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_revision_id=portal_revision_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: _models.PortalRevisionContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PortalRevisionContract]: + """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` + property indicates if the revision is publicly accessible. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PortalRevisionContract]: + """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` + property indicates if the revision is publicly accessible. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PortalRevisionContract]: + """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` + property indicates if the revision is publicly accessible. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: Union[_models.PortalRevisionContract, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.PortalRevisionContract]: + """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` + property indicates if the revision is publicly accessible. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Is one of the following types: PortalRevisionContract, JSON, IO[bytes] + Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalRevisionContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + portal_revision_id=portal_revision_id, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.PortalRevisionContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.PortalRevisionContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.PortalRevisionContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: Union[_models.PortalRevisionContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_portal_revision_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_revision_id=portal_revision_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: _models.PortalRevisionContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PortalRevisionContract]: + """Updates the description of specified portal revision or makes it current. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PortalRevisionContract]: + """Updates the description of specified portal revision or makes it current. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PortalRevisionContract]: + """Updates the description of specified portal revision or makes it current. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: Union[_models.PortalRevisionContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> AsyncLROPoller[_models.PortalRevisionContract]: + """Updates the description of specified portal revision or makes it current. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Is one of the following types: PortalRevisionContract, JSON, IO[bytes] + Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalRevisionContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + portal_revision_id=portal_revision_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.PortalRevisionContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.PortalRevisionContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.PortalRevisionContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.PortalRevisionContract"]: + """Lists developer portal's revisions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Supported operators | Supported functions | + |-------------|------------------------|-----------------------------------| + + |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| + |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| + |isCurrent | eq, ne | |. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of PortalRevisionContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PortalRevisionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_portal_revision_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PortalRevisionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class PrivateEndpointConnectionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`private_endpoint_connection` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get_by_name( + self, resource_group_name: str, service_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Gets the details of the Private Endpoint Connection specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. Required. + :type private_endpoint_connection_name: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connection_get_by_name_request( + resource_group_name=resource_group_name, + service_name=service_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection_request: Union[_models.PrivateEndpointConnectionRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(private_endpoint_connection_request, (IOBase, bytes)): + _content = private_endpoint_connection_request + else: + _content = json.dumps(private_endpoint_connection_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_private_endpoint_connection_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection_request: _models.PrivateEndpointConnectionRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Creates a new Private Endpoint Connection or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_endpoint_connection_name: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection_request: Required. + :type private_endpoint_connection_request: + ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Creates a new Private Endpoint Connection or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_endpoint_connection_name: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection_request: Required. + :type private_endpoint_connection_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Creates a new Private Endpoint Connection or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_endpoint_connection_name: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection_request: Required. + :type private_endpoint_connection_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection_request: Union[_models.PrivateEndpointConnectionRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Creates a new Private Endpoint Connection or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_endpoint_connection_name: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection_request: Is one of the following types: + PrivateEndpointConnectionRequest, JSON, IO[bytes] Required. + :type private_endpoint_connection_request: + ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequest or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_connection_request=private_endpoint_connection_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.PrivateEndpointConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.PrivateEndpointConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, service_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connection_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, service_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified Private Endpoint Connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. Required. + :type private_endpoint_connection_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.PrivateEndpointConnection"]: + """Lists all private endpoint connections of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_private_endpoint_connection_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PrivateEndpointConnection], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get_private_link_resource( + self, resource_group_name: str, service_name: str, private_link_sub_resource_name: str, **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_link_sub_resource_name: The name of the private link associated with the Azure + resource. Required. + :type private_link_sub_resource_name: str + :return: PrivateLinkResource. The PrivateLinkResource is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connection_get_private_link_resource_request( + resource_group_name=resource_group_name, + service_name=service_name, + private_link_sub_resource_name=private_link_sub_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateLinkResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def list_private_link_resources( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> _models.PrivateLinkResourceListResult: + """Gets the private link resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: PrivateLinkResourceListResult. The PrivateLinkResourceListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PrivateLinkResourceListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connection_list_private_link_resources_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateLinkResourceListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ProductApiOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`product_api` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ApiContract"]: + """Lists a collection of the APIs associated with a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_api_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def check_entity_exists( + self, resource_group_name: str, service_name: str, product_id: str, api_id: str, **kwargs: Any + ) -> bool: + """Checks that API entity specified by identifier is associated with the Product entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_api_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace_async + async def create_or_update( + self, resource_group_name: str, service_name: str, product_id: str, api_id: str, **kwargs: Any + ) -> _models.ApiContract: + """Adds an API to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + + _request = build_product_api_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, product_id: str, api_id: str, **kwargs: Any + ) -> None: + """Deletes the specified API from the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_api_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class ProductGroupOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`product_group` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.GroupContract"]: + """Lists the collection of developer groups associated with the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | |
| displayName | filter | eq, ne | |
| + description | filter | eq, ne | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GroupContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GroupContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GroupContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_group_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GroupContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def check_entity_exists( + self, resource_group_name: str, service_name: str, product_id: str, group_id: str, **kwargs: Any + ) -> bool: + """Checks that Group entity specified by identifier is associated with the Product entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_group_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace_async + async def create_or_update( + self, resource_group_name: str, service_name: str, product_id: str, group_id: str, **kwargs: Any + ) -> _models.GroupContract: + """Adds the association between the specified developer group with the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + _request = build_product_group_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, product_id: str, group_id: str, **kwargs: Any + ) -> None: + """Deletes the association between the specified group and product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_group_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class ProductSubscriptionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`product_subscriptions` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.SubscriptionContract"]: + """Lists the collection of subscriptions to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| state | filter | eq | |
| user | expand | | + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of SubscriptionContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SubscriptionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_subscriptions_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SubscriptionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ProductApiLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`product_api_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, product_id: str, api_link_id: str, **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Gets the API link for the product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) + + _request = build_product_api_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + api_link_id: str, + parameters: _models.ProductApiLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + api_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + api_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + api_link_id: str, + parameters: Union[_models.ProductApiLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + ProductApiLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract or JSON or IO[bytes] + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_api_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, product_id: str, api_link_id: str, **kwargs: Any + ) -> None: + """Deletes the specified API from the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_api_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ProductApiLinkContract"]: + """Lists a collection of the API links associated with a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| apiId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ProductApiLinkContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductApiLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductApiLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_api_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductApiLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ProductGroupLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`product_group_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, product_id: str, group_link_id: str, **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Gets the group link for the product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) + + _request = build_product_group_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + group_link_id=group_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductGroupLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + group_link_id: str, + parameters: _models.ProductGroupLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + group_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + group_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + group_link_id: str, + parameters: Union[_models.ProductGroupLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + ProductGroupLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract or JSON or + IO[bytes] + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_group_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + group_link_id=group_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductGroupLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, product_id: str, group_link_id: str, **kwargs: Any + ) -> None: + """Deletes the specified group from the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_group_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + group_link_id=group_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.ProductGroupLinkContract"]: + """Lists a collection of the group links associated with a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| groupId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ProductGroupLinkContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductGroupLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductGroupLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_group_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductGroupLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class GlobalSchemaOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`global_schema` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, schema_id: str, **kwargs: Any + ) -> _models.GlobalSchemaContract: + """Gets the details of the Schema specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: GlobalSchemaContract. The GlobalSchemaContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GlobalSchemaContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) + + _request = build_global_schema_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GlobalSchemaContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, schema_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the Schema specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_global_schema_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + schema_id: str, + parameters: Union[_models.GlobalSchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_global_schema_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + schema_id: str, + parameters: _models.GlobalSchemaContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns GlobalSchemaContract. The + GlobalSchemaContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + schema_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns GlobalSchemaContract. The + GlobalSchemaContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + schema_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns GlobalSchemaContract. The + GlobalSchemaContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + schema_id: str, + parameters: Union[_models.GlobalSchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Is one of the following types: + GlobalSchemaContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns GlobalSchemaContract. The + GlobalSchemaContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + schema_id=schema_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.GlobalSchemaContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.GlobalSchemaContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.GlobalSchemaContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + schema_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Schema. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_global_schema_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.GlobalSchemaContract"]: + """Lists a collection of schemas registered with service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GlobalSchemaContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GlobalSchemaContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_global_schema_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GlobalSchemaContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class TenantSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`tenant_settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + settings_type: Union[str, _models.SettingsTypeName], + **kwargs: Any + ) -> _models.TenantSettingsContract: + """Get tenant settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param settings_type: The identifier of the settings. "public" Required. + :type settings_type: str or ~azure.mgmt.apimanagement.models.SettingsTypeName + :return: TenantSettingsContract. The TenantSettingsContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TenantSettingsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TenantSettingsContract] = kwargs.pop("cls", None) + + _request = build_tenant_settings_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + settings_type=settings_type, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TenantSettingsContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, *, filter: Optional[str] = None, **kwargs: Any + ) -> AsyncItemPaged["_models.TenantSettingsContract"]: + """Public settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: Not used. Default value is None. + :paramtype filter: str + :return: An iterator like instance of TenantSettingsContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TenantSettingsContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TenantSettingsContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tenant_settings_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TenantSettingsContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class SubscriptionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`subscription` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any + ) -> _models.SubscriptionContract: + """Gets the specified Subscription entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + _request = build_subscription_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the apimanagement subscription specified by its + identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_subscription_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: _models.SubscriptionCreateParameters, + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: JSON, + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: IO[bytes], + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: Union[_models.SubscriptionCreateParameters, JSON, IO[bytes]], + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Is one of the following types: + SubscriptionCreateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters or JSON or + IO[bytes] + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_subscription_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + notify=notify, + app_type=app_type, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: _models.SubscriptionUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: Union[_models.SubscriptionUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Is one of the following types: + SubscriptionUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_subscription_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + notify=notify, + app_type=app_type, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + sid: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified subscription. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_subscription_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.SubscriptionContract"]: + """Lists all subscriptions of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| state | filter | eq | |
| user | expand | | + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of SubscriptionContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SubscriptionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_subscription_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SubscriptionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def regenerate_primary_key( + self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any + ) -> None: + """Regenerates primary key of existing subscription of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_subscription_regenerate_primary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def regenerate_secondary_key( + self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any + ) -> None: + """Regenerates secondary key of existing subscription of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_subscription_regenerate_secondary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def list_secrets( + self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any + ) -> _models.SubscriptionKeysContract: + """Gets the specified Subscription keys. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: SubscriptionKeysContract. The SubscriptionKeysContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionKeysContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SubscriptionKeysContract] = kwargs.pop("cls", None) + + _request = build_subscription_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionKeysContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class TagApiLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`tag_api_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, **kwargs: Any + ) -> _models.TagApiLinkContract: + """Gets the API link for the tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) + + _request = build_tag_api_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + api_link_id: str, + parameters: _models.TagApiLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + api_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + api_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + api_link_id: str, + parameters: Union[_models.TagApiLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + TagApiLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract or JSON or IO[bytes] + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tag_api_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, **kwargs: Any + ) -> None: + """Deletes the specified API from the specified tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_api_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagApiLinkContract"]: + """Lists a collection of the API links associated with a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| apiId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagApiLinkContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagApiLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagApiLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_api_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagApiLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class TagOperationLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`tag_operation_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, tag_id: str, operation_link_id: str, **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Gets the operation link for the tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) + + _request = build_tag_operation_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + operation_link_id=operation_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagOperationLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + operation_link_id: str, + parameters: _models.TagOperationLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + operation_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + operation_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + operation_link_id: str, + parameters: Union[_models.TagOperationLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + TagOperationLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract or JSON or + IO[bytes] + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tag_operation_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + operation_link_id=operation_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagOperationLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, tag_id: str, operation_link_id: str, **kwargs: Any + ) -> None: + """Deletes the specified operation from the specified tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_operation_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + operation_link_id=operation_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagOperationLinkContract"]: + """Lists a collection of the operation links associated with a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| operationId + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagOperationLinkContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagOperationLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagOperationLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_operation_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagOperationLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class TagProductLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`tag_product_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, **kwargs: Any + ) -> _models.TagProductLinkContract: + """Gets the product link for the tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) + + _request = build_tag_product_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + product_link_id=product_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagProductLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + product_link_id: str, + parameters: _models.TagProductLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + product_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + product_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + product_link_id: str, + parameters: Union[_models.TagProductLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + TagProductLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract or JSON or IO[bytes] + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tag_product_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + product_link_id=product_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagProductLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, **kwargs: Any + ) -> None: + """Deletes the specified product from the specified tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_product_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + product_link_id=product_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.TagProductLinkContract"]: + """Lists a collection of the product links associated with a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| productId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagProductLinkContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagProductLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagProductLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_product_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagProductLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class TenantAccessOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`tenant_access` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> _models.AccessInformationContract: + """Get tenant access information details without secrets. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AccessInformationContract] = kwargs.pop("cls", None) + + _request = build_tenant_access_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AccessInformationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> bool: + """Tenant access metadata. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tenant_access_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: _models.AccessInformationCreateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationCreateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: Union[_models.AccessInformationCreateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Is one of the + following types: AccessInformationCreateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationCreateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AccessInformationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tenant_access_create_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AccessInformationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: _models.AccessInformationUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: Union[_models.AccessInformationUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Is one of the + following types: AccessInformationUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AccessInformationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tenant_access_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AccessInformationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, *, filter: Optional[str] = None, **kwargs: Any + ) -> AsyncItemPaged["_models.AccessInformationContract"]: + """Returns list of access infos - for Git and Management endpoints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: Not used. Default value is None. + :paramtype filter: str + :return: An iterator like instance of AccessInformationContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.AccessInformationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AccessInformationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tenant_access_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AccessInformationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def regenerate_primary_key( + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> None: + """Regenerate primary access key. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tenant_access_regenerate_primary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def regenerate_secondary_key( + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> None: + """Regenerate secondary access key. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tenant_access_regenerate_secondary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def list_secrets( + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> _models.AccessInformationSecretsContract: + """Get tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: AccessInformationSecretsContract. The AccessInformationSecretsContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationSecretsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AccessInformationSecretsContract] = kwargs.pop("cls", None) + + _request = build_tenant_access_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AccessInformationSecretsContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class TenantAccessGitOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`tenant_access_git` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def regenerate_primary_key( + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> None: + """Regenerate primary access key for GIT. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tenant_access_git_regenerate_primary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def regenerate_secondary_key( + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> None: + """Regenerate secondary access key for GIT. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tenant_access_git_regenerate_secondary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class TenantConfigurationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`tenant_configuration` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _deploy_initial( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: Union[_models.DeployConfigurationParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tenant_configuration_deploy_request( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_deploy( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: _models.DeployConfigurationParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationResultContract]: + """This operation applies changes from the specified Git branch to the configuration database. + This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Deploy Configuration parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_deploy( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationResultContract]: + """This operation applies changes from the specified Git branch to the configuration database. + This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Deploy Configuration parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_deploy( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationResultContract]: + """This operation applies changes from the specified Git branch to the configuration database. + This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Deploy Configuration parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_deploy( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: Union[_models.DeployConfigurationParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationResultContract]: + """This operation applies changes from the specified Git branch to the configuration database. + This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Deploy Configuration parameters. Is one of the following types: + DeployConfigurationParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._deploy_initial( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationResultContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationResultContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationResultContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _save_initial( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: Union[_models.SaveConfigurationParameter, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tenant_configuration_save_request( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_save( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: _models.SaveConfigurationParameter, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationResultContract]: + """This operation creates a commit with the current configuration snapshot to the specified branch + in the repository. This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Save Configuration parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SaveConfigurationParameter + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_save( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationResultContract]: + """This operation creates a commit with the current configuration snapshot to the specified branch + in the repository. This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Save Configuration parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_save( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationResultContract]: + """This operation creates a commit with the current configuration snapshot to the specified branch + in the repository. This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Save Configuration parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_save( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: Union[_models.SaveConfigurationParameter, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationResultContract]: + """This operation creates a commit with the current configuration snapshot to the specified branch + in the repository. This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Save Configuration parameters. Is one of the following types: + SaveConfigurationParameter, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SaveConfigurationParameter or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._save_initial( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationResultContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationResultContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationResultContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _validate_initial( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: Union[_models.DeployConfigurationParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tenant_configuration_validate_request( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_validate( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: _models.DeployConfigurationParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationResultContract]: + """This operation validates the changes in the specified Git branch. This is a long running + operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Validate Configuration parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_validate( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationResultContract]: + """This operation validates the changes in the specified Git branch. This is a long running + operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Validate Configuration parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_validate( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationResultContract]: + """This operation validates the changes in the specified Git branch. This is a long running + operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Validate Configuration parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_validate( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: Union[_models.DeployConfigurationParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationResultContract]: + """This operation validates the changes in the specified Git branch. This is a long running + operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Validate Configuration parameters. Is one of the following types: + DeployConfigurationParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._validate_initial( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationResultContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationResultContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationResultContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def get_sync_state( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + **kwargs: Any + ) -> _models.TenantConfigurationSyncStateContract: + """Gets the status of the most recent synchronization between the configuration database and the + Git repository. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :return: TenantConfigurationSyncStateContract. The TenantConfigurationSyncStateContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TenantConfigurationSyncStateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TenantConfigurationSyncStateContract] = kwargs.pop("cls", None) + + _request = build_tenant_configuration_get_sync_state_request( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TenantConfigurationSyncStateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class UserOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`user` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any + ) -> _models.UserContract: + """Gets the details of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) + + _request = build_user_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag(self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_user_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: _models.UserCreateParameters, + *, + notify: Optional[bool] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.UserContract: + """Creates or Updates a user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.UserCreateParameters + :keyword notify: Send an Email notification to the User. Default value is None. + :paramtype notify: bool + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: JSON, + *, + notify: Optional[bool] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.UserContract: + """Creates or Updates a user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword notify: Send an Email notification to the User. Default value is None. + :paramtype notify: bool + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: IO[bytes], + *, + notify: Optional[bool] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.UserContract: + """Creates or Updates a user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword notify: Send an Email notification to the User. Default value is None. + :paramtype notify: bool + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: Union[_models.UserCreateParameters, JSON, IO[bytes]], + *, + notify: Optional[bool] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.UserContract: + """Creates or Updates a user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create or update parameters. Is one of the following types: + UserCreateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.UserCreateParameters or JSON or IO[bytes] + :keyword notify: Send an Email notification to the User. Default value is None. + :paramtype notify: bool + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_user_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + notify=notify, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: _models.UserUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UserContract: + """Updates the details of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.UserUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UserContract: + """Updates the details of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UserContract: + """Updates the details of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: Union[_models.UserUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.UserContract: + """Updates the details of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Update parameters. Is one of the following types: UserUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.UserUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_user_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + service_name: str, + user_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_subscriptions: Optional[bool] = None, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_user_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + delete_subscriptions=delete_subscriptions, + notify=notify, + app_type=app_type, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + service_name: str, + user_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_subscriptions: Optional[bool] = None, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes specific user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword delete_subscriptions: Whether to delete user's subscription or not. Default value is + None. + :paramtype delete_subscriptions: bool + :keyword notify: Send an Account Closed Email notification to the User. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + etag=etag, + match_condition=match_condition, + delete_subscriptions=delete_subscriptions, + notify=notify, + app_type=app_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + expand_groups: Optional[bool] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.UserContract"]: + """Lists a collection of registered users in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| state | filter | eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | + |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| groups | expand | | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword expand_groups: Detailed Group in response. Default value is None. + :paramtype expand_groups: bool + :return: An iterator like instance of UserContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.UserContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.UserContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_user_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + expand_groups=expand_groups, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.UserContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def generate_sso_url( + self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any + ) -> _models.GenerateSsoUrlResult: + """Retrieves a redirection URL containing an authentication token for signing a given user into + the developer portal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: GenerateSsoUrlResult. The GenerateSsoUrlResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GenerateSsoUrlResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GenerateSsoUrlResult] = kwargs.pop("cls", None) + + _request = build_user_generate_sso_url_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GenerateSsoUrlResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def get_shared_access_token( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: _models.UserTokenParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UserTokenResult: + """Gets the Shared Access Authorization Token for the User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create Authorization Token parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.UserTokenParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: UserTokenResult. The UserTokenResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def get_shared_access_token( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UserTokenResult: + """Gets the Shared Access Authorization Token for the User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create Authorization Token parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: UserTokenResult. The UserTokenResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def get_shared_access_token( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UserTokenResult: + """Gets the Shared Access Authorization Token for the User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create Authorization Token parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: UserTokenResult. The UserTokenResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def get_shared_access_token( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: Union[_models.UserTokenParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.UserTokenResult: + """Gets the Shared Access Authorization Token for the User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create Authorization Token parameters. Is one of the following types: + UserTokenParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.UserTokenParameters or JSON or IO[bytes] + :return: UserTokenResult. The UserTokenResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UserTokenResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_user_get_shared_access_token_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserTokenResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class UserGroupOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`user_group` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + user_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.GroupContract"]: + """Lists all user groups. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions + |
|-------------|------------------------|-----------------------------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GroupContract + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GroupContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GroupContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_user_group_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GroupContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class UserIdentitiesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`user_identities` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any + ) -> AsyncItemPaged["_models.UserIdentityContract"]: + """List of all user identities. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: An iterator like instance of UserIdentityContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.UserIdentityContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.UserIdentityContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_user_identities_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.UserIdentityContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class UserConfirmationPasswordOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`user_confirmation_password` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def send( + self, + resource_group_name: str, + service_name: str, + user_id: str, + *, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any + ) -> None: + """Sends confirmation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_user_confirmation_password_send_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + app_type=app_type, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class ApiManagementWorkspaceLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_management_workspace_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any + ) -> _models.ApiManagementWorkspaceLinksResource: + """Gets an API Management WorkspaceLink resource description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :return: ApiManagementWorkspaceLinksResource. The ApiManagementWorkspaceLinksResource is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementWorkspaceLinksResource] = kwargs.pop("cls", None) + + _request = build_api_management_workspace_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementWorkspaceLinksResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ApiManagementWorkspaceLinksOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_management_workspace_links` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ApiManagementWorkspaceLinksResource"]: + """List all API Management workspaceLinks for a service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of ApiManagementWorkspaceLinksResource + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementWorkspaceLinksResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_workspace_links_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementWorkspaceLinksResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any + ) -> _models.WorkspaceContract: + """Gets the details of the workspace specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.WorkspaceContract] = kwargs.pop("cls", None) + + _request = build_workspace_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WorkspaceContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the workspace specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: _models.WorkspaceContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WorkspaceContract: + """Creates a new workspace or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WorkspaceContract: + """Creates a new workspace or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WorkspaceContract: + """Creates a new workspace or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: Union[_models.WorkspaceContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WorkspaceContract: + """Creates a new workspace or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Create parameters. Is one of the following types: WorkspaceContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.WorkspaceContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WorkspaceContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: _models.WorkspaceContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WorkspaceContract: + """Updates the details of the workspace specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Workspace Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WorkspaceContract: + """Updates the details of the workspace specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Workspace Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WorkspaceContract: + """Updates the details of the workspace specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Workspace Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: Union[_models.WorkspaceContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.WorkspaceContract: + """Updates the details of the workspace specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Workspace Update parameters. Is one of the following types: + WorkspaceContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.WorkspaceContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WorkspaceContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.WorkspaceContract"]: + """Lists all workspaces of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |

| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of WorkspaceContract + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.WorkspaceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.WorkspaceContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.WorkspaceContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ApiExportOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_export` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + format: Union[str, _models.ExportFormat], + export: Union[str, _models.ExportApi], + **kwargs: Any + ) -> _models.ApiExportResult: + """Gets the details of the API specified by its identifier in the format specified to the Storage + Blob with SAS Key valid for 5 minutes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword format: Format in which to export the Api Details to the Storage Blob with Sas Key + valid for 5 minutes. New formats can be added in the future. Known values are: "swagger-link", + "wsdl-link", "wadl-link", "openapi-link", and "openapi+json-link". Required. + :paramtype format: str or ~azure.mgmt.apimanagement.models.ExportFormat + :keyword export: Query parameter required to export the API details. "true" Required. + :paramtype export: str or ~azure.mgmt.apimanagement.models.ExportApi + :return: ApiExportResult. The ApiExportResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiExportResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiExportResult] = kwargs.pop("cls", None) + + _request = build_api_export_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + format=format, + export=export, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiExportResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ApiManagementSkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`api_management_skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ApiManagementSku"]: + """Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + + :return: An iterator like instance of ApiManagementSku + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiManagementSku] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementSku]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_skus_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementSku], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class WorkspaceApiExportOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`workspace_api_export` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + format: Union[str, _models.ExportFormat], + export: Union[str, _models.ExportApi], + **kwargs: Any + ) -> _models.ApiExportResult: + """Gets the details of the API specified by its identifier in the format specified to the Storage + Blob with SAS Key valid for 5 minutes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword format: Format in which to export the Api Details to the Storage Blob with Sas Key + valid for 5 minutes. Known values are: "swagger-link", "wsdl-link", "wadl-link", + "openapi-link", and "openapi+json-link". Required. + :paramtype format: str or ~azure.mgmt.apimanagement.models.ExportFormat + :keyword export: Query parameter required to export the API details. "true" Required. + :paramtype export: str or ~azure.mgmt.apimanagement.models.ExportApi + :return: ApiExportResult. The ApiExportResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiExportResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiExportResult] = kwargs.pop("cls", None) + + _request = build_workspace_api_export_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + format=format, + export=export, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiExportResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class OperationStatusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`operation_status` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationStatusResult: + """Returns the current status of an async operation. + + :param location: The name of the Azure region. Required. + :type location: str + :param operation_id: The ID of an ongoing async operation. Required. + :type operation_id: str + :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationStatusResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + + _request = build_operation_status_get_request( + location=location, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class OperationsResultsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s + :attr:`operations_results` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, location: str, operation_id: str, **kwargs: Any) -> None: + """Returns operation results for long running operations executing DELETE or PATCH on the + resource. + + :param location: The name of the Azure region. Required. + :type location: str + :param operation_id: The ID of an ongoing async operation. Required. + :type operation_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_operations_results_get_request( + location=location, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + + +class _ApiManagementClientOperationsMixin( + ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], ApiManagementClientConfiguration] +): + + async def _perform_connectivity_check_async_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + service_name: str, + connectivity_check_request_params: Union[_models.ConnectivityCheckRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(connectivity_check_request_params, (IOBase, bytes)): + _content = connectivity_check_request_params + else: + _content = json.dumps(connectivity_check_request_params, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_management_perform_connectivity_check_async_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_perform_connectivity_check_async( + self, + resource_group_name: str, + service_name: str, + connectivity_check_request_params: _models.ConnectivityCheckRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ConnectivityCheckResponse]: + """Performs a connectivity check between the API Management service and a given destination, and + returns metrics for the connection, as well as errors encountered while trying to establish it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param connectivity_check_request_params: Connectivity Check request parameters. Required. + :type connectivity_check_request_params: + ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ConnectivityCheckResponse. The + ConnectivityCheckResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_perform_connectivity_check_async( + self, + resource_group_name: str, + service_name: str, + connectivity_check_request_params: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ConnectivityCheckResponse]: + """Performs a connectivity check between the API Management service and a given destination, and + returns metrics for the connection, as well as errors encountered while trying to establish it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param connectivity_check_request_params: Connectivity Check request parameters. Required. + :type connectivity_check_request_params: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ConnectivityCheckResponse. The + ConnectivityCheckResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_perform_connectivity_check_async( + self, + resource_group_name: str, + service_name: str, + connectivity_check_request_params: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ConnectivityCheckResponse]: + """Performs a connectivity check between the API Management service and a given destination, and + returns metrics for the connection, as well as errors encountered while trying to establish it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param connectivity_check_request_params: Connectivity Check request parameters. Required. + :type connectivity_check_request_params: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ConnectivityCheckResponse. The + ConnectivityCheckResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_perform_connectivity_check_async( + self, + resource_group_name: str, + service_name: str, + connectivity_check_request_params: Union[_models.ConnectivityCheckRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ConnectivityCheckResponse]: + """Performs a connectivity check between the API Management service and a given destination, and + returns metrics for the connection, as well as errors encountered while trying to establish it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param connectivity_check_request_params: Connectivity Check request parameters. Is one of the + following types: ConnectivityCheckRequest, JSON, IO[bytes] Required. + :type connectivity_check_request_params: + ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns ConnectivityCheckResponse. The + ConnectivityCheckResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ConnectivityCheckResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._perform_connectivity_check_async_initial( + resource_group_name=resource_group_name, + service_name=service_name, + connectivity_check_request_params=connectivity_check_request_params, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ConnectivityCheckResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ConnectivityCheckResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ConnectivityCheckResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operations_results_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operations_results_operations.py deleted file mode 100644 index 119323bed5ed..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operations_results_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations_results_operations import build_get_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class OperationsResultsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`operations_results` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, location: str, operation_id: str, **kwargs: Any) -> None: - """Returns operation results for long running operations executing DELETE or PATCH on the - resource. - - :param location: The name of the Azure region. Required. - :type location: str - :param operation_id: The ID of an ongoing async operation. Required. - :type operation_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_request( - location=location, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py deleted file mode 100644 index ece5e06914a3..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._outbound_network_dependencies_endpoints_operations import build_list_by_service_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class OutboundNetworkDependenciesEndpointsOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`outbound_network_dependencies_endpoints` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> _models.OutboundEnvironmentEndpointList: - """Gets the network endpoints of all outbound dependencies of a ApiManagement service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: OutboundEnvironmentEndpointList or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OutboundEnvironmentEndpointList - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OutboundEnvironmentEndpointList] = kwargs.pop("cls", None) - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("OutboundEnvironmentEndpointList", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_patch.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_patch.py index 49900f6ab120..87676c65a8f0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_patch.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_patch.py @@ -1,15 +1,15 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py deleted file mode 100644 index e3c5e39b65cb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._policy_description_operations import build_list_by_service_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class PolicyDescriptionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`policy_description` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list_by_service( - self, - resource_group_name: str, - service_name: str, - scope: Optional[Union[str, _models.PolicyScopeContract]] = None, - **kwargs: Any - ) -> _models.PolicyDescriptionCollection: - """Lists all policy descriptions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param scope: Policy scope. Known values are: "Tenant", "Product", "Api", "Operation", and - "All". Default value is None. - :type scope: str or ~azure.mgmt.apimanagement.models.PolicyScopeContract - :return: PolicyDescriptionCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyDescriptionCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyDescriptionCollection] = kwargs.pop("cls", None) - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PolicyDescriptionCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_fragment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_fragment_operations.py deleted file mode 100644 index 6863fddbe4c5..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_fragment_operations.py +++ /dev/null @@ -1,700 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._policy_fragment_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_list_references_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class PolicyFragmentOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`policy_fragment` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - orderby: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.PolicyFragmentContract"]: - """Gets all policy fragments. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either PolicyFragmentContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyFragmentCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - orderby=orderby, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyFragmentCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - id=id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - id: str, - format: Optional[Union[str, _models.PolicyFragmentContentFormat]] = None, - **kwargs: Any - ) -> _models.PolicyFragmentContract: - """Gets a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :param format: Policy fragment content format. Known values are: "xml" and "rawxml". Default - value is None. - :type format: str or ~azure.mgmt.apimanagement.models.PolicyFragmentContentFormat - :return: PolicyFragmentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyFragmentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - id=id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyFragmentContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - id: str, - parameters: Union[_models.PolicyFragmentContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyFragmentContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - id=id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - id: str, - parameters: _models.PolicyFragmentContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PolicyFragmentContract]: - """Creates or updates a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :param parameters: The policy fragment contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PolicyFragmentContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PolicyFragmentContract]: - """Creates or updates a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :param parameters: The policy fragment contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PolicyFragmentContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - id: str, - parameters: Union[_models.PolicyFragmentContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.PolicyFragmentContract]: - """Creates or updates a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :param parameters: The policy fragment contents to apply. Is either a PolicyFragmentContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either PolicyFragmentContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - id=id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("PolicyFragmentContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.PolicyFragmentContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.PolicyFragmentContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def delete(self, resource_group_name: str, service_name: str, id: str, if_match: str, **kwargs: Any) -> None: - """Deletes a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - id=id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def list_references( - self, - resource_group_name: str, - service_name: str, - id: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> _models.ResourceCollection: - """Lists policy resources that reference the policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: ResourceCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResourceCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourceCollection] = kwargs.pop("cls", None) - - _request = build_list_references_request( - resource_group_name=resource_group_name, - service_name=service_name, - id=id, - subscription_id=self._config.subscription_id, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ResourceCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py deleted file mode 100644 index 906c952356fe..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py +++ /dev/null @@ -1,521 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._policy_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class PolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.PolicyContract"]: - """Lists all the Global Policy definitions of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either PolicyContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, policy_id: Union[str, _models.PolicyIdName], **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Global policy definition in the Api Management - service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the Global policy definition of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates the global policy configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates the global policy configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates the global policy configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the global policy configuration of the Api Management Service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_operations.py deleted file mode 100644 index cfa4d78ff7a5..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_operations.py +++ /dev/null @@ -1,673 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._policy_restriction_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class PolicyRestrictionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`policy_restriction` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.PolicyRestrictionContract"]: - """Gets all policy restrictions of API Management services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either PolicyRestrictionContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyRestrictionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyRestrictionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyRestrictionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, policy_restriction_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the policy restriction in the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_restriction_id=policy_restriction_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, policy_restriction_id: str, **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Get the policy restriction of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyRestrictionContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_restriction_id=policy_restriction_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyRestrictionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - parameters: _models.PolicyRestrictionContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Creates or updates the policy restriction configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param parameters: The policy restriction to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Creates or updates the policy restriction configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param parameters: The policy restriction to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - parameters: Union[_models.PolicyRestrictionContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Creates or updates the policy restriction configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param parameters: The policy restriction to apply. Is either a PolicyRestrictionContract type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyRestrictionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyRestrictionContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_restriction_id=policy_restriction_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyRestrictionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - if_match: str, - parameters: _models.PolicyRestrictionUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Updates the policy restriction configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: The policy restriction to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Updates the policy restriction configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: The policy restriction to apply. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - if_match: str, - parameters: Union[_models.PolicyRestrictionUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Updates the policy restriction configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: The policy restriction to apply. Is either a PolicyRestrictionUpdateContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionUpdateContract or IO[bytes] - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyRestrictionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyRestrictionUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_restriction_id=policy_restriction_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyRestrictionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - if_match: Optional[str] = None, - **kwargs: Any - ) -> None: - """Deletes the policy restriction configuration of the Api Management Service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_restriction_id=policy_restriction_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_validations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_validations_operations.py deleted file mode 100644 index 8f0f46e9b9f2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_restriction_validations_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, AsyncIterator, Callable, Optional, TypeVar, Union, cast - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._policy_restriction_validations_operations import build_by_service_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class PolicyRestrictionValidationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`policy_restriction_validations` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _by_service_initial( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.OperationResultContract]: - """Validate all policies of API Management services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An instance of AsyncLROPoller that returns either OperationResultContract or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._by_service_initial( - resource_group_name=resource_group_name, - service_name=service_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationResultContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.OperationResultContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.OperationResultContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_config_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_config_operations.py deleted file mode 100644 index 6d7ccaa51e63..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_config_operations.py +++ /dev/null @@ -1,597 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._portal_config_operations import ( - build_create_or_update_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class PortalConfigOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`portal_config` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.PortalConfigContract"]: - """Lists the developer portal configurations. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either PortalConfigContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PortalConfigContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalConfigCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PortalConfigCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, portal_config_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_config_id=portal_config_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, portal_config_id: str, **kwargs: Any - ) -> _models.PortalConfigContract: - """Get the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalConfigContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_config_id=portal_config_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PortalConfigContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - portal_config_id: str, - if_match: str, - parameters: _models.PortalConfigContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalConfigContract: - """Update the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update the developer portal configuration. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - portal_config_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalConfigContract: - """Update the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update the developer portal configuration. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - portal_config_id: str, - if_match: str, - parameters: Union[_models.PortalConfigContract, IO[bytes]], - **kwargs: Any - ) -> _models.PortalConfigContract: - """Update the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update the developer portal configuration. Is either a PortalConfigContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract or IO[bytes] - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalConfigContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalConfigContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_config_id=portal_config_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalConfigContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - portal_config_id: str, - if_match: str, - parameters: _models.PortalConfigContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalConfigContract: - """Create or update the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update the developer portal configuration. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - portal_config_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalConfigContract: - """Create or update the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update the developer portal configuration. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - portal_config_id: str, - if_match: str, - parameters: Union[_models.PortalConfigContract, IO[bytes]], - **kwargs: Any - ) -> _models.PortalConfigContract: - """Create or update the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update the developer portal configuration. Is either a PortalConfigContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract or IO[bytes] - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalConfigContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalConfigContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_config_id=portal_config_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalConfigContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py deleted file mode 100644 index 6820d26269e3..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py +++ /dev/null @@ -1,792 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._portal_revision_operations import ( - build_create_or_update_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class PortalRevisionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`portal_revision` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.PortalRevisionContract"]: - """Lists developer portal's revisions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: .. list-table:: - :header-rows: 1 - - * - Field - - Supported operators - - Supported functions - * - - - - |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - |isCurrent | eq, ne | |. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either PortalRevisionContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalRevisionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PortalRevisionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, portal_revision_id: str, **kwargs: Any - ) -> bool: - """Gets the developer portal revision specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_revision_id=portal_revision_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, portal_revision_id: str, **kwargs: Any - ) -> _models.PortalRevisionContract: - """Gets the developer portal's revision specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :return: PortalRevisionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalRevisionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalRevisionContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_revision_id=portal_revision_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PortalRevisionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - parameters: Union[_models.PortalRevisionContract, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalRevisionContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_revision_id=portal_revision_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - parameters: _models.PortalRevisionContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PortalRevisionContract]: - """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` - property indicates if the revision is publicly accessible. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PortalRevisionContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PortalRevisionContract]: - """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` - property indicates if the revision is publicly accessible. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :param parameters: Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PortalRevisionContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - parameters: Union[_models.PortalRevisionContract, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.PortalRevisionContract]: - """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` - property indicates if the revision is publicly accessible. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :param parameters: Is either a PortalRevisionContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract or IO[bytes] - :return: An instance of AsyncLROPoller that returns either PortalRevisionContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalRevisionContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - portal_revision_id=portal_revision_id, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("PortalRevisionContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.PortalRevisionContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.PortalRevisionContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - if_match: str, - parameters: Union[_models.PortalRevisionContract, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalRevisionContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_revision_id=portal_revision_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 200: - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - if_match: str, - parameters: _models.PortalRevisionContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PortalRevisionContract]: - """Updates the description of specified portal revision or makes it current. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PortalRevisionContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PortalRevisionContract]: - """Updates the description of specified portal revision or makes it current. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PortalRevisionContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - if_match: str, - parameters: Union[_models.PortalRevisionContract, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.PortalRevisionContract]: - """Updates the description of specified portal revision or makes it current. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Is either a PortalRevisionContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract or IO[bytes] - :return: An instance of AsyncLROPoller that returns either PortalRevisionContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalRevisionContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - portal_revision_id=portal_revision_id, - if_match=if_match, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PortalRevisionContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.PortalRevisionContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.PortalRevisionContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py deleted file mode 100644 index bb1c096437b2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._portal_settings_operations import build_list_by_service_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class PortalSettingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`portal_settings` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> _models.PortalSettingsCollection: - """Lists a collection of portalsettings defined within a service instance.. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: PortalSettingsCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSettingsCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalSettingsCollection] = kwargs.pop("cls", None) - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalSettingsCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_private_endpoint_connection_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_private_endpoint_connection_operations.py deleted file mode 100644 index 5657a13a2e8b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_private_endpoint_connection_operations.py +++ /dev/null @@ -1,680 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._private_endpoint_connection_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_by_name_request, - build_get_private_link_resource_request, - build_list_by_service_request, - build_list_private_link_resources_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class PrivateEndpointConnectionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`private_endpoint_connection` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.PrivateEndpointConnection"]: - """Lists all private endpoint connections of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either PrivateEndpointConnection or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_by_name( - self, resource_group_name: str, service_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Gets the details of the Private Endpoint Connection specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param private_endpoint_connection_name: Name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - - _request = build_get_by_name_request( - resource_group_name=resource_group_name, - service_name=service_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection_request: Union[_models.PrivateEndpointConnectionRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(private_endpoint_connection_request, (IOBase, bytes)): - _content = private_endpoint_connection_request - else: - _json = self._serialize.body(private_endpoint_connection_request, "PrivateEndpointConnectionRequest") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection_request: _models.PrivateEndpointConnectionRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: - """Creates a new Private Endpoint Connection or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param private_endpoint_connection_name: Name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection_request: Required. - :type private_endpoint_connection_request: - ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: - """Creates a new Private Endpoint Connection or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param private_endpoint_connection_name: Name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection_request: Required. - :type private_endpoint_connection_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection_request: Union[_models.PrivateEndpointConnectionRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: - """Creates a new Private Endpoint Connection or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param private_endpoint_connection_name: Name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection_request: Is either a PrivateEndpointConnectionRequest type - or a IO[bytes] type. Required. - :type private_endpoint_connection_request: - ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequest or IO[bytes] - :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - private_endpoint_connection_name=private_endpoint_connection_name, - private_endpoint_connection_request=private_endpoint_connection_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.PrivateEndpointConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.PrivateEndpointConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, service_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, service_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified Private Endpoint Connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param private_endpoint_connection_name: Name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - service_name=service_name, - private_endpoint_connection_name=private_endpoint_connection_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace_async - async def list_private_link_resources( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> _models.PrivateLinkResourceListResult: - """Gets the private link resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: PrivateLinkResourceListResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PrivateLinkResourceListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) - - _request = build_list_private_link_resources_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateLinkResourceListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_private_link_resource( - self, resource_group_name: str, service_name: str, private_link_sub_resource_name: str, **kwargs: Any - ) -> _models.PrivateLinkResource: - """Gets the private link resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param private_link_sub_resource_name: Name of the private link resource. Required. - :type private_link_sub_resource_name: str - :return: PrivateLinkResource or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PrivateLinkResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) - - _request = build_get_private_link_resource_request( - resource_group_name=resource_group_name, - service_name=service_name, - private_link_sub_resource_name=private_link_sub_resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_link_operations.py deleted file mode 100644 index 5b0a90ec3dd5..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_link_operations.py +++ /dev/null @@ -1,471 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._product_api_link_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ProductApiLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`product_api_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ProductApiLinkContract"]: - """Lists a collection of the API links associated with a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| apiId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ProductApiLinkContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductApiLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductApiLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ProductApiLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, product_id: str, api_link_id: str, **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Gets the API link for the product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - api_link_id: str, - parameters: _models.ProductApiLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Adds an API to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - api_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Adds an API to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - api_link_id: str, - parameters: Union[_models.ProductApiLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Adds an API to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Is either a ProductApiLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract or IO[bytes] - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductApiLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ProductApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, product_id: str, api_link_id: str, **kwargs: Any - ) -> None: - """Deletes the specified API from the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py deleted file mode 100644 index a3a1688bf59e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._product_api_operations import ( - build_check_entity_exists_request, - build_create_or_update_request, - build_delete_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ProductApiOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`product_api` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ApiContract"]: - """Lists a collection of the APIs associated with a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def check_entity_exists( - self, resource_group_name: str, service_name: str, product_id: str, api_id: str, **kwargs: Any - ) -> bool: - """Checks that API entity specified by identifier is associated with the Product entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def create_or_update( - self, resource_group_name: str, service_name: str, product_id: str, api_id: str, **kwargs: Any - ) -> _models.ApiContract: - """Adds an API to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, product_id: str, api_id: str, **kwargs: Any - ) -> None: - """Deletes the specified API from the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_link_operations.py deleted file mode 100644 index b3ba3f64e917..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_link_operations.py +++ /dev/null @@ -1,471 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._product_group_link_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ProductGroupLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`product_group_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ProductGroupLinkContract"]: - """Lists a collection of the group links associated with a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| groupId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ProductGroupLinkContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductGroupLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductGroupLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ProductGroupLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, product_id: str, group_link_id: str, **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Gets the group link for the product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - group_link_id=group_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductGroupLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - group_link_id: str, - parameters: _models.ProductGroupLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Adds a group to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - group_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Adds a group to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - group_link_id: str, - parameters: Union[_models.ProductGroupLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Adds a group to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :param parameters: Create or update parameters. Is either a ProductGroupLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract or IO[bytes] - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductGroupLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - group_link_id=group_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ProductGroupLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, product_id: str, group_link_id: str, **kwargs: Any - ) -> None: - """Deletes the specified group from the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - group_link_id=group_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py deleted file mode 100644 index 803775ff70ee..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py +++ /dev/null @@ -1,371 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._product_group_operations import ( - build_check_entity_exists_request, - build_create_or_update_request, - build_delete_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ProductGroupOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`product_group` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.GroupContract"]: - """Lists the collection of developer groups associated with the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | |
| displayName | filter | eq, ne | |
| - description | filter | eq, ne | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GroupContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GroupContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("GroupCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def check_entity_exists( - self, resource_group_name: str, service_name: str, product_id: str, group_id: str, **kwargs: Any - ) -> bool: - """Checks that Group entity specified by identifier is associated with the Product entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def create_or_update( - self, resource_group_name: str, service_name: str, product_id: str, group_id: str, **kwargs: Any - ) -> _models.GroupContract: - """Adds the association between the specified developer group with the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, product_id: str, group_id: str, **kwargs: Any - ) -> None: - """Deletes the association between the specified group and product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py deleted file mode 100644 index 3833e05a46b1..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py +++ /dev/null @@ -1,830 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._product_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_list_by_tags_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ProductOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`product` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - expand_groups: Optional[bool] = None, - tags: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ProductContract"]: - """Lists a collection of products in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| state | filter | eq | |
| groups | expand | | |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param expand_groups: When set to true, the response contains an array of groups that have - visibility to the product. The default is false. Default value is None. - :type expand_groups: bool - :param tags: Products which are part of a specific tag. Default value is None. - :type tags: str - :return: An iterator like instance of either ProductContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - expand_groups=expand_groups, - tags=tags, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ProductCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any - ) -> _models.ProductContract: - """Gets the details of the product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - parameters: _models.ProductContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Creates or Updates a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Creates or Updates a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - parameters: Union[_models.ProductContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ProductContract: - """Creates or Updates a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create or update parameters. Is either a ProductContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - parameters: _models.ProductUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Update existing product details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Update existing product details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - parameters: Union[_models.ProductUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.ProductContract: - """Update existing product details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a ProductUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters or IO[bytes] - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - delete_subscriptions: Optional[bool] = None, - **kwargs: Any - ) -> None: - """Delete product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param delete_subscriptions: Delete existing subscriptions associated with the product or not. - Default value is None. - :type delete_subscriptions: bool - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - delete_subscriptions=delete_subscriptions, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_by_tags( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - include_not_tagged_products: Optional[bool] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagResourceContract"]: - """Lists a collection of products associated with tags. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| state | filter | eq | substringof, contains, startswith, endswith |
. - Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param include_not_tagged_products: Include not tagged Products. Default value is None. - :type include_not_tagged_products: bool - :return: An iterator like instance of either TagResourceContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagResourceCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_tags_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - include_not_tagged_products=include_not_tagged_products, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagResourceCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py deleted file mode 100644 index 77f4351dbbe4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py +++ /dev/null @@ -1,556 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._product_policy_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ProductPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`product_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any - ) -> AsyncItemPaged["_models.PolicyContract"]: - """Get the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: An iterator like instance of either PolicyContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Get the ETag of the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py deleted file mode 100644 index f61cf3e63f50..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py +++ /dev/null @@ -1,174 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._product_subscriptions_operations import build_list_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ProductSubscriptionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`product_subscriptions` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.SubscriptionContract"]: - """Lists the collection of subscriptions to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| state | filter | eq | |
| user | expand | | - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either SubscriptionContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("SubscriptionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wiki_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wiki_operations.py deleted file mode 100644 index e33a107f2aba..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wiki_operations.py +++ /dev/null @@ -1,582 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._product_wiki_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ProductWikiOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`product_wiki` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any - ) -> _models.WikiContract: - """Gets the details of the Wiki for a Product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WikiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - parameters: _models.WikiContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Creates a new Wiki for a Product or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Creates a new Wiki for a Product or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - parameters: Union[_models.WikiContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.WikiContract: - """Creates a new Wiki for a Product or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create parameters. Is either a WikiContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "WikiContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WikiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - parameters: _models.WikiUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Updates the details of the Wiki for a Product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Wiki Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Updates the details of the Wiki for a Product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Wiki Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - parameters: Union[_models.WikiUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.WikiContract: - """Updates the details of the Wiki for a Product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Wiki Update parameters. Is either a WikiUpdateContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract or IO[bytes] - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "WikiUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WikiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, product_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified Wiki from a Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wikis_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wikis_operations.py deleted file mode 100644 index 81d5dec2de04..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_wikis_operations.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._product_wikis_operations import build_list_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ProductWikisOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`product_wikis` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.WikiContract"]: - """Gets the details of the Wiki for a Product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | eq | contains |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either WikiContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.WikiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WikiCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("WikiCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py deleted file mode 100644 index 91418bc9e405..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py +++ /dev/null @@ -1,285 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._quota_by_counter_keys_operations import build_list_by_service_request, build_update_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class QuotaByCounterKeysOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`quota_by_counter_keys` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list_by_service( - self, resource_group_name: str, service_name: str, quota_counter_key: str, **kwargs: Any - ) -> _models.QuotaCounterCollection: - """Lists a collection of current quota counter periods associated with the counter-key configured - in the policy on the specified service instance. The api does not support paging yet. - - .. seealso:: - - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-product-with-rules#a-namepolicies-ato-configure-call-rate-limit-and-quota-policies - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :return: QuotaCounterCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.QuotaCounterCollection] = kwargs.pop("cls", None) - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - quota_counter_key=quota_counter_key, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("QuotaCounterCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - quota_counter_key: str, - parameters: _models.QuotaCounterValueUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.QuotaCounterCollection: - """Updates all the quota counter values specified with the existing quota counter key to a value - in the specified service instance. This should be used for reset of the quota counter values. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param parameters: The value of the quota counter to be applied to all quota counter periods. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: QuotaCounterCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - quota_counter_key: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.QuotaCounterCollection: - """Updates all the quota counter values specified with the existing quota counter key to a value - in the specified service instance. This should be used for reset of the quota counter values. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param parameters: The value of the quota counter to be applied to all quota counter periods. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: QuotaCounterCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - quota_counter_key: str, - parameters: Union[_models.QuotaCounterValueUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.QuotaCounterCollection: - """Updates all the quota counter values specified with the existing quota counter key to a value - in the specified service instance. This should be used for reset of the quota counter values. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param parameters: The value of the quota counter to be applied to all quota counter periods. - Is either a QuotaCounterValueUpdateContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract or IO[bytes] - :return: QuotaCounterCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.QuotaCounterCollection] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "QuotaCounterValueUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - quota_counter_key=quota_counter_key, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("QuotaCounterCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py deleted file mode 100644 index 61c277bab60e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py +++ /dev/null @@ -1,295 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._quota_by_period_keys_operations import build_get_request, build_update_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class QuotaByPeriodKeysOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`quota_by_period_keys` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, quota_counter_key: str, quota_period_key: str, **kwargs: Any - ) -> _models.QuotaCounterContract: - """Gets the value of the quota counter associated with the counter-key in the policy for the - specific period in service instance. - - .. seealso:: - - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-product-with-rules#a-namepolicies-ato-configure-call-rate-limit-and-quota-policies - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param quota_period_key: Quota period key identifier. Required. - :type quota_period_key: str - :return: QuotaCounterContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.QuotaCounterContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - quota_counter_key=quota_counter_key, - quota_period_key=quota_period_key, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("QuotaCounterContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - quota_counter_key: str, - quota_period_key: str, - parameters: _models.QuotaCounterValueUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.QuotaCounterContract: - """Updates an existing quota counter value in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param quota_period_key: Quota period key identifier. Required. - :type quota_period_key: str - :param parameters: The value of the Quota counter to be applied on the specified period. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: QuotaCounterContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - quota_counter_key: str, - quota_period_key: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.QuotaCounterContract: - """Updates an existing quota counter value in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param quota_period_key: Quota period key identifier. Required. - :type quota_period_key: str - :param parameters: The value of the Quota counter to be applied on the specified period. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: QuotaCounterContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - quota_counter_key: str, - quota_period_key: str, - parameters: Union[_models.QuotaCounterValueUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.QuotaCounterContract: - """Updates an existing quota counter value in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param quota_period_key: Quota period key identifier. Required. - :type quota_period_key: str - :param parameters: The value of the Quota counter to be applied on the specified period. Is - either a QuotaCounterValueUpdateContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract or IO[bytes] - :return: QuotaCounterContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.QuotaCounterContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "QuotaCounterValueUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - quota_counter_key=quota_counter_key, - quota_period_key=quota_period_key, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("QuotaCounterContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py deleted file mode 100644 index 4ba4c6f8613c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._region_operations import build_list_by_service_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class RegionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`region` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.RegionContract"]: - """Lists all azure regions in which the service exists. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either RegionContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.RegionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RegionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("RegionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py deleted file mode 100644 index b53611ee81d8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py +++ /dev/null @@ -1,1006 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -import datetime -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._reports_operations import ( - build_list_by_api_request, - build_list_by_geo_request, - build_list_by_operation_request, - build_list_by_product_request, - build_list_by_request_request, - build_list_by_subscription_request, - build_list_by_time_request, - build_list_by_user_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ReportsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`reports` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ReportRecordContract"]: - """Lists report records by API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: The filter to apply on the operation. Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - orderby=orderby, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_user( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ReportRecordContract"]: - """Lists report records by User. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter | ge, le | |
| displayName | select, orderBy | | |
| userId | - select, filter | eq | |
| apiRegion | filter | eq | |
| productId | filter | - eq | |
| subscriptionId | filter | eq | |
| apiId | filter | eq | | -
| operationId | filter | eq | |
| callCountSuccess | select, orderBy | | - |
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, - orderBy | | |
| callCountOther | select, orderBy | | |
| - callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | | -
| cacheHitsCount | select | | |
| cacheMissCount | select | | | -
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | -
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. - Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_user_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - orderby=orderby, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_operation( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ReportRecordContract"]: - """Lists report records by API Operations. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter | ge, le | |
| displayName | select, orderBy | | |
| apiRegion | - filter | eq | |
| userId | filter | eq | |
| productId | filter | eq | | -
| subscriptionId | filter | eq | |
| apiId | filter | eq | |
| - operationId | select, filter | eq | |
| callCountSuccess | select, orderBy | | - |
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, - orderBy | | |
| callCountOther | select, orderBy | | |
| - callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | | -
| cacheHitsCount | select | | |
| cacheMissCount | select | | | -
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | -
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. - Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - orderby=orderby, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ReportRecordContract"]: - """Lists report records by Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter | ge, le | |
| displayName | select, orderBy | | |
| apiRegion | - filter | eq | |
| userId | filter | eq | |
| productId | select, filter | eq - | |
| subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | - | |
| callCountBlocked | select, orderBy | | |
| callCountFailed | - select, orderBy | | |
| callCountOther | select, orderBy | | |
| - callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | | -
| cacheHitsCount | select | | |
| cacheMissCount | select | | | -
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | -
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. - Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - orderby=orderby, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_geo( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ReportRecordContract"]: - """Lists report records by geography. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter | ge, le | |
| country | select | | |
| region | select | | - |
| zip | select | | |
| apiRegion | filter | eq | |
| userId | - filter | eq | |
| productId | filter | eq | |
| subscriptionId | filter | eq - | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| - callCountSuccess | select | | |
| callCountBlocked | select | | |
| - callCountFailed | select | | |
| callCountOther | select | | |
| - bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| - cacheMissCount | select | | |
| apiTimeAvg | select | | |
| - apiTimeMin | select | | |
| apiTimeMax | select | | |
| - serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - serviceTimeMax | select | | |
. Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_geo_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ReportRecordContract"]: - """Lists report records by subscription. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter | ge, le | |
| displayName | select, orderBy | | |
| apiRegion | - filter | eq | |
| userId | select, filter | eq | |
| productId | select, - filter | eq | |
| subscriptionId | select, filter | eq | |
| callCountSuccess - | select, orderBy | | |
| callCountBlocked | select, orderBy | | |
| - callCountFailed | select, orderBy | | |
| callCountOther | select, orderBy | | - |
| callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | - | |
| cacheHitsCount | select | | |
| cacheMissCount | select | | - |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | -
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. - Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - orderby=orderby, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_time( - self, - resource_group_name: str, - service_name: str, - filter: str, - interval: datetime.timedelta, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ReportRecordContract"]: - """Lists report records by Time. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter, select | ge, le | |
| interval | select | | |
| apiRegion | - filter | eq | |
| userId | filter | eq | |
| productId | filter | eq | | -
| subscriptionId | filter | eq | |
| apiId | filter | eq | |
| - operationId | filter | eq | |
| callCountSuccess | select | | |
| - callCountBlocked | select | | |
| callCountFailed | select | | |
| - callCountOther | select | | |
| bandwidth | select, orderBy | | |
| - cacheHitsCount | select | | |
| cacheMissCount | select | | |
| - apiTimeAvg | select | | |
| apiTimeMin | select | | |
| apiTimeMax | - select | | |
| serviceTimeAvg | select | | |
| serviceTimeMin | - select | | |
| serviceTimeMax | select | | |
. Required. - :type filter: str - :param interval: By time interval. Interval must be multiple of 15 minutes and may not be zero. - The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This - code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new - TimeSpan(hours, minutes, seconds)). Required. - :type interval: ~datetime.timedelta - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_time_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - interval=interval, - top=top, - skip=skip, - orderby=orderby, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_request( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.RequestReportRecordContract"]: - """Lists report records by Request. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter | ge, le | |
| apiId | filter | eq | |
| operationId | filter | eq | - |
| productId | filter | eq | |
| userId | filter | eq | |
| apiRegion | - filter | eq | |
| subscriptionId | filter | eq | |
. Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either RequestReportRecordContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.RequestReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RequestReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_request_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("RequestReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py deleted file mode 100644 index c80a98c89719..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py +++ /dev/null @@ -1,470 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._sign_in_settings_operations import ( - build_create_or_update_request, - build_get_entity_tag_request, - build_get_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class SignInSettingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`sign_in_settings` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the SignInSettings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.PortalSigninSettings: - """Get Sign In Settings for the Portal. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: PortalSigninSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalSigninSettings] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PortalSigninSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: _models.PortalSigninSettings, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Update Sign-In settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Sign-In settings. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Update Sign-In settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Sign-In settings. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: Union[_models.PortalSigninSettings, IO[bytes]], - **kwargs: Any - ) -> None: - """Update Sign-In settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Sign-In settings. Is either a PortalSigninSettings type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings or IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalSigninSettings") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: _models.PortalSigninSettings, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalSigninSettings: - """Create or Update Sign-In settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalSigninSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalSigninSettings: - """Create or Update Sign-In settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalSigninSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.PortalSigninSettings, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PortalSigninSettings: - """Create or Update Sign-In settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Is either a PortalSigninSettings type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PortalSigninSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalSigninSettings] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalSigninSettings") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalSigninSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py deleted file mode 100644 index 47cfed02bf8f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py +++ /dev/null @@ -1,470 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._sign_up_settings_operations import ( - build_create_or_update_request, - build_get_entity_tag_request, - build_get_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class SignUpSettingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`sign_up_settings` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the SignUpSettings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.PortalSignupSettings: - """Get Sign Up Settings for the Portal. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: PortalSignupSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalSignupSettings] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PortalSignupSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: _models.PortalSignupSettings, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Sign-Up settings. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Sign-Up settings. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: Union[_models.PortalSignupSettings, IO[bytes]], - **kwargs: Any - ) -> None: - """Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Sign-Up settings. Is either a PortalSignupSettings type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings or IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalSignupSettings") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: _models.PortalSignupSettings, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalSignupSettings: - """Create or Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalSignupSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalSignupSettings: - """Create or Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalSignupSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.PortalSignupSettings, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PortalSignupSettings: - """Create or Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Is either a PortalSignupSettings type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PortalSignupSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalSignupSettings] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalSignupSettings") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalSignupSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py deleted file mode 100644 index e0fd5ca09372..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py +++ /dev/null @@ -1,968 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._subscription_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_request, - build_list_secrets_request, - build_regenerate_primary_key_request, - build_regenerate_secondary_key_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class SubscriptionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`subscription` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.SubscriptionContract"]: - """Lists all subscriptions of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| state | filter | eq | |
| user | expand | | - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either SubscriptionContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("SubscriptionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the apimanagement subscription specified by its - identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any - ) -> _models.SubscriptionContract: - """Gets the specified Subscription entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - sid: str, - parameters: _models.SubscriptionCreateParameters, - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Creates or updates the subscription of specified user to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - sid: str, - parameters: IO[bytes], - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Creates or updates the subscription of specified user to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - sid: str, - parameters: Union[_models.SubscriptionCreateParameters, IO[bytes]], - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> _models.SubscriptionContract: - """Creates or updates the subscription of specified user to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param parameters: Create parameters. Is either a SubscriptionCreateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters or IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SubscriptionCreateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - notify=notify, - if_match=if_match, - app_type=app_type, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - sid: str, - if_match: str, - parameters: _models.SubscriptionUpdateParameters, - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Updates the details of a subscription specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - sid: str, - if_match: str, - parameters: IO[bytes], - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Updates the details of a subscription specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - sid: str, - if_match: str, - parameters: Union[_models.SubscriptionUpdateParameters, IO[bytes]], - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> _models.SubscriptionContract: - """Updates the details of a subscription specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a SubscriptionUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters or IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SubscriptionUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - if_match=if_match, - notify=notify, - app_type=app_type, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete(self, resource_group_name: str, service_name: str, sid: str, if_match: str, **kwargs: Any) -> None: - """Deletes the specified subscription. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def regenerate_primary_key( - self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any - ) -> None: - """Regenerates primary key of existing subscription of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_primary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def regenerate_secondary_key( - self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any - ) -> None: - """Regenerates secondary key of existing subscription of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_secondary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def list_secrets( - self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any - ) -> _models.SubscriptionKeysContract: - """Gets the specified Subscription keys. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: SubscriptionKeysContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionKeysContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionKeysContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionKeysContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_api_link_operations.py deleted file mode 100644 index c7e1bba44880..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_api_link_operations.py +++ /dev/null @@ -1,470 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._tag_api_link_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class TagApiLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`tag_api_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagApiLinkContract"]: - """Lists a collection of the API links associated with a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| apiId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagApiLinkContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagApiLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagApiLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagApiLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, **kwargs: Any - ) -> _models.TagApiLinkContract: - """Gets the API link for the tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - api_link_id: str, - parameters: _models.TagApiLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Adds an API to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - api_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Adds an API to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - api_link_id: str, - parameters: Union[_models.TagApiLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Adds an API to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Is either a TagApiLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract or IO[bytes] - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagApiLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, **kwargs: Any - ) -> None: - """Deletes the specified API from the specified tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operation_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operation_link_operations.py deleted file mode 100644 index e9152c78b5f9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operation_link_operations.py +++ /dev/null @@ -1,471 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._tag_operation_link_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class TagOperationLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`tag_operation_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagOperationLinkContract"]: - """Lists a collection of the operation links associated with a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| operationId - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagOperationLinkContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagOperationLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagOperationLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagOperationLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, tag_id: str, operation_link_id: str, **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Gets the operation link for the tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - operation_link_id=operation_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagOperationLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - operation_link_id: str, - parameters: _models.TagOperationLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Adds an operation to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - operation_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Adds an operation to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - operation_link_id: str, - parameters: Union[_models.TagOperationLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Adds an operation to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :param parameters: Create or update parameters. Is either a TagOperationLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract or IO[bytes] - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagOperationLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - operation_link_id=operation_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagOperationLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, tag_id: str, operation_link_id: str, **kwargs: Any - ) -> None: - """Deletes the specified operation from the specified tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - operation_link_id=operation_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py deleted file mode 100644 index b03702378eb2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py +++ /dev/null @@ -1,1892 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._tag_operations import ( - build_assign_to_api_request, - build_assign_to_operation_request, - build_assign_to_product_request, - build_create_or_update_request, - build_delete_request, - build_detach_from_api_request, - build_detach_from_operation_request, - build_detach_from_product_request, - build_get_by_api_request, - build_get_by_operation_request, - build_get_by_product_request, - build_get_entity_state_by_api_request, - build_get_entity_state_by_operation_request, - build_get_entity_state_by_product_request, - build_get_entity_state_request, - build_get_request, - build_list_by_api_request, - build_list_by_operation_request, - build_list_by_product_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class TagOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`tag` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_operation( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagContract"]: - """Lists all Tags associated with the Operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_state_by_operation( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_state_by_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get_by_operation( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Get tag associated with the Operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_get_by_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def assign_to_operation( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Assign tag to the Operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_assign_to_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def detach_from_operation( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any - ) -> None: - """Detach the tag from the Operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_detach_from_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagContract"]: - """Lists all Tags associated with the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_state_by_api( - self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_state_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get_by_api( - self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Get tag associated with the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_get_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def assign_to_api( - self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Assign tag to the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_assign_to_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def detach_from_api( - self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any - ) -> None: - """Detach the tag from the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_detach_from_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagContract"]: - """Lists all Tags associated with the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_state_by_product( - self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_state_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get_by_product( - self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Get tag associated with the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_get_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def assign_to_product( - self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Assign tag to the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_assign_to_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def detach_from_product( - self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any - ) -> None: - """Detach the tag from the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_detach_from_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - scope: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagContract"]: - """Lists a collection of tags defined within a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param scope: Scope like 'apis', 'products' or 'apis/{apiId}. Default value is None. - :type scope: str - :return: An iterator like instance of either TagContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_state(self, resource_group_name: str, service_name: str, tag_id: str, **kwargs: Any) -> bool: - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_state_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get(self, resource_group_name: str, service_name: str, tag_id: str, **kwargs: Any) -> _models.TagContract: - """Gets the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - parameters: _models.TagCreateUpdateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Creates a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Creates a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - parameters: Union[_models.TagCreateUpdateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.TagContract: - """Creates a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param parameters: Create parameters. Is either a TagCreateUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagCreateUpdateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - if_match: str, - parameters: _models.TagCreateUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Updates the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Updates the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - if_match: str, - parameters: Union[_models.TagCreateUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.TagContract: - """Updates the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a TagCreateUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or IO[bytes] - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagCreateUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, tag_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific tag of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_product_link_operations.py deleted file mode 100644 index b57550525437..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_product_link_operations.py +++ /dev/null @@ -1,471 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._tag_product_link_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class TagProductLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`tag_product_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagProductLinkContract"]: - """Lists a collection of the product links associated with a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| productId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagProductLinkContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagProductLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagProductLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagProductLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, **kwargs: Any - ) -> _models.TagProductLinkContract: - """Gets the product link for the tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - product_link_id=product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagProductLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - product_link_id: str, - parameters: _models.TagProductLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Adds a product to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - product_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Adds a product to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - product_link_id: str, - parameters: Union[_models.TagProductLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Adds a product to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :param parameters: Create or update parameters. Is either a TagProductLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract or IO[bytes] - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagProductLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - product_link_id=product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagProductLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, **kwargs: Any - ) -> None: - """Deletes the specified product from the specified tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - product_link_id=product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py deleted file mode 100644 index 6a30781df48d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py +++ /dev/null @@ -1,172 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._tag_resource_operations import build_list_by_service_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class TagResourceOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`tag_resource` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagResourceContract"]: - """Lists a collection of resources associated with tags. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| aid | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| state | filter | eq | |
| isCurrent - | filter | eq | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagResourceContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagResourceCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagResourceCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py deleted file mode 100644 index a7318be1a6fc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._tenant_access_git_operations import ( - build_regenerate_primary_key_request, - build_regenerate_secondary_key_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class TenantAccessGitOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`tenant_access_git` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def regenerate_primary_key( - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> None: - """Regenerate primary access key for GIT. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_primary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def regenerate_secondary_key( - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> None: - """Regenerate secondary access key for GIT. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_secondary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py deleted file mode 100644 index af56ef20b4d0..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py +++ /dev/null @@ -1,809 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._tenant_access_operations import ( - build_create_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_list_secrets_request, - build_regenerate_primary_key_request, - build_regenerate_secondary_key_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class TenantAccessOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`tenant_access` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, filter: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.AccessInformationContract"]: - """Returns list of access infos - for Git and Management endpoints. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: Not used. Default value is None. - :type filter: str - :return: An iterator like instance of either AccessInformationContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.AccessInformationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AccessInformationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AccessInformationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> bool: - """Tenant access metadata. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> _models.AccessInformationContract: - """Get tenant access information details without secrets. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AccessInformationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AccessInformationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create( - self, - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - if_match: str, - parameters: _models.AccessInformationCreateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AccessInformationContract: - """Update tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationCreateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create( - self, - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AccessInformationContract: - """Update tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create( - self, - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - if_match: str, - parameters: Union[_models.AccessInformationCreateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.AccessInformationContract: - """Update tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Parameters supplied to retrieve the Tenant Access Information. Is either a - AccessInformationCreateParameters type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationCreateParameters or - IO[bytes] - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AccessInformationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AccessInformationCreateParameters") - - _request = build_create_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AccessInformationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - if_match: str, - parameters: _models.AccessInformationUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AccessInformationContract: - """Update tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AccessInformationContract: - """Update tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - if_match: str, - parameters: Union[_models.AccessInformationUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.AccessInformationContract: - """Update tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Parameters supplied to retrieve the Tenant Access Information. Is either a - AccessInformationUpdateParameters type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationUpdateParameters or - IO[bytes] - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AccessInformationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AccessInformationUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AccessInformationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def regenerate_primary_key( - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> None: - """Regenerate primary access key. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_primary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def regenerate_secondary_key( - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> None: - """Regenerate secondary access key. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_secondary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def list_secrets( - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> _models.AccessInformationSecretsContract: - """Get tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: AccessInformationSecretsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationSecretsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AccessInformationSecretsContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AccessInformationSecretsContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py deleted file mode 100644 index 6b5c6b740622..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py +++ /dev/null @@ -1,827 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._tenant_configuration_operations import ( - build_deploy_request, - build_get_sync_state_request, - build_save_request, - build_validate_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class TenantConfigurationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`tenant_configuration` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _deploy_initial( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: Union[_models.DeployConfigurationParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DeployConfigurationParameters") - - _request = build_deploy_request( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_deploy( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: _models.DeployConfigurationParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.OperationResultContract]: - """This operation applies changes from the specified Git branch to the configuration database. - This is a long running operation and could take several minutes to complete. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-deploy-any-service-configuration-changes-to-the-api-management-service-instance - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Deploy Configuration parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either OperationResultContract or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_deploy( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.OperationResultContract]: - """This operation applies changes from the specified Git branch to the configuration database. - This is a long running operation and could take several minutes to complete. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-deploy-any-service-configuration-changes-to-the-api-management-service-instance - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Deploy Configuration parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either OperationResultContract or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_deploy( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: Union[_models.DeployConfigurationParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.OperationResultContract]: - """This operation applies changes from the specified Git branch to the configuration database. - This is a long running operation and could take several minutes to complete. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-deploy-any-service-configuration-changes-to-the-api-management-service-instance - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Deploy Configuration parameters. Is either a DeployConfigurationParameters - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either OperationResultContract or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._deploy_initial( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationResultContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.OperationResultContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.OperationResultContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _save_initial( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: Union[_models.SaveConfigurationParameter, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SaveConfigurationParameter") - - _request = build_save_request( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_save( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: _models.SaveConfigurationParameter, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.OperationResultContract]: - """This operation creates a commit with the current configuration snapshot to the specified branch - in the repository. This is a long running operation and could take several minutes to complete. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-save-the-service-configuration-to-the-git-repository - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Save Configuration parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SaveConfigurationParameter - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either OperationResultContract or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_save( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.OperationResultContract]: - """This operation creates a commit with the current configuration snapshot to the specified branch - in the repository. This is a long running operation and could take several minutes to complete. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-save-the-service-configuration-to-the-git-repository - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Save Configuration parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either OperationResultContract or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_save( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: Union[_models.SaveConfigurationParameter, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.OperationResultContract]: - """This operation creates a commit with the current configuration snapshot to the specified branch - in the repository. This is a long running operation and could take several minutes to complete. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-save-the-service-configuration-to-the-git-repository - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Save Configuration parameters. Is either a SaveConfigurationParameter type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SaveConfigurationParameter or IO[bytes] - :return: An instance of AsyncLROPoller that returns either OperationResultContract or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._save_initial( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationResultContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.OperationResultContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.OperationResultContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _validate_initial( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: Union[_models.DeployConfigurationParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DeployConfigurationParameters") - - _request = build_validate_request( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_validate( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: _models.DeployConfigurationParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.OperationResultContract]: - """This operation validates the changes in the specified Git branch. This is a long running - operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Validate Configuration parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either OperationResultContract or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_validate( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.OperationResultContract]: - """This operation validates the changes in the specified Git branch. This is a long running - operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Validate Configuration parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either OperationResultContract or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_validate( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: Union[_models.DeployConfigurationParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.OperationResultContract]: - """This operation validates the changes in the specified Git branch. This is a long running - operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Validate Configuration parameters. Is either a DeployConfigurationParameters - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either OperationResultContract or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._validate_initial( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationResultContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.OperationResultContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.OperationResultContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get_sync_state( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - **kwargs: Any - ) -> _models.TenantConfigurationSyncStateContract: - """Gets the status of the most recent synchronization between the configuration database and the - Git repository. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :return: TenantConfigurationSyncStateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TenantConfigurationSyncStateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TenantConfigurationSyncStateContract] = kwargs.pop("cls", None) - - _request = build_get_sync_state_request( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TenantConfigurationSyncStateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py deleted file mode 100644 index 3ea3542ca8fb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py +++ /dev/null @@ -1,219 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._tenant_settings_operations import build_get_request, build_list_by_service_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class TenantSettingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`tenant_settings` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, filter: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.TenantSettingsContract"]: - """Public settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: Not used. Default value is None. - :type filter: str - :return: An iterator like instance of either TenantSettingsContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TenantSettingsContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TenantSettingsCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TenantSettingsCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - settings_type: Union[str, _models.SettingsTypeName], - **kwargs: Any - ) -> _models.TenantSettingsContract: - """Get tenant settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param settings_type: The identifier of the settings. "public" Required. - :type settings_type: str or ~azure.mgmt.apimanagement.models.SettingsTypeName - :return: TenantSettingsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TenantSettingsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TenantSettingsContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - settings_type=settings_type, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TenantSettingsContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py deleted file mode 100644 index 1fdf50cbf35e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._user_confirmation_password_operations import build_send_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class UserConfirmationPasswordOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`user_confirmation_password` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def send( - self, - resource_group_name: str, - service_name: str, - user_id: str, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> None: - """Sends confirmation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_send_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - app_type=app_type, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py deleted file mode 100644 index e4a58f109b75..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._user_group_operations import build_list_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class UserGroupOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`user_group` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - user_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.GroupContract"]: - """Lists all user groups. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions - |
|-------------|------------------------|-----------------------------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GroupContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GroupContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("GroupCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py deleted file mode 100644 index eba4cefd7680..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._user_identities_operations import build_list_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class UserIdentitiesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`user_identities` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any - ) -> AsyncItemPaged["_models.UserIdentityContract"]: - """List of all user identities. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: An iterator like instance of either UserIdentityContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.UserIdentityContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserIdentityCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("UserIdentityCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py deleted file mode 100644 index 7095ae8cc563..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py +++ /dev/null @@ -1,1024 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._user_operations import ( - build_create_or_update_request, - build_delete_request, - build_generate_sso_url_request, - build_get_entity_tag_request, - build_get_request, - build_get_shared_access_token_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class UserOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`user` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - expand_groups: Optional[bool] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.UserContract"]: - """Lists a collection of registered users in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| state | filter | eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | - |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| groups | expand | | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param expand_groups: Detailed Group in response. Default value is None. - :type expand_groups: bool - :return: An iterator like instance of either UserContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.UserContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - expand_groups=expand_groups, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("UserCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag(self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the user specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any - ) -> _models.UserContract: - """Gets the details of the user specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("UserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - user_id: str, - parameters: _models.UserCreateParameters, - notify: Optional[bool] = None, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UserContract: - """Creates or Updates a user. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.UserCreateParameters - :param notify: Send an Email notification to the User. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - user_id: str, - parameters: IO[bytes], - notify: Optional[bool] = None, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UserContract: - """Creates or Updates a user. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param notify: Send an Email notification to the User. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - user_id: str, - parameters: Union[_models.UserCreateParameters, IO[bytes]], - notify: Optional[bool] = None, - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.UserContract: - """Creates or Updates a user. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param parameters: Create or update parameters. Is either a UserCreateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.UserCreateParameters or IO[bytes] - :param notify: Send an Email notification to the User. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "UserCreateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - notify=notify, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("UserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - user_id: str, - if_match: str, - parameters: _models.UserUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UserContract: - """Updates the details of the user specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.UserUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - user_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UserContract: - """Updates the details of the user specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - user_id: str, - if_match: str, - parameters: Union[_models.UserUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.UserContract: - """Updates the details of the user specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a UserUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.UserUpdateParameters or IO[bytes] - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "UserUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("UserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - service_name: str, - user_id: str, - if_match: str, - delete_subscriptions: Optional[bool] = None, - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - delete_subscriptions=delete_subscriptions, - notify=notify, - app_type=app_type, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, - resource_group_name: str, - service_name: str, - user_id: str, - if_match: str, - delete_subscriptions: Optional[bool] = None, - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes specific user. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param delete_subscriptions: Whether to delete user's subscription or not. Default value is - None. - :type delete_subscriptions: bool - :param notify: Send an Account Closed Email notification to the User. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - if_match=if_match, - delete_subscriptions=delete_subscriptions, - notify=notify, - app_type=app_type, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace_async - async def generate_sso_url( - self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any - ) -> _models.GenerateSsoUrlResult: - """Retrieves a redirection URL containing an authentication token for signing a given user into - the developer portal. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: GenerateSsoUrlResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GenerateSsoUrlResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GenerateSsoUrlResult] = kwargs.pop("cls", None) - - _request = build_generate_sso_url_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GenerateSsoUrlResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def get_shared_access_token( - self, - resource_group_name: str, - service_name: str, - user_id: str, - parameters: _models.UserTokenParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UserTokenResult: - """Gets the Shared Access Authorization Token for the User. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param parameters: Create Authorization Token parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.UserTokenParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: UserTokenResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def get_shared_access_token( - self, - resource_group_name: str, - service_name: str, - user_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UserTokenResult: - """Gets the Shared Access Authorization Token for the User. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param parameters: Create Authorization Token parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: UserTokenResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def get_shared_access_token( - self, - resource_group_name: str, - service_name: str, - user_id: str, - parameters: Union[_models.UserTokenParameters, IO[bytes]], - **kwargs: Any - ) -> _models.UserTokenResult: - """Gets the Shared Access Authorization Token for the User. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param parameters: Create Authorization Token parameters. Is either a UserTokenParameters type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.UserTokenParameters or IO[bytes] - :return: UserTokenResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.UserTokenResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "UserTokenParameters") - - _request = build_get_shared_access_token_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("UserTokenResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py deleted file mode 100644 index cec4a4c19ab4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._user_subscription_operations import build_get_request, build_list_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class UserSubscriptionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`user_subscription` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - user_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.SubscriptionContract"]: - """Lists the collection of subscriptions of the specified user. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param filter: | Field | Usage | Supported operators | Supported functions - |
|-------------|------------------------|-----------------------------------|
|name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
|productId | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either SubscriptionContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("SubscriptionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, user_id: str, sid: str, **kwargs: Any - ) -> _models.SubscriptionContract: - """Gets the specified Subscription entity associated with a particular user. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_diagnostic_operations.py deleted file mode 100644 index 40f155246551..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_diagnostic_operations.py +++ /dev/null @@ -1,799 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_api_diagnostic_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_workspace_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceApiDiagnosticOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_api_diagnostic` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_workspace( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.DiagnosticContract"]: - """Lists all diagnostics of an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either DiagnosticContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_workspace_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DiagnosticCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - **kwargs: Any - ) -> _models.DiagnosticContract: - """Gets the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - parameters: _models.DiagnosticContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - parameters: Union[_models.DiagnosticContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Is either a DiagnosticContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - if_match: str, - parameters: _models.DiagnosticUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - if_match: str, - parameters: Union[_models.DiagnosticUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Is either a DiagnosticUpdateContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract or IO[bytes] - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified Diagnostic from an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_export_operations.py deleted file mode 100644 index 1b2f1dbcf9dc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_export_operations.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_api_export_operations import build_get_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceApiExportOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_api_export` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - format: Union[str, _models.ExportFormat], - export: Union[str, _models.ExportApi], - **kwargs: Any - ) -> _models.ApiExportResult: - """Gets the details of the API specified by its identifier in the format specified to the Storage - Blob with SAS Key valid for 5 minutes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param format: Format in which to export the Api Details to the Storage Blob with Sas Key valid - for 5 minutes. Known values are: "swagger-link", "wsdl-link", "wadl-link", "openapi-link", and - "openapi+json-link". Required. - :type format: str or ~azure.mgmt.apimanagement.models.ExportFormat - :param export: Query parameter required to export the API details. "true" Required. - :type export: str or ~azure.mgmt.apimanagement.models.ExportApi - :return: ApiExportResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiExportResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiExportResult] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - format=format, - export=export, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiExportResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_operations.py deleted file mode 100644 index 6121d37a577a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_operations.py +++ /dev/null @@ -1,807 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_api_operation_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_api_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceApiOperationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_api_operation` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - tags: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.OperationContract"]: - """Lists a collection of the operations for the specified API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param tags: Include tags in the response. Default value is None. - :type tags: str - :return: An iterator like instance of either OperationContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.OperationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - tags=tags, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("OperationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API operation specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - **kwargs: Any - ) -> _models.OperationContract: - """Gets the details of the API Operation specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OperationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - parameters: _models.OperationContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Creates a new operation in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Creates a new operation in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - parameters: Union[_models.OperationContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.OperationContract: - """Creates a new operation in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param parameters: Create parameters. Is either a OperationContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "OperationContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OperationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - if_match: str, - parameters: _models.OperationUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Updates the details of the operation in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Operation Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Updates the details of the operation in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Operation Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - if_match: str, - parameters: Union[_models.OperationUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.OperationContract: - """Updates the details of the operation in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Operation Update parameters. Is either a OperationUpdateContract type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract or IO[bytes] - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "OperationUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OperationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified operation in the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_policy_operations.py deleted file mode 100644 index c4029c5aeddc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operation_policy_operations.py +++ /dev/null @@ -1,626 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_api_operation_policy_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_operation_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceApiOperationPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_api_operation_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_operation( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - **kwargs: Any - ) -> AsyncItemPaged["_models.PolicyContract"]: - """Get the list of policy configuration at the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :return: An iterator like instance of either PolicyContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API operation policy specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the Api Operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operations.py deleted file mode 100644 index dd236855f76f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_operations.py +++ /dev/null @@ -1,851 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_api_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceApiOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_api` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - tags: Optional[str] = None, - expand_api_version_set: Optional[bool] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ApiContract"]: - """Lists all APIs of the workspace in an API Management service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-apis - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| isCurrent | filter | eq, ne | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param tags: Include tags in the response. Default value is None. - :type tags: str - :param expand_api_version_set: Include full ApiVersionSet resource in response. Default value - is None. - :type expand_api_version_set: bool - :return: An iterator like instance of either ApiContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - tags=tags, - expand_api_version_set=expand_api_version_set, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any - ) -> _models.ApiContract: - """Gets the details of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - parameters: Union[_models.ApiCreateOrUpdateParameter, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiCreateOrUpdateParameter") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - parameters: _models.ApiCreateOrUpdateParameter, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiContract]: - """Creates new or updates existing specified API of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiContract]: - """Creates new or updates existing specified API of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ApiContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - parameters: Union[_models.ApiCreateOrUpdateParameter, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.ApiContract]: - """Creates new or updates existing specified API of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param parameters: Create or update parameters. Is either a ApiCreateOrUpdateParameter type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either ApiContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ApiContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ApiContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - if_match: str, - parameters: _models.ApiUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiContract: - """Updates the specified API of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Update Contract parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiContract: - """Updates the specified API of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Update Contract parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - if_match: str, - parameters: Union[_models.ApiUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.ApiContract: - """Updates the specified API of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Update Contract parameters. Is either a ApiUpdateContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract or IO[bytes] - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - if_match: str, - delete_revisions: Optional[bool] = None, - **kwargs: Any - ) -> None: - """Deletes the specified API of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param delete_revisions: Delete all revisions of the Api. Default value is None. - :type delete_revisions: bool - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - delete_revisions=delete_revisions, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_policy_operations.py deleted file mode 100644 index 2d30fbb29ce4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_policy_operations.py +++ /dev/null @@ -1,588 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_api_policy_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_api_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceApiPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_api_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any - ) -> AsyncItemPaged["_models.PolicyContract"]: - """Get the policy configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: An iterator like instance of either PolicyContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API policy specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_release_operations.py deleted file mode 100644 index 2bf21d6eb15a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_release_operations.py +++ /dev/null @@ -1,801 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_api_release_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceApiReleaseOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_api_release` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ApiReleaseContract"]: - """Lists all releases of an API. An API release is created when making an API Revision current. - Releases are also used to rollback to previous revisions. Results will be paged and can be - constrained by the $top and $skip parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| notes | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiReleaseContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiReleaseContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiReleaseCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiReleaseCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - **kwargs: Any - ) -> bool: - """Returns the etag of an API release. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Returns the details of an API release. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiReleaseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - parameters: _models.ApiReleaseContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Creates a new Release for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Creates a new Release for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - parameters: Union[_models.ApiReleaseContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Creates a new Release for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param parameters: Create parameters. Is either a ApiReleaseContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiReleaseContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiReleaseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - if_match: str, - parameters: _models.ApiReleaseContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Updates the details of the release of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Release Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Updates the details of the release of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Release Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - if_match: str, - parameters: Union[_models.ApiReleaseContract, IO[bytes]], - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Updates the details of the release of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Release Update parameters. Is either a ApiReleaseContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or IO[bytes] - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiReleaseContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiReleaseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified release in the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_revision_operations.py deleted file mode 100644 index 3129cdf47f25..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_revision_operations.py +++ /dev/null @@ -1,171 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_api_revision_operations import build_list_by_service_request -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceApiRevisionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_api_revision` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ApiRevisionContract"]: - """Lists all revisions of an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| apiRevision - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiRevisionContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiRevisionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiRevisionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_schema_operations.py deleted file mode 100644 index 2e6ef4095cb2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_schema_operations.py +++ /dev/null @@ -1,690 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_api_schema_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_api_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceApiSchemaOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_api_schema` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.SchemaContract"]: - """Get the schema configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| contentType - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either SchemaContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SchemaCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("SchemaCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, schema_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the schema specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, schema_id: str, **kwargs: Any - ) -> _models.SchemaContract: - """Get the schema configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: SchemaContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SchemaContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SchemaContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - parameters: Union[_models.SchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SchemaContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - parameters: _models.SchemaContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.SchemaContract]: - """Creates or updates schema configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: The schema contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.SchemaContract]: - """Creates or updates schema configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: The schema contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - parameters: Union[_models.SchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.SchemaContract]: - """Creates or updates schema configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: The schema contents to apply. Is either a SchemaContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either SchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - schema_id=schema_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("SchemaContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.SchemaContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.SchemaContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - if_match: str, - force: Optional[bool] = None, - **kwargs: Any - ) -> None: - """Deletes the schema configuration at the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param force: If true removes all references to the schema before deleting it. Default value is - None. - :type force: bool - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - force=force, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_version_set_operations.py deleted file mode 100644 index f54a0f1b051b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_api_version_set_operations.py +++ /dev/null @@ -1,743 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_api_version_set_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceApiVersionSetOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_api_version_set` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ApiVersionSetContract"]: - """Lists a collection of API Version Sets in the specified workspace with a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiVersionSetContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ApiVersionSetContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiVersionSetCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ApiVersionSetCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, version_set_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, version_set_id: str, **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Gets the details of the Api Version Set specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiVersionSetContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - parameters: _models.ApiVersionSetContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Creates or Updates a Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Creates or Updates a Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - parameters: Union[_models.ApiVersionSetContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Creates or Updates a Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param parameters: Create or update parameters. Is either a ApiVersionSetContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiVersionSetContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiVersionSetContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - if_match: str, - parameters: _models.ApiVersionSetUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Updates the details of the Api VersionSet specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Updates the details of the Api VersionSet specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - if_match: str, - parameters: Union[_models.ApiVersionSetUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Updates the details of the Api VersionSet specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a ApiVersionSetUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters or IO[bytes] - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiVersionSetUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiVersionSetContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_backend_operations.py deleted file mode 100644 index d82a5a3d0fd9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_backend_operations.py +++ /dev/null @@ -1,745 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_backend_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_workspace_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceBackendOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_backend` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_workspace( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.BackendContract"]: - """Lists a collection of backends in the specified workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either BackendContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.BackendContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BackendCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_workspace_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("BackendCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, backend_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the backend specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, backend_id: str, **kwargs: Any - ) -> _models.BackendContract: - """Gets the details of the backend specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("BackendContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - parameters: _models.BackendContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Creates or Updates a backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Creates or Updates a backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - parameters: Union[_models.BackendContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.BackendContract: - """Creates or Updates a backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Create parameters. Is either a BackendContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "BackendContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("BackendContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - if_match: str, - parameters: _models.BackendUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Updates an existing backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Updates an existing backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - if_match: str, - parameters: Union[_models.BackendUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.BackendContract: - """Updates an existing backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a BackendUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters or IO[bytes] - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "BackendUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("BackendContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_certificate_operations.py deleted file mode 100644 index f38a04c227d3..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_certificate_operations.py +++ /dev/null @@ -1,663 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_certificate_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_workspace_request, - build_refresh_secret_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceCertificateOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_certificate` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_workspace( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - is_key_vault_refresh_failed: Optional[bool] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.CertificateContract"]: - """Lists a collection of all certificates in the specified workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param is_key_vault_refresh_failed: When set to true, the response contains only certificates - entities which failed refresh. Default value is None. - :type is_key_vault_refresh_failed: bool - :return: An iterator like instance of either CertificateContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.CertificateContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_workspace_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - is_key_vault_refresh_failed=is_key_vault_refresh_failed, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("CertificateCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, certificate_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the certificate specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, certificate_id: str, **kwargs: Any - ) -> _models.CertificateContract: - """Gets the details of the certificate specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CertificateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - certificate_id: str, - parameters: _models.CertificateCreateOrUpdateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateContract: - """Creates or updates the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Create or Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - certificate_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateContract: - """Creates or updates the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Create or Update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - certificate_id: str, - parameters: Union[_models.CertificateCreateOrUpdateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.CertificateContract: - """Creates or updates the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Create or Update parameters. Is either a CertificateCreateOrUpdateParameters - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters or - IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "CertificateCreateOrUpdateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CertificateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - certificate_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific certificate. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def refresh_secret( - self, resource_group_name: str, service_name: str, workspace_id: str, certificate_id: str, **kwargs: Any - ) -> _models.CertificateContract: - """From KeyVault, Refresh the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) - - _request = build_refresh_secret_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CertificateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_diagnostic_operations.py deleted file mode 100644 index d10643d7d6fc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_diagnostic_operations.py +++ /dev/null @@ -1,743 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_diagnostic_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_workspace_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceDiagnosticOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_diagnostic` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_workspace( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.DiagnosticContract"]: - """Lists all diagnostics in the specified workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either DiagnosticContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_workspace_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DiagnosticCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, diagnostic_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, diagnostic_id: str, **kwargs: Any - ) -> _models.DiagnosticContract: - """Gets the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - parameters: _models.DiagnosticContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - parameters: Union[_models.DiagnosticContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Is either a DiagnosticContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - if_match: str, - parameters: _models.DiagnosticUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - if_match: str, - parameters: Union[_models.DiagnosticUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Is either a DiagnosticUpdateContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract or IO[bytes] - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified Diagnostic. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_global_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_global_schema_operations.py deleted file mode 100644 index eccab1265468..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_global_schema_operations.py +++ /dev/null @@ -1,659 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_global_schema_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceGlobalSchemaOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_global_schema` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.GlobalSchemaContract"]: - """Lists a collection of schemas registered with workspace in a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GlobalSchemaContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GlobalSchemaCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("GlobalSchemaCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, schema_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Schema specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, schema_id: str, **kwargs: Any - ) -> _models.GlobalSchemaContract: - """Gets the details of the Schema specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: GlobalSchemaContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GlobalSchemaContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GlobalSchemaContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - schema_id: str, - parameters: Union[_models.GlobalSchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GlobalSchemaContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - schema_id: str, - parameters: _models.GlobalSchemaContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.GlobalSchemaContract]: - """Creates new or updates existing specified Schema of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either GlobalSchemaContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - schema_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.GlobalSchemaContract]: - """Creates new or updates existing specified Schema of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either GlobalSchemaContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - schema_id: str, - parameters: Union[_models.GlobalSchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.GlobalSchemaContract]: - """Creates new or updates existing specified Schema of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: Create or update parameters. Is either a GlobalSchemaContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either GlobalSchemaContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - schema_id=schema_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("GlobalSchemaContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.GlobalSchemaContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.GlobalSchemaContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - schema_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific Schema. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_operations.py deleted file mode 100644 index 7cda62bb7e98..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_operations.py +++ /dev/null @@ -1,747 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_group_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceGroupOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_group` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.GroupContract"]: - """Lists a collection of groups defined within a workspace in a service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-groups - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| externalId | filter | eq | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GroupContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.GroupContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("GroupCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, **kwargs: Any - ) -> _models.GroupContract: - """Gets the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - parameters: _models.GroupCreateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Creates or Updates a group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Creates or Updates a group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - parameters: Union[_models.GroupCreateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.GroupContract: - """Creates or Updates a group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param parameters: Create parameters. Is either a GroupCreateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GroupCreateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - if_match: str, - parameters: _models.GroupUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Updates the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Updates the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - if_match: str, - parameters: Union[_models.GroupUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.GroupContract: - """Updates the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a GroupUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters or IO[bytes] - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GroupUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific group of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_user_operations.py deleted file mode 100644 index 6afffbc7f257..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_group_user_operations.py +++ /dev/null @@ -1,392 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_group_user_operations import ( - build_check_entity_exists_request, - build_create_request, - build_delete_request, - build_list_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceGroupUserOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_group_user` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.UserContract"]: - """Lists a collection of user entities associated with the group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, - le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either UserContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.UserContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("UserCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def check_entity_exists( - self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, user_id: str, **kwargs: Any - ) -> bool: - """Checks that user entity specified by identifier is associated with the group entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def create( - self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, user_id: str, **kwargs: Any - ) -> _models.UserContract: - """Add existing user to existing group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) - - _request = build_create_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("UserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, user_id: str, **kwargs: Any - ) -> None: - """Remove existing user from existing group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_logger_operations.py deleted file mode 100644 index 682423cb86e9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_logger_operations.py +++ /dev/null @@ -1,748 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_logger_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_workspace_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceLoggerOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_logger` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_workspace( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.LoggerContract"]: - """Lists a collection of loggers in the specified workspace. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-log-event-hubs - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either LoggerContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.LoggerContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LoggerCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_workspace_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("LoggerCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, logger_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the logger specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, logger_id: str, **kwargs: Any - ) -> _models.LoggerContract: - """Gets the details of the logger specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("LoggerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - parameters: _models.LoggerContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Creates or Updates a logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Creates or Updates a logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - parameters: Union[_models.LoggerContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.LoggerContract: - """Creates or Updates a logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param parameters: Create parameters. Is either a LoggerContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "LoggerContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("LoggerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - if_match: str, - parameters: _models.LoggerUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Updates an existing logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Updates an existing logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - if_match: str, - parameters: Union[_models.LoggerUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.LoggerContract: - """Updates an existing logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a LoggerUpdateContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract or IO[bytes] - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "LoggerUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("LoggerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_named_value_operations.py deleted file mode 100644 index b2c4b18f0b1f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_named_value_operations.py +++ /dev/null @@ -1,1123 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_named_value_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_list_value_request, - build_refresh_secret_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceNamedValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_named_value` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - is_key_vault_refresh_failed: Optional[Union[str, _models.KeyVaultRefreshState]] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.NamedValueContract"]: - """Lists a collection of named values defined within a workspace in a service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-properties - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| tags | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param is_key_vault_refresh_failed: Query parameter to fetch named value entities based on - refresh status. Known values are: "true" and "false". Default value is None. - :type is_key_vault_refresh_failed: str or ~azure.mgmt.apimanagement.models.KeyVaultRefreshState - :return: An iterator like instance of either NamedValueContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - is_key_vault_refresh_failed=is_key_vault_refresh_failed, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NamedValueCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any - ) -> _models.NamedValueContract: - """Gets the details of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: NamedValueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NamedValueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - parameters: Union[_models.NamedValueCreateContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NamedValueCreateContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - parameters: _models.NamedValueCreateContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Creates or updates named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Creates or updates named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - parameters: Union[_models.NamedValueCreateContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Creates or updates named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param parameters: Create parameters. Is either a NamedValueCreateContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NamedValueContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NamedValueContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - if_match: str, - parameters: Union[_models.NamedValueUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NamedValueUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 200: - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - if_match: str, - parameters: _models.NamedValueUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Updates the specific named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Updates the specific named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - if_match: str, - parameters: Union[_models.NamedValueUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Updates the specific named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a NamedValueUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - if_match=if_match, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NamedValueContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NamedValueContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific named value from the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def list_value( - self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any - ) -> _models.NamedValueSecretContract: - """Gets the secret of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: NamedValueSecretContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NamedValueSecretContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueSecretContract] = kwargs.pop("cls", None) - - _request = build_list_value_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueSecretContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _refresh_secret_initial( - self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_secret_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 200: - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_refresh_secret( - self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any - ) -> AsyncLROPoller[_models.NamedValueContract]: - """Refresh the secret of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: An instance of AsyncLROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._refresh_secret_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NamedValueContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NamedValueContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_operations.py deleted file mode 100644 index 2d5bf26feebd..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_operations.py +++ /dev/null @@ -1,322 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_notification_operations import ( - build_create_or_update_request, - build_get_request, - build_list_by_service_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceNotificationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_notification` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.NotificationContract"]: - """Lists a collection of properties defined within a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either NotificationContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.NotificationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NotificationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NotificationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - **kwargs: Any - ) -> _models.NotificationContract: - """Gets the details of the Notification specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :return: NotificationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NotificationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.NotificationContract: - """Create or Update API Management publisher notification for the workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: NotificationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NotificationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_email_operations.py deleted file mode 100644 index 5a7b3c5cd68c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_email_operations.py +++ /dev/null @@ -1,367 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_notification_recipient_email_operations import ( - build_check_entity_exists_request, - build_create_or_update_request, - build_delete_request, - build_list_by_notification_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceNotificationRecipientEmailOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_notification_recipient_email` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list_by_notification( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - **kwargs: Any - ) -> _models.RecipientEmailCollection: - """Gets the list of the Notification Recipient Emails subscribed to a notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :return: RecipientEmailCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientEmailCollection] = kwargs.pop("cls", None) - - _request = build_list_by_notification_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientEmailCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def check_entity_exists( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - email: str, - **kwargs: Any - ) -> bool: - """Determine if Notification Recipient Email subscribed to the notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. Required. - :type email: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - email=email, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - email: str, - **kwargs: Any - ) -> _models.RecipientEmailContract: - """Adds the Email address to the list of Recipients for the Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. Required. - :type email: str - :return: RecipientEmailContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientEmailContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - email=email, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientEmailContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - email: str, - **kwargs: Any - ) -> None: - """Removes the email from the list of Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. Required. - :type email: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - email=email, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_user_operations.py deleted file mode 100644 index 3c729d9dc708..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_notification_recipient_user_operations.py +++ /dev/null @@ -1,370 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_notification_recipient_user_operations import ( - build_check_entity_exists_request, - build_create_or_update_request, - build_delete_request, - build_list_by_notification_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceNotificationRecipientUserOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_notification_recipient_user` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list_by_notification( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - **kwargs: Any - ) -> _models.RecipientUserCollection: - """Gets the list of the Notification Recipient User subscribed to the notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :return: RecipientUserCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientUserCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientUserCollection] = kwargs.pop("cls", None) - - _request = build_list_by_notification_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientUserCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def check_entity_exists( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - **kwargs: Any - ) -> bool: - """Determine if the Notification Recipient User is subscribed to the notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - **kwargs: Any - ) -> _models.RecipientUserContract: - """Adds the API Management User to the list of Recipients for the Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: RecipientUserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientUserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientUserContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientUserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - **kwargs: Any - ) -> None: - """Removes the API Management user from the list of Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_operations.py deleted file mode 100644 index 5cd5b7612c28..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_operations.py +++ /dev/null @@ -1,695 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.WorkspaceContract"]: - """Lists all workspaces of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |

| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either WorkspaceContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.WorkspaceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WorkspaceCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("WorkspaceCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the workspace specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any - ) -> _models.WorkspaceContract: - """Gets the details of the workspace specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WorkspaceContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WorkspaceContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - parameters: _models.WorkspaceContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WorkspaceContract: - """Creates a new workspace or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WorkspaceContract: - """Creates a new workspace or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - parameters: Union[_models.WorkspaceContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.WorkspaceContract: - """Creates a new workspace or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param parameters: Create parameters. Is either a WorkspaceContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.WorkspaceContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "WorkspaceContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WorkspaceContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - if_match: str, - parameters: _models.WorkspaceContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WorkspaceContract: - """Updates the details of the workspace specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Workspace Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WorkspaceContract: - """Updates the details of the workspace specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Workspace Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - if_match: str, - parameters: Union[_models.WorkspaceContract, IO[bytes]], - **kwargs: Any - ) -> _models.WorkspaceContract: - """Updates the details of the workspace specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Workspace Update parameters. Is either a WorkspaceContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract or IO[bytes] - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.WorkspaceContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "WorkspaceContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WorkspaceContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, workspace_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_fragment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_fragment_operations.py deleted file mode 100644 index 76723c37f049..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_fragment_operations.py +++ /dev/null @@ -1,742 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_policy_fragment_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_list_references_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspacePolicyFragmentOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_policy_fragment` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - orderby: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.PolicyFragmentContract"]: - """Gets all policy fragments defined within a workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either PolicyFragmentContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyFragmentCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - orderby=orderby, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyFragmentCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - id=id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - format: Optional[Union[str, _models.PolicyFragmentContentFormat]] = None, - **kwargs: Any - ) -> _models.PolicyFragmentContract: - """Gets a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :param format: Policy fragment content format. Known values are: "xml" and "rawxml". Default - value is None. - :type format: str or ~azure.mgmt.apimanagement.models.PolicyFragmentContentFormat - :return: PolicyFragmentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyFragmentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - id=id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyFragmentContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - parameters: Union[_models.PolicyFragmentContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyFragmentContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - id=id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - parameters: _models.PolicyFragmentContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PolicyFragmentContract]: - """Creates or updates a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :param parameters: The policy fragment contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PolicyFragmentContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PolicyFragmentContract]: - """Creates or updates a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :param parameters: The policy fragment contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PolicyFragmentContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - parameters: Union[_models.PolicyFragmentContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.PolicyFragmentContract]: - """Creates or updates a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :param parameters: The policy fragment contents to apply. Is either a PolicyFragmentContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either PolicyFragmentContract or the result - of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - id=id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("PolicyFragmentContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.PolicyFragmentContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.PolicyFragmentContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, workspace_id: str, id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - id=id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def list_references( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> _models.ResourceCollection: - """Lists policy resources that reference the policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: ResourceCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResourceCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourceCollection] = kwargs.pop("cls", None) - - _request = build_list_references_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - id=id, - subscription_id=self._config.subscription_id, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ResourceCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_operations.py deleted file mode 100644 index ce89c4287bfc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_policy_operations.py +++ /dev/null @@ -1,556 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_policy_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_api_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspacePolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any - ) -> AsyncItemPaged["_models.PolicyContract"]: - """Get the policy configuration at the workspace level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :return: An iterator like instance of either PolicyContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the workspace policy specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_api_link_operations.py deleted file mode 100644 index 879032c78c50..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_api_link_operations.py +++ /dev/null @@ -1,509 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_product_api_link_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceProductApiLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_product_api_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ProductApiLinkContract"]: - """Lists a collection of the API links associated with a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| apiId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ProductApiLinkContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductApiLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductApiLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ProductApiLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - api_link_id: str, - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Gets the API link for the product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - api_link_id: str, - parameters: _models.ProductApiLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Adds an API to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - api_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Adds an API to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - api_link_id: str, - parameters: Union[_models.ProductApiLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Adds an API to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Is either a ProductApiLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract or IO[bytes] - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductApiLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ProductApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - api_link_id: str, - **kwargs: Any - ) -> None: - """Deletes the specified API from the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_group_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_group_link_operations.py deleted file mode 100644 index 2abafdf8e092..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_group_link_operations.py +++ /dev/null @@ -1,509 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_product_group_link_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceProductGroupLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_product_group_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ProductGroupLinkContract"]: - """Lists a collection of the group links associated with a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| groupId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ProductGroupLinkContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductGroupLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductGroupLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ProductGroupLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - group_link_id: str, - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Gets the group link for the product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - group_link_id=group_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductGroupLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - group_link_id: str, - parameters: _models.ProductGroupLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Adds a group to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - group_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Adds a group to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - group_link_id: str, - parameters: Union[_models.ProductGroupLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Adds a group to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :param parameters: Create or update parameters. Is either a ProductGroupLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract or IO[bytes] - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductGroupLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - group_link_id=group_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ProductGroupLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - group_link_id: str, - **kwargs: Any - ) -> None: - """Deletes the specified group from the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - group_link_id=group_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_operations.py deleted file mode 100644 index 86989dc6cc4b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_operations.py +++ /dev/null @@ -1,761 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_product_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceProductOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_product` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - expand_groups: Optional[bool] = None, - tags: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.ProductContract"]: - """Lists a collection of products in the specified workspace in a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| state | filter | eq | |
| groups | expand | | |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param expand_groups: When set to true, the response contains an array of groups that have - visibility to the product. The default is false. Default value is None. - :type expand_groups: bool - :param tags: Products which are part of a specific tag. Default value is None. - :type tags: str - :return: An iterator like instance of either ProductContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.ProductContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - expand_groups=expand_groups, - tags=tags, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ProductCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, product_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, product_id: str, **kwargs: Any - ) -> _models.ProductContract: - """Gets the details of the product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - parameters: _models.ProductContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Creates or Updates a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Creates or Updates a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - parameters: Union[_models.ProductContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ProductContract: - """Creates or Updates a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create or update parameters. Is either a ProductContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - if_match: str, - parameters: _models.ProductUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Update existing product details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Update existing product details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - if_match: str, - parameters: Union[_models.ProductUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.ProductContract: - """Update existing product details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a ProductUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters or IO[bytes] - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - if_match: str, - delete_subscriptions: Optional[bool] = None, - **kwargs: Any - ) -> None: - """Delete product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param delete_subscriptions: Delete existing subscriptions associated with the product or not. - Default value is None. - :type delete_subscriptions: bool - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - delete_subscriptions=delete_subscriptions, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_policy_operations.py deleted file mode 100644 index f2e50abbbfc0..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_product_policy_operations.py +++ /dev/null @@ -1,558 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_product_policy_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceProductPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_product_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list_by_product( - self, resource_group_name: str, service_name: str, workspace_id: str, product_id: str, **kwargs: Any - ) -> _models.PolicyCollection: - """Get the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: PolicyCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PolicyCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Get the ETag of the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_subscription_operations.py deleted file mode 100644 index c6711bef5abd..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_subscription_operations.py +++ /dev/null @@ -1,1030 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_subscription_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_tag_request, - build_get_request, - build_list_request, - build_list_secrets_request, - build_regenerate_primary_key_request, - build_regenerate_secondary_key_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceSubscriptionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_subscription` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.SubscriptionContract"]: - """Lists all subscriptions of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| state | filter | eq | |
| user | expand | | - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either SubscriptionContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("SubscriptionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the apimanagement subscription specified by its - identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any - ) -> _models.SubscriptionContract: - """Gets the specified Subscription entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - parameters: _models.SubscriptionCreateParameters, - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Creates or updates the subscription of specified user to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - parameters: IO[bytes], - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Creates or updates the subscription of specified user to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - parameters: Union[_models.SubscriptionCreateParameters, IO[bytes]], - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> _models.SubscriptionContract: - """Creates or updates the subscription of specified user to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param parameters: Create parameters. Is either a SubscriptionCreateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters or IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SubscriptionCreateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - notify=notify, - if_match=if_match, - app_type=app_type, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - if_match: str, - parameters: _models.SubscriptionUpdateParameters, - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Updates the details of a subscription specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - if_match: str, - parameters: IO[bytes], - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Updates the details of a subscription specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - if_match: str, - parameters: Union[_models.SubscriptionUpdateParameters, IO[bytes]], - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> _models.SubscriptionContract: - """Updates the details of a subscription specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a SubscriptionUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters or IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SubscriptionUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - if_match=if_match, - notify=notify, - app_type=app_type, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified subscription. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def regenerate_primary_key( - self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any - ) -> None: - """Regenerates primary key of existing subscription of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_primary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def regenerate_secondary_key( - self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any - ) -> None: - """Regenerates secondary key of existing subscription of the workspace in an API Management - service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_secondary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def list_secrets( - self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any - ) -> _models.SubscriptionKeysContract: - """Gets the specified Subscription keys. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: SubscriptionKeysContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionKeysContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionKeysContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionKeysContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_api_link_operations.py deleted file mode 100644 index 3a15a4a195ff..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_api_link_operations.py +++ /dev/null @@ -1,508 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_tag_api_link_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceTagApiLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_tag_api_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagApiLinkContract"]: - """Lists a collection of the API links associated with a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| apiId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagApiLinkContract or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagApiLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagApiLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagApiLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - api_link_id: str, - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Gets the API link for the tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - api_link_id: str, - parameters: _models.TagApiLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Adds an API to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - api_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Adds an API to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - api_link_id: str, - parameters: Union[_models.TagApiLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Adds an API to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Is either a TagApiLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract or IO[bytes] - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagApiLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - api_link_id: str, - **kwargs: Any - ) -> None: - """Deletes the specified API from the specified tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operation_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operation_link_operations.py deleted file mode 100644 index c73bac7f99ad..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operation_link_operations.py +++ /dev/null @@ -1,509 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_tag_operation_link_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceTagOperationLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_tag_operation_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagOperationLinkContract"]: - """Lists a collection of the operation links associated with a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| operationId - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagOperationLinkContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagOperationLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagOperationLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagOperationLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - operation_link_id: str, - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Gets the operation link for the tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - operation_link_id=operation_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagOperationLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - operation_link_id: str, - parameters: _models.TagOperationLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Adds an operation to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - operation_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Adds an operation to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - operation_link_id: str, - parameters: Union[_models.TagOperationLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Adds an operation to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :param parameters: Create or update parameters. Is either a TagOperationLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract or IO[bytes] - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagOperationLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - operation_link_id=operation_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagOperationLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - operation_link_id: str, - **kwargs: Any - ) -> None: - """Deletes the specified operation from the specified tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - operation_link_id=operation_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operations.py deleted file mode 100644 index f0414b5e2f11..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_operations.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_tag_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_entity_state_request, - build_get_request, - build_list_by_service_request, - build_update_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceTagOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_tag` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - scope: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagContract"]: - """Lists a collection of tags defined within a workspace in a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param scope: Scope like 'apis', 'products' or 'apis/{apiId}. Default value is None. - :type scope: str - :return: An iterator like instance of either TagContract or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_entity_state( - self, resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_state_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace_async - async def get( - self, resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Gets the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - parameters: _models.TagCreateUpdateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Creates a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Creates a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - parameters: Union[_models.TagCreateUpdateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.TagContract: - """Creates a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param parameters: Create parameters. Is either a TagCreateUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagCreateUpdateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - if_match: str, - parameters: _models.TagCreateUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Updates the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Updates the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - if_match: str, - parameters: Union[_models.TagCreateUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.TagContract: - """Updates the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a TagCreateUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or IO[bytes] - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagCreateUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific tag of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_product_link_operations.py deleted file mode 100644 index abaf97196459..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_workspace_tag_product_link_operations.py +++ /dev/null @@ -1,509 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._workspace_tag_product_link_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_product_request, -) -from .._configuration import ApiManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class WorkspaceTagProductLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.aio.ApiManagementClient`'s - :attr:`workspace_tag_product_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.TagProductLinkContract"]: - """Lists a collection of the product links associated with a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| productId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagProductLinkContract or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.apimanagement.models.TagProductLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagProductLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TagProductLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - product_link_id: str, - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Gets the product link for the tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - product_link_id=product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagProductLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - product_link_id: str, - parameters: _models.TagProductLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Adds a product to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - product_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Adds a product to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - product_link_id: str, - parameters: Union[_models.TagProductLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Adds a product to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :param parameters: Create or update parameters. Is either a TagProductLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract or IO[bytes] - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagProductLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - product_link_id=product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagProductLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - product_link_id: str, - **kwargs: Any - ) -> None: - """Deletes the specified product from the specified tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - product_link_id=product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py index 37cfc5f888e2..eac41783962e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -14,16 +14,17 @@ from ._patch import * # pylint: disable=unused-wildcard-import -from ._models_py3 import ( # type: ignore - AccessInformationCollection, +from ._models import ( # type: ignore AccessInformationContract, + AccessInformationContractProperties, + AccessInformationCreateParameterProperties, AccessInformationCreateParameters, AccessInformationSecretsContract, + AccessInformationUpdateParameterProperties, AccessInformationUpdateParameters, AdditionalLocation, - AllPoliciesCollection, AllPoliciesContract, - ApiCollection, + AllPoliciesContractProperties, ApiContactInformation, ApiContract, ApiContractProperties, @@ -36,9 +37,7 @@ ApiExportResultValue, ApiLicenseInformation, ApiManagementGatewayBaseProperties, - ApiManagementGatewayConfigConnectionListResult, ApiManagementGatewayConfigConnectionResource, - ApiManagementGatewayListResult, ApiManagementGatewayProperties, ApiManagementGatewayResource, ApiManagementGatewaySkuProperties, @@ -52,7 +51,6 @@ ApiManagementServiceGetDomainOwnershipIdentifierResult, ApiManagementServiceGetSsoTokenResult, ApiManagementServiceIdentity, - ApiManagementServiceListResult, ApiManagementServiceNameAvailabilityResult, ApiManagementServiceProperties, ApiManagementServiceResource, @@ -67,19 +65,14 @@ ApiManagementSkuRestrictionInfo, ApiManagementSkuRestrictions, ApiManagementSkuZoneDetails, - ApiManagementSkusResult, - ApiManagementWorkspaceLinksListResult, ApiManagementWorkspaceLinksProperties, ApiManagementWorkspaceLinksResource, - ApiReleaseCollection, ApiReleaseContract, - ApiRevisionCollection, + ApiReleaseContractProperties, ApiRevisionContract, - ApiRevisionInfoContract, ApiTagResourceContractProperties, ApiUpdateContract, ApiVersionConstraint, - ApiVersionSetCollection, ApiVersionSetContract, ApiVersionSetContractDetails, ApiVersionSetContractProperties, @@ -89,22 +82,22 @@ ApimResource, ArmIdWrapper, AssociationContract, + AssociationContractProperties, AuthenticationSettingsContract, - AuthorizationAccessPolicyCollection, AuthorizationAccessPolicyContract, - AuthorizationCollection, + AuthorizationAccessPolicyContractProperties, AuthorizationConfirmConsentCodeRequestContract, AuthorizationContract, + AuthorizationContractProperties, AuthorizationError, AuthorizationLoginRequestContract, AuthorizationLoginResponseContract, - AuthorizationProviderCollection, AuthorizationProviderContract, + AuthorizationProviderContractProperties, AuthorizationProviderKeyVaultContract, AuthorizationProviderKeyVaultCreateProperties, AuthorizationProviderOAuth2GrantTypes, AuthorizationProviderOAuth2Settings, - AuthorizationServerCollection, AuthorizationServerContract, AuthorizationServerContractBaseProperties, AuthorizationServerContractProperties, @@ -115,7 +108,6 @@ BackendBaseParameters, BackendBaseParametersPool, BackendCircuitBreaker, - BackendCollection, BackendConfiguration, BackendContract, BackendContractProperties, @@ -126,6 +118,7 @@ BackendProperties, BackendProxyContract, BackendReconnectContract, + BackendReconnectProperties, BackendServiceFabricClusterProperties, BackendSessionAffinity, BackendSessionId, @@ -134,20 +127,22 @@ BackendUpdateParameterProperties, BackendUpdateParameters, BodyDiagnosticSettings, - CacheCollection, CacheContract, + CacheContractProperties, CacheUpdateParameters, - CertificateCollection, + CacheUpdateProperties, CertificateConfiguration, CertificateContract, + CertificateContractProperties, CertificateCreateOrUpdateParameters, + CertificateCreateOrUpdateProperties, CertificateInformation, CircuitBreakerFailureCondition, CircuitBreakerRule, - ClientApplicationCollection, ClientApplicationContract, - ClientApplicationProductLinkCollection, + ClientApplicationContractProperties, ClientApplicationProductLinkContract, + ClientApplicationProductLinkContractProperties, ClientApplicationSecretsContract, ClientApplicationSecretsContractEntra, ClientSecretContract, @@ -155,30 +150,32 @@ ConnectivityCheckRequest, ConnectivityCheckRequestDestination, ConnectivityCheckRequestProtocolConfiguration, - ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration, + ConnectivityCheckRequestProtocolConfigurationHttpConfiguration, ConnectivityCheckRequestSource, ConnectivityCheckResponse, ConnectivityHop, ConnectivityIssue, ConnectivityStatusContract, - ContentItemCollection, ContentItemContract, - ContentTypeCollection, ContentTypeContract, + ContentTypeContractProperties, DataMasking, DataMaskingEntity, DeletedServiceContract, - DeletedServicesCollection, + DeletedServiceContractProperties, + DeployConfigurationParameterProperties, DeployConfigurationParameters, - DiagnosticCollection, DiagnosticContract, + DiagnosticContractProperties, + DiagnosticContractUpdateProperties, DiagnosticUpdateContract, - DocumentationCollection, DocumentationContract, + DocumentationContractProperties, DocumentationUpdateContract, - EmailTemplateCollection, EmailTemplateContract, + EmailTemplateContractProperties, EmailTemplateParametersContractProperties, + EmailTemplateUpdateParameterProperties, EmailTemplateUpdateParameters, EndpointDependency, EndpointDetail, @@ -189,37 +186,38 @@ ErrorResponseBody, FailureStatusCodeRange, FrontendConfiguration, - GatewayCertificateAuthorityCollection, GatewayCertificateAuthorityContract, - GatewayCollection, + GatewayCertificateAuthorityContractProperties, + GatewayConfigConnectionBaseProperties, GatewayConfigurationApi, GatewayContract, + GatewayContractProperties, GatewayDebugCredentialsContract, + GatewayHostnameBindingBaseProperties, GatewayHostnameBindingCertificate, GatewayHostnameBindingKeyVault, GatewayHostnameBindingKeyVaultLastStatus, - GatewayHostnameBindingListResult, GatewayHostnameBindingResource, - GatewayHostnameConfigurationCollection, GatewayHostnameConfigurationContract, + GatewayHostnameConfigurationContractProperties, GatewayKeyRegenerationRequestContract, GatewayKeysContract, GatewayListDebugCredentialsContract, GatewayListTraceContract, GatewayResourceSkuResult, - GatewayResourceSkuResults, GatewaySku, GatewaySkuCapacity, GatewayTokenContract, GatewayTokenRequestContract, GenerateSsoUrlResult, - GlobalSchemaCollection, GlobalSchemaContract, - GroupCollection, + GlobalSchemaContractProperties, GroupContract, GroupContractProperties, GroupCreateParameters, + GroupCreateParametersProperties, GroupUpdateParameters, + GroupUpdateParametersProperties, HTTPHeader, HostnameConfiguration, HttpMessageDiagnostic, @@ -228,14 +226,12 @@ IdentityProviderContractProperties, IdentityProviderCreateContract, IdentityProviderCreateContractProperties, - IdentityProviderList, IdentityProviderUpdateParameters, IdentityProviderUpdateProperties, - IssueAttachmentCollection, IssueAttachmentContract, - IssueCollection, - IssueCommentCollection, + IssueAttachmentContractProperties, IssueCommentContract, + IssueCommentContractProperties, IssueContract, IssueContractBaseProperties, IssueContractProperties, @@ -246,12 +242,12 @@ KeyVaultLastAccessStatusContractProperties, LLMDiagnosticSettings, LLMMessageDiagnosticSettings, - LoggerCollection, LoggerContract, + LoggerContractProperties, LoggerUpdateContract, + LoggerUpdateParameters, ManagedServiceIdentity, MigrateToStv2Contract, - NamedValueCollection, NamedValueContract, NamedValueContractProperties, NamedValueCreateContract, @@ -262,21 +258,21 @@ NamedValueUpdateParameters, NetworkStatusContract, NetworkStatusContractByLocation, - NotificationCollection, NotificationContract, + NotificationContractProperties, OAuth2AuthenticationSettingsContract, OpenIdAuthenticationSettingsContract, - OpenIdConnectProviderCollection, OpenidConnectProviderContract, + OpenidConnectProviderContractProperties, OpenidConnectProviderUpdateContract, + OpenidConnectProviderUpdateContractProperties, Operation, - OperationCollection, OperationContract, OperationContractProperties, OperationDisplay, OperationEntityBaseContract, - OperationListResult, OperationResultContract, + OperationResultContractProperties, OperationResultLogItemContract, OperationStatusResult, OperationTagResourceContractProperties, @@ -289,79 +285,81 @@ PipelineDiagnosticSettings, PolicyCollection, PolicyContract, + PolicyContractProperties, PolicyDescriptionCollection, PolicyDescriptionContract, - PolicyFragmentCollection, + PolicyDescriptionContractProperties, PolicyFragmentContract, - PolicyRestrictionCollection, + PolicyFragmentContractProperties, PolicyRestrictionContract, + PolicyRestrictionContractProperties, PolicyRestrictionUpdateContract, - PolicyWithComplianceCollection, - PolicyWithComplianceContract, - PortalConfigCollection, PortalConfigContract, PortalConfigCorsProperties, PortalConfigCspProperties, PortalConfigDelegationProperties, + PortalConfigProperties, PortalConfigPropertiesSignin, PortalConfigPropertiesSignup, PortalConfigTermsOfServiceProperties, PortalDelegationSettings, - PortalRevisionCollection, + PortalDelegationSettingsProperties, PortalRevisionContract, + PortalRevisionContractProperties, PortalSettingValidationKeyContract, PortalSettingsCollection, PortalSettingsContract, + PortalSettingsContractProperties, + PortalSigninSettingProperties, PortalSigninSettings, PortalSignupSettings, + PortalSignupSettingsProperties, PrivateEndpoint, PrivateEndpointConnection, - PrivateEndpointConnectionListResult, + PrivateEndpointConnectionProperties, PrivateEndpointConnectionRequest, PrivateEndpointConnectionRequestProperties, + PrivateEndpointConnectionWrapperProperties, PrivateLinkResource, PrivateLinkResourceListResult, + PrivateLinkResourceProperties, PrivateLinkServiceConnectionState, - ProductApiLinkCollection, ProductApiLinkContract, + ProductApiLinkContractProperties, ProductApplicationContract, ProductApplicationContractEntra, - ProductCollection, ProductContract, ProductContractProperties, ProductEntityBaseParameters, ProductEntityBaseParametersApplication, - ProductGroupLinkCollection, ProductGroupLinkContract, + ProductGroupLinkContractProperties, ProductTagResourceContractProperties, ProductUpdateParameters, ProductUpdateProperties, ProxyResource, QuotaCounterCollection, QuotaCounterContract, - QuotaCounterValueContract, QuotaCounterValueContractProperties, QuotaCounterValueUpdateContract, RecipientEmailCollection, RecipientEmailContract, + RecipientEmailContractProperties, RecipientUserCollection, RecipientUserContract, + RecipientUsersContractProperties, RecipientsContractProperties, RegionContract, - RegionListResult, RegistrationDelegationSettingsProperties, RemotePrivateEndpointConnectionWrapper, - ReportCollection, ReportRecordContract, RepresentationContract, RequestContract, - RequestReportCollection, RequestReportRecordContract, - ResolverCollection, ResolverContract, - ResolverResultContract, - ResolverResultLogItemContract, + ResolverEntityBaseContract, ResolverUpdateContract, + ResolverUpdateContractProperties, Resource, ResourceCollection, ResourceCollectionValueItem, @@ -369,71 +367,73 @@ ResourceSku, ResourceSkuCapacity, ResourceSkuResult, - ResourceSkuResults, ResponseContract, SamplingSettings, SaveConfigurationParameter, - SchemaCollection, + SaveConfigurationParameterProperties, SchemaContract, - SubscriptionCollection, + SchemaContractProperties, + SchemaDocumentProperties, SubscriptionContract, + SubscriptionContractProperties, + SubscriptionCreateParameterProperties, SubscriptionCreateParameters, SubscriptionKeyParameterNamesContract, SubscriptionKeysContract, + SubscriptionUpdateParameterProperties, SubscriptionUpdateParameters, SubscriptionsDelegationSettingsProperties, SystemData, - TagApiLinkCollection, TagApiLinkContract, - TagCollection, + TagApiLinkContractProperties, TagContract, + TagContractProperties, TagCreateUpdateParameters, TagDescriptionBaseProperties, - TagDescriptionCollection, TagDescriptionContract, TagDescriptionContractProperties, TagDescriptionCreateParameters, - TagOperationLinkCollection, TagOperationLinkContract, - TagProductLinkCollection, + TagOperationLinkContractProperties, TagProductLinkContract, - TagResourceCollection, + TagProductLinkContractProperties, TagResourceContract, TagResourceContractProperties, TenantConfigurationSyncStateContract, - TenantSettingsCollection, + TenantConfigurationSyncStateContractProperties, TenantSettingsContract, + TenantSettingsContractProperties, TermsOfServiceProperties, TokenBodyParameterContract, - ToolCollection, ToolContract, + ToolContractProperties, + TrackedResource, UserAssignedIdentity, - UserCollection, UserContract, UserContractProperties, UserCreateParameterProperties, UserCreateParameters, UserEntityBaseParameters, - UserIdentityCollection, UserIdentityContract, UserIdentityProperties, + UserTokenParameterProperties, UserTokenParameters, UserTokenResult, UserUpdateParameters, UserUpdateParametersProperties, VirtualNetworkConfiguration, - WikiCollection, WikiContract, + WikiContractProperties, WikiDocumentationContract, WikiUpdateContract, - WorkspaceCollection, WorkspaceContract, + WorkspaceContractProperties, WorkspaceLinksBaseProperties, WorkspaceLinksGateway, X509CertificateName, ) -from ._api_management_client_enums import ( # type: ignore +from ._enums import ( # type: ignore AccessIdName, AccessType, AlwaysLog, @@ -445,7 +445,6 @@ ApimIdentityType, AppType, AsyncOperationStatus, - AsyncResolverStatus, AuthorizationMethod, AuthorizationType, BackendProtocol, @@ -535,15 +534,16 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "AccessInformationCollection", "AccessInformationContract", + "AccessInformationContractProperties", + "AccessInformationCreateParameterProperties", "AccessInformationCreateParameters", "AccessInformationSecretsContract", + "AccessInformationUpdateParameterProperties", "AccessInformationUpdateParameters", "AdditionalLocation", - "AllPoliciesCollection", "AllPoliciesContract", - "ApiCollection", + "AllPoliciesContractProperties", "ApiContactInformation", "ApiContract", "ApiContractProperties", @@ -556,9 +556,7 @@ "ApiExportResultValue", "ApiLicenseInformation", "ApiManagementGatewayBaseProperties", - "ApiManagementGatewayConfigConnectionListResult", "ApiManagementGatewayConfigConnectionResource", - "ApiManagementGatewayListResult", "ApiManagementGatewayProperties", "ApiManagementGatewayResource", "ApiManagementGatewaySkuProperties", @@ -572,7 +570,6 @@ "ApiManagementServiceGetDomainOwnershipIdentifierResult", "ApiManagementServiceGetSsoTokenResult", "ApiManagementServiceIdentity", - "ApiManagementServiceListResult", "ApiManagementServiceNameAvailabilityResult", "ApiManagementServiceProperties", "ApiManagementServiceResource", @@ -587,19 +584,14 @@ "ApiManagementSkuRestrictionInfo", "ApiManagementSkuRestrictions", "ApiManagementSkuZoneDetails", - "ApiManagementSkusResult", - "ApiManagementWorkspaceLinksListResult", "ApiManagementWorkspaceLinksProperties", "ApiManagementWorkspaceLinksResource", - "ApiReleaseCollection", "ApiReleaseContract", - "ApiRevisionCollection", + "ApiReleaseContractProperties", "ApiRevisionContract", - "ApiRevisionInfoContract", "ApiTagResourceContractProperties", "ApiUpdateContract", "ApiVersionConstraint", - "ApiVersionSetCollection", "ApiVersionSetContract", "ApiVersionSetContractDetails", "ApiVersionSetContractProperties", @@ -609,22 +601,22 @@ "ApimResource", "ArmIdWrapper", "AssociationContract", + "AssociationContractProperties", "AuthenticationSettingsContract", - "AuthorizationAccessPolicyCollection", "AuthorizationAccessPolicyContract", - "AuthorizationCollection", + "AuthorizationAccessPolicyContractProperties", "AuthorizationConfirmConsentCodeRequestContract", "AuthorizationContract", + "AuthorizationContractProperties", "AuthorizationError", "AuthorizationLoginRequestContract", "AuthorizationLoginResponseContract", - "AuthorizationProviderCollection", "AuthorizationProviderContract", + "AuthorizationProviderContractProperties", "AuthorizationProviderKeyVaultContract", "AuthorizationProviderKeyVaultCreateProperties", "AuthorizationProviderOAuth2GrantTypes", "AuthorizationProviderOAuth2Settings", - "AuthorizationServerCollection", "AuthorizationServerContract", "AuthorizationServerContractBaseProperties", "AuthorizationServerContractProperties", @@ -635,7 +627,6 @@ "BackendBaseParameters", "BackendBaseParametersPool", "BackendCircuitBreaker", - "BackendCollection", "BackendConfiguration", "BackendContract", "BackendContractProperties", @@ -646,6 +637,7 @@ "BackendProperties", "BackendProxyContract", "BackendReconnectContract", + "BackendReconnectProperties", "BackendServiceFabricClusterProperties", "BackendSessionAffinity", "BackendSessionId", @@ -654,20 +646,22 @@ "BackendUpdateParameterProperties", "BackendUpdateParameters", "BodyDiagnosticSettings", - "CacheCollection", "CacheContract", + "CacheContractProperties", "CacheUpdateParameters", - "CertificateCollection", + "CacheUpdateProperties", "CertificateConfiguration", "CertificateContract", + "CertificateContractProperties", "CertificateCreateOrUpdateParameters", + "CertificateCreateOrUpdateProperties", "CertificateInformation", "CircuitBreakerFailureCondition", "CircuitBreakerRule", - "ClientApplicationCollection", "ClientApplicationContract", - "ClientApplicationProductLinkCollection", + "ClientApplicationContractProperties", "ClientApplicationProductLinkContract", + "ClientApplicationProductLinkContractProperties", "ClientApplicationSecretsContract", "ClientApplicationSecretsContractEntra", "ClientSecretContract", @@ -675,30 +669,32 @@ "ConnectivityCheckRequest", "ConnectivityCheckRequestDestination", "ConnectivityCheckRequestProtocolConfiguration", - "ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration", + "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", "ConnectivityCheckRequestSource", "ConnectivityCheckResponse", "ConnectivityHop", "ConnectivityIssue", "ConnectivityStatusContract", - "ContentItemCollection", "ContentItemContract", - "ContentTypeCollection", "ContentTypeContract", + "ContentTypeContractProperties", "DataMasking", "DataMaskingEntity", "DeletedServiceContract", - "DeletedServicesCollection", + "DeletedServiceContractProperties", + "DeployConfigurationParameterProperties", "DeployConfigurationParameters", - "DiagnosticCollection", "DiagnosticContract", + "DiagnosticContractProperties", + "DiagnosticContractUpdateProperties", "DiagnosticUpdateContract", - "DocumentationCollection", "DocumentationContract", + "DocumentationContractProperties", "DocumentationUpdateContract", - "EmailTemplateCollection", "EmailTemplateContract", + "EmailTemplateContractProperties", "EmailTemplateParametersContractProperties", + "EmailTemplateUpdateParameterProperties", "EmailTemplateUpdateParameters", "EndpointDependency", "EndpointDetail", @@ -709,37 +705,38 @@ "ErrorResponseBody", "FailureStatusCodeRange", "FrontendConfiguration", - "GatewayCertificateAuthorityCollection", "GatewayCertificateAuthorityContract", - "GatewayCollection", + "GatewayCertificateAuthorityContractProperties", + "GatewayConfigConnectionBaseProperties", "GatewayConfigurationApi", "GatewayContract", + "GatewayContractProperties", "GatewayDebugCredentialsContract", + "GatewayHostnameBindingBaseProperties", "GatewayHostnameBindingCertificate", "GatewayHostnameBindingKeyVault", "GatewayHostnameBindingKeyVaultLastStatus", - "GatewayHostnameBindingListResult", "GatewayHostnameBindingResource", - "GatewayHostnameConfigurationCollection", "GatewayHostnameConfigurationContract", + "GatewayHostnameConfigurationContractProperties", "GatewayKeyRegenerationRequestContract", "GatewayKeysContract", "GatewayListDebugCredentialsContract", "GatewayListTraceContract", "GatewayResourceSkuResult", - "GatewayResourceSkuResults", "GatewaySku", "GatewaySkuCapacity", "GatewayTokenContract", "GatewayTokenRequestContract", "GenerateSsoUrlResult", - "GlobalSchemaCollection", "GlobalSchemaContract", - "GroupCollection", + "GlobalSchemaContractProperties", "GroupContract", "GroupContractProperties", "GroupCreateParameters", + "GroupCreateParametersProperties", "GroupUpdateParameters", + "GroupUpdateParametersProperties", "HTTPHeader", "HostnameConfiguration", "HttpMessageDiagnostic", @@ -748,14 +745,12 @@ "IdentityProviderContractProperties", "IdentityProviderCreateContract", "IdentityProviderCreateContractProperties", - "IdentityProviderList", "IdentityProviderUpdateParameters", "IdentityProviderUpdateProperties", - "IssueAttachmentCollection", "IssueAttachmentContract", - "IssueCollection", - "IssueCommentCollection", + "IssueAttachmentContractProperties", "IssueCommentContract", + "IssueCommentContractProperties", "IssueContract", "IssueContractBaseProperties", "IssueContractProperties", @@ -766,12 +761,12 @@ "KeyVaultLastAccessStatusContractProperties", "LLMDiagnosticSettings", "LLMMessageDiagnosticSettings", - "LoggerCollection", "LoggerContract", + "LoggerContractProperties", "LoggerUpdateContract", + "LoggerUpdateParameters", "ManagedServiceIdentity", "MigrateToStv2Contract", - "NamedValueCollection", "NamedValueContract", "NamedValueContractProperties", "NamedValueCreateContract", @@ -782,21 +777,21 @@ "NamedValueUpdateParameters", "NetworkStatusContract", "NetworkStatusContractByLocation", - "NotificationCollection", "NotificationContract", + "NotificationContractProperties", "OAuth2AuthenticationSettingsContract", "OpenIdAuthenticationSettingsContract", - "OpenIdConnectProviderCollection", "OpenidConnectProviderContract", + "OpenidConnectProviderContractProperties", "OpenidConnectProviderUpdateContract", + "OpenidConnectProviderUpdateContractProperties", "Operation", - "OperationCollection", "OperationContract", "OperationContractProperties", "OperationDisplay", "OperationEntityBaseContract", - "OperationListResult", "OperationResultContract", + "OperationResultContractProperties", "OperationResultLogItemContract", "OperationStatusResult", "OperationTagResourceContractProperties", @@ -809,79 +804,81 @@ "PipelineDiagnosticSettings", "PolicyCollection", "PolicyContract", + "PolicyContractProperties", "PolicyDescriptionCollection", "PolicyDescriptionContract", - "PolicyFragmentCollection", + "PolicyDescriptionContractProperties", "PolicyFragmentContract", - "PolicyRestrictionCollection", + "PolicyFragmentContractProperties", "PolicyRestrictionContract", + "PolicyRestrictionContractProperties", "PolicyRestrictionUpdateContract", - "PolicyWithComplianceCollection", - "PolicyWithComplianceContract", - "PortalConfigCollection", "PortalConfigContract", "PortalConfigCorsProperties", "PortalConfigCspProperties", "PortalConfigDelegationProperties", + "PortalConfigProperties", "PortalConfigPropertiesSignin", "PortalConfigPropertiesSignup", "PortalConfigTermsOfServiceProperties", "PortalDelegationSettings", - "PortalRevisionCollection", + "PortalDelegationSettingsProperties", "PortalRevisionContract", + "PortalRevisionContractProperties", "PortalSettingValidationKeyContract", "PortalSettingsCollection", "PortalSettingsContract", + "PortalSettingsContractProperties", + "PortalSigninSettingProperties", "PortalSigninSettings", "PortalSignupSettings", + "PortalSignupSettingsProperties", "PrivateEndpoint", "PrivateEndpointConnection", - "PrivateEndpointConnectionListResult", + "PrivateEndpointConnectionProperties", "PrivateEndpointConnectionRequest", "PrivateEndpointConnectionRequestProperties", + "PrivateEndpointConnectionWrapperProperties", "PrivateLinkResource", "PrivateLinkResourceListResult", + "PrivateLinkResourceProperties", "PrivateLinkServiceConnectionState", - "ProductApiLinkCollection", "ProductApiLinkContract", + "ProductApiLinkContractProperties", "ProductApplicationContract", "ProductApplicationContractEntra", - "ProductCollection", "ProductContract", "ProductContractProperties", "ProductEntityBaseParameters", "ProductEntityBaseParametersApplication", - "ProductGroupLinkCollection", "ProductGroupLinkContract", + "ProductGroupLinkContractProperties", "ProductTagResourceContractProperties", "ProductUpdateParameters", "ProductUpdateProperties", "ProxyResource", "QuotaCounterCollection", "QuotaCounterContract", - "QuotaCounterValueContract", "QuotaCounterValueContractProperties", "QuotaCounterValueUpdateContract", "RecipientEmailCollection", "RecipientEmailContract", + "RecipientEmailContractProperties", "RecipientUserCollection", "RecipientUserContract", + "RecipientUsersContractProperties", "RecipientsContractProperties", "RegionContract", - "RegionListResult", "RegistrationDelegationSettingsProperties", "RemotePrivateEndpointConnectionWrapper", - "ReportCollection", "ReportRecordContract", "RepresentationContract", "RequestContract", - "RequestReportCollection", "RequestReportRecordContract", - "ResolverCollection", "ResolverContract", - "ResolverResultContract", - "ResolverResultLogItemContract", + "ResolverEntityBaseContract", "ResolverUpdateContract", + "ResolverUpdateContractProperties", "Resource", "ResourceCollection", "ResourceCollectionValueItem", @@ -889,65 +886,67 @@ "ResourceSku", "ResourceSkuCapacity", "ResourceSkuResult", - "ResourceSkuResults", "ResponseContract", "SamplingSettings", "SaveConfigurationParameter", - "SchemaCollection", + "SaveConfigurationParameterProperties", "SchemaContract", - "SubscriptionCollection", + "SchemaContractProperties", + "SchemaDocumentProperties", "SubscriptionContract", + "SubscriptionContractProperties", + "SubscriptionCreateParameterProperties", "SubscriptionCreateParameters", "SubscriptionKeyParameterNamesContract", "SubscriptionKeysContract", + "SubscriptionUpdateParameterProperties", "SubscriptionUpdateParameters", "SubscriptionsDelegationSettingsProperties", "SystemData", - "TagApiLinkCollection", "TagApiLinkContract", - "TagCollection", + "TagApiLinkContractProperties", "TagContract", + "TagContractProperties", "TagCreateUpdateParameters", "TagDescriptionBaseProperties", - "TagDescriptionCollection", "TagDescriptionContract", "TagDescriptionContractProperties", "TagDescriptionCreateParameters", - "TagOperationLinkCollection", "TagOperationLinkContract", - "TagProductLinkCollection", + "TagOperationLinkContractProperties", "TagProductLinkContract", - "TagResourceCollection", + "TagProductLinkContractProperties", "TagResourceContract", "TagResourceContractProperties", "TenantConfigurationSyncStateContract", - "TenantSettingsCollection", + "TenantConfigurationSyncStateContractProperties", "TenantSettingsContract", + "TenantSettingsContractProperties", "TermsOfServiceProperties", "TokenBodyParameterContract", - "ToolCollection", "ToolContract", + "ToolContractProperties", + "TrackedResource", "UserAssignedIdentity", - "UserCollection", "UserContract", "UserContractProperties", "UserCreateParameterProperties", "UserCreateParameters", "UserEntityBaseParameters", - "UserIdentityCollection", "UserIdentityContract", "UserIdentityProperties", + "UserTokenParameterProperties", "UserTokenParameters", "UserTokenResult", "UserUpdateParameters", "UserUpdateParametersProperties", "VirtualNetworkConfiguration", - "WikiCollection", "WikiContract", + "WikiContractProperties", "WikiDocumentationContract", "WikiUpdateContract", - "WorkspaceCollection", "WorkspaceContract", + "WorkspaceContractProperties", "WorkspaceLinksBaseProperties", "WorkspaceLinksGateway", "X509CertificateName", @@ -962,7 +961,6 @@ "ApimIdentityType", "AppType", "AsyncOperationStatus", - "AsyncResolverStatus", "AuthorizationMethod", "AuthorizationType", "BackendProtocol", diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_enums.py similarity index 84% rename from sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py rename to sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_enums.py index 003fda799ab2..90053e38e784 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_enums.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -12,10 +12,12 @@ class AccessIdName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """AccessIdName.""" + """Type of AccessIdName.""" ACCESS = "access" + """ACCESS.""" GIT_ACCESS = "gitAccess" + """GIT_ACCESS.""" class AccessType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -51,22 +53,29 @@ class ApiManagementSkuCapacityScaleType(str, Enum, metaclass=CaseInsensitiveEnum """The scale type applicable to the sku.""" AUTOMATIC = "Automatic" + """AUTOMATIC.""" MANUAL = "Manual" + """MANUAL.""" NONE = "None" + """NONE.""" class ApiManagementSkuRestrictionsReasonCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The reason for restriction.""" QUOTA_ID = "QuotaId" + """QUOTA_ID.""" NOT_AVAILABLE_FOR_SUBSCRIPTION = "NotAvailableForSubscription" + """NOT_AVAILABLE_FOR_SUBSCRIPTION.""" class ApiManagementSkuRestrictionsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of restrictions.""" LOCATION = "Location" + """LOCATION.""" ZONE = "Zone" + """ZONE.""" class ApimIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -76,24 +85,34 @@ class ApimIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ SYSTEM_ASSIGNED = "SystemAssigned" + """SYSTEM_ASSIGNED.""" USER_ASSIGNED = "UserAssigned" + """USER_ASSIGNED.""" SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + """SYSTEM_ASSIGNED_USER_ASSIGNED.""" NONE = "None" + """NONE.""" class ApiType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of API.""" HTTP = "http" + """HTTP.""" SOAP = "soap" + """SOAP.""" WEBSOCKET = "websocket" + """WEBSOCKET.""" GRAPHQL = "graphql" + """GRAPHQL.""" ODATA = "odata" + """ODATA.""" GRPC = "grpc" + """GRPC.""" class AppType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """AppType.""" + """Type of AppType.""" PORTAL = "portal" """User create request was sent by legacy developer portal.""" @@ -105,38 +124,41 @@ class AsyncOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Status of an async operation.""" STARTED = "Started" + """STARTED.""" IN_PROGRESS = "InProgress" + """IN_PROGRESS.""" SUCCEEDED = "Succeeded" + """SUCCEEDED.""" FAILED = "Failed" - - -class AsyncResolverStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Status of an async resolver.""" - - STARTED = "Started" - IN_PROGRESS = "InProgress" - SUCCEEDED = "Succeeded" - FAILED = "Failed" + """FAILED.""" class AuthorizationMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """AuthorizationMethod.""" + """Type of AuthorizationMethod.""" HEAD = "HEAD" + """HEAD.""" OPTIONS = "OPTIONS" + """OPTIONS.""" TRACE = "TRACE" + """TRACE.""" GET = "GET" + """GET.""" POST = "POST" + """POST.""" PUT = "PUT" + """PUT.""" PATCH = "PATCH" + """PATCH.""" DELETE = "DELETE" + """DELETE.""" class AuthorizationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Authorization type options.""" O_AUTH2 = "OAuth2" - """OAuth2 authorization type""" + """OAuth2 authorization type.""" class BackendProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -160,23 +182,25 @@ class BackendType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of the backend. A backend can be either Single or Pool.""" SINGLE = "Single" - """supports single backend""" + """supports single backend.""" POOL = "Pool" - """supports pool backend""" + """supports pool backend.""" class BearerTokenSendingMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """BearerTokenSendingMethod.""" + """Type of BearerTokenSendingMethod.""" AUTHORIZATION_HEADER = "authorizationHeader" + """AUTHORIZATION_HEADER.""" QUERY = "query" + """QUERY.""" class BearerTokenSendingMethods(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Form of an authorization grant, which the client uses to request the access token.""" AUTHORIZATION_HEADER = "authorizationHeader" - """Access token will be transmitted in the Authorization header using Bearer schema""" + """Access token will be transmitted in the Authorization header using Bearer schema.""" QUERY = "query" """Access token will be transmitted as query parameters.""" @@ -190,15 +214,15 @@ class CarbonEmissionCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ VERY_LOW = "VeryLow" - """Carbon intensity of less than or equal to 150 grams COâ‚‚e per KWh""" + """Carbon intensity of less than or equal to 150 grams COâ‚‚e per KWh.""" LOW = "Low" - """Carbon intensity between 151 & 300 (incl) grams COâ‚‚e per KWh""" + """Carbon intensity between 151 & 300 (incl) grams COâ‚‚e per KWh.""" MEDIUM = "Medium" - """Carbon intensity between 301 & 500 (incl) grams COâ‚‚e per KWh""" + """Carbon intensity between 301 & 500 (incl) grams COâ‚‚e per KWh.""" HIGH = "High" - """Carbon intensity between 501 & 700 (incl) grams COâ‚‚e per KWh""" + """Carbon intensity between 501 & 700 (incl) grams COâ‚‚e per KWh.""" VERY_HIGH = "VeryHigh" - """Carbon intensity of more than 700 grams COâ‚‚e per KWh""" + """Carbon intensity of more than 700 grams COâ‚‚e per KWh.""" class CertificateConfigurationStoreName(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -207,24 +231,33 @@ class CertificateConfigurationStoreName(str, Enum, metaclass=CaseInsensitiveEnum """ CERTIFICATE_AUTHORITY = "CertificateAuthority" + """CERTIFICATE_AUTHORITY.""" ROOT = "Root" + """ROOT.""" class CertificateSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Certificate Source.""" MANAGED = "Managed" + """MANAGED.""" KEY_VAULT = "KeyVault" + """KEY_VAULT.""" CUSTOM = "Custom" + """CUSTOM.""" BUILT_IN = "BuiltIn" + """BUILT_IN.""" class CertificateStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Certificate Status.""" COMPLETED = "Completed" + """COMPLETED.""" FAILED = "Failed" + """FAILED.""" IN_PROGRESS = "InProgress" + """IN_PROGRESS.""" class ClientApplicationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -238,15 +271,15 @@ class ClientApplicationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): active and rejected without any approved).""" ACTIVE = "active" """If there are no approved ClientApplicationLink, but at least one ClientApplicationLink is - active, the Application is considered active""" + active, the Application is considered active.""" REJECTED = "rejected" - """If all ClientApplicationLinks are rejected, the Application is considered rejected""" + """If all ClientApplicationLinks are rejected, the Application is considered rejected.""" APPROVED = "approved" - """If at least one ClientApplicationLink is approved, the Application is considered approved""" + """If at least one ClientApplicationLink is approved, the Application is considered approved.""" class ClientAuthenticationMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """ClientAuthenticationMethod.""" + """Type of ClientAuthenticationMethod.""" BASIC = "Basic" """Basic Client Authentication method.""" @@ -255,9 +288,10 @@ class ClientAuthenticationMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ConfigurationIdName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """ConfigurationIdName.""" + """Type of ConfigurationIdName.""" CONFIGURATION = "configuration" + """CONFIGURATION.""" class Confirmation(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -273,9 +307,13 @@ class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The connection status.""" UNKNOWN = "Unknown" + """UNKNOWN.""" CONNECTED = "Connected" + """CONNECTED.""" DISCONNECTED = "Disconnected" + """DISCONNECTED.""" DEGRADED = "Degraded" + """DEGRADED.""" class ConnectivityCheckProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -284,16 +322,22 @@ class ConnectivityCheckProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ TCP = "TCP" + """TCP.""" HTTP = "HTTP" + """HTTP.""" HTTPS = "HTTPS" + """HTTPS.""" class ConnectivityStatusType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Resource Connectivity Status Type identifier.""" INITIALIZING = "initializing" + """INITIALIZING.""" SUCCESS = "success" + """SUCCESS.""" FAILURE = "failure" + """FAILURE.""" class ContentFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -334,12 +378,16 @@ class ContentFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of identity that created the resource.""" + """The kind of entity that created the resource.""" USER = "User" + """The entity was created by a user.""" APPLICATION = "Application" + """The entity was created by an application.""" MANAGED_IDENTITY = "ManagedIdentity" + """The entity was created by a managed identity.""" KEY = "Key" + """The entity was created by a key.""" class DataMaskingMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -361,19 +409,20 @@ class DeveloperPortalStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ExportApi(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """ExportApi.""" + """Type of ExportApi.""" TRUE = "true" + """TRUE.""" class ExportFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """ExportFormat.""" + """Type of ExportFormat.""" SWAGGER = "swagger-link" """Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob.""" WSDL = "wsdl-link" """Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of - Type ``soap``""" + Type ``soap``.""" WADL = "wadl-link" """Export the Api Definition in WADL Schema to Storage Blob.""" OPENAPI = "openapi-link" @@ -389,11 +438,11 @@ class ExportResultFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): SWAGGER = "swagger-link-json" """The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob.""" - WSDL = "wsdl-link+xml" - """The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs - of Type ``soap``""" WADL = "wadl-link-json" """Export the API Definition in WADL Schema to Storage Blob.""" + WSDL = "wsdl-link+xml" + """The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs + of Type ``soap``.""" OPEN_API = "openapi-link" """Export the API Definition in OpenAPI Specification 3.0 to Storage Blob.""" @@ -419,36 +468,49 @@ class GatewaySkuCapacityScaleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class GrantType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """GrantType.""" + """Type of GrantType.""" AUTHORIZATION_CODE = "authorizationCode" - """Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1.""" + """Authorization Code Grant flow as described `https://tools.ietf.org/html/rfc6749#section-4.1 + `_.""" IMPLICIT = "implicit" - """Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2.""" + """Implicit Code Grant flow as described `https://tools.ietf.org/html/rfc6749#section-4.2 + `_.""" RESOURCE_OWNER_PASSWORD = "resourceOwnerPassword" """Resource Owner Password Grant flow as described - https://tools.ietf.org/html/rfc6749#section-4.3.""" + `https://tools.ietf.org/html/rfc6749#section-4.3 + `_.""" CLIENT_CREDENTIALS = "clientCredentials" - """Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4.""" + """Client Credentials Grant flow as described `https://tools.ietf.org/html/rfc6749#section-4.4 + `_.""" class GroupType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Group type.""" CUSTOM = "custom" + """CUSTOM.""" SYSTEM = "system" + """SYSTEM.""" EXTERNAL = "external" + """EXTERNAL.""" class HostnameType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Hostname type.""" PROXY = "Proxy" + """PROXY.""" PORTAL = "Portal" + """PORTAL.""" MANAGEMENT = "Management" + """MANAGEMENT.""" SCM = "Scm" + """SCM.""" DEVELOPER_PORTAL = "DeveloperPortal" + """DEVELOPER_PORTAL.""" CONFIGURATION_API = "ConfigurationApi" + """CONFIGURATION_API.""" class HttpCorrelationProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -458,13 +520,15 @@ class HttpCorrelationProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Do not read and inject correlation headers.""" LEGACY = "Legacy" """Inject Request-Id and Request-Context headers with request correlation data. See - https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md.""" + `https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md + `_.""" W3_C = "W3C" - """Inject Trace Context headers. See https://w3c.github.io/trace-context.""" + """Inject Trace Context headers. See `https://w3c.github.io/trace-context + `_.""" class IdentityProviderType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """IdentityProviderType.""" + """Type of IdentityProviderType.""" FACEBOOK = "facebook" """Facebook as Identity provider.""" @@ -484,37 +548,50 @@ class IssueType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of issue.""" UNKNOWN = "Unknown" + """UNKNOWN.""" AGENT_STOPPED = "AgentStopped" + """AGENT_STOPPED.""" GUEST_FIREWALL = "GuestFirewall" + """GUEST_FIREWALL.""" DNS_RESOLUTION = "DnsResolution" + """DNS_RESOLUTION.""" SOCKET_BIND = "SocketBind" + """SOCKET_BIND.""" NETWORK_SECURITY_RULE = "NetworkSecurityRule" + """NETWORK_SECURITY_RULE.""" USER_DEFINED_ROUTE = "UserDefinedRoute" + """USER_DEFINED_ROUTE.""" PORT_THROTTLED = "PortThrottled" + """PORT_THROTTLED.""" PLATFORM = "Platform" + """PLATFORM.""" class KeyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Key to be used to generate token for user.""" PRIMARY = "primary" + """PRIMARY.""" SECONDARY = "secondary" + """SECONDARY.""" class KeyVaultFetchCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The last status of the Key Vault certificate fetch process.""" SUCCESS = "Success" + """SUCCESS.""" FAILED = "Failed" + """FAILED.""" class KeyVaultRefreshState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """KeyVaultRefreshState.""" + """Type of KeyVaultRefreshState.""" TRUE = "true" """Entities for which KeyVault refresh failed.""" FALSE = "false" - """Entities for which KeyVault refresh succeeded""" + """Entities for which KeyVault refresh succeeded.""" class LegacyApiState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -542,7 +619,7 @@ class LegacyPortalStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class LlmDiagnosticSettings(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """LlmDiagnosticSettings.""" + """Type of LlmDiagnosticSettings.""" ENABLED = "enabled" """Default LLM logs are enabled.""" @@ -551,7 +628,7 @@ class LlmDiagnosticSettings(str, Enum, metaclass=CaseInsensitiveEnumMeta): class LlmMessageLogTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """LlmMessageLogTypes.""" + """Type of LlmMessageLogTypes.""" ALL = "all" """Log all messages.""" @@ -565,7 +642,7 @@ class LoggerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): APPLICATION_INSIGHTS = "applicationInsights" """Azure Application Insights as log destination.""" AZURE_MONITOR = "azureMonitor" - """Azure Monitor""" + """Azure Monitor.""" class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -574,16 +651,22 @@ class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ NONE = "None" + """No managed identity.""" SYSTEM_ASSIGNED = "SystemAssigned" + """System assigned managed identity.""" USER_ASSIGNED = "UserAssigned" + """User assigned managed identity.""" SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" + """System and user assigned managed identity.""" class Method(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The HTTP method to be used.""" GET = "GET" + """GET.""" POST = "POST" + """POST.""" class MigrateToStv2Mode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -605,8 +688,11 @@ class NameAvailabilityReason(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ VALID = "Valid" + """VALID.""" INVALID = "Invalid" + """INVALID.""" ALREADY_EXISTS = "AlreadyExists" + """ALREADY_EXISTS.""" class NatGatewayState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -619,7 +705,7 @@ class NatGatewayState(str, Enum, metaclass=CaseInsensitiveEnumMeta): class NotificationName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """NotificationName.""" + """Type of NotificationName.""" REQUEST_PUBLISHER_NOTIFICATION_MESSAGE = "RequestPublisherNotificationMessage" """The following email recipients and users will receive email notifications about subscription @@ -647,26 +733,29 @@ class OAuth2GrantType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """OAuth2 grant type options.""" AUTHORIZATION_CODE = "AuthorizationCode" - """Authorization Code grant""" + """Authorization Code grant.""" CLIENT_CREDENTIALS = "ClientCredentials" - """Client Credential grant""" + """Client Credential grant.""" class OperationNameFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The format of the Operation Name for Application Insights telemetries. Default is Name.""" NAME = "Name" - """API_NAME;rev=API_REVISION - OPERATION_NAME""" + """API_NAME;rev=API_REVISION - OPERATION_NAME.""" URL = "Url" - """HTTP_VERB URL""" + """HTTP_VERB URL.""" class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The origin of the issue.""" LOCAL = "Local" + """LOCAL.""" INBOUND = "Inbound" + """INBOUND.""" OUTBOUND = "Outbound" + """OUTBOUND.""" class PlatformVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -711,7 +800,7 @@ class PolicyContentFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): class PolicyExportFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """PolicyExportFormat.""" + """Type of PolicyExportFormat.""" XML = "xml" """The contents are inline and Content type is an XML document.""" @@ -720,7 +809,7 @@ class PolicyExportFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): class PolicyFragmentContentFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """PolicyFragmentContentFormat.""" + """Type of PolicyFragmentContentFormat.""" XML = "xml" """The contents are inline and Content type is an XML document.""" @@ -729,28 +818,34 @@ class PolicyFragmentContentFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): class PolicyIdName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """PolicyIdName.""" + """Type of PolicyIdName.""" POLICY = "policy" + """POLICY.""" class PolicyRestrictionRequireBase(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Indicates if base policy should be enforced for the policy document.""" TRUE = "true" - """The policy is required to have base policy""" + """The policy is required to have base policy.""" FALSE = "false" - """The policy does not require to have base policy""" + """The policy does not require to have base policy.""" class PolicyScopeContract(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """PolicyScopeContract.""" + """Type of PolicyScopeContract.""" TENANT = "Tenant" + """TENANT.""" PRODUCT = "Product" + """PRODUCT.""" API = "Api" + """API.""" OPERATION = "Operation" + """OPERATION.""" ALL = "All" + """ALL.""" class PortalRevisionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -781,6 +876,7 @@ class PreferredIPVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The IP version to be used. Only IPv4 is supported for now.""" I_PV4 = "IPv4" + """I_PV4.""" class PrivateEndpointConnectionProvisioningState( # pylint: disable=name-too-long @@ -789,24 +885,33 @@ class PrivateEndpointConnectionProvisioningState( # pylint: disable=name-too-lo """The current provisioning state.""" SUCCEEDED = "Succeeded" + """Connection has been provisioned.""" CREATING = "Creating" + """Connection is being created.""" DELETING = "Deleting" + """Connection is being deleted.""" FAILED = "Failed" + """Connection provisioning has failed.""" class PrivateEndpointServiceConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The private endpoint connection status.""" PENDING = "Pending" + """Connection waiting for approval or rejection.""" APPROVED = "Approved" + """Connection approved.""" REJECTED = "Rejected" + """Connection Rejected.""" class ProductAuthType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """ProductAuthType.""" + """Type of ProductAuthType.""" SUBSCRIPTION_KEY = "subscription-key" + """SUBSCRIPTION_KEY.""" APPLICATION_TOKEN = "application-token" + """APPLICATION_TOKEN.""" class ProductState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -816,16 +921,22 @@ class ProductState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ NOT_PUBLISHED = "notPublished" + """NOT_PUBLISHED.""" PUBLISHED = "published" + """PUBLISHED.""" class Protocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Protocol.""" + """Type of Protocol.""" HTTP = "http" + """HTTP.""" HTTPS = "https" + """HTTPS.""" WS = "ws" + """WS.""" WSS = "wss" + """WSS.""" class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -835,7 +946,9 @@ class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ ENABLED = "Enabled" + """ENABLED.""" DISABLED = "Disabled" + """DISABLED.""" class ReleaseChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -877,16 +990,19 @@ class SchemaType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class SettingsTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """SettingsTypeName.""" + """Type of SettingsTypeName.""" PUBLIC = "public" + """PUBLIC.""" class Severity(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The severity of the issue.""" ERROR = "Error" + """ERROR.""" WARNING = "Warning" + """WARNING.""" class SkuType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -915,12 +1031,11 @@ class SkuType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class SoapApiType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of API to create. - - * ``http`` creates a REST API - * ``soap`` creates a SOAP pass-through API - * ``websocket`` creates websocket API - * ``graphql`` creates GraphQL API. - New types can be added in the future. + * `http` creates a REST API + * `soap` creates a SOAP pass-through API + * `websocket` creates websocket API + * `graphql` creates GraphQL API. + New types can be added in the future. """ SOAP_TO_REST = "http" @@ -962,30 +1077,50 @@ class SubscriptionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ SUSPENDED = "suspended" + """SUSPENDED.""" ACTIVE = "active" + """ACTIVE.""" EXPIRED = "expired" + """EXPIRED.""" SUBMITTED = "submitted" + """SUBMITTED.""" REJECTED = "rejected" + """REJECTED.""" CANCELLED = "cancelled" + """CANCELLED.""" class TemplateName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """TemplateName.""" + """Type of TemplateName.""" APPLICATION_APPROVED_NOTIFICATION_MESSAGE = "applicationApprovedNotificationMessage" + """APPLICATION_APPROVED_NOTIFICATION_MESSAGE.""" ACCOUNT_CLOSED_DEVELOPER = "accountClosedDeveloper" + """ACCOUNT_CLOSED_DEVELOPER.""" QUOTA_LIMIT_APPROACHING_DEVELOPER_NOTIFICATION_MESSAGE = "quotaLimitApproachingDeveloperNotificationMessage" + """QUOTA_LIMIT_APPROACHING_DEVELOPER_NOTIFICATION_MESSAGE.""" NEW_DEVELOPER_NOTIFICATION_MESSAGE = "newDeveloperNotificationMessage" + """NEW_DEVELOPER_NOTIFICATION_MESSAGE.""" EMAIL_CHANGE_IDENTITY_DEFAULT = "emailChangeIdentityDefault" + """EMAIL_CHANGE_IDENTITY_DEFAULT.""" INVITE_USER_NOTIFICATION_MESSAGE = "inviteUserNotificationMessage" + """INVITE_USER_NOTIFICATION_MESSAGE.""" NEW_COMMENT_NOTIFICATION_MESSAGE = "newCommentNotificationMessage" + """NEW_COMMENT_NOTIFICATION_MESSAGE.""" CONFIRM_SIGN_UP_IDENTITY_DEFAULT = "confirmSignUpIdentityDefault" + """CONFIRM_SIGN_UP_IDENTITY_DEFAULT.""" NEW_ISSUE_NOTIFICATION_MESSAGE = "newIssueNotificationMessage" + """NEW_ISSUE_NOTIFICATION_MESSAGE.""" PURCHASE_DEVELOPER_NOTIFICATION_MESSAGE = "purchaseDeveloperNotificationMessage" + """PURCHASE_DEVELOPER_NOTIFICATION_MESSAGE.""" PASSWORD_RESET_IDENTITY_DEFAULT = "passwordResetIdentityDefault" + """PASSWORD_RESET_IDENTITY_DEFAULT.""" PASSWORD_RESET_BY_ADMIN_NOTIFICATION_MESSAGE = "passwordResetByAdminNotificationMessage" + """PASSWORD_RESET_BY_ADMIN_NOTIFICATION_MESSAGE.""" REJECT_DEVELOPER_NOTIFICATION_MESSAGE = "rejectDeveloperNotificationMessage" + """REJECT_DEVELOPER_NOTIFICATION_MESSAGE.""" REQUEST_DEVELOPER_NOTIFICATION_MESSAGE = "requestDeveloperNotificationMessage" + """REQUEST_DEVELOPER_NOTIFICATION_MESSAGE.""" class TranslateRequiredQueryParametersConduct(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -994,7 +1129,7 @@ class TranslateRequiredQueryParametersConduct(str, Enum, metaclass=CaseInsensiti """ TEMPLATE = "template" - """Translates required query parameters to template ones. Is a default value""" + """Translates required query parameters to template ones. Is a default value.""" QUERY = "query" """Leaves required query parameters as they are (no translation done).""" diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py new file mode 100644 index 000000000000..8c3c3c39b25b --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py @@ -0,0 +1,21629 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=useless-super-delegation + +import datetime +from typing import Any, Literal, Mapping, Optional, TYPE_CHECKING, Union, overload + +from .._utils.model_base import Model as _Model, rest_field + +if TYPE_CHECKING: + from .. import models as _models + + +class Resource(_Model): + """Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the resource.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or + \"Microsoft.Storage/storageAccounts\".""" + system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +class ProxyResource(Resource): + """Proxy Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + """ + + +class AccessInformationContract(ProxyResource): + """Tenant Settings. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: AccessInformation entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.AccessInformationContractProperties + """ + + properties: Optional["_models.AccessInformationContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """AccessInformation entity contract properties.""" + + __flattened_items = ["id", "principal_id", "enabled"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AccessInformationContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AccessInformationContractProperties(_Model): + """Tenant access information contract of the API Management service. + + :ivar id: Access Information type ('access' or 'gitAccess'). + :vartype id: str + :ivar principal_id: Principal (User) Identifier. + :vartype principal_id: str + :ivar enabled: Determines whether direct access is enabled. + :vartype enabled: bool + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Access Information type ('access' or 'gitAccess').""" + principal_id: Optional[str] = rest_field( + name="principalId", visibility=["read", "create", "update", "delete", "query"] + ) + """Principal (User) Identifier.""" + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Determines whether direct access is enabled.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + principal_id: Optional[str] = None, + enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessInformationCreateParameterProperties(_Model): # pylint: disable=name-too-long + """Tenant access information update parameters of the API Management service. + + :ivar principal_id: Principal (User) Identifier. + :vartype principal_id: str + :ivar primary_key: Primary access key. This property will not be filled on 'GET' operations! + Use '/listSecrets' POST request to get the value. + :vartype primary_key: str + :ivar secondary_key: Secondary access key. This property will not be filled on 'GET' + operations! Use '/listSecrets' POST request to get the value. + :vartype secondary_key: str + :ivar enabled: Determines whether direct access is enabled. + :vartype enabled: bool + """ + + principal_id: Optional[str] = rest_field( + name="principalId", visibility=["read", "create", "update", "delete", "query"] + ) + """Principal (User) Identifier.""" + primary_key: Optional[str] = rest_field( + name="primaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' + POST request to get the value.""" + secondary_key: Optional[str] = rest_field( + name="secondaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' + POST request to get the value.""" + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Determines whether direct access is enabled.""" + + @overload + def __init__( + self, + *, + principal_id: Optional[str] = None, + primary_key: Optional[str] = None, + secondary_key: Optional[str] = None, + enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessInformationCreateParameters(_Model): + """Tenant access information update parameters. + + :ivar properties: Tenant access information update parameter properties. + :vartype properties: + ~azure.mgmt.apimanagement.models.AccessInformationCreateParameterProperties + """ + + properties: Optional["_models.AccessInformationCreateParameterProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Tenant access information update parameter properties.""" + + __flattened_items = ["principal_id", "primary_key", "secondary_key", "enabled"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AccessInformationCreateParameterProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AccessInformationSecretsContract(_Model): + """Tenant access information contract of the API Management service. + + :ivar id: Access Information type ('access' or 'gitAccess'). + :vartype id: str + :ivar principal_id: Principal (User) Identifier. + :vartype principal_id: str + :ivar primary_key: Primary access key. This property will not be filled on 'GET' operations! + Use '/listSecrets' POST request to get the value. + :vartype primary_key: str + :ivar secondary_key: Secondary access key. This property will not be filled on 'GET' + operations! Use '/listSecrets' POST request to get the value. + :vartype secondary_key: str + :ivar enabled: Determines whether direct access is enabled. + :vartype enabled: bool + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Access Information type ('access' or 'gitAccess').""" + principal_id: Optional[str] = rest_field( + name="principalId", visibility=["read", "create", "update", "delete", "query"] + ) + """Principal (User) Identifier.""" + primary_key: Optional[str] = rest_field( + name="primaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' + POST request to get the value.""" + secondary_key: Optional[str] = rest_field( + name="secondaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' + POST request to get the value.""" + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Determines whether direct access is enabled.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + principal_id: Optional[str] = None, + primary_key: Optional[str] = None, + secondary_key: Optional[str] = None, + enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessInformationUpdateParameterProperties(_Model): # pylint: disable=name-too-long + """Tenant access information update parameters of the API Management service. + + :ivar enabled: Determines whether direct access is enabled. + :vartype enabled: bool + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Determines whether direct access is enabled.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessInformationUpdateParameters(_Model): + """Tenant access information update parameters. + + :ivar properties: Tenant access information update parameter properties. + :vartype properties: + ~azure.mgmt.apimanagement.models.AccessInformationUpdateParameterProperties + """ + + properties: Optional["_models.AccessInformationUpdateParameterProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Tenant access information update parameter properties.""" + + __flattened_items = ["enabled"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AccessInformationUpdateParameterProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AdditionalLocation(_Model): + """Description of an additional API Management resource location. + + :ivar location: The location name of the additional region among Azure Data center regions. + Required. + :vartype location: str + :ivar sku: SKU properties of the API Management service. Required. + :vartype sku: ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties + :ivar zones: A list of availability zones denoting where the resource needs to come from. + :vartype zones: list[str] + :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management + service in the additional location. Available only for Basic, Standard, Premium and Isolated + SKU. + :vartype public_ip_addresses: list[str] + :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management + service which is deployed in an Internal Virtual Network in a particular additional location. + Available only for Basic, Standard, Premium and Isolated SKU. + :vartype private_ip_addresses: list[str] + :ivar public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the location. Supported only for Premium SKU being deployed + in Virtual Network. + :vartype public_ip_address_id: str + :ivar virtual_network_configuration: Virtual network configuration for the location. + :vartype virtual_network_configuration: + ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration + :ivar gateway_regional_url: Gateway URL of the API Management service in the Region. + :vartype gateway_regional_url: str + :ivar nat_gateway_state: Property can be used to enable NAT Gateway for this API Management + service. Known values are: "Enabled" and "Disabled". + :vartype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState + :ivar outbound_public_ip_addresses: Outbound public IPV4 address prefixes associated with NAT + Gateway deployed service. Available only for Premium SKU on stv2 platform. + :vartype outbound_public_ip_addresses: list[str] + :ivar disable_gateway: Property only valid for an Api Management service deployed in multiple + locations. This can be used to disable the gateway in this additional location. + :vartype disable_gateway: bool + :ivar platform_version: Compute Platform Version running the service. Known values are: + "undetermined", "stv1", "stv2", "mtv1", and "stv2.1". + :vartype platform_version: str or ~azure.mgmt.apimanagement.models.PlatformVersion + """ + + location: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The location name of the additional region among Azure Data center regions. Required.""" + sku: "_models.ApiManagementServiceSkuProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """SKU properties of the API Management service. Required.""" + zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A list of availability zones denoting where the resource needs to come from.""" + public_ip_addresses: Optional[list[str]] = rest_field(name="publicIPAddresses", visibility=["read"]) + """Public Static Load Balanced IP addresses of the API Management service in the additional + location. Available only for Basic, Standard, Premium and Isolated SKU.""" + private_ip_addresses: Optional[list[str]] = rest_field(name="privateIPAddresses", visibility=["read"]) + """Private Static Load Balanced IP addresses of the API Management service which is deployed in an + Internal Virtual Network in a particular additional location. Available only for Basic, + Standard, Premium and Isolated SKU.""" + public_ip_address_id: Optional[str] = rest_field( + name="publicIpAddressId", visibility=["read", "create", "update", "delete", "query"] + ) + """Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed + service in the location. Supported only for Premium SKU being deployed in Virtual Network.""" + virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = rest_field( + name="virtualNetworkConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Virtual network configuration for the location.""" + gateway_regional_url: Optional[str] = rest_field(name="gatewayRegionalUrl", visibility=["read"]) + """Gateway URL of the API Management service in the Region.""" + nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = rest_field( + name="natGatewayState", visibility=["read", "create", "update", "delete", "query"] + ) + """Property can be used to enable NAT Gateway for this API Management service. Known values are: + \"Enabled\" and \"Disabled\".""" + outbound_public_ip_addresses: Optional[list[str]] = rest_field( + name="outboundPublicIPAddresses", visibility=["read"] + ) + """Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available + only for Premium SKU on stv2 platform.""" + disable_gateway: Optional[bool] = rest_field( + name="disableGateway", visibility=["read", "create", "update", "delete", "query"] + ) + """Property only valid for an Api Management service deployed in multiple locations. This can be + used to disable the gateway in this additional location.""" + platform_version: Optional[Union[str, "_models.PlatformVersion"]] = rest_field( + name="platformVersion", visibility=["read"] + ) + """Compute Platform Version running the service. Known values are: \"undetermined\", \"stv1\", + \"stv2\", \"mtv1\", and \"stv2.1\".""" + + @overload + def __init__( + self, + *, + location: str, + sku: "_models.ApiManagementServiceSkuProperties", + zones: Optional[list[str]] = None, + public_ip_address_id: Optional[str] = None, + virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, + nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, + disable_gateway: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AllPoliciesContract(ProxyResource): + """AllPolicies Contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the All Policies. + :vartype properties: ~azure.mgmt.apimanagement.models.AllPoliciesContractProperties + """ + + properties: Optional["_models.AllPoliciesContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the All Policies.""" + + __flattened_items = ["reference_policy_id", "compliance_state"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AllPoliciesContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AllPoliciesContractProperties(_Model): + """AllPolicies Properties. + + :ivar reference_policy_id: Policy Identifier. + :vartype reference_policy_id: str + :ivar compliance_state: Policy Restriction Compliance State. Known values are: "Pending", + "NonCompliant", and "Compliant". + :vartype compliance_state: str or ~azure.mgmt.apimanagement.models.PolicyComplianceState + """ + + reference_policy_id: Optional[str] = rest_field( + name="referencePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """Policy Identifier.""" + compliance_state: Optional[Union[str, "_models.PolicyComplianceState"]] = rest_field( + name="complianceState", visibility=["read", "create", "update", "delete", "query"] + ) + """Policy Restriction Compliance State. Known values are: \"Pending\", \"NonCompliant\", and + \"Compliant\".""" + + @overload + def __init__( + self, + *, + reference_policy_id: Optional[str] = None, + compliance_state: Optional[Union[str, "_models.PolicyComplianceState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiContactInformation(_Model): + """API contact information. + + :ivar name: The identifying name of the contact person/organization. + :vartype name: str + :ivar url: The URL pointing to the contact information. MUST be in the format of a URL. + :vartype url: str + :ivar email: The email address of the contact person/organization. MUST be in the format of an + email address. + :vartype email: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The identifying name of the contact person/organization.""" + url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The URL pointing to the contact information. MUST be in the format of a URL.""" + email: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The email address of the contact person/organization. MUST be in the format of an email + address.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + url: Optional[str] = None, + email: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiContract(ProxyResource): + """API details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: API entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.ApiContractProperties + """ + + properties: Optional["_models.ApiContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """API entity contract properties.""" + + __flattened_items = [ + "description", + "authentication_settings", + "subscription_key_parameter_names", + "api_type", + "api_revision", + "api_version", + "is_current", + "is_online", + "api_revision_description", + "api_version_description", + "api_version_set_id", + "subscription_required", + "terms_of_service_url", + "contact", + "license", + "source_api_id", + "display_name", + "service_url", + "path", + "protocols", + "api_version_set", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ApiContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ApiEntityBaseContract(_Model): + """API base contract details. + + :ivar description: Description of the API. May include HTML formatting tags. + :vartype description: str + :ivar authentication_settings: Collection of authentication settings included into this API. + :vartype authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :ivar subscription_key_parameter_names: Protocols over which API is made available. + :vartype subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :ivar api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", "odata", + and "grpc". + :vartype api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :ivar api_revision: Describes the revision of the API. If no value is provided, default + revision 1 is created. + :vartype api_revision: str + :ivar api_version: Indicates the version identifier of the API if the API is versioned. + :vartype api_version: str + :ivar is_current: Indicates if API revision is current api revision. + :vartype is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :ivar api_revision_description: Description of the API Revision. + :vartype api_revision_description: str + :ivar api_version_description: Description of the API Version. + :vartype api_version_description: str + :ivar api_version_set_id: A resource identifier for the related ApiVersionSet. + :vartype api_version_set_id: str + :ivar subscription_required: Specifies whether an API or Product subscription is required for + accessing the API. + :vartype subscription_required: bool + :ivar terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format of + a URL. + :vartype terms_of_service_url: str + :ivar contact: Contact information for the API. + :vartype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :ivar license: License information for the API. + :vartype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation + """ + + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of the API. May include HTML formatting tags.""" + authentication_settings: Optional["_models.AuthenticationSettingsContract"] = rest_field( + name="authenticationSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Collection of authentication settings included into this API.""" + subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = rest_field( + name="subscriptionKeyParameterNames", visibility=["read", "create", "update", "delete", "query"] + ) + """Protocols over which API is made available.""" + api_type: Optional[Union[str, "_models.ApiType"]] = rest_field( + name="type", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of API. Known values are: \"http\", \"soap\", \"websocket\", \"graphql\", \"odata\", and + \"grpc\".""" + api_revision: Optional[str] = rest_field( + name="apiRevision", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes the revision of the API. If no value is provided, default revision 1 is created.""" + api_version: Optional[str] = rest_field( + name="apiVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates the version identifier of the API if the API is versioned.""" + is_current: Optional[bool] = rest_field( + name="isCurrent", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates if API revision is current api revision.""" + is_online: Optional[bool] = rest_field(name="isOnline", visibility=["read"]) + """Indicates if API revision is accessible via the gateway.""" + api_revision_description: Optional[str] = rest_field( + name="apiRevisionDescription", visibility=["read", "create", "update", "delete", "query"] + ) + """Description of the API Revision.""" + api_version_description: Optional[str] = rest_field( + name="apiVersionDescription", visibility=["read", "create", "update", "delete", "query"] + ) + """Description of the API Version.""" + api_version_set_id: Optional[str] = rest_field( + name="apiVersionSetId", visibility=["read", "create", "update", "delete", "query"] + ) + """A resource identifier for the related ApiVersionSet.""" + subscription_required: Optional[bool] = rest_field( + name="subscriptionRequired", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether an API or Product subscription is required for accessing the API.""" + terms_of_service_url: Optional[str] = rest_field( + name="termsOfServiceUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """A URL to the Terms of Service for the API. MUST be in the format of a URL.""" + contact: Optional["_models.ApiContactInformation"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Contact information for the API.""" + license: Optional["_models.ApiLicenseInformation"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """License information for the API.""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + authentication_settings: Optional["_models.AuthenticationSettingsContract"] = None, + subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = None, + api_type: Optional[Union[str, "_models.ApiType"]] = None, + api_revision: Optional[str] = None, + api_version: Optional[str] = None, + is_current: Optional[bool] = None, + api_revision_description: Optional[str] = None, + api_version_description: Optional[str] = None, + api_version_set_id: Optional[str] = None, + subscription_required: Optional[bool] = None, + terms_of_service_url: Optional[str] = None, + contact: Optional["_models.ApiContactInformation"] = None, + license: Optional["_models.ApiLicenseInformation"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiContractProperties(ApiEntityBaseContract): + """API Entity Properties. + + :ivar description: Description of the API. May include HTML formatting tags. + :vartype description: str + :ivar authentication_settings: Collection of authentication settings included into this API. + :vartype authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :ivar subscription_key_parameter_names: Protocols over which API is made available. + :vartype subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :ivar api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", "odata", + and "grpc". + :vartype api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :ivar api_revision: Describes the revision of the API. If no value is provided, default + revision 1 is created. + :vartype api_revision: str + :ivar api_version: Indicates the version identifier of the API if the API is versioned. + :vartype api_version: str + :ivar is_current: Indicates if API revision is current api revision. + :vartype is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :ivar api_revision_description: Description of the API Revision. + :vartype api_revision_description: str + :ivar api_version_description: Description of the API Version. + :vartype api_version_description: str + :ivar api_version_set_id: A resource identifier for the related ApiVersionSet. + :vartype api_version_set_id: str + :ivar subscription_required: Specifies whether an API or Product subscription is required for + accessing the API. + :vartype subscription_required: bool + :ivar terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format of + a URL. + :vartype terms_of_service_url: str + :ivar contact: Contact information for the API. + :vartype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :ivar license: License information for the API. + :vartype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation + :ivar source_api_id: API identifier of the source API. + :vartype source_api_id: str + :ivar display_name: API name. Must be 1 to 300 characters long. + :vartype display_name: str + :ivar service_url: Absolute URL of the backend service implementing this API. Cannot be more + than 2000 characters long. + :vartype service_url: str + :ivar path: Relative URL uniquely identifying this API and all of its resource paths within the + API Management service instance. It is appended to the API endpoint base URL specified during + the service instance creation to form a public URL for this API. Required. + :vartype path: str + :ivar protocols: Describes on which protocols the operations in this API can be invoked. + :vartype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + :ivar api_version_set: Version set details. + :vartype api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + source_api_id: Optional[str] = rest_field( + name="sourceApiId", visibility=["read", "create", "update", "delete", "query"] + ) + """API identifier of the source API.""" + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """API name. Must be 1 to 300 characters long.""" + service_url: Optional[str] = rest_field( + name="serviceUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters + long.""" + path: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Relative URL uniquely identifying this API and all of its resource paths within the API + Management service instance. It is appended to the API endpoint base URL specified during the + service instance creation to form a public URL for this API. Required.""" + protocols: Optional[list[Union[str, "_models.Protocol"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes on which protocols the operations in this API can be invoked.""" + api_version_set: Optional["_models.ApiVersionSetContractDetails"] = rest_field( + name="apiVersionSet", visibility=["read", "create", "update", "delete", "query"] + ) + """Version set details.""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The provisioning state.""" + + @overload + def __init__( + self, + *, + path: str, + description: Optional[str] = None, + authentication_settings: Optional["_models.AuthenticationSettingsContract"] = None, + subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = None, + api_type: Optional[Union[str, "_models.ApiType"]] = None, + api_revision: Optional[str] = None, + api_version: Optional[str] = None, + is_current: Optional[bool] = None, + api_revision_description: Optional[str] = None, + api_version_description: Optional[str] = None, + api_version_set_id: Optional[str] = None, + subscription_required: Optional[bool] = None, + terms_of_service_url: Optional[str] = None, + contact: Optional["_models.ApiContactInformation"] = None, + license: Optional["_models.ApiLicenseInformation"] = None, + source_api_id: Optional[str] = None, + display_name: Optional[str] = None, + service_url: Optional[str] = None, + protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, + api_version_set: Optional["_models.ApiVersionSetContractDetails"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiContractUpdateProperties(ApiEntityBaseContract): + """API update contract properties. + + :ivar description: Description of the API. May include HTML formatting tags. + :vartype description: str + :ivar authentication_settings: Collection of authentication settings included into this API. + :vartype authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :ivar subscription_key_parameter_names: Protocols over which API is made available. + :vartype subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :ivar api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", "odata", + and "grpc". + :vartype api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :ivar api_revision: Describes the revision of the API. If no value is provided, default + revision 1 is created. + :vartype api_revision: str + :ivar api_version: Indicates the version identifier of the API if the API is versioned. + :vartype api_version: str + :ivar is_current: Indicates if API revision is current api revision. + :vartype is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :ivar api_revision_description: Description of the API Revision. + :vartype api_revision_description: str + :ivar api_version_description: Description of the API Version. + :vartype api_version_description: str + :ivar api_version_set_id: A resource identifier for the related ApiVersionSet. + :vartype api_version_set_id: str + :ivar subscription_required: Specifies whether an API or Product subscription is required for + accessing the API. + :vartype subscription_required: bool + :ivar terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format of + a URL. + :vartype terms_of_service_url: str + :ivar contact: Contact information for the API. + :vartype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :ivar license: License information for the API. + :vartype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation + :ivar display_name: API name. + :vartype display_name: str + :ivar service_url: Absolute URL of the backend service implementing this API. + :vartype service_url: str + :ivar path: Relative URL uniquely identifying this API and all of its resource paths within the + API Management service instance. It is appended to the API endpoint base URL specified during + the service instance creation to form a public URL for this API. + :vartype path: str + :ivar protocols: Describes on which protocols the operations in this API can be invoked. + :vartype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + """ + + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """API name.""" + service_url: Optional[str] = rest_field( + name="serviceUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Absolute URL of the backend service implementing this API.""" + path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Relative URL uniquely identifying this API and all of its resource paths within the API + Management service instance. It is appended to the API endpoint base URL specified during the + service instance creation to form a public URL for this API.""" + protocols: Optional[list[Union[str, "_models.Protocol"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes on which protocols the operations in this API can be invoked.""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + authentication_settings: Optional["_models.AuthenticationSettingsContract"] = None, + subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = None, + api_type: Optional[Union[str, "_models.ApiType"]] = None, + api_revision: Optional[str] = None, + api_version: Optional[str] = None, + is_current: Optional[bool] = None, + api_revision_description: Optional[str] = None, + api_version_description: Optional[str] = None, + api_version_set_id: Optional[str] = None, + subscription_required: Optional[bool] = None, + terms_of_service_url: Optional[str] = None, + contact: Optional["_models.ApiContactInformation"] = None, + license: Optional["_models.ApiLicenseInformation"] = None, + display_name: Optional[str] = None, + service_url: Optional[str] = None, + path: Optional[str] = None, + protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiCreateOrUpdateParameter(_Model): + """API Create or Update Parameters. + + :ivar properties: API entity create of update properties. + :vartype properties: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateProperties + """ + + properties: Optional["_models.ApiCreateOrUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """API entity create of update properties.""" + + __flattened_items = [ + "description", + "authentication_settings", + "subscription_key_parameter_names", + "api_type", + "api_revision", + "api_version", + "is_current", + "is_online", + "api_revision_description", + "api_version_description", + "api_version_set_id", + "subscription_required", + "terms_of_service_url", + "contact", + "license", + "source_api_id", + "display_name", + "service_url", + "path", + "protocols", + "api_version_set", + "provisioning_state", + "value", + "format", + "wsdl_selector", + "soap_api_type", + "translate_required_query_parameters_conduct", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ApiCreateOrUpdateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ApiCreateOrUpdateProperties(ApiContractProperties): + """API Create or Update Properties. + + :ivar description: Description of the API. May include HTML formatting tags. + :vartype description: str + :ivar authentication_settings: Collection of authentication settings included into this API. + :vartype authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :ivar subscription_key_parameter_names: Protocols over which API is made available. + :vartype subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :ivar api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", "odata", + and "grpc". + :vartype api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :ivar api_revision: Describes the revision of the API. If no value is provided, default + revision 1 is created. + :vartype api_revision: str + :ivar api_version: Indicates the version identifier of the API if the API is versioned. + :vartype api_version: str + :ivar is_current: Indicates if API revision is current api revision. + :vartype is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :ivar api_revision_description: Description of the API Revision. + :vartype api_revision_description: str + :ivar api_version_description: Description of the API Version. + :vartype api_version_description: str + :ivar api_version_set_id: A resource identifier for the related ApiVersionSet. + :vartype api_version_set_id: str + :ivar subscription_required: Specifies whether an API or Product subscription is required for + accessing the API. + :vartype subscription_required: bool + :ivar terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format of + a URL. + :vartype terms_of_service_url: str + :ivar contact: Contact information for the API. + :vartype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :ivar license: License information for the API. + :vartype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation + :ivar source_api_id: API identifier of the source API. + :vartype source_api_id: str + :ivar display_name: API name. Must be 1 to 300 characters long. + :vartype display_name: str + :ivar service_url: Absolute URL of the backend service implementing this API. Cannot be more + than 2000 characters long. + :vartype service_url: str + :ivar path: Relative URL uniquely identifying this API and all of its resource paths within the + API Management service instance. It is appended to the API endpoint base URL specified during + the service instance creation to form a public URL for this API. Required. + :vartype path: str + :ivar protocols: Describes on which protocols the operations in this API can be invoked. + :vartype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + :ivar api_version_set: Version set details. + :vartype api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + :ivar value: Content value when Importing an API. + :vartype value: str + :ivar format: Format of the Content in which the API is getting imported. New formats can be + added in the future. Known values are: "wadl-xml", "wadl-link-json", "swagger-json", + "swagger-link-json", "wsdl", "wsdl-link", "openapi", "openapi+json", "openapi-link", + "openapi+json-link", "graphql-link", "odata", "odata-link", "grpc", and "grpc-link". + :vartype format: str or ~azure.mgmt.apimanagement.models.ContentFormat + :ivar wsdl_selector: Criteria to limit import of WSDL to a subset of the document. + :vartype wsdl_selector: + ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector + :ivar soap_api_type: Type of API to create. + + * `http` creates a REST API + * `soap` creates a SOAP pass-through API + * `websocket` creates websocket API + * `graphql` creates GraphQL API. + New types can be added in the future. Known values are: "http", "soap", "websocket", + "graphql", "odata", and "grpc". + :vartype soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType + :ivar translate_required_query_parameters_conduct: Strategy of translating required query + parameters to template ones. By default has value 'template'. Possible values: 'template', + 'query'. Known values are: "template" and "query". + :vartype translate_required_query_parameters_conduct: str or + ~azure.mgmt.apimanagement.models.TranslateRequiredQueryParametersConduct + """ + + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Content value when Importing an API.""" + format: Optional[Union[str, "_models.ContentFormat"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Format of the Content in which the API is getting imported. New formats can be added in the + future. Known values are: \"wadl-xml\", \"wadl-link-json\", \"swagger-json\", + \"swagger-link-json\", \"wsdl\", \"wsdl-link\", \"openapi\", \"openapi+json\", + \"openapi-link\", \"openapi+json-link\", \"graphql-link\", \"odata\", \"odata-link\", \"grpc\", + and \"grpc-link\".""" + wsdl_selector: Optional["_models.ApiCreateOrUpdatePropertiesWsdlSelector"] = rest_field( + name="wsdlSelector", visibility=["read", "create", "update", "delete", "query"] + ) + """Criteria to limit import of WSDL to a subset of the document.""" + soap_api_type: Optional[Union[str, "_models.SoapApiType"]] = rest_field( + name="apiType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of API to create. + + * `http` creates a REST API + * `soap` creates a SOAP pass-through API + * `websocket` creates websocket API + * `graphql` creates GraphQL API. + New types can be added in the future. Known values are: \"http\", \"soap\", \"websocket\", + \"graphql\", \"odata\", and \"grpc\".""" + translate_required_query_parameters_conduct: Optional[ + Union[str, "_models.TranslateRequiredQueryParametersConduct"] + ] = rest_field(name="translateRequiredQueryParameters", visibility=["read", "create", "update", "delete", "query"]) + """Strategy of translating required query parameters to template ones. By default has value + 'template'. Possible values: 'template', 'query'. Known values are: \"template\" and \"query\".""" + + @overload + def __init__( # pylint: disable=too-many-locals + self, + *, + path: str, + description: Optional[str] = None, + authentication_settings: Optional["_models.AuthenticationSettingsContract"] = None, + subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = None, + api_type: Optional[Union[str, "_models.ApiType"]] = None, + api_revision: Optional[str] = None, + api_version: Optional[str] = None, + is_current: Optional[bool] = None, + api_revision_description: Optional[str] = None, + api_version_description: Optional[str] = None, + api_version_set_id: Optional[str] = None, + subscription_required: Optional[bool] = None, + terms_of_service_url: Optional[str] = None, + contact: Optional["_models.ApiContactInformation"] = None, + license: Optional["_models.ApiLicenseInformation"] = None, + source_api_id: Optional[str] = None, + display_name: Optional[str] = None, + service_url: Optional[str] = None, + protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, + api_version_set: Optional["_models.ApiVersionSetContractDetails"] = None, + value: Optional[str] = None, + format: Optional[Union[str, "_models.ContentFormat"]] = None, + wsdl_selector: Optional["_models.ApiCreateOrUpdatePropertiesWsdlSelector"] = None, + soap_api_type: Optional[Union[str, "_models.SoapApiType"]] = None, + translate_required_query_parameters_conduct: Optional[ + Union[str, "_models.TranslateRequiredQueryParametersConduct"] + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiCreateOrUpdatePropertiesWsdlSelector(_Model): + """Criteria to limit import of WSDL to a subset of the document. + + :ivar wsdl_service_name: Name of service to import from WSDL. + :vartype wsdl_service_name: str + :ivar wsdl_endpoint_name: Name of endpoint(port) to import from WSDL. + :vartype wsdl_endpoint_name: str + """ + + wsdl_service_name: Optional[str] = rest_field( + name="wsdlServiceName", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of service to import from WSDL.""" + wsdl_endpoint_name: Optional[str] = rest_field( + name="wsdlEndpointName", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of endpoint(port) to import from WSDL.""" + + @overload + def __init__( + self, + *, + wsdl_service_name: Optional[str] = None, + wsdl_endpoint_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiExportResult(_Model): + """API Export result. + + :ivar id: ResourceId of the API which was exported. + :vartype id: str + :ivar export_result_format: Format in which the API Details are exported to the Storage Blob + with Sas Key valid for 5 minutes. Known values are: "swagger-link-json", "wadl-link-json", + "wsdl-link+xml", and "openapi-link". + :vartype export_result_format: str or ~azure.mgmt.apimanagement.models.ExportResultFormat + :ivar value: The object defining the schema of the exported API Detail. + :vartype value: ~azure.mgmt.apimanagement.models.ApiExportResultValue + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """ResourceId of the API which was exported.""" + export_result_format: Optional[Union[str, "_models.ExportResultFormat"]] = rest_field( + name="format", visibility=["read", "create", "update", "delete", "query"] + ) + """Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 + minutes. Known values are: \"swagger-link-json\", \"wadl-link-json\", \"wsdl-link+xml\", and + \"openapi-link\".""" + value: Optional["_models.ApiExportResultValue"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The object defining the schema of the exported API Detail.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + export_result_format: Optional[Union[str, "_models.ExportResultFormat"]] = None, + value: Optional["_models.ApiExportResultValue"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiExportResultValue(_Model): + """The object defining the schema of the exported API Detail. + + :ivar link: Link to the Storage Blob containing the result of the export operation. The Blob + Uri is only valid for 5 minutes. + :vartype link: str + """ + + link: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Link to the Storage Blob containing the result of the export operation. The Blob Uri is only + valid for 5 minutes.""" + + @overload + def __init__( + self, + *, + link: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiLicenseInformation(_Model): + """API license information. + + :ivar name: The license name used for the API. + :vartype name: str + :ivar url: A URL to the license used for the API. MUST be in the format of a URL. + :vartype url: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The license name used for the API.""" + url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A URL to the license used for the API. MUST be in the format of a URL.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + url: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementGatewayBaseProperties(_Model): + """Base Properties of an API Management gateway resource description. + + :ivar provisioning_state: The current provisioning state of the API Management gateway which + can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + :vartype provisioning_state: str + :ivar target_provisioning_state: The provisioning state of the API Management gateway, which is + targeted by the long running operation started on the gateway. + :vartype target_provisioning_state: str + :ivar created_at_utc: Creation UTC date of the API Management gateway.The date conforms to the + following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype created_at_utc: ~datetime.datetime + :ivar frontend: Information regarding how the gateway should be exposed. + :vartype frontend: ~azure.mgmt.apimanagement.models.FrontendConfiguration + :ivar backend: Information regarding how the gateway should integrate with backend systems. + :vartype backend: ~azure.mgmt.apimanagement.models.BackendConfiguration + :ivar configuration_api: Information regarding the Configuration API of the API Management + gateway. This is only applicable for API gateway with Standard SKU. + :vartype configuration_api: ~azure.mgmt.apimanagement.models.GatewayConfigurationApi + :ivar virtual_network_type: The type of VPN in which API Management gateway needs to be + configured in. Known values are: "None", "External", and "Internal". + :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType + """ + + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The current provisioning state of the API Management gateway which can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.""" + target_provisioning_state: Optional[str] = rest_field(name="targetProvisioningState", visibility=["read"]) + """The provisioning state of the API Management gateway, which is targeted by the long running + operation started on the gateway.""" + created_at_utc: Optional[datetime.datetime] = rest_field(name="createdAtUtc", visibility=["read"], format="rfc3339") + """Creation UTC date of the API Management gateway.The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard.""" + frontend: Optional["_models.FrontendConfiguration"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Information regarding how the gateway should be exposed.""" + backend: Optional["_models.BackendConfiguration"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Information regarding how the gateway should integrate with backend systems.""" + configuration_api: Optional["_models.GatewayConfigurationApi"] = rest_field( + name="configurationApi", visibility=["read", "create", "update", "delete", "query"] + ) + """Information regarding the Configuration API of the API Management gateway. This is only + applicable for API gateway with Standard SKU.""" + virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = rest_field( + name="virtualNetworkType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of VPN in which API Management gateway needs to be configured in. Known values are: + \"None\", \"External\", and \"Internal\".""" + + @overload + def __init__( + self, + *, + frontend: Optional["_models.FrontendConfiguration"] = None, + backend: Optional["_models.BackendConfiguration"] = None, + configuration_api: Optional["_models.GatewayConfigurationApi"] = None, + virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementGatewayConfigConnectionResource(ProxyResource): # pylint: disable=name-too-long + """A single API Management gateway resource in List or Get response. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the API Management gateway config connection. Required. + :vartype properties: ~azure.mgmt.apimanagement.models.GatewayConfigConnectionBaseProperties + :ivar etag: ETag of the resource. + :vartype etag: str + """ + + properties: "_models.GatewayConfigConnectionBaseProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the API Management gateway config connection. Required.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """ETag of the resource.""" + + __flattened_items = ["provisioning_state", "source_id", "default_hostname", "hostnames"] + + @overload + def __init__( + self, + *, + properties: "_models.GatewayConfigConnectionBaseProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ApiManagementGatewayProperties(ApiManagementGatewayBaseProperties): + """Properties of an API Management gateway resource description. + + :ivar provisioning_state: The current provisioning state of the API Management gateway which + can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + :vartype provisioning_state: str + :ivar target_provisioning_state: The provisioning state of the API Management gateway, which is + targeted by the long running operation started on the gateway. + :vartype target_provisioning_state: str + :ivar created_at_utc: Creation UTC date of the API Management gateway.The date conforms to the + following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype created_at_utc: ~datetime.datetime + :ivar frontend: Information regarding how the gateway should be exposed. + :vartype frontend: ~azure.mgmt.apimanagement.models.FrontendConfiguration + :ivar backend: Information regarding how the gateway should integrate with backend systems. + :vartype backend: ~azure.mgmt.apimanagement.models.BackendConfiguration + :ivar configuration_api: Information regarding the Configuration API of the API Management + gateway. This is only applicable for API gateway with Standard SKU. + :vartype configuration_api: ~azure.mgmt.apimanagement.models.GatewayConfigurationApi + :ivar virtual_network_type: The type of VPN in which API Management gateway needs to be + configured in. Known values are: "None", "External", and "Internal". + :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType + """ + + @overload + def __init__( + self, + *, + frontend: Optional["_models.FrontendConfiguration"] = None, + backend: Optional["_models.BackendConfiguration"] = None, + configuration_api: Optional["_models.GatewayConfigurationApi"] = None, + virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TrackedResource(Resource): + """Tracked Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + location: str = rest_field(visibility=["read", "create"]) + """The geo-location where the resource lives. Required.""" + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementGatewayResource(TrackedResource): + """A single API Management gateway resource in List or Get response. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Properties of the API Management gateway. Required. + :vartype properties: ~azure.mgmt.apimanagement.models.ApiManagementGatewayProperties + :ivar sku: SKU properties of the API Management gateway. Required. + :vartype sku: ~azure.mgmt.apimanagement.models.ApiManagementGatewaySkuProperties + :ivar etag: ETag of the resource. + :vartype etag: str + """ + + properties: "_models.ApiManagementGatewayProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the API Management gateway. Required.""" + sku: "_models.ApiManagementGatewaySkuProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """SKU properties of the API Management gateway. Required.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """ETag of the resource.""" + + __flattened_items = [ + "provisioning_state", + "target_provisioning_state", + "created_at_utc", + "frontend", + "backend", + "configuration_api", + "virtual_network_type", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.ApiManagementGatewayProperties", + sku: "_models.ApiManagementGatewaySkuProperties", + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ApiManagementGatewaySkuProperties(_Model): + """API Management gateway resource SKU properties. + + :ivar name: Name of the Sku. Required. Known values are: "Standard", + "WorkspaceGatewayStandard", and "WorkspaceGatewayPremium". + :vartype name: str or ~azure.mgmt.apimanagement.models.ApiGatewaySkuType + :ivar capacity: Capacity of the SKU (number of deployed units of the SKU). + :vartype capacity: int + """ + + name: Union[str, "_models.ApiGatewaySkuType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Name of the Sku. Required. Known values are: \"Standard\", \"WorkspaceGatewayStandard\", and + \"WorkspaceGatewayPremium\".""" + capacity: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Capacity of the SKU (number of deployed units of the SKU).""" + + @overload + def __init__( + self, + *, + name: Union[str, "_models.ApiGatewaySkuType"], + capacity: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementGatewaySkuPropertiesForPatch(_Model): # pylint: disable=name-too-long + """API Management gateway resource SKU properties for PATCH operations given nothing should be + required. + + :ivar name: Name of the Sku. Known values are: "Standard", "WorkspaceGatewayStandard", and + "WorkspaceGatewayPremium". + :vartype name: str or ~azure.mgmt.apimanagement.models.ApiGatewaySkuType + :ivar capacity: Capacity of the SKU (number of deployed units of the SKU). + :vartype capacity: int + """ + + name: Optional[Union[str, "_models.ApiGatewaySkuType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Name of the Sku. Known values are: \"Standard\", \"WorkspaceGatewayStandard\", and + \"WorkspaceGatewayPremium\".""" + capacity: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Capacity of the SKU (number of deployed units of the SKU).""" + + @overload + def __init__( + self, + *, + name: Optional[Union[str, "_models.ApiGatewaySkuType"]] = None, + capacity: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApimResource(_Model): + """The Resource definition. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource is set to Microsoft.ApiManagement. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Resource ID.""" + name: Optional[str] = rest_field(visibility=["read"]) + """Resource name.""" + type: Optional[str] = rest_field(visibility=["read"]) + """Resource type for API Management resource is set to Microsoft.ApiManagement.""" + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementGatewayUpdateParameters(ApimResource): + """Parameter supplied to Update API Management gateway. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource is set to Microsoft.ApiManagement. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Properties of the API Management gateway. + :vartype properties: ~azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateProperties + :ivar sku: SKU properties of the API Management gateway. + :vartype sku: ~azure.mgmt.apimanagement.models.ApiManagementGatewaySkuPropertiesForPatch + :ivar etag: ETag of the resource. + :vartype etag: str + """ + + properties: Optional["_models.ApiManagementGatewayUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the API Management gateway.""" + sku: Optional["_models.ApiManagementGatewaySkuPropertiesForPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """SKU properties of the API Management gateway.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """ETag of the resource.""" + + __flattened_items = [ + "provisioning_state", + "target_provisioning_state", + "created_at_utc", + "frontend", + "backend", + "configuration_api", + "virtual_network_type", + ] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.ApiManagementGatewayUpdateProperties"] = None, + sku: Optional["_models.ApiManagementGatewaySkuPropertiesForPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ApiManagementGatewayUpdateProperties(ApiManagementGatewayBaseProperties): + """Properties of an API Management gateway resource description. + + :ivar provisioning_state: The current provisioning state of the API Management gateway which + can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + :vartype provisioning_state: str + :ivar target_provisioning_state: The provisioning state of the API Management gateway, which is + targeted by the long running operation started on the gateway. + :vartype target_provisioning_state: str + :ivar created_at_utc: Creation UTC date of the API Management gateway.The date conforms to the + following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype created_at_utc: ~datetime.datetime + :ivar frontend: Information regarding how the gateway should be exposed. + :vartype frontend: ~azure.mgmt.apimanagement.models.FrontendConfiguration + :ivar backend: Information regarding how the gateway should integrate with backend systems. + :vartype backend: ~azure.mgmt.apimanagement.models.BackendConfiguration + :ivar configuration_api: Information regarding the Configuration API of the API Management + gateway. This is only applicable for API gateway with Standard SKU. + :vartype configuration_api: ~azure.mgmt.apimanagement.models.GatewayConfigurationApi + :ivar virtual_network_type: The type of VPN in which API Management gateway needs to be + configured in. Known values are: "None", "External", and "Internal". + :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType + """ + + @overload + def __init__( + self, + *, + frontend: Optional["_models.FrontendConfiguration"] = None, + backend: Optional["_models.BackendConfiguration"] = None, + configuration_api: Optional["_models.GatewayConfigurationApi"] = None, + virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementServiceApplyNetworkConfigurationParameters(_Model): # pylint: disable=name-too-long + """Parameter supplied to the Apply Network configuration operation. + + :ivar location: Location of the Api Management service to update for a multi-region service. + For a service deployed in a single region, this parameter is not required. + :vartype location: str + """ + + location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Location of the Api Management service to update for a multi-region service. For a service + deployed in a single region, this parameter is not required.""" + + @overload + def __init__( + self, + *, + location: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementServiceBackupRestoreParameters(_Model): # pylint: disable=name-too-long + """Parameters supplied to the Backup/Restore of an API Management service operation. + + :ivar storage_account: The name of the Azure storage account (used to place/retrieve the + backup). Required. + :vartype storage_account: str + :ivar container_name: The name of the blob container (used to place/retrieve the backup). + Required. + :vartype container_name: str + :ivar backup_name: The name of the backup file to create/retrieve. Required. + :vartype backup_name: str + :ivar access_type: The type of access to be used for the storage account. Known values are: + "AccessKey", "SystemAssignedManagedIdentity", and "UserAssignedManagedIdentity". + :vartype access_type: str or ~azure.mgmt.apimanagement.models.AccessType + :ivar access_key: Storage account access key. Required only if ``accessType`` is set to + ``AccessKey``. + :vartype access_key: str + :ivar client_id: The Client ID of user assigned managed identity. Required only if + ``accessType`` is set to ``UserAssignedManagedIdentity``. + :vartype client_id: str + """ + + storage_account: str = rest_field(name="storageAccount", visibility=["read", "create", "update", "delete", "query"]) + """The name of the Azure storage account (used to place/retrieve the backup). Required.""" + container_name: str = rest_field(name="containerName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the blob container (used to place/retrieve the backup). Required.""" + backup_name: str = rest_field(name="backupName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the backup file to create/retrieve. Required.""" + access_type: Optional[Union[str, "_models.AccessType"]] = rest_field( + name="accessType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of access to be used for the storage account. Known values are: \"AccessKey\", + \"SystemAssignedManagedIdentity\", and \"UserAssignedManagedIdentity\".""" + access_key: Optional[str] = rest_field(name="accessKey", visibility=["read", "create", "update", "delete", "query"]) + """Storage account access key. Required only if ``accessType`` is set to ``AccessKey``.""" + client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"]) + """The Client ID of user assigned managed identity. Required only if ``accessType`` is set to + ``UserAssignedManagedIdentity``.""" + + @overload + def __init__( + self, + *, + storage_account: str, + container_name: str, + backup_name: str, + access_type: Optional[Union[str, "_models.AccessType"]] = None, + access_key: Optional[str] = None, + client_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementServiceBaseProperties(_Model): + """Base Properties of an API Management service resource description. + + :ivar notification_sender_email: Email address from which the notification will be sent. + :vartype notification_sender_email: str + :ivar provisioning_state: The current provisioning state of the API Management service which + can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + :vartype provisioning_state: str + :ivar target_provisioning_state: The provisioning state of the API Management service, which is + targeted by the long running operation started on the service. + :vartype target_provisioning_state: str + :ivar created_at_utc: Creation UTC date of the API Management service.The date conforms to the + following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype created_at_utc: ~datetime.datetime + :ivar gateway_url: Gateway URL of the API Management service. + :vartype gateway_url: str + :ivar gateway_regional_url: Gateway URL of the API Management service in the Default Region. + :vartype gateway_regional_url: str + :ivar portal_url: Publisher portal endpoint Url of the API Management service. + :vartype portal_url: str + :ivar management_api_url: Management API endpoint URL of the API Management service. + :vartype management_api_url: str + :ivar scm_url: SCM endpoint URL of the API Management service. + :vartype scm_url: str + :ivar developer_portal_url: DEveloper Portal endpoint URL of the API Management service. + :vartype developer_portal_url: str + :ivar hostname_configurations: Custom hostname configuration of the API Management service. + :vartype hostname_configurations: list[~azure.mgmt.apimanagement.models.HostnameConfiguration] + :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management + service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + :vartype public_ip_addresses: list[str] + :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management + service in Primary region which is deployed in an Internal Virtual Network. Available only for + Basic, Standard, Premium and Isolated SKU. + :vartype private_ip_addresses: list[str] + :ivar public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the region. Supported only for Developer and Premium SKU + being deployed in Virtual Network. + :vartype public_ip_address_id: str + :ivar public_network_access: Whether or not public endpoint access is allowed for this API + Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If + 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + Known values are: "Enabled" and "Disabled". + :vartype public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess + :ivar configuration_api: Configuration API configuration of the API Management service. + :vartype configuration_api: ~azure.mgmt.apimanagement.models.ConfigurationApi + :ivar virtual_network_configuration: Virtual network configuration of the API Management + service. + :vartype virtual_network_configuration: + ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration + :ivar additional_locations: Additional datacenter locations of the API Management service. + :vartype additional_locations: list[~azure.mgmt.apimanagement.models.AdditionalLocation] + :ivar custom_properties: Custom properties of the API Management service.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the + cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to + disable just TLS 1.1.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to + disable TLS 1.0 on an API Management service.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used + to disable just TLS 1.1 for communications with backends.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used + to disable TLS 1.0 for communications with backends.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable + HTTP2 protocol on an API Management service.
Not specifying any of these properties on + PATCH operation will reset omitted properties' values to their defaults. For all the settings + except Http2 the default value is ``True`` if the service was created on or before April 1, + 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can + disable any of the following ciphers by using settings + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]``: + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, + TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. + For example, + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256``:``false``. + The default value is ``true`` for them.
Note: The following ciphers can't be disabled + since they are required by internal platform components: + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. + :vartype custom_properties: dict[str, str] + :ivar certificates: List of Certificates that need to be installed in the API Management + service. Max supported certificates that can be installed is 10. + :vartype certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :ivar enable_client_certificate: Property only meant to be used for Consumption SKU Service. + This enforces a client certificate to be presented on each request to the gateway. This also + enables the ability to authenticate the certificate in the policy on the gateway. + :vartype enable_client_certificate: bool + :ivar nat_gateway_state: Property can be used to enable NAT Gateway for this API Management + service. Known values are: "Enabled" and "Disabled". + :vartype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState + :ivar outbound_public_ip_addresses: Outbound public IPV4 address prefixes associated with NAT + Gateway deployed service. Available only for Premium SKU on stv2 platform. + :vartype outbound_public_ip_addresses: list[str] + :ivar disable_gateway: Property only valid for an Api Management service deployed in multiple + locations. This can be used to disable the gateway in master region. + :vartype disable_gateway: bool + :ivar virtual_network_type: The type of VPN in which API Management service needs to be + configured in. None (Default Value) means the API Management service is not part of any Virtual + Network, External means the API Management deployment is set up inside a Virtual Network having + an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside + a Virtual Network having an Intranet Facing Endpoint only. Known values are: "None", + "External", and "Internal". + :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType + :ivar api_version_constraint: Control Plane Apis version constraint for the API Management + service. + :vartype api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint + :ivar restore: Undelete Api Management Service if it was previously soft-deleted. If this flag + is specified and set to True all other properties will be ignored. + :vartype restore: bool + :ivar private_endpoint_connections: List of Private Endpoint Connections of this service. + :vartype private_endpoint_connections: + list[~azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper] + :ivar platform_version: Compute Platform Version running the service in this location. Known + values are: "undetermined", "stv1", "stv2", "mtv1", and "stv2.1". + :vartype platform_version: str or ~azure.mgmt.apimanagement.models.PlatformVersion + :ivar legacy_portal_status: Status of legacy portal in the API Management service. Known values + are: "Enabled" and "Disabled". + :vartype legacy_portal_status: str or ~azure.mgmt.apimanagement.models.LegacyPortalStatus + :ivar developer_portal_status: Status of developer portal in this API Management service. Known + values are: "Enabled" and "Disabled". + :vartype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus + :ivar release_channel: Release Channel of this API Management service. Known values are: + "Preview", "Default", and "Stable". + :vartype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel + :ivar zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If + this flag is set to True, will return a APIM service with Zone redundant or fail the request if + any underneath component cannot be zone redundant. + :vartype zone_redundant: bool + """ + + notification_sender_email: Optional[str] = rest_field( + name="notificationSenderEmail", visibility=["read", "create", "update", "delete", "query"] + ) + """Email address from which the notification will be sent.""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The current provisioning state of the API Management service which can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.""" + target_provisioning_state: Optional[str] = rest_field(name="targetProvisioningState", visibility=["read"]) + """The provisioning state of the API Management service, which is targeted by the long running + operation started on the service.""" + created_at_utc: Optional[datetime.datetime] = rest_field(name="createdAtUtc", visibility=["read"], format="rfc3339") + """Creation UTC date of the API Management service.The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard.""" + gateway_url: Optional[str] = rest_field(name="gatewayUrl", visibility=["read"]) + """Gateway URL of the API Management service.""" + gateway_regional_url: Optional[str] = rest_field(name="gatewayRegionalUrl", visibility=["read"]) + """Gateway URL of the API Management service in the Default Region.""" + portal_url: Optional[str] = rest_field(name="portalUrl", visibility=["read"]) + """Publisher portal endpoint Url of the API Management service.""" + management_api_url: Optional[str] = rest_field(name="managementApiUrl", visibility=["read"]) + """Management API endpoint URL of the API Management service.""" + scm_url: Optional[str] = rest_field(name="scmUrl", visibility=["read"]) + """SCM endpoint URL of the API Management service.""" + developer_portal_url: Optional[str] = rest_field(name="developerPortalUrl", visibility=["read"]) + """DEveloper Portal endpoint URL of the API Management service.""" + hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = rest_field( + name="hostnameConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """Custom hostname configuration of the API Management service.""" + public_ip_addresses: Optional[list[str]] = rest_field(name="publicIPAddresses", visibility=["read"]) + """Public Static Load Balanced IP addresses of the API Management service in Primary region. + Available only for Basic, Standard, Premium and Isolated SKU.""" + private_ip_addresses: Optional[list[str]] = rest_field(name="privateIPAddresses", visibility=["read"]) + """Private Static Load Balanced IP addresses of the API Management service in Primary region which + is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and + Isolated SKU.""" + public_ip_address_id: Optional[str] = rest_field( + name="publicIpAddressId", visibility=["read", "create", "update", "delete", "query"] + ) + """Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed + service in the region. Supported only for Developer and Premium SKU being deployed in Virtual + Network.""" + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field( + name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether or not public endpoint access is allowed for this API Management service. Value is + optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints + are the exclusive access method. Default value is 'Enabled'. Known values are: \"Enabled\" and + \"Disabled\".""" + configuration_api: Optional["_models.ConfigurationApi"] = rest_field( + name="configurationApi", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration API configuration of the API Management service.""" + virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = rest_field( + name="virtualNetworkConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Virtual network configuration of the API Management service.""" + additional_locations: Optional[list["_models.AdditionalLocation"]] = rest_field( + name="additionalLocations", visibility=["read", "create", "update", "delete", "query"] + ) + """Additional datacenter locations of the API Management service.""" + custom_properties: Optional[dict[str, str]] = rest_field( + name="customProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """Custom properties of the API Management service.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the + cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to + disable just TLS 1.1.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to + disable TLS 1.0 on an API Management service.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used + to disable just TLS 1.1 for communications with backends.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used + to disable TLS 1.0 for communications with backends.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable + HTTP2 protocol on an API Management service.
Not specifying any of these properties on + PATCH operation will reset omitted properties' values to their defaults. For all the settings + except Http2 the default value is ``True`` if the service was created on or before April 1, + 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can + disable any of the following ciphers by using settings + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]``: + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, + TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. + For example, + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256``:``false``. + The default value is ``true`` for them.
Note: The following ciphers can't be disabled + since they are required by internal platform components: + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256.""" + certificates: Optional[list["_models.CertificateConfiguration"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of Certificates that need to be installed in the API Management service. Max supported + certificates that can be installed is 10.""" + enable_client_certificate: Optional[bool] = rest_field( + name="enableClientCertificate", visibility=["read", "create", "update", "delete", "query"] + ) + """Property only meant to be used for Consumption SKU Service. This enforces a client certificate + to be presented on each request to the gateway. This also enables the ability to authenticate + the certificate in the policy on the gateway.""" + nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = rest_field( + name="natGatewayState", visibility=["read", "create", "update", "delete", "query"] + ) + """Property can be used to enable NAT Gateway for this API Management service. Known values are: + \"Enabled\" and \"Disabled\".""" + outbound_public_ip_addresses: Optional[list[str]] = rest_field( + name="outboundPublicIPAddresses", visibility=["read"] + ) + """Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available + only for Premium SKU on stv2 platform.""" + disable_gateway: Optional[bool] = rest_field( + name="disableGateway", visibility=["read", "create", "update", "delete", "query"] + ) + """Property only valid for an Api Management service deployed in multiple locations. This can be + used to disable the gateway in master region.""" + virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = rest_field( + name="virtualNetworkType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of VPN in which API Management service needs to be configured in. None (Default Value) + means the API Management service is not part of any Virtual Network, External means the API + Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, + and Internal means that API Management deployment is setup inside a Virtual Network having an + Intranet Facing Endpoint only. Known values are: \"None\", \"External\", and \"Internal\".""" + api_version_constraint: Optional["_models.ApiVersionConstraint"] = rest_field( + name="apiVersionConstraint", visibility=["read", "create", "update", "delete", "query"] + ) + """Control Plane Apis version constraint for the API Management service.""" + restore: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Undelete Api Management Service if it was previously soft-deleted. If this flag is specified + and set to True all other properties will be ignored.""" + private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = rest_field( + name="privateEndpointConnections", visibility=["read", "create", "update", "delete", "query"] + ) + """List of Private Endpoint Connections of this service.""" + platform_version: Optional[Union[str, "_models.PlatformVersion"]] = rest_field( + name="platformVersion", visibility=["read"] + ) + """Compute Platform Version running the service in this location. Known values are: + \"undetermined\", \"stv1\", \"stv2\", \"mtv1\", and \"stv2.1\".""" + legacy_portal_status: Optional[Union[str, "_models.LegacyPortalStatus"]] = rest_field( + name="legacyPortalStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Status of legacy portal in the API Management service. Known values are: \"Enabled\" and + \"Disabled\".""" + developer_portal_status: Optional[Union[str, "_models.DeveloperPortalStatus"]] = rest_field( + name="developerPortalStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Status of developer portal in this API Management service. Known values are: \"Enabled\" and + \"Disabled\".""" + release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = rest_field( + name="releaseChannel", visibility=["read", "create", "update", "delete", "query"] + ) + """Release Channel of this API Management service. Known values are: \"Preview\", \"Default\", and + \"Stable\".""" + zone_redundant: Optional[bool] = rest_field( + name="zoneRedundant", visibility=["read", "create", "update", "delete", "query"] + ) + """Zone Redundant Requirement when creating StandardV2 and PremiumV2. If this flag is set to True, + will return a APIM service with Zone redundant or fail the request if any underneath component + cannot be zone redundant.""" + + @overload + def __init__( # pylint: disable=too-many-locals + self, + *, + notification_sender_email: Optional[str] = None, + hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = None, + public_ip_address_id: Optional[str] = None, + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, + configuration_api: Optional["_models.ConfigurationApi"] = None, + virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, + additional_locations: Optional[list["_models.AdditionalLocation"]] = None, + custom_properties: Optional[dict[str, str]] = None, + certificates: Optional[list["_models.CertificateConfiguration"]] = None, + enable_client_certificate: Optional[bool] = None, + nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, + disable_gateway: Optional[bool] = None, + virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, + api_version_constraint: Optional["_models.ApiVersionConstraint"] = None, + restore: Optional[bool] = None, + private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = None, + legacy_portal_status: Optional[Union[str, "_models.LegacyPortalStatus"]] = None, + developer_portal_status: Optional[Union[str, "_models.DeveloperPortalStatus"]] = None, + release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = None, + zone_redundant: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementServiceCheckNameAvailabilityParameters(_Model): # pylint: disable=name-too-long + """Parameters supplied to the CheckNameAvailability operation. + + :ivar name: The name to check for availability. Required. + :vartype name: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name to check for availability. Required.""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementServiceGetDomainOwnershipIdentifierResult(_Model): # pylint: disable=name-too-long + """Response of the GetDomainOwnershipIdentifier operation. + + :ivar domain_ownership_identifier: The domain ownership identifier value. + :vartype domain_ownership_identifier: str + """ + + domain_ownership_identifier: Optional[str] = rest_field(name="domainOwnershipIdentifier", visibility=["read"]) + """The domain ownership identifier value.""" + + +class ApiManagementServiceGetSsoTokenResult(_Model): + """The response of the GetSsoToken operation. + + :ivar redirect_uri: Redirect URL to the Publisher Portal containing the SSO token. + :vartype redirect_uri: str + """ + + redirect_uri: Optional[str] = rest_field( + name="redirectUri", visibility=["read", "create", "update", "delete", "query"] + ) + """Redirect URL to the Publisher Portal containing the SSO token.""" + + @overload + def __init__( + self, + *, + redirect_uri: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementServiceIdentity(_Model): + """Identity properties of the Api Management service resource. + + :ivar type: The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' + includes both an implicitly created identity and a set of user assigned identities. The type + 'None' will remove any identities from the service. Required. Known values are: + "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", and "None". + :vartype type: str or ~azure.mgmt.apimanagement.models.ApimIdentityType + :ivar principal_id: The principal id of the identity. + :vartype principal_id: str + :ivar tenant_id: The client tenant id of the identity. + :vartype tenant_id: str + :ivar user_assigned_identities: The list of user identities associated with the resource. The + user identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.apimanagement.models.UserIdentityProperties] + """ + + type: Union[str, "_models.ApimIdentityType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes + both an implicitly created identity and a set of user assigned identities. The type 'None' will + remove any identities from the service. Required. Known values are: \"SystemAssigned\", + \"UserAssigned\", \"SystemAssigned, UserAssigned\", and \"None\".""" + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The principal id of the identity.""" + tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"]) + """The client tenant id of the identity.""" + user_assigned_identities: Optional[dict[str, "_models.UserIdentityProperties"]] = rest_field( + name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of user identities associated with the resource. The user identity dictionary key + references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.ApimIdentityType"], + user_assigned_identities: Optional[dict[str, "_models.UserIdentityProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementServiceNameAvailabilityResult(_Model): # pylint: disable=name-too-long + """Response of the CheckNameAvailability operation. + + :ivar name_available: True if the name is available and can be used to create a new API + Management service; otherwise false. + :vartype name_available: bool + :ivar message: If reason == invalid, provide the user with the reason why the given name is + invalid, and provide the resource naming requirements so that the user can select a valid name. + If reason == AlreadyExists, explain that is already in use, and direct them to + select a different name. + :vartype message: str + :ivar reason: Invalid indicates the name provided does not match the resource provider’s naming + requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the + name is already in use and is therefore unavailable. Known values are: "Valid", "Invalid", and + "AlreadyExists". + :vartype reason: str or ~azure.mgmt.apimanagement.models.NameAvailabilityReason + """ + + name_available: Optional[bool] = rest_field(name="nameAvailable", visibility=["read"]) + """True if the name is available and can be used to create a new API Management service; otherwise + false.""" + message: Optional[str] = rest_field(visibility=["read"]) + """If reason == invalid, provide the user with the reason why the given name is invalid, and + provide the resource naming requirements so that the user can select a valid name. If reason == + AlreadyExists, explain that is already in use, and direct them to select a + different name.""" + reason: Optional[Union[str, "_models.NameAvailabilityReason"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Invalid indicates the name provided does not match the resource provider’s naming requirements + (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is + already in use and is therefore unavailable. Known values are: \"Valid\", \"Invalid\", and + \"AlreadyExists\".""" + + @overload + def __init__( + self, + *, + reason: Optional[Union[str, "_models.NameAvailabilityReason"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementServiceProperties(ApiManagementServiceBaseProperties): + """Properties of an API Management service resource description. + + :ivar notification_sender_email: Email address from which the notification will be sent. + :vartype notification_sender_email: str + :ivar provisioning_state: The current provisioning state of the API Management service which + can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + :vartype provisioning_state: str + :ivar target_provisioning_state: The provisioning state of the API Management service, which is + targeted by the long running operation started on the service. + :vartype target_provisioning_state: str + :ivar created_at_utc: Creation UTC date of the API Management service.The date conforms to the + following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype created_at_utc: ~datetime.datetime + :ivar gateway_url: Gateway URL of the API Management service. + :vartype gateway_url: str + :ivar gateway_regional_url: Gateway URL of the API Management service in the Default Region. + :vartype gateway_regional_url: str + :ivar portal_url: Publisher portal endpoint Url of the API Management service. + :vartype portal_url: str + :ivar management_api_url: Management API endpoint URL of the API Management service. + :vartype management_api_url: str + :ivar scm_url: SCM endpoint URL of the API Management service. + :vartype scm_url: str + :ivar developer_portal_url: DEveloper Portal endpoint URL of the API Management service. + :vartype developer_portal_url: str + :ivar hostname_configurations: Custom hostname configuration of the API Management service. + :vartype hostname_configurations: list[~azure.mgmt.apimanagement.models.HostnameConfiguration] + :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management + service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + :vartype public_ip_addresses: list[str] + :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management + service in Primary region which is deployed in an Internal Virtual Network. Available only for + Basic, Standard, Premium and Isolated SKU. + :vartype private_ip_addresses: list[str] + :ivar public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the region. Supported only for Developer and Premium SKU + being deployed in Virtual Network. + :vartype public_ip_address_id: str + :ivar public_network_access: Whether or not public endpoint access is allowed for this API + Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If + 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + Known values are: "Enabled" and "Disabled". + :vartype public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess + :ivar configuration_api: Configuration API configuration of the API Management service. + :vartype configuration_api: ~azure.mgmt.apimanagement.models.ConfigurationApi + :ivar virtual_network_configuration: Virtual network configuration of the API Management + service. + :vartype virtual_network_configuration: + ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration + :ivar additional_locations: Additional datacenter locations of the API Management service. + :vartype additional_locations: list[~azure.mgmt.apimanagement.models.AdditionalLocation] + :ivar custom_properties: Custom properties of the API Management service.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the + cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to + disable just TLS 1.1.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to + disable TLS 1.0 on an API Management service.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used + to disable just TLS 1.1 for communications with backends.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used + to disable TLS 1.0 for communications with backends.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable + HTTP2 protocol on an API Management service.
Not specifying any of these properties on + PATCH operation will reset omitted properties' values to their defaults. For all the settings + except Http2 the default value is ``True`` if the service was created on or before April 1, + 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can + disable any of the following ciphers by using settings + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]``: + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, + TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. + For example, + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256``:``false``. + The default value is ``true`` for them.
Note: The following ciphers can't be disabled + since they are required by internal platform components: + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. + :vartype custom_properties: dict[str, str] + :ivar certificates: List of Certificates that need to be installed in the API Management + service. Max supported certificates that can be installed is 10. + :vartype certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :ivar enable_client_certificate: Property only meant to be used for Consumption SKU Service. + This enforces a client certificate to be presented on each request to the gateway. This also + enables the ability to authenticate the certificate in the policy on the gateway. + :vartype enable_client_certificate: bool + :ivar nat_gateway_state: Property can be used to enable NAT Gateway for this API Management + service. Known values are: "Enabled" and "Disabled". + :vartype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState + :ivar outbound_public_ip_addresses: Outbound public IPV4 address prefixes associated with NAT + Gateway deployed service. Available only for Premium SKU on stv2 platform. + :vartype outbound_public_ip_addresses: list[str] + :ivar disable_gateway: Property only valid for an Api Management service deployed in multiple + locations. This can be used to disable the gateway in master region. + :vartype disable_gateway: bool + :ivar virtual_network_type: The type of VPN in which API Management service needs to be + configured in. None (Default Value) means the API Management service is not part of any Virtual + Network, External means the API Management deployment is set up inside a Virtual Network having + an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside + a Virtual Network having an Intranet Facing Endpoint only. Known values are: "None", + "External", and "Internal". + :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType + :ivar api_version_constraint: Control Plane Apis version constraint for the API Management + service. + :vartype api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint + :ivar restore: Undelete Api Management Service if it was previously soft-deleted. If this flag + is specified and set to True all other properties will be ignored. + :vartype restore: bool + :ivar private_endpoint_connections: List of Private Endpoint Connections of this service. + :vartype private_endpoint_connections: + list[~azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper] + :ivar platform_version: Compute Platform Version running the service in this location. Known + values are: "undetermined", "stv1", "stv2", "mtv1", and "stv2.1". + :vartype platform_version: str or ~azure.mgmt.apimanagement.models.PlatformVersion + :ivar legacy_portal_status: Status of legacy portal in the API Management service. Known values + are: "Enabled" and "Disabled". + :vartype legacy_portal_status: str or ~azure.mgmt.apimanagement.models.LegacyPortalStatus + :ivar developer_portal_status: Status of developer portal in this API Management service. Known + values are: "Enabled" and "Disabled". + :vartype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus + :ivar release_channel: Release Channel of this API Management service. Known values are: + "Preview", "Default", and "Stable". + :vartype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel + :ivar zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If + this flag is set to True, will return a APIM service with Zone redundant or fail the request if + any underneath component cannot be zone redundant. + :vartype zone_redundant: bool + :ivar publisher_email: Publisher email. Required. + :vartype publisher_email: str + :ivar publisher_name: Publisher name. Required. + :vartype publisher_name: str + """ + + publisher_email: str = rest_field(name="publisherEmail", visibility=["read", "create", "update", "delete", "query"]) + """Publisher email. Required.""" + publisher_name: str = rest_field(name="publisherName", visibility=["read", "create", "update", "delete", "query"]) + """Publisher name. Required.""" + + @overload + def __init__( # pylint: disable=too-many-locals + self, + *, + publisher_email: str, + publisher_name: str, + notification_sender_email: Optional[str] = None, + hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = None, + public_ip_address_id: Optional[str] = None, + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, + configuration_api: Optional["_models.ConfigurationApi"] = None, + virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, + additional_locations: Optional[list["_models.AdditionalLocation"]] = None, + custom_properties: Optional[dict[str, str]] = None, + certificates: Optional[list["_models.CertificateConfiguration"]] = None, + enable_client_certificate: Optional[bool] = None, + nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, + disable_gateway: Optional[bool] = None, + virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, + api_version_constraint: Optional["_models.ApiVersionConstraint"] = None, + restore: Optional[bool] = None, + private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = None, + legacy_portal_status: Optional[Union[str, "_models.LegacyPortalStatus"]] = None, + developer_portal_status: Optional[Union[str, "_models.DeveloperPortalStatus"]] = None, + release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = None, + zone_redundant: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementServiceResource(TrackedResource): + """A single API Management service resource in List or Get response. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Properties of the API Management service. Required. + :vartype properties: ~azure.mgmt.apimanagement.models.ApiManagementServiceProperties + :ivar sku: SKU properties of the API Management service. Required. + :vartype sku: ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties + :ivar identity: Managed service identity of the Api Management service. + :vartype identity: ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity + :ivar etag: ETag of the resource. + :vartype etag: str + :ivar zones: The availability zones. + :vartype zones: list[str] + """ + + properties: "_models.ApiManagementServiceProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the API Management service. Required.""" + sku: "_models.ApiManagementServiceSkuProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """SKU properties of the API Management service. Required.""" + identity: Optional["_models.ApiManagementServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Managed service identity of the Api Management service.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """ETag of the resource.""" + zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The availability zones.""" + + __flattened_items = [ + "notification_sender_email", + "provisioning_state", + "target_provisioning_state", + "created_at_utc", + "gateway_url", + "gateway_regional_url", + "portal_url", + "management_api_url", + "scm_url", + "developer_portal_url", + "hostname_configurations", + "public_ip_addresses", + "private_ip_addresses", + "public_ip_address_id", + "public_network_access", + "configuration_api", + "virtual_network_configuration", + "additional_locations", + "custom_properties", + "certificates", + "enable_client_certificate", + "nat_gateway_state", + "outbound_public_ip_addresses", + "disable_gateway", + "virtual_network_type", + "api_version_constraint", + "restore", + "private_endpoint_connections", + "platform_version", + "legacy_portal_status", + "developer_portal_status", + "release_channel", + "zone_redundant", + "publisher_email", + "publisher_name", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.ApiManagementServiceProperties", + sku: "_models.ApiManagementServiceSkuProperties", + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ApiManagementServiceIdentity"] = None, + zones: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ApiManagementServiceSkuProperties(_Model): + """API Management service resource SKU properties. + + :ivar name: Name of the Sku. Required. Known values are: "Developer", "Standard", "Premium", + "Basic", "Consumption", "Isolated", "BasicV2", "StandardV2", and "PremiumV2". + :vartype name: str or ~azure.mgmt.apimanagement.models.SkuType + :ivar capacity: Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU + capacity must be specified as 0. Required. + :vartype capacity: int + """ + + name: Union[str, "_models.SkuType"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the Sku. Required. Known values are: \"Developer\", \"Standard\", \"Premium\", + \"Basic\", \"Consumption\", \"Isolated\", \"BasicV2\", \"StandardV2\", and \"PremiumV2\".""" + capacity: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be + specified as 0. Required.""" + + @overload + def __init__( + self, + *, + name: Union[str, "_models.SkuType"], + capacity: int, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementServiceUpdateParameters(ApimResource): + """Parameter supplied to Update Api Management Service. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource is set to Microsoft.ApiManagement. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Properties of the API Management service. + :vartype properties: ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateProperties + :ivar sku: SKU properties of the API Management service. + :vartype sku: ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties + :ivar identity: Managed service identity of the Api Management service. + :vartype identity: ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity + :ivar etag: ETag of the resource. + :vartype etag: str + :ivar zones: A list of availability zones denoting where the resource needs to come from. + :vartype zones: list[str] + """ + + properties: Optional["_models.ApiManagementServiceUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the API Management service.""" + sku: Optional["_models.ApiManagementServiceSkuProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """SKU properties of the API Management service.""" + identity: Optional["_models.ApiManagementServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Managed service identity of the Api Management service.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """ETag of the resource.""" + zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A list of availability zones denoting where the resource needs to come from.""" + + __flattened_items = [ + "notification_sender_email", + "provisioning_state", + "target_provisioning_state", + "created_at_utc", + "gateway_url", + "gateway_regional_url", + "portal_url", + "management_api_url", + "scm_url", + "developer_portal_url", + "hostname_configurations", + "public_ip_addresses", + "private_ip_addresses", + "public_ip_address_id", + "public_network_access", + "configuration_api", + "virtual_network_configuration", + "additional_locations", + "custom_properties", + "certificates", + "enable_client_certificate", + "nat_gateway_state", + "outbound_public_ip_addresses", + "disable_gateway", + "virtual_network_type", + "api_version_constraint", + "restore", + "private_endpoint_connections", + "platform_version", + "legacy_portal_status", + "developer_portal_status", + "release_channel", + "zone_redundant", + "publisher_email", + "publisher_name", + ] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.ApiManagementServiceUpdateProperties"] = None, + sku: Optional["_models.ApiManagementServiceSkuProperties"] = None, + identity: Optional["_models.ApiManagementServiceIdentity"] = None, + zones: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ApiManagementServiceUpdateProperties(ApiManagementServiceBaseProperties): + """Properties of an API Management service resource description. + + :ivar notification_sender_email: Email address from which the notification will be sent. + :vartype notification_sender_email: str + :ivar provisioning_state: The current provisioning state of the API Management service which + can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + :vartype provisioning_state: str + :ivar target_provisioning_state: The provisioning state of the API Management service, which is + targeted by the long running operation started on the service. + :vartype target_provisioning_state: str + :ivar created_at_utc: Creation UTC date of the API Management service.The date conforms to the + following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype created_at_utc: ~datetime.datetime + :ivar gateway_url: Gateway URL of the API Management service. + :vartype gateway_url: str + :ivar gateway_regional_url: Gateway URL of the API Management service in the Default Region. + :vartype gateway_regional_url: str + :ivar portal_url: Publisher portal endpoint Url of the API Management service. + :vartype portal_url: str + :ivar management_api_url: Management API endpoint URL of the API Management service. + :vartype management_api_url: str + :ivar scm_url: SCM endpoint URL of the API Management service. + :vartype scm_url: str + :ivar developer_portal_url: DEveloper Portal endpoint URL of the API Management service. + :vartype developer_portal_url: str + :ivar hostname_configurations: Custom hostname configuration of the API Management service. + :vartype hostname_configurations: list[~azure.mgmt.apimanagement.models.HostnameConfiguration] + :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management + service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + :vartype public_ip_addresses: list[str] + :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management + service in Primary region which is deployed in an Internal Virtual Network. Available only for + Basic, Standard, Premium and Isolated SKU. + :vartype private_ip_addresses: list[str] + :ivar public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the region. Supported only for Developer and Premium SKU + being deployed in Virtual Network. + :vartype public_ip_address_id: str + :ivar public_network_access: Whether or not public endpoint access is allowed for this API + Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If + 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + Known values are: "Enabled" and "Disabled". + :vartype public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess + :ivar configuration_api: Configuration API configuration of the API Management service. + :vartype configuration_api: ~azure.mgmt.apimanagement.models.ConfigurationApi + :ivar virtual_network_configuration: Virtual network configuration of the API Management + service. + :vartype virtual_network_configuration: + ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration + :ivar additional_locations: Additional datacenter locations of the API Management service. + :vartype additional_locations: list[~azure.mgmt.apimanagement.models.AdditionalLocation] + :ivar custom_properties: Custom properties of the API Management service.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the + cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to + disable just TLS 1.1.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to + disable TLS 1.0 on an API Management service.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used + to disable just TLS 1.1 for communications with backends.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used + to disable TLS 1.0 for communications with backends.
Setting + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable + HTTP2 protocol on an API Management service.
Not specifying any of these properties on + PATCH operation will reset omitted properties' values to their defaults. For all the settings + except Http2 the default value is ``True`` if the service was created on or before April 1, + 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can + disable any of the following ciphers by using settings + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]``: + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, + TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. + For example, + ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256``:``false``. + The default value is ``true`` for them.
Note: The following ciphers can't be disabled + since they are required by internal platform components: + TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. + :vartype custom_properties: dict[str, str] + :ivar certificates: List of Certificates that need to be installed in the API Management + service. Max supported certificates that can be installed is 10. + :vartype certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :ivar enable_client_certificate: Property only meant to be used for Consumption SKU Service. + This enforces a client certificate to be presented on each request to the gateway. This also + enables the ability to authenticate the certificate in the policy on the gateway. + :vartype enable_client_certificate: bool + :ivar nat_gateway_state: Property can be used to enable NAT Gateway for this API Management + service. Known values are: "Enabled" and "Disabled". + :vartype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState + :ivar outbound_public_ip_addresses: Outbound public IPV4 address prefixes associated with NAT + Gateway deployed service. Available only for Premium SKU on stv2 platform. + :vartype outbound_public_ip_addresses: list[str] + :ivar disable_gateway: Property only valid for an Api Management service deployed in multiple + locations. This can be used to disable the gateway in master region. + :vartype disable_gateway: bool + :ivar virtual_network_type: The type of VPN in which API Management service needs to be + configured in. None (Default Value) means the API Management service is not part of any Virtual + Network, External means the API Management deployment is set up inside a Virtual Network having + an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside + a Virtual Network having an Intranet Facing Endpoint only. Known values are: "None", + "External", and "Internal". + :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType + :ivar api_version_constraint: Control Plane Apis version constraint for the API Management + service. + :vartype api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint + :ivar restore: Undelete Api Management Service if it was previously soft-deleted. If this flag + is specified and set to True all other properties will be ignored. + :vartype restore: bool + :ivar private_endpoint_connections: List of Private Endpoint Connections of this service. + :vartype private_endpoint_connections: + list[~azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper] + :ivar platform_version: Compute Platform Version running the service in this location. Known + values are: "undetermined", "stv1", "stv2", "mtv1", and "stv2.1". + :vartype platform_version: str or ~azure.mgmt.apimanagement.models.PlatformVersion + :ivar legacy_portal_status: Status of legacy portal in the API Management service. Known values + are: "Enabled" and "Disabled". + :vartype legacy_portal_status: str or ~azure.mgmt.apimanagement.models.LegacyPortalStatus + :ivar developer_portal_status: Status of developer portal in this API Management service. Known + values are: "Enabled" and "Disabled". + :vartype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus + :ivar release_channel: Release Channel of this API Management service. Known values are: + "Preview", "Default", and "Stable". + :vartype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel + :ivar zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If + this flag is set to True, will return a APIM service with Zone redundant or fail the request if + any underneath component cannot be zone redundant. + :vartype zone_redundant: bool + :ivar publisher_email: Publisher email. + :vartype publisher_email: str + :ivar publisher_name: Publisher name. + :vartype publisher_name: str + """ + + publisher_email: Optional[str] = rest_field( + name="publisherEmail", visibility=["read", "create", "update", "delete", "query"] + ) + """Publisher email.""" + publisher_name: Optional[str] = rest_field( + name="publisherName", visibility=["read", "create", "update", "delete", "query"] + ) + """Publisher name.""" + + @overload + def __init__( # pylint: disable=too-many-locals + self, + *, + notification_sender_email: Optional[str] = None, + hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = None, + public_ip_address_id: Optional[str] = None, + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, + configuration_api: Optional["_models.ConfigurationApi"] = None, + virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, + additional_locations: Optional[list["_models.AdditionalLocation"]] = None, + custom_properties: Optional[dict[str, str]] = None, + certificates: Optional[list["_models.CertificateConfiguration"]] = None, + enable_client_certificate: Optional[bool] = None, + nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, + disable_gateway: Optional[bool] = None, + virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, + api_version_constraint: Optional["_models.ApiVersionConstraint"] = None, + restore: Optional[bool] = None, + private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = None, + legacy_portal_status: Optional[Union[str, "_models.LegacyPortalStatus"]] = None, + developer_portal_status: Optional[Union[str, "_models.DeveloperPortalStatus"]] = None, + release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = None, + zone_redundant: Optional[bool] = None, + publisher_email: Optional[str] = None, + publisher_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementSku(_Model): + """Describes an available ApiManagement SKU. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of virtual machines in a scale set.

Possible + Values:

**Standard**

**Basic**. + :vartype tier: str + :ivar size: The Size of the SKU. + :vartype size: str + :ivar family: The Family of this particular SKU. + :vartype family: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: ~azure.mgmt.apimanagement.models.ApiManagementSkuCapacity + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar location_info: A list of locations and availability zones in those locations where the + SKU is available. + :vartype location_info: list[~azure.mgmt.apimanagement.models.ApiManagementSkuLocationInfo] + :ivar api_versions: The api versions that support this SKU. + :vartype api_versions: list[str] + :ivar costs: Metadata for retrieving price info. + :vartype costs: list[~azure.mgmt.apimanagement.models.ApiManagementSkuCosts] + :ivar capabilities: A name value pair to describe the capability. + :vartype capabilities: list[~azure.mgmt.apimanagement.models.ApiManagementSkuCapabilities] + :ivar restrictions: The restrictions because of which SKU cannot be used. This is empty if + there are no restrictions. + :vartype restrictions: list[~azure.mgmt.apimanagement.models.ApiManagementSkuRestrictions] + """ + + resource_type: Optional[str] = rest_field(name="resourceType", visibility=["read"]) + """The type of resource the SKU applies to.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The name of SKU.""" + tier: Optional[str] = rest_field(visibility=["read"]) + """Specifies the tier of virtual machines in a scale set.

Possible Values:

+ **Standard**

**Basic**.""" + size: Optional[str] = rest_field(visibility=["read"]) + """The Size of the SKU.""" + family: Optional[str] = rest_field(visibility=["read"]) + """The Family of this particular SKU.""" + kind: Optional[str] = rest_field(visibility=["read"]) + """The Kind of resources that are supported in this SKU.""" + capacity: Optional["_models.ApiManagementSkuCapacity"] = rest_field(visibility=["read"]) + """Specifies the number of virtual machines in the scale set.""" + locations: Optional[list[str]] = rest_field(visibility=["read"]) + """The set of locations that the SKU is available.""" + location_info: Optional[list["_models.ApiManagementSkuLocationInfo"]] = rest_field( + name="locationInfo", visibility=["read"] + ) + """A list of locations and availability zones in those locations where the SKU is available.""" + api_versions: Optional[list[str]] = rest_field(name="apiVersions", visibility=["read"]) + """The api versions that support this SKU.""" + costs: Optional[list["_models.ApiManagementSkuCosts"]] = rest_field(visibility=["read"]) + """Metadata for retrieving price info.""" + capabilities: Optional[list["_models.ApiManagementSkuCapabilities"]] = rest_field(visibility=["read"]) + """A name value pair to describe the capability.""" + restrictions: Optional[list["_models.ApiManagementSkuRestrictions"]] = rest_field(visibility=["read"]) + """The restrictions because of which SKU cannot be used. This is empty if there are no + restrictions.""" + + +class ApiManagementSkuCapabilities(_Model): + """Describes The SKU capabilities object. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + name: Optional[str] = rest_field(visibility=["read"]) + """An invariant to describe the feature.""" + value: Optional[str] = rest_field(visibility=["read"]) + """An invariant if the feature is measured by quantity.""" + + +class ApiManagementSkuCapacity(_Model): + """Describes scaling information of a SKU. + + :ivar minimum: The minimum capacity. + :vartype minimum: int + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: int + :ivar default: The default capacity. + :vartype default: int + :ivar scale_type: The scale type applicable to the sku. Known values are: "Automatic", + "Manual", and "None". + :vartype scale_type: str or ~azure.mgmt.apimanagement.models.ApiManagementSkuCapacityScaleType + """ + + minimum: Optional[int] = rest_field(visibility=["read"]) + """The minimum capacity.""" + maximum: Optional[int] = rest_field(visibility=["read"]) + """The maximum capacity that can be set.""" + default: Optional[int] = rest_field(visibility=["read"]) + """The default capacity.""" + scale_type: Optional[Union[str, "_models.ApiManagementSkuCapacityScaleType"]] = rest_field( + name="scaleType", visibility=["read"] + ) + """The scale type applicable to the sku. Known values are: \"Automatic\", \"Manual\", and + \"None\".""" + + +class ApiManagementSkuCosts(_Model): + """Describes metadata for retrieving price info. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The multiplier is needed to extend the base metered cost. + :vartype quantity: int + :ivar extended_unit: An invariant to show the extended unit. + :vartype extended_unit: str + """ + + meter_id: Optional[str] = rest_field(name="meterID", visibility=["read"]) + """Used for querying price from commerce.""" + quantity: Optional[int] = rest_field(visibility=["read"]) + """The multiplier is needed to extend the base metered cost.""" + extended_unit: Optional[str] = rest_field(name="extendedUnit", visibility=["read"]) + """An invariant to show the extended unit.""" + + +class ApiManagementSkuLocationInfo(_Model): + """ApiManagementSkuLocationInfo. + + :ivar location: Location of the SKU. + :vartype location: str + :ivar zones: List of availability zones where the SKU is supported. + :vartype zones: list[str] + :ivar zone_details: Details of capabilities available to a SKU in specific zones. + :vartype zone_details: list[~azure.mgmt.apimanagement.models.ApiManagementSkuZoneDetails] + """ + + location: Optional[str] = rest_field(visibility=["read"]) + """Location of the SKU.""" + zones: Optional[list[str]] = rest_field(visibility=["read"]) + """List of availability zones where the SKU is supported.""" + zone_details: Optional[list["_models.ApiManagementSkuZoneDetails"]] = rest_field( + name="zoneDetails", visibility=["read"] + ) + """Details of capabilities available to a SKU in specific zones.""" + + +class ApiManagementSkuRestrictionInfo(_Model): + """ApiManagementSkuRestrictionInfo. + + :ivar locations: Locations where the SKU is restricted. + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + locations: Optional[list[str]] = rest_field(visibility=["read"]) + """Locations where the SKU is restricted.""" + zones: Optional[list[str]] = rest_field(visibility=["read"]) + """List of availability zones where the SKU is restricted.""" + + +class ApiManagementSkuRestrictions(_Model): + """Describes scaling information of a SKU. + + :ivar type: The type of restrictions. Known values are: "Location" and "Zone". + :vartype type: str or ~azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionsType + :ivar values_property: The value of restrictions. If the restriction type is set to location. + This would be different locations where the SKU is restricted. + :vartype values_property: list[str] + :ivar restriction_info: The information about the restriction where the SKU cannot be used. + :vartype restriction_info: ~azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Known values are: "QuotaId" and + "NotAvailableForSubscription". + :vartype reason_code: str or + ~azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionsReasonCode + """ + + type: Optional[Union[str, "_models.ApiManagementSkuRestrictionsType"]] = rest_field(visibility=["read"]) + """The type of restrictions. Known values are: \"Location\" and \"Zone\".""" + values_property: Optional[list[str]] = rest_field(name="values", visibility=["read"], original_tsp_name="values") + """The value of restrictions. If the restriction type is set to location. This would be different + locations where the SKU is restricted.""" + restriction_info: Optional["_models.ApiManagementSkuRestrictionInfo"] = rest_field( + name="restrictionInfo", visibility=["read"] + ) + """The information about the restriction where the SKU cannot be used.""" + reason_code: Optional[Union[str, "_models.ApiManagementSkuRestrictionsReasonCode"]] = rest_field( + name="reasonCode", visibility=["read"] + ) + """The reason for restriction. Known values are: \"QuotaId\" and \"NotAvailableForSubscription\".""" + + +class ApiManagementSkuZoneDetails(_Model): + """Describes The zonal capabilities of a SKU. + + :ivar name: The set of zones that the SKU is available in with the specified capabilities. + :vartype name: list[str] + :ivar capabilities: A list of capabilities that are available for the SKU in the specified list + of zones. + :vartype capabilities: list[~azure.mgmt.apimanagement.models.ApiManagementSkuCapabilities] + """ + + name: Optional[list[str]] = rest_field(visibility=["read"]) + """The set of zones that the SKU is available in with the specified capabilities.""" + capabilities: Optional[list["_models.ApiManagementSkuCapabilities"]] = rest_field(visibility=["read"]) + """A list of capabilities that are available for the SKU in the specified list of zones.""" + + +class WorkspaceLinksBaseProperties(_Model): + """WorkspaceLinksBaseProperties. + + :ivar workspace_id: The link to the API Management service workspace. + :vartype workspace_id: str + :ivar gateways: The array of linked gateways. + :vartype gateways: list[~azure.mgmt.apimanagement.models.WorkspaceLinksGateway] + """ + + workspace_id: Optional[str] = rest_field( + name="workspaceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The link to the API Management service workspace.""" + gateways: Optional[list["_models.WorkspaceLinksGateway"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The array of linked gateways.""" + + @overload + def __init__( + self, + *, + workspace_id: Optional[str] = None, + gateways: Optional[list["_models.WorkspaceLinksGateway"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementWorkspaceLinksProperties(WorkspaceLinksBaseProperties): + """Properties of an API Management workspaceLinks resource. + + :ivar workspace_id: The link to the API Management service workspace. + :vartype workspace_id: str + :ivar gateways: The array of linked gateways. + :vartype gateways: list[~azure.mgmt.apimanagement.models.WorkspaceLinksGateway] + """ + + @overload + def __init__( + self, + *, + workspace_id: Optional[str] = None, + gateways: Optional[list["_models.WorkspaceLinksGateway"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiManagementWorkspaceLinksResource(ProxyResource): + """A single API Management WorkspaceLinks in List or Get response. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the API Management WorkspaceLinks. Required. + :vartype properties: ~azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksProperties + :ivar etag: ETag of the resource. + :vartype etag: str + """ + + properties: "_models.ApiManagementWorkspaceLinksProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the API Management WorkspaceLinks. Required.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """ETag of the resource.""" + + __flattened_items = ["workspace_id", "gateways"] + + @overload + def __init__( + self, + *, + properties: "_models.ApiManagementWorkspaceLinksProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ApiReleaseContract(ProxyResource): + """ApiRelease details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: ApiRelease entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.ApiReleaseContractProperties + """ + + properties: Optional["_models.ApiReleaseContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """ApiRelease entity contract properties.""" + + __flattened_items = ["api_id", "created_date_time", "updated_date_time", "notes"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ApiReleaseContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ApiReleaseContractProperties(_Model): + """API Release details. + + :ivar api_id: Identifier of the API the release belongs to. + :vartype api_id: str + :ivar created_date_time: The time the API was released. The date conforms to the following + format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + :vartype created_date_time: ~datetime.datetime + :ivar updated_date_time: The time the API release was updated. + :vartype updated_date_time: ~datetime.datetime + :ivar notes: Release Notes. + :vartype notes: str + """ + + api_id: Optional[str] = rest_field(name="apiId", visibility=["read", "create", "update", "delete", "query"]) + """Identifier of the API the release belongs to.""" + created_date_time: Optional[datetime.datetime] = rest_field( + name="createdDateTime", visibility=["read"], format="rfc3339" + ) + """The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ + as specified by the ISO 8601 standard.""" + updated_date_time: Optional[datetime.datetime] = rest_field( + name="updatedDateTime", visibility=["read"], format="rfc3339" + ) + """The time the API release was updated.""" + notes: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Release Notes.""" + + @overload + def __init__( + self, + *, + api_id: Optional[str] = None, + notes: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiRevisionContract(_Model): + """Summary of revision metadata. + + :ivar api_id: Identifier of the API Revision. + :vartype api_id: str + :ivar api_revision: Revision number of API. + :vartype api_revision: str + :ivar created_date_time: The time the API Revision was created. The date conforms to the + following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + :vartype created_date_time: ~datetime.datetime + :ivar updated_date_time: The time the API Revision were updated. The date conforms to the + following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + :vartype updated_date_time: ~datetime.datetime + :ivar description: Description of the API Revision. + :vartype description: str + :ivar private_url: Gateway URL for accessing the non-current API Revision. + :vartype private_url: str + :ivar is_online: Indicates if API revision is the current api revision. + :vartype is_online: bool + :ivar is_current: Indicates if API revision is accessible via the gateway. + :vartype is_current: bool + """ + + api_id: Optional[str] = rest_field(name="apiId", visibility=["read"]) + """Identifier of the API Revision.""" + api_revision: Optional[str] = rest_field(name="apiRevision", visibility=["read"]) + """Revision number of API.""" + created_date_time: Optional[datetime.datetime] = rest_field( + name="createdDateTime", visibility=["read"], format="rfc3339" + ) + """The time the API Revision was created. The date conforms to the following format: + yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.""" + updated_date_time: Optional[datetime.datetime] = rest_field( + name="updatedDateTime", visibility=["read"], format="rfc3339" + ) + """The time the API Revision were updated. The date conforms to the following format: + yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.""" + description: Optional[str] = rest_field(visibility=["read"]) + """Description of the API Revision.""" + private_url: Optional[str] = rest_field(name="privateUrl", visibility=["read"]) + """Gateway URL for accessing the non-current API Revision.""" + is_online: Optional[bool] = rest_field(name="isOnline", visibility=["read"]) + """Indicates if API revision is the current api revision.""" + is_current: Optional[bool] = rest_field(name="isCurrent", visibility=["read"]) + """Indicates if API revision is accessible via the gateway.""" + + +class ApiTagResourceContractProperties(ApiEntityBaseContract): + """API contract properties for the Tag Resources. + + :ivar description: Description of the API. May include HTML formatting tags. + :vartype description: str + :ivar authentication_settings: Collection of authentication settings included into this API. + :vartype authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :ivar subscription_key_parameter_names: Protocols over which API is made available. + :vartype subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :ivar api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", "odata", + and "grpc". + :vartype api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :ivar api_revision: Describes the revision of the API. If no value is provided, default + revision 1 is created. + :vartype api_revision: str + :ivar api_version: Indicates the version identifier of the API if the API is versioned. + :vartype api_version: str + :ivar is_current: Indicates if API revision is current api revision. + :vartype is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :ivar api_revision_description: Description of the API Revision. + :vartype api_revision_description: str + :ivar api_version_description: Description of the API Version. + :vartype api_version_description: str + :ivar api_version_set_id: A resource identifier for the related ApiVersionSet. + :vartype api_version_set_id: str + :ivar subscription_required: Specifies whether an API or Product subscription is required for + accessing the API. + :vartype subscription_required: bool + :ivar terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format of + a URL. + :vartype terms_of_service_url: str + :ivar contact: Contact information for the API. + :vartype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :ivar license: License information for the API. + :vartype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation + :ivar id: API identifier in the form /apis/{apiId}. + :vartype id: str + :ivar name: API name. + :vartype name: str + :ivar service_url: Absolute URL of the backend service implementing this API. + :vartype service_url: str + :ivar path: Relative URL uniquely identifying this API and all of its resource paths within the + API Management service instance. It is appended to the API endpoint base URL specified during + the service instance creation to form a public URL for this API. + :vartype path: str + :ivar protocols: Describes on which protocols the operations in this API can be invoked. + :vartype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """API identifier in the form /apis/{apiId}.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """API name.""" + service_url: Optional[str] = rest_field( + name="serviceUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Absolute URL of the backend service implementing this API.""" + path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Relative URL uniquely identifying this API and all of its resource paths within the API + Management service instance. It is appended to the API endpoint base URL specified during the + service instance creation to form a public URL for this API.""" + protocols: Optional[list[Union[str, "_models.Protocol"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes on which protocols the operations in this API can be invoked.""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + authentication_settings: Optional["_models.AuthenticationSettingsContract"] = None, + subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = None, + api_type: Optional[Union[str, "_models.ApiType"]] = None, + api_revision: Optional[str] = None, + api_version: Optional[str] = None, + is_current: Optional[bool] = None, + api_revision_description: Optional[str] = None, + api_version_description: Optional[str] = None, + api_version_set_id: Optional[str] = None, + subscription_required: Optional[bool] = None, + terms_of_service_url: Optional[str] = None, + contact: Optional["_models.ApiContactInformation"] = None, + license: Optional["_models.ApiLicenseInformation"] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + service_url: Optional[str] = None, + path: Optional[str] = None, + protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiUpdateContract(_Model): + """API update contract details. + + :ivar properties: Properties of the API entity that can be updated. + :vartype properties: ~azure.mgmt.apimanagement.models.ApiContractUpdateProperties + """ + + properties: Optional["_models.ApiContractUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the API entity that can be updated.""" + + __flattened_items = [ + "description", + "authentication_settings", + "subscription_key_parameter_names", + "api_type", + "api_revision", + "api_version", + "is_current", + "is_online", + "api_revision_description", + "api_version_description", + "api_version_set_id", + "subscription_required", + "terms_of_service_url", + "contact", + "license", + "display_name", + "service_url", + "path", + "protocols", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ApiContractUpdateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ApiVersionConstraint(_Model): + """Control Plane Apis version constraint for the API Management service. + + :ivar min_api_version: Limit control plane API calls to API Management service with version + equal to or newer than this value. + :vartype min_api_version: str + """ + + min_api_version: Optional[str] = rest_field( + name="minApiVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Limit control plane API calls to API Management service with version equal to or newer than + this value.""" + + @overload + def __init__( + self, + *, + min_api_version: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiVersionSetContract(ProxyResource): + """API Version Set Contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: API VersionSet contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.ApiVersionSetContractProperties + """ + + properties: Optional["_models.ApiVersionSetContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """API VersionSet contract properties.""" + + __flattened_items = [ + "description", + "version_query_name", + "version_header_name", + "display_name", + "versioning_scheme", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ApiVersionSetContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ApiVersionSetContractDetails(_Model): + """An API Version Set contains the common configuration for a set of API Versions relating. + + :ivar id: Identifier for existing API Version Set. Omit this value to create a new Version Set. + :vartype id: str + :ivar name: The display Name of the API Version Set. + :vartype name: str + :ivar description: Description of API Version Set. + :vartype description: str + :ivar versioning_scheme: An value that determines where the API Version identifier will be + located in a HTTP request. Known values are: "Segment", "Query", and "Header". + :vartype versioning_scheme: str or ~azure.mgmt.apimanagement.models.VersioningScheme + :ivar version_query_name: Name of query parameter that indicates the API Version if + versioningScheme is set to ``query``. + :vartype version_query_name: str + :ivar version_header_name: Name of HTTP header parameter that indicates the API Version if + versioningScheme is set to ``header``. + :vartype version_header_name: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Identifier for existing API Version Set. Omit this value to create a new Version Set.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The display Name of the API Version Set.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of API Version Set.""" + versioning_scheme: Optional[Union[str, "_models.VersioningScheme"]] = rest_field( + name="versioningScheme", visibility=["read", "create", "update", "delete", "query"] + ) + """An value that determines where the API Version identifier will be located in a HTTP request. + Known values are: \"Segment\", \"Query\", and \"Header\".""" + version_query_name: Optional[str] = rest_field( + name="versionQueryName", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of query parameter that indicates the API Version if versioningScheme is set to ``query``.""" + version_header_name: Optional[str] = rest_field( + name="versionHeaderName", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of HTTP header parameter that indicates the API Version if versioningScheme is set to + ``header``.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + description: Optional[str] = None, + versioning_scheme: Optional[Union[str, "_models.VersioningScheme"]] = None, + version_query_name: Optional[str] = None, + version_header_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiVersionSetEntityBase(_Model): + """API Version set base parameters. + + :ivar description: Description of API Version Set. + :vartype description: str + :ivar version_query_name: Name of query parameter that indicates the API Version if + versioningScheme is set to ``query``. + :vartype version_query_name: str + :ivar version_header_name: Name of HTTP header parameter that indicates the API Version if + versioningScheme is set to ``header``. + :vartype version_header_name: str + """ + + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of API Version Set.""" + version_query_name: Optional[str] = rest_field( + name="versionQueryName", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of query parameter that indicates the API Version if versioningScheme is set to ``query``.""" + version_header_name: Optional[str] = rest_field( + name="versionHeaderName", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of HTTP header parameter that indicates the API Version if versioningScheme is set to + ``header``.""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + version_query_name: Optional[str] = None, + version_header_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiVersionSetContractProperties(ApiVersionSetEntityBase): + """Properties of an API Version Set. + + :ivar description: Description of API Version Set. + :vartype description: str + :ivar version_query_name: Name of query parameter that indicates the API Version if + versioningScheme is set to ``query``. + :vartype version_query_name: str + :ivar version_header_name: Name of HTTP header parameter that indicates the API Version if + versioningScheme is set to ``header``. + :vartype version_header_name: str + :ivar display_name: Name of API Version Set. Required. + :vartype display_name: str + :ivar versioning_scheme: An value that determines where the API Version identifier will be + located in a HTTP request. Required. Known values are: "Segment", "Query", and "Header". + :vartype versioning_scheme: str or ~azure.mgmt.apimanagement.models.VersioningScheme + """ + + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """Name of API Version Set. Required.""" + versioning_scheme: Union[str, "_models.VersioningScheme"] = rest_field( + name="versioningScheme", visibility=["read", "create", "update", "delete", "query"] + ) + """An value that determines where the API Version identifier will be located in a HTTP request. + Required. Known values are: \"Segment\", \"Query\", and \"Header\".""" + + @overload + def __init__( + self, + *, + display_name: str, + versioning_scheme: Union[str, "_models.VersioningScheme"], + description: Optional[str] = None, + version_query_name: Optional[str] = None, + version_header_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiVersionSetUpdateParameters(_Model): + """Parameters to update or create an API Version Set Contract. + + :ivar properties: Parameters to update or create an API Version Set Contract. + :vartype properties: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParametersProperties + """ + + properties: Optional["_models.ApiVersionSetUpdateParametersProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Parameters to update or create an API Version Set Contract.""" + + __flattened_items = [ + "description", + "version_query_name", + "version_header_name", + "display_name", + "versioning_scheme", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ApiVersionSetUpdateParametersProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ApiVersionSetUpdateParametersProperties(ApiVersionSetEntityBase): + """Properties used to create or update an API Version Set. + + :ivar description: Description of API Version Set. + :vartype description: str + :ivar version_query_name: Name of query parameter that indicates the API Version if + versioningScheme is set to ``query``. + :vartype version_query_name: str + :ivar version_header_name: Name of HTTP header parameter that indicates the API Version if + versioningScheme is set to ``header``. + :vartype version_header_name: str + :ivar display_name: Name of API Version Set. + :vartype display_name: str + :ivar versioning_scheme: An value that determines where the API Version identifier will be + located in a HTTP request. Known values are: "Segment", "Query", and "Header". + :vartype versioning_scheme: str or ~azure.mgmt.apimanagement.models.VersioningScheme + """ + + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of API Version Set.""" + versioning_scheme: Optional[Union[str, "_models.VersioningScheme"]] = rest_field( + name="versioningScheme", visibility=["read", "create", "update", "delete", "query"] + ) + """An value that determines where the API Version identifier will be located in a HTTP request. + Known values are: \"Segment\", \"Query\", and \"Header\".""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + version_query_name: Optional[str] = None, + version_header_name: Optional[str] = None, + display_name: Optional[str] = None, + versioning_scheme: Optional[Union[str, "_models.VersioningScheme"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ArmIdWrapper(_Model): + """A wrapper for an ARM resource id. + + :ivar id: + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read"]) + + +class AssociationContract(ProxyResource): + """Association entity details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Association entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.AssociationContractProperties + """ + + properties: Optional["_models.AssociationContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Association entity contract properties.""" + + __flattened_items = ["provisioning_state"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AssociationContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AssociationContractProperties(_Model): + """Association entity contract properties. + + :ivar provisioning_state: Provisioning state. Default value is "created". + :vartype provisioning_state: str + """ + + provisioning_state: Optional[Literal["created"]] = rest_field( + name="provisioningState", visibility=["read", "create", "update", "delete", "query"] + ) + """Provisioning state. Default value is \"created\".""" + + @overload + def __init__( + self, + *, + provisioning_state: Optional[Literal["created"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthenticationSettingsContract(_Model): + """API Authentication Settings. + + :ivar o_auth2: OAuth2 Authentication settings. + :vartype o_auth2: ~azure.mgmt.apimanagement.models.OAuth2AuthenticationSettingsContract + :ivar openid: OpenID Connect Authentication Settings. + :vartype openid: ~azure.mgmt.apimanagement.models.OpenIdAuthenticationSettingsContract + :ivar o_auth2_authentication_settings: Collection of OAuth2 authentication settings included + into this API. + :vartype o_auth2_authentication_settings: + list[~azure.mgmt.apimanagement.models.OAuth2AuthenticationSettingsContract] + :ivar openid_authentication_settings: Collection of Open ID Connect authentication settings + included into this API. + :vartype openid_authentication_settings: + list[~azure.mgmt.apimanagement.models.OpenIdAuthenticationSettingsContract] + """ + + o_auth2: Optional["_models.OAuth2AuthenticationSettingsContract"] = rest_field( + name="oAuth2", visibility=["read", "create", "update", "delete", "query"] + ) + """OAuth2 Authentication settings.""" + openid: Optional["_models.OpenIdAuthenticationSettingsContract"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """OpenID Connect Authentication Settings.""" + o_auth2_authentication_settings: Optional[list["_models.OAuth2AuthenticationSettingsContract"]] = rest_field( + name="oAuth2AuthenticationSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Collection of OAuth2 authentication settings included into this API.""" + openid_authentication_settings: Optional[list["_models.OpenIdAuthenticationSettingsContract"]] = rest_field( + name="openidAuthenticationSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Collection of Open ID Connect authentication settings included into this API.""" + + @overload + def __init__( + self, + *, + o_auth2: Optional["_models.OAuth2AuthenticationSettingsContract"] = None, + openid: Optional["_models.OpenIdAuthenticationSettingsContract"] = None, + o_auth2_authentication_settings: Optional[list["_models.OAuth2AuthenticationSettingsContract"]] = None, + openid_authentication_settings: Optional[list["_models.OpenIdAuthenticationSettingsContract"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationAccessPolicyContract(ProxyResource): + """Authorization access policy contract. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Authorization Contract. + :vartype properties: + ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContractProperties + """ + + properties: Optional["_models.AuthorizationAccessPolicyContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Authorization Contract.""" + + __flattened_items = ["app_ids", "tenant_id", "object_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AuthorizationAccessPolicyContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AuthorizationAccessPolicyContractProperties(_Model): # pylint: disable=name-too-long + """Authorization Access Policy details. + + :ivar app_ids: The allowed Azure Active Directory Application IDs. + :vartype app_ids: list[str] + :ivar tenant_id: The Tenant Id. + :vartype tenant_id: str + :ivar object_id: The Object Id. + :vartype object_id: str + """ + + app_ids: Optional[list[str]] = rest_field(name="appIds", visibility=["read", "create", "update", "delete", "query"]) + """The allowed Azure Active Directory Application IDs.""" + tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"]) + """The Tenant Id.""" + object_id: Optional[str] = rest_field(name="objectId", visibility=["read", "create", "update", "delete", "query"]) + """The Object Id.""" + + @overload + def __init__( + self, + *, + app_ids: Optional[list[str]] = None, + tenant_id: Optional[str] = None, + object_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationConfirmConsentCodeRequestContract(_Model): # pylint: disable=name-too-long + """Authorization confirm consent code request contract. + + :ivar consent_code: The consent code from the authorization server after authorizing and + consenting. + :vartype consent_code: str + """ + + consent_code: Optional[str] = rest_field( + name="consentCode", visibility=["read", "create", "update", "delete", "query"] + ) + """The consent code from the authorization server after authorizing and consenting.""" + + @overload + def __init__( + self, + *, + consent_code: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationContract(ProxyResource): + """Authorization contract. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Authorization Contract. + :vartype properties: ~azure.mgmt.apimanagement.models.AuthorizationContractProperties + """ + + properties: Optional["_models.AuthorizationContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Authorization Contract.""" + + __flattened_items = ["authorization_type", "o_auth2_grant_type", "parameters", "error", "status"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AuthorizationContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AuthorizationContractProperties(_Model): + """Authorization details. + + :ivar authorization_type: Authorization type options. "OAuth2" + :vartype authorization_type: str or ~azure.mgmt.apimanagement.models.AuthorizationType + :ivar o_auth2_grant_type: OAuth2 grant type options. Known values are: "AuthorizationCode" and + "ClientCredentials". + :vartype o_auth2_grant_type: str or ~azure.mgmt.apimanagement.models.OAuth2GrantType + :ivar parameters: Authorization parameters. + :vartype parameters: dict[str, str] + :ivar error: Authorization error details. + :vartype error: ~azure.mgmt.apimanagement.models.AuthorizationError + :ivar status: Status of the Authorization. + :vartype status: str + """ + + authorization_type: Optional[Union[str, "_models.AuthorizationType"]] = rest_field( + name="authorizationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Authorization type options. \"OAuth2\"""" + o_auth2_grant_type: Optional[Union[str, "_models.OAuth2GrantType"]] = rest_field( + name="oauth2grantType", visibility=["read", "create", "update", "delete", "query"] + ) + """OAuth2 grant type options. Known values are: \"AuthorizationCode\" and \"ClientCredentials\".""" + parameters: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Authorization parameters.""" + error: Optional["_models.AuthorizationError"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Authorization error details.""" + status: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Status of the Authorization.""" + + @overload + def __init__( + self, + *, + authorization_type: Optional[Union[str, "_models.AuthorizationType"]] = None, + o_auth2_grant_type: Optional[Union[str, "_models.OAuth2GrantType"]] = None, + parameters: Optional[dict[str, str]] = None, + error: Optional["_models.AuthorizationError"] = None, + status: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationError(_Model): + """Authorization error details. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message. + :vartype message: str + """ + + code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Error code.""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Error message.""" + + @overload + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationLoginRequestContract(_Model): + """Authorization login request contract. + + :ivar post_login_redirect_url: The redirect URL after login has completed. + :vartype post_login_redirect_url: str + """ + + post_login_redirect_url: Optional[str] = rest_field( + name="postLoginRedirectUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """The redirect URL after login has completed.""" + + @overload + def __init__( + self, + *, + post_login_redirect_url: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationLoginResponseContract(_Model): + """Authorization login response contract. + + :ivar login_link: The login link. + :vartype login_link: str + """ + + login_link: Optional[str] = rest_field(name="loginLink", visibility=["read", "create", "update", "delete", "query"]) + """The login link.""" + + @overload + def __init__( + self, + *, + login_link: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationProviderContract(ProxyResource): + """Authorization Provider contract. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Authorization Provider Contract. + :vartype properties: ~azure.mgmt.apimanagement.models.AuthorizationProviderContractProperties + """ + + properties: Optional["_models.AuthorizationProviderContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Authorization Provider Contract.""" + + __flattened_items = ["display_name", "identity_provider", "oauth2"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AuthorizationProviderContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AuthorizationProviderContractProperties(_Model): + """Authorization Provider details. + + :ivar display_name: Authorization Provider name. Must be 1 to 300 characters long. + :vartype display_name: str + :ivar identity_provider: Identity provider name. Must be 1 to 300 characters long. + :vartype identity_provider: str + :ivar oauth2: OAuth2 settings. + :vartype oauth2: ~azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2Settings + """ + + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Authorization Provider name. Must be 1 to 300 characters long.""" + identity_provider: Optional[str] = rest_field( + name="identityProvider", visibility=["read", "create", "update", "delete", "query"] + ) + """Identity provider name. Must be 1 to 300 characters long.""" + oauth2: Optional["_models.AuthorizationProviderOAuth2Settings"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """OAuth2 settings.""" + + @overload + def __init__( + self, + *, + display_name: Optional[str] = None, + identity_provider: Optional[str] = None, + oauth2: Optional["_models.AuthorizationProviderOAuth2Settings"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationProviderKeyVaultCreateProperties(_Model): # pylint: disable=name-too-long + """Authorization Provider KeyVault create contract properties. + + :ivar secret_identifier: Key vault secret identifier for client secret. When provided, client + secret will be retrieved from the provided key vault secret. + :vartype secret_identifier: str + """ + + secret_identifier: Optional[str] = rest_field( + name="secretIdentifier", visibility=["read", "create", "update", "delete", "query"] + ) + """Key vault secret identifier for client secret. When provided, client secret will be retrieved + from the provided key vault secret.""" + + @overload + def __init__( + self, + *, + secret_identifier: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationProviderKeyVaultContract(AuthorizationProviderKeyVaultCreateProperties): + """Authorization Provider KeyVault contract properties. + + :ivar secret_identifier: Key vault secret identifier for client secret. When provided, client + secret will be retrieved from the provided key vault secret. + :vartype secret_identifier: str + :ivar updated: When the secret was last updated in key vault. + :vartype updated: ~datetime.datetime + :ivar last_status: Last time sync and refresh of secret from key vault. + :vartype last_status: + ~azure.mgmt.apimanagement.models.KeyVaultLastAccessStatusContractProperties + """ + + updated: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc3339") + """When the secret was last updated in key vault.""" + last_status: Optional["_models.KeyVaultLastAccessStatusContractProperties"] = rest_field( + name="lastStatus", visibility=["read"] + ) + """Last time sync and refresh of secret from key vault.""" + + @overload + def __init__( + self, + *, + secret_identifier: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationProviderOAuth2GrantTypes(_Model): + """Authorization Provider oauth2 grant types settings. + + :ivar authorization_code: OAuth2 authorization code grant parameters. + :vartype authorization_code: dict[str, str] + :ivar client_credentials: OAuth2 client credential grant parameters. + :vartype client_credentials: dict[str, str] + """ + + authorization_code: Optional[dict[str, str]] = rest_field( + name="authorizationCode", visibility=["read", "create", "update", "delete", "query"] + ) + """OAuth2 authorization code grant parameters.""" + client_credentials: Optional[dict[str, str]] = rest_field( + name="clientCredentials", visibility=["read", "create", "update", "delete", "query"] + ) + """OAuth2 client credential grant parameters.""" + + @overload + def __init__( + self, + *, + authorization_code: Optional[dict[str, str]] = None, + client_credentials: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationProviderOAuth2Settings(_Model): + """OAuth2 settings details. + + :ivar redirect_url: Redirect URL to be set in the OAuth application. + :vartype redirect_url: str + :ivar grant_types: OAuth2 settings. + :vartype grant_types: ~azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2GrantTypes + :ivar key_vault: Key Vault reference for client secret storage. + :vartype key_vault: ~azure.mgmt.apimanagement.models.AuthorizationProviderKeyVaultContract + """ + + redirect_url: Optional[str] = rest_field( + name="redirectUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Redirect URL to be set in the OAuth application.""" + grant_types: Optional["_models.AuthorizationProviderOAuth2GrantTypes"] = rest_field( + name="grantTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """OAuth2 settings.""" + key_vault: Optional["_models.AuthorizationProviderKeyVaultContract"] = rest_field( + name="keyVault", visibility=["read", "create", "update", "delete", "query"] + ) + """Key Vault reference for client secret storage.""" + + @overload + def __init__( + self, + *, + redirect_url: Optional[str] = None, + grant_types: Optional["_models.AuthorizationProviderOAuth2GrantTypes"] = None, + key_vault: Optional["_models.AuthorizationProviderKeyVaultContract"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationServerContract(ProxyResource): + """External OAuth authorization server settings. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the External OAuth authorization server Contract. + :vartype properties: ~azure.mgmt.apimanagement.models.AuthorizationServerContractProperties + """ + + properties: Optional["_models.AuthorizationServerContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the External OAuth authorization server Contract.""" + + __flattened_items = [ + "description", + "authorization_methods", + "client_authentication_method", + "token_body_parameters", + "token_endpoint", + "support_state", + "default_scope", + "bearer_token_sending_methods", + "resource_owner_username", + "resource_owner_password", + "display_name", + "use_in_test_console", + "use_in_api_documentation", + "client_registration_endpoint", + "authorization_endpoint", + "grant_types", + "client_id", + "client_secret", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AuthorizationServerContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AuthorizationServerContractBaseProperties(_Model): # pylint: disable=name-too-long + """External OAuth authorization server Update settings contract. + + :ivar description: Description of the authorization server. Can contain HTML formatting tags. + :vartype description: str + :ivar authorization_methods: HTTP verbs supported by the authorization endpoint. GET must be + always present. POST is optional. + :vartype authorization_methods: list[str or + ~azure.mgmt.apimanagement.models.AuthorizationMethod] + :ivar client_authentication_method: Method of authentication supported by the token endpoint of + this authorization server. Possible values are Basic and/or Body. When Body is specified, + client credentials and other parameters are passed within the request body in the + application/x-www-form-urlencoded format. + :vartype client_authentication_method: list[str or + ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] + :ivar token_body_parameters: Additional parameters required by the token endpoint of this + authorization server represented as an array of JSON objects with name and value string + properties, i.e. {"name" : "name value", "value": "a value"}. + :vartype token_body_parameters: + list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] + :ivar token_endpoint: OAuth token endpoint. Contains absolute URI to entity being referenced. + :vartype token_endpoint: str + :ivar support_state: If true, authorization server will include state parameter from the + authorization request to its response. Client may use state parameter to raise protocol + security. + :vartype support_state: bool + :ivar default_scope: Access token scope that is going to be requested by default. Can be + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. + :vartype default_scope: str + :ivar bearer_token_sending_methods: Specifies the mechanism by which access token is passed to + the API. + :vartype bearer_token_sending_methods: list[str or + ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] + :ivar resource_owner_username: Can be optionally specified when resource owner password grant + type is supported by this authorization server. Default resource owner username. + :vartype resource_owner_username: str + :ivar resource_owner_password: Can be optionally specified when resource owner password grant + type is supported by this authorization server. Default resource owner password. + :vartype resource_owner_password: str + """ + + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of the authorization server. Can contain HTML formatting tags.""" + authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = rest_field( + name="authorizationMethods", visibility=["read", "create", "update", "delete", "query"] + ) + """HTTP verbs supported by the authorization endpoint. GET must be always present. POST is + optional.""" + client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = rest_field( + name="clientAuthenticationMethod", visibility=["read", "create", "update", "delete", "query"] + ) + """Method of authentication supported by the token endpoint of this authorization server. Possible + values are Basic and/or Body. When Body is specified, client credentials and other parameters + are passed within the request body in the application/x-www-form-urlencoded format.""" + token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = rest_field( + name="tokenBodyParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """Additional parameters required by the token endpoint of this authorization server represented + as an array of JSON objects with name and value string properties, i.e. {\"name\" : \"name + value\", \"value\": \"a value\"}.""" + token_endpoint: Optional[str] = rest_field( + name="tokenEndpoint", visibility=["read", "create", "update", "delete", "query"] + ) + """OAuth token endpoint. Contains absolute URI to entity being referenced.""" + support_state: Optional[bool] = rest_field( + name="supportState", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, authorization server will include state parameter from the authorization request to + its response. Client may use state parameter to raise protocol security.""" + default_scope: Optional[str] = rest_field( + name="defaultScope", visibility=["read", "create", "update", "delete", "query"] + ) + """Access token scope that is going to be requested by default. Can be overridden at the API + level. Should be provided in the form of a string containing space-delimited values.""" + bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = rest_field( + name="bearerTokenSendingMethods", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the mechanism by which access token is passed to the API.""" + resource_owner_username: Optional[str] = rest_field( + name="resourceOwnerUsername", visibility=["read", "create", "update", "delete", "query"] + ) + """Can be optionally specified when resource owner password grant type is supported by this + authorization server. Default resource owner username.""" + resource_owner_password: Optional[str] = rest_field( + name="resourceOwnerPassword", visibility=["read", "create", "update", "delete", "query"] + ) + """Can be optionally specified when resource owner password grant type is supported by this + authorization server. Default resource owner password.""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = None, + client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = None, + token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = None, + token_endpoint: Optional[str] = None, + support_state: Optional[bool] = None, + default_scope: Optional[str] = None, + bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = None, + resource_owner_username: Optional[str] = None, + resource_owner_password: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationServerContractProperties(AuthorizationServerContractBaseProperties): + """External OAuth authorization server settings Properties. + + :ivar description: Description of the authorization server. Can contain HTML formatting tags. + :vartype description: str + :ivar authorization_methods: HTTP verbs supported by the authorization endpoint. GET must be + always present. POST is optional. + :vartype authorization_methods: list[str or + ~azure.mgmt.apimanagement.models.AuthorizationMethod] + :ivar client_authentication_method: Method of authentication supported by the token endpoint of + this authorization server. Possible values are Basic and/or Body. When Body is specified, + client credentials and other parameters are passed within the request body in the + application/x-www-form-urlencoded format. + :vartype client_authentication_method: list[str or + ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] + :ivar token_body_parameters: Additional parameters required by the token endpoint of this + authorization server represented as an array of JSON objects with name and value string + properties, i.e. {"name" : "name value", "value": "a value"}. + :vartype token_body_parameters: + list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] + :ivar token_endpoint: OAuth token endpoint. Contains absolute URI to entity being referenced. + :vartype token_endpoint: str + :ivar support_state: If true, authorization server will include state parameter from the + authorization request to its response. Client may use state parameter to raise protocol + security. + :vartype support_state: bool + :ivar default_scope: Access token scope that is going to be requested by default. Can be + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. + :vartype default_scope: str + :ivar bearer_token_sending_methods: Specifies the mechanism by which access token is passed to + the API. + :vartype bearer_token_sending_methods: list[str or + ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] + :ivar resource_owner_username: Can be optionally specified when resource owner password grant + type is supported by this authorization server. Default resource owner username. + :vartype resource_owner_username: str + :ivar resource_owner_password: Can be optionally specified when resource owner password grant + type is supported by this authorization server. Default resource owner password. + :vartype resource_owner_password: str + :ivar display_name: User-friendly authorization server name. Required. + :vartype display_name: str + :ivar use_in_test_console: If true, the authorization server may be used in the developer + portal test console. True by default if no value is provided. + :vartype use_in_test_console: bool + :ivar use_in_api_documentation: If true, the authorization server will be used in the API + documentation in the developer portal. False by default if no value is provided. + :vartype use_in_api_documentation: bool + :ivar client_registration_endpoint: Optional reference to a page where client or app + registration for this authorization server is performed. Contains absolute URL to entity being + referenced. Required. + :vartype client_registration_endpoint: str + :ivar authorization_endpoint: OAuth authorization endpoint. See + `http://tools.ietf.org/html/rfc6749#section-3.2 + `_. Required. + :vartype authorization_endpoint: str + :ivar grant_types: Form of an authorization grant, which the client uses to request the access + token. Required. + :vartype grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] + :ivar client_id: Client or app id registered with this authorization server. Required. + :vartype client_id: str + :ivar client_secret: Client or app secret registered with this authorization server. This + property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the + value. + :vartype client_secret: str + """ + + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """User-friendly authorization server name. Required.""" + use_in_test_console: Optional[bool] = rest_field( + name="useInTestConsole", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, the authorization server may be used in the developer portal test console. True by + default if no value is provided.""" + use_in_api_documentation: Optional[bool] = rest_field( + name="useInApiDocumentation", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, the authorization server will be used in the API documentation in the developer + portal. False by default if no value is provided.""" + client_registration_endpoint: str = rest_field( + name="clientRegistrationEndpoint", visibility=["read", "create", "update", "delete", "query"] + ) + """Optional reference to a page where client or app registration for this authorization server is + performed. Contains absolute URL to entity being referenced. Required.""" + authorization_endpoint: str = rest_field( + name="authorizationEndpoint", visibility=["read", "create", "update", "delete", "query"] + ) + """OAuth authorization endpoint. See `http://tools.ietf.org/html/rfc6749#section-3.2 + `_. Required.""" + grant_types: list[Union[str, "_models.GrantType"]] = rest_field( + name="grantTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """Form of an authorization grant, which the client uses to request the access token. Required.""" + client_id: str = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"]) + """Client or app id registered with this authorization server. Required.""" + client_secret: Optional[str] = rest_field( + name="clientSecret", visibility=["read", "create", "update", "delete", "query"] + ) + """Client or app secret registered with this authorization server. This property will not be + filled on 'GET' operations! Use '/listSecrets' POST request to get the value.""" + + @overload + def __init__( + self, + *, + display_name: str, + client_registration_endpoint: str, + authorization_endpoint: str, + grant_types: list[Union[str, "_models.GrantType"]], + client_id: str, + description: Optional[str] = None, + authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = None, + client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = None, + token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = None, + token_endpoint: Optional[str] = None, + support_state: Optional[bool] = None, + default_scope: Optional[str] = None, + bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = None, + resource_owner_username: Optional[str] = None, + resource_owner_password: Optional[str] = None, + use_in_test_console: Optional[bool] = None, + use_in_api_documentation: Optional[bool] = None, + client_secret: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationServerSecretsContract(_Model): + """OAuth Server Secrets Contract. + + :ivar client_secret: oAuth Authorization Server Secrets. + :vartype client_secret: str + :ivar resource_owner_username: Can be optionally specified when resource owner password grant + type is supported by this authorization server. Default resource owner username. + :vartype resource_owner_username: str + :ivar resource_owner_password: Can be optionally specified when resource owner password grant + type is supported by this authorization server. Default resource owner password. + :vartype resource_owner_password: str + """ + + client_secret: Optional[str] = rest_field( + name="clientSecret", visibility=["read", "create", "update", "delete", "query"] + ) + """oAuth Authorization Server Secrets.""" + resource_owner_username: Optional[str] = rest_field( + name="resourceOwnerUsername", visibility=["read", "create", "update", "delete", "query"] + ) + """Can be optionally specified when resource owner password grant type is supported by this + authorization server. Default resource owner username.""" + resource_owner_password: Optional[str] = rest_field( + name="resourceOwnerPassword", visibility=["read", "create", "update", "delete", "query"] + ) + """Can be optionally specified when resource owner password grant type is supported by this + authorization server. Default resource owner password.""" + + @overload + def __init__( + self, + *, + client_secret: Optional[str] = None, + resource_owner_username: Optional[str] = None, + resource_owner_password: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizationServerUpdateContract(ProxyResource): + """External OAuth authorization server settings. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the External OAuth authorization server update Contract. + :vartype properties: + ~azure.mgmt.apimanagement.models.AuthorizationServerUpdateContractProperties + """ + + properties: Optional["_models.AuthorizationServerUpdateContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the External OAuth authorization server update Contract.""" + + __flattened_items = [ + "description", + "authorization_methods", + "client_authentication_method", + "token_body_parameters", + "token_endpoint", + "support_state", + "default_scope", + "bearer_token_sending_methods", + "resource_owner_username", + "resource_owner_password", + "display_name", + "use_in_test_console", + "use_in_api_documentation", + "client_registration_endpoint", + "authorization_endpoint", + "grant_types", + "client_id", + "client_secret", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AuthorizationServerUpdateContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AuthorizationServerUpdateContractProperties( + AuthorizationServerContractBaseProperties +): # pylint: disable=name-too-long + """External OAuth authorization server Update settings contract. + + :ivar description: Description of the authorization server. Can contain HTML formatting tags. + :vartype description: str + :ivar authorization_methods: HTTP verbs supported by the authorization endpoint. GET must be + always present. POST is optional. + :vartype authorization_methods: list[str or + ~azure.mgmt.apimanagement.models.AuthorizationMethod] + :ivar client_authentication_method: Method of authentication supported by the token endpoint of + this authorization server. Possible values are Basic and/or Body. When Body is specified, + client credentials and other parameters are passed within the request body in the + application/x-www-form-urlencoded format. + :vartype client_authentication_method: list[str or + ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] + :ivar token_body_parameters: Additional parameters required by the token endpoint of this + authorization server represented as an array of JSON objects with name and value string + properties, i.e. {"name" : "name value", "value": "a value"}. + :vartype token_body_parameters: + list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] + :ivar token_endpoint: OAuth token endpoint. Contains absolute URI to entity being referenced. + :vartype token_endpoint: str + :ivar support_state: If true, authorization server will include state parameter from the + authorization request to its response. Client may use state parameter to raise protocol + security. + :vartype support_state: bool + :ivar default_scope: Access token scope that is going to be requested by default. Can be + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. + :vartype default_scope: str + :ivar bearer_token_sending_methods: Specifies the mechanism by which access token is passed to + the API. + :vartype bearer_token_sending_methods: list[str or + ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] + :ivar resource_owner_username: Can be optionally specified when resource owner password grant + type is supported by this authorization server. Default resource owner username. + :vartype resource_owner_username: str + :ivar resource_owner_password: Can be optionally specified when resource owner password grant + type is supported by this authorization server. Default resource owner password. + :vartype resource_owner_password: str + :ivar display_name: User-friendly authorization server name. + :vartype display_name: str + :ivar use_in_test_console: If true, the authorization server may be used in the developer + portal test console. True by default if no value is provided. + :vartype use_in_test_console: bool + :ivar use_in_api_documentation: If true, the authorization server will be used in the API + documentation in the developer portal. False by default if no value is provided. + :vartype use_in_api_documentation: bool + :ivar client_registration_endpoint: Optional reference to a page where client or app + registration for this authorization server is performed. Contains absolute URL to entity being + referenced. + :vartype client_registration_endpoint: str + :ivar authorization_endpoint: OAuth authorization endpoint. See + `http://tools.ietf.org/html/rfc6749#section-3.2 + `_. + :vartype authorization_endpoint: str + :ivar grant_types: Form of an authorization grant, which the client uses to request the access + token. + :vartype grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] + :ivar client_id: Client or app id registered with this authorization server. + :vartype client_id: str + :ivar client_secret: Client or app secret registered with this authorization server. This + property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the + value. + :vartype client_secret: str + """ + + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """User-friendly authorization server name.""" + use_in_test_console: Optional[bool] = rest_field( + name="useInTestConsole", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, the authorization server may be used in the developer portal test console. True by + default if no value is provided.""" + use_in_api_documentation: Optional[bool] = rest_field( + name="useInApiDocumentation", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, the authorization server will be used in the API documentation in the developer + portal. False by default if no value is provided.""" + client_registration_endpoint: Optional[str] = rest_field( + name="clientRegistrationEndpoint", visibility=["read", "create", "update", "delete", "query"] + ) + """Optional reference to a page where client or app registration for this authorization server is + performed. Contains absolute URL to entity being referenced.""" + authorization_endpoint: Optional[str] = rest_field( + name="authorizationEndpoint", visibility=["read", "create", "update", "delete", "query"] + ) + """OAuth authorization endpoint. See `http://tools.ietf.org/html/rfc6749#section-3.2 + `_.""" + grant_types: Optional[list[Union[str, "_models.GrantType"]]] = rest_field( + name="grantTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """Form of an authorization grant, which the client uses to request the access token.""" + client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"]) + """Client or app id registered with this authorization server.""" + client_secret: Optional[str] = rest_field( + name="clientSecret", visibility=["read", "create", "update", "delete", "query"] + ) + """Client or app secret registered with this authorization server. This property will not be + filled on 'GET' operations! Use '/listSecrets' POST request to get the value.""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = None, + client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = None, + token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = None, + token_endpoint: Optional[str] = None, + support_state: Optional[bool] = None, + default_scope: Optional[str] = None, + bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = None, + resource_owner_username: Optional[str] = None, + resource_owner_password: Optional[str] = None, + display_name: Optional[str] = None, + use_in_test_console: Optional[bool] = None, + use_in_api_documentation: Optional[bool] = None, + client_registration_endpoint: Optional[str] = None, + authorization_endpoint: Optional[str] = None, + grant_types: Optional[list[Union[str, "_models.GrantType"]]] = None, + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendAuthorizationHeaderCredentials(_Model): + """Authorization header information. + + :ivar scheme: Authentication Scheme name. Required. + :vartype scheme: str + :ivar parameter: Authentication Parameter value. Required. + :vartype parameter: str + """ + + scheme: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Authentication Scheme name. Required.""" + parameter: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Authentication Parameter value. Required.""" + + @overload + def __init__( + self, + *, + scheme: str, + parameter: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendBaseParameters(_Model): + """Backend entity base Parameter set. + + :ivar title: Backend Title. + :vartype title: str + :ivar description: Backend Description. + :vartype description: str + :ivar resource_id: Management Uri of the Resource in External System. This URL can be the Arm + Resource Id of Logic Apps, Function Apps or API Apps. + :vartype resource_id: str + :ivar properties: Backend Properties contract. + :vartype properties: ~azure.mgmt.apimanagement.models.BackendProperties + :ivar credentials: Backend Credentials Contract Properties. + :vartype credentials: ~azure.mgmt.apimanagement.models.BackendCredentialsContract + :ivar proxy: Backend gateway Contract Properties. + :vartype proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract + :ivar tls: Backend TLS Properties. + :vartype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties + :ivar circuit_breaker: Backend Circuit Breaker Configuration. + :vartype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker + :ivar azure_region: Azure region in which the backend is deployed. Can be optionally specified + to use features such as carbon-optimized load balancer. + :vartype azure_region: str + :ivar pool: Backend Pool Properties. + :vartype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool + :ivar type: Type of the backend. A backend can be either Single or Pool. Known values are: + "Single" and "Pool". + :vartype type: str or ~azure.mgmt.apimanagement.models.BackendType + """ + + title: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Backend Title.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Backend Description.""" + resource_id: Optional[str] = rest_field( + name="resourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic + Apps, Function Apps or API Apps.""" + properties: Optional["_models.BackendProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Backend Properties contract.""" + credentials: Optional["_models.BackendCredentialsContract"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Backend Credentials Contract Properties.""" + proxy: Optional["_models.BackendProxyContract"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Backend gateway Contract Properties.""" + tls: Optional["_models.BackendTlsProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Backend TLS Properties.""" + circuit_breaker: Optional["_models.BackendCircuitBreaker"] = rest_field( + name="circuitBreaker", visibility=["read", "create", "update", "delete", "query"] + ) + """Backend Circuit Breaker Configuration.""" + azure_region: Optional[str] = rest_field( + name="azureRegion", visibility=["read", "create", "update", "delete", "query"] + ) + """Azure region in which the backend is deployed. Can be optionally specified to use features such + as carbon-optimized load balancer.""" + pool: Optional["_models.BackendBaseParametersPool"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Backend Pool Properties.""" + type: Optional[Union[str, "_models.BackendType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Type of the backend. A backend can be either Single or Pool. Known values are: \"Single\" and + \"Pool\".""" + + @overload + def __init__( + self, + *, + title: Optional[str] = None, + description: Optional[str] = None, + resource_id: Optional[str] = None, + properties: Optional["_models.BackendProperties"] = None, + credentials: Optional["_models.BackendCredentialsContract"] = None, + proxy: Optional["_models.BackendProxyContract"] = None, + tls: Optional["_models.BackendTlsProperties"] = None, + circuit_breaker: Optional["_models.BackendCircuitBreaker"] = None, + azure_region: Optional[str] = None, + pool: Optional["_models.BackendBaseParametersPool"] = None, + type: Optional[Union[str, "_models.BackendType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendPool(_Model): + """Backend pool information. + + :ivar services: The list of backend entities belonging to a pool. + :vartype services: list[~azure.mgmt.apimanagement.models.BackendPoolItem] + :ivar failure_response: The response to be returned when all the backends in the pool are + inactive. + :vartype failure_response: ~azure.mgmt.apimanagement.models.BackendFailureResponse + :ivar session_affinity: The session stickiness properties of the backend pool. + :vartype session_affinity: ~azure.mgmt.apimanagement.models.BackendSessionAffinity + """ + + services: Optional[list["_models.BackendPoolItem"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The list of backend entities belonging to a pool.""" + failure_response: Optional["_models.BackendFailureResponse"] = rest_field( + name="failureResponse", visibility=["read", "create", "update", "delete", "query"] + ) + """The response to be returned when all the backends in the pool are inactive.""" + session_affinity: Optional["_models.BackendSessionAffinity"] = rest_field( + name="sessionAffinity", visibility=["read", "create", "update", "delete", "query"] + ) + """The session stickiness properties of the backend pool.""" + + @overload + def __init__( + self, + *, + services: Optional[list["_models.BackendPoolItem"]] = None, + failure_response: Optional["_models.BackendFailureResponse"] = None, + session_affinity: Optional["_models.BackendSessionAffinity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendBaseParametersPool(BackendPool): + """BackendBaseParametersPool. + + :ivar services: The list of backend entities belonging to a pool. + :vartype services: list[~azure.mgmt.apimanagement.models.BackendPoolItem] + :ivar failure_response: The response to be returned when all the backends in the pool are + inactive. + :vartype failure_response: ~azure.mgmt.apimanagement.models.BackendFailureResponse + :ivar session_affinity: The session stickiness properties of the backend pool. + :vartype session_affinity: ~azure.mgmt.apimanagement.models.BackendSessionAffinity + """ + + @overload + def __init__( + self, + *, + services: Optional[list["_models.BackendPoolItem"]] = None, + failure_response: Optional["_models.BackendFailureResponse"] = None, + session_affinity: Optional["_models.BackendSessionAffinity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendCircuitBreaker(_Model): + """The configuration of the backend circuit breaker. + + :ivar rules: The rules for tripping the backend. + :vartype rules: list[~azure.mgmt.apimanagement.models.CircuitBreakerRule] + """ + + rules: Optional[list["_models.CircuitBreakerRule"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The rules for tripping the backend.""" + + @overload + def __init__( + self, + *, + rules: Optional[list["_models.CircuitBreakerRule"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendConfiguration(_Model): + """Information regarding how the gateway should integrate with backend systems. + + :ivar subnet: The default hostname of the data-plane gateway to which requests can be sent. + :vartype subnet: ~azure.mgmt.apimanagement.models.BackendSubnetConfiguration + """ + + subnet: Optional["_models.BackendSubnetConfiguration"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The default hostname of the data-plane gateway to which requests can be sent.""" + + @overload + def __init__( + self, + *, + subnet: Optional["_models.BackendSubnetConfiguration"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendContract(ProxyResource): + """Backend details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Backend entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.BackendContractProperties + """ + + properties: Optional["_models.BackendContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Backend entity contract properties.""" + + __flattened_items = [ + "title", + "description", + "resource_id", + "properties", + "credentials", + "proxy", + "tls", + "circuit_breaker", + "azure_region", + "pool", + "type", + "url", + "protocol", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.BackendContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class BackendContractProperties(BackendBaseParameters): + """Parameters supplied to the Create Backend operation. + + :ivar title: Backend Title. + :vartype title: str + :ivar description: Backend Description. + :vartype description: str + :ivar resource_id: Management Uri of the Resource in External System. This URL can be the Arm + Resource Id of Logic Apps, Function Apps or API Apps. + :vartype resource_id: str + :ivar properties: Backend Properties contract. + :vartype properties: ~azure.mgmt.apimanagement.models.BackendProperties + :ivar credentials: Backend Credentials Contract Properties. + :vartype credentials: ~azure.mgmt.apimanagement.models.BackendCredentialsContract + :ivar proxy: Backend gateway Contract Properties. + :vartype proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract + :ivar tls: Backend TLS Properties. + :vartype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties + :ivar circuit_breaker: Backend Circuit Breaker Configuration. + :vartype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker + :ivar azure_region: Azure region in which the backend is deployed. Can be optionally specified + to use features such as carbon-optimized load balancer. + :vartype azure_region: str + :ivar pool: Backend Pool Properties. + :vartype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool + :ivar type: Type of the backend. A backend can be either Single or Pool. Known values are: + "Single" and "Pool". + :vartype type: str or ~azure.mgmt.apimanagement.models.BackendType + :ivar url: Runtime Url of the Backend. Required when backend type is 'Single'. + :vartype url: str + :ivar protocol: Backend communication protocol. Required when backend type is 'Single'. Known + values are: "http" and "soap". + :vartype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol + """ + + url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Runtime Url of the Backend. Required when backend type is 'Single'.""" + protocol: Optional[Union[str, "_models.BackendProtocol"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Backend communication protocol. Required when backend type is 'Single'. Known values are: + \"http\" and \"soap\".""" + + @overload + def __init__( + self, + *, + title: Optional[str] = None, + description: Optional[str] = None, + resource_id: Optional[str] = None, + properties: Optional["_models.BackendProperties"] = None, + credentials: Optional["_models.BackendCredentialsContract"] = None, + proxy: Optional["_models.BackendProxyContract"] = None, + tls: Optional["_models.BackendTlsProperties"] = None, + circuit_breaker: Optional["_models.BackendCircuitBreaker"] = None, + azure_region: Optional[str] = None, + pool: Optional["_models.BackendBaseParametersPool"] = None, + type: Optional[Union[str, "_models.BackendType"]] = None, + url: Optional[str] = None, + protocol: Optional[Union[str, "_models.BackendProtocol"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendCredentialsContract(_Model): + """Details of the Credentials used to connect to Backend. + + :ivar certificate_ids: List of Client Certificate Ids. + :vartype certificate_ids: list[str] + :ivar certificate: List of Client Certificate Thumbprints. Will be ignored if certificatesIds + are provided. + :vartype certificate: list[str] + :ivar query: Query Parameter description. + :vartype query: dict[str, list[str]] + :ivar header: Header Parameter description. + :vartype header: dict[str, list[str]] + :ivar authorization: Authorization header authentication. + :vartype authorization: ~azure.mgmt.apimanagement.models.BackendAuthorizationHeaderCredentials + """ + + certificate_ids: Optional[list[str]] = rest_field( + name="certificateIds", visibility=["read", "create", "update", "delete", "query"] + ) + """List of Client Certificate Ids.""" + certificate: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided.""" + query: Optional[dict[str, list[str]]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Query Parameter description.""" + header: Optional[dict[str, list[str]]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Header Parameter description.""" + authorization: Optional["_models.BackendAuthorizationHeaderCredentials"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Authorization header authentication.""" + + @overload + def __init__( + self, + *, + certificate_ids: Optional[list[str]] = None, + certificate: Optional[list[str]] = None, + query: Optional[dict[str, list[str]]] = None, + header: Optional[dict[str, list[str]]] = None, + authorization: Optional["_models.BackendAuthorizationHeaderCredentials"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendFailureResponse(_Model): + """The response to be returned when a backend fails to respond. + + :ivar status_code: The status code of the response. + :vartype status_code: int + """ + + status_code: Optional[int] = rest_field( + name="statusCode", visibility=["read", "create", "update", "delete", "query"] + ) + """The status code of the response.""" + + @overload + def __init__( + self, + *, + status_code: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendPoolItem(_Model): + """Backend pool service information. + + :ivar id: The unique ARM id of the backend entity. The ARM id should refer to an already + existing backend entity. Required. + :vartype id: str + :ivar weight: The weight of the backend entity in the backend pool. Must be between 0 and 100. + It can be also null if the value not specified. + :vartype weight: int + :ivar priority: The priority of the backend entity in the backend pool. Must be between 0 and + 100. It can be also null if the value not specified. + :vartype priority: int + :ivar preferred_carbon_emission: Scope 2 carbon emission preference for the backend. When + specified, the load balancer will optimize traffic flow by routing to regions that have carbon + emission less than or equal to the specified category. However, when all other backends are not + available it will route traffic to these regions anyway. This requires the backend to be + attributed with 'azureRegion' information. Known values are: "VeryLow", "Low", "Medium", + "High", and "VeryHigh". + :vartype preferred_carbon_emission: str or + ~azure.mgmt.apimanagement.models.CarbonEmissionCategory + """ + + id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The unique ARM id of the backend entity. The ARM id should refer to an already existing backend + entity. Required.""" + weight: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The weight of the backend entity in the backend pool. Must be between 0 and 100. It can be also + null if the value not specified.""" + priority: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The priority of the backend entity in the backend pool. Must be between 0 and 100. It can be + also null if the value not specified.""" + preferred_carbon_emission: Optional[Union[str, "_models.CarbonEmissionCategory"]] = rest_field( + name="preferredCarbonEmission", visibility=["read", "create", "update", "delete", "query"] + ) + """Scope 2 carbon emission preference for the backend. When specified, the load balancer will + optimize traffic flow by routing to regions that have carbon emission less than or equal to the + specified category. However, when all other backends are not available it will route traffic to + these regions anyway. This requires the backend to be attributed with 'azureRegion' + information. Known values are: \"VeryLow\", \"Low\", \"Medium\", \"High\", and \"VeryHigh\".""" + + @overload + def __init__( + self, + *, + id: str, # pylint: disable=redefined-builtin + weight: Optional[int] = None, + priority: Optional[int] = None, + preferred_carbon_emission: Optional[Union[str, "_models.CarbonEmissionCategory"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendProperties(_Model): + """Properties specific to the Backend Type. + + :ivar service_fabric_cluster: Backend Service Fabric Cluster Properties. + :vartype service_fabric_cluster: + ~azure.mgmt.apimanagement.models.BackendServiceFabricClusterProperties + """ + + service_fabric_cluster: Optional["_models.BackendServiceFabricClusterProperties"] = rest_field( + name="serviceFabricCluster", visibility=["read", "create", "update", "delete", "query"] + ) + """Backend Service Fabric Cluster Properties.""" + + @overload + def __init__( + self, + *, + service_fabric_cluster: Optional["_models.BackendServiceFabricClusterProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendProxyContract(_Model): + """Details of the Backend WebProxy Server to use in the Request to Backend. + + :ivar url: WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri + instance, including all fragments and query strings. Required. + :vartype url: str + :ivar username: Username to connect to the WebProxy server. + :vartype username: str + :ivar password: Password to connect to the WebProxy Server. + :vartype password: str + """ + + url: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, + including all fragments and query strings. Required.""" + username: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Username to connect to the WebProxy server.""" + password: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Password to connect to the WebProxy Server.""" + + @overload + def __init__( + self, + *, + url: str, + username: Optional[str] = None, + password: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendReconnectContract(ProxyResource): + """Reconnect request parameters. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Reconnect request properties. + :vartype properties: ~azure.mgmt.apimanagement.models.BackendReconnectProperties + """ + + properties: Optional["_models.BackendReconnectProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Reconnect request properties.""" + + __flattened_items = ["after"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.BackendReconnectProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class BackendReconnectProperties(_Model): + """Properties to control reconnect requests. + + :ivar after: Duration in ISO8601 format after which reconnect will be initiated. Minimum + duration of the Reconnect is PT2M. + :vartype after: ~datetime.timedelta + """ + + after: Optional[datetime.timedelta] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the + Reconnect is PT2M.""" + + @overload + def __init__( + self, + *, + after: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendServiceFabricClusterProperties(_Model): + """Properties of the Service Fabric Type Backend. + + :ivar client_certificate_id: The client certificate id for the management endpoint. + :vartype client_certificate_id: str + :ivar client_certificatethumbprint: The client certificate thumbprint for the management + endpoint. Will be ignored if certificatesIds are provided. + :vartype client_certificatethumbprint: str + :ivar max_partition_resolution_retries: Maximum number of retries while attempting resolve the + partition. + :vartype max_partition_resolution_retries: int + :ivar management_endpoints: The cluster management endpoint. Required. + :vartype management_endpoints: list[str] + :ivar server_certificate_thumbprints: Thumbprints of certificates cluster management service + uses for tls communication. + :vartype server_certificate_thumbprints: list[str] + :ivar server_x509_names: Server X509 Certificate Names Collection. + :vartype server_x509_names: list[~azure.mgmt.apimanagement.models.X509CertificateName] + """ + + client_certificate_id: Optional[str] = rest_field( + name="clientCertificateId", visibility=["read", "create", "update", "delete", "query"] + ) + """The client certificate id for the management endpoint.""" + client_certificatethumbprint: Optional[str] = rest_field( + name="clientCertificatethumbprint", visibility=["read", "create", "update", "delete", "query"] + ) + """The client certificate thumbprint for the management endpoint. Will be ignored if + certificatesIds are provided.""" + max_partition_resolution_retries: Optional[int] = rest_field( + name="maxPartitionResolutionRetries", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum number of retries while attempting resolve the partition.""" + management_endpoints: list[str] = rest_field( + name="managementEndpoints", visibility=["read", "create", "update", "delete", "query"] + ) + """The cluster management endpoint. Required.""" + server_certificate_thumbprints: Optional[list[str]] = rest_field( + name="serverCertificateThumbprints", visibility=["read", "create", "update", "delete", "query"] + ) + """Thumbprints of certificates cluster management service uses for tls communication.""" + server_x509_names: Optional[list["_models.X509CertificateName"]] = rest_field( + name="serverX509Names", visibility=["read", "create", "update", "delete", "query"] + ) + """Server X509 Certificate Names Collection.""" + + @overload + def __init__( + self, + *, + management_endpoints: list[str], + client_certificate_id: Optional[str] = None, + client_certificatethumbprint: Optional[str] = None, + max_partition_resolution_retries: Optional[int] = None, + server_certificate_thumbprints: Optional[list[str]] = None, + server_x509_names: Optional[list["_models.X509CertificateName"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendSessionAffinity(_Model): + """The session stickiness properties of the backend pool. + + :ivar session_id: The id that identifies the requests belonging to the same session. + :vartype session_id: ~azure.mgmt.apimanagement.models.BackendSessionId + """ + + session_id: Optional["_models.BackendSessionId"] = rest_field( + name="sessionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The id that identifies the requests belonging to the same session.""" + + @overload + def __init__( + self, + *, + session_id: Optional["_models.BackendSessionId"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendSessionId(_Model): + """The properties of the id that identifies the requests belonging to the same session. + + :ivar source: Source from where the session id is extracted. "cookie" + :vartype source: str or ~azure.mgmt.apimanagement.models.BackendSessionIdSource + :ivar name: Name of the variable that refers to the session id. + :vartype name: str + """ + + source: Optional[Union[str, "_models.BackendSessionIdSource"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Source from where the session id is extracted. \"cookie\"""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the variable that refers to the session id.""" + + @overload + def __init__( + self, + *, + source: Optional[Union[str, "_models.BackendSessionIdSource"]] = None, + name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendSubnetConfiguration(_Model): + """Information regarding how the subnet to which the gateway should be injected. + + :ivar id: The ARM ID of the subnet in which the backend systems are hosted. + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The ARM ID of the subnet in which the backend systems are hosted.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendTlsProperties(_Model): + """Properties controlling TLS Certificate Validation. + + :ivar validate_certificate_chain: Flag indicating whether SSL certificate chain validation + should be done when using self-signed certificates for this backend host. + :vartype validate_certificate_chain: bool + :ivar validate_certificate_name: Flag indicating whether SSL certificate name validation should + be done when using self-signed certificates for this backend host. + :vartype validate_certificate_name: bool + :ivar server_certificate_thumbprints: Thumbprints of certificates used by the backend host for + TLS communication. + :vartype server_certificate_thumbprints: list[str] + :ivar server_x509_names: Server X509 Certificate Names of the Backend Host. + :vartype server_x509_names: list[~azure.mgmt.apimanagement.models.X509CertificateName] + """ + + validate_certificate_chain: Optional[bool] = rest_field( + name="validateCertificateChain", visibility=["read", "create", "update", "delete", "query"] + ) + """Flag indicating whether SSL certificate chain validation should be done when using self-signed + certificates for this backend host.""" + validate_certificate_name: Optional[bool] = rest_field( + name="validateCertificateName", visibility=["read", "create", "update", "delete", "query"] + ) + """Flag indicating whether SSL certificate name validation should be done when using self-signed + certificates for this backend host.""" + server_certificate_thumbprints: Optional[list[str]] = rest_field( + name="serverCertificateThumbprints", visibility=["read", "create", "update", "delete", "query"] + ) + """Thumbprints of certificates used by the backend host for TLS communication.""" + server_x509_names: Optional[list["_models.X509CertificateName"]] = rest_field( + name="serverX509Names", visibility=["read", "create", "update", "delete", "query"] + ) + """Server X509 Certificate Names of the Backend Host.""" + + @overload + def __init__( + self, + *, + validate_certificate_chain: Optional[bool] = None, + validate_certificate_name: Optional[bool] = None, + server_certificate_thumbprints: Optional[list[str]] = None, + server_x509_names: Optional[list["_models.X509CertificateName"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendUpdateParameterProperties(BackendBaseParameters): + """Parameters supplied to the Update Backend operation. + + :ivar title: Backend Title. + :vartype title: str + :ivar description: Backend Description. + :vartype description: str + :ivar resource_id: Management Uri of the Resource in External System. This URL can be the Arm + Resource Id of Logic Apps, Function Apps or API Apps. + :vartype resource_id: str + :ivar properties: Backend Properties contract. + :vartype properties: ~azure.mgmt.apimanagement.models.BackendProperties + :ivar credentials: Backend Credentials Contract Properties. + :vartype credentials: ~azure.mgmt.apimanagement.models.BackendCredentialsContract + :ivar proxy: Backend gateway Contract Properties. + :vartype proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract + :ivar tls: Backend TLS Properties. + :vartype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties + :ivar circuit_breaker: Backend Circuit Breaker Configuration. + :vartype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker + :ivar azure_region: Azure region in which the backend is deployed. Can be optionally specified + to use features such as carbon-optimized load balancer. + :vartype azure_region: str + :ivar pool: Backend Pool Properties. + :vartype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool + :ivar type: Type of the backend. A backend can be either Single or Pool. Known values are: + "Single" and "Pool". + :vartype type: str or ~azure.mgmt.apimanagement.models.BackendType + :ivar url: Runtime Url of the Backend. + :vartype url: str + :ivar protocol: Backend communication protocol. Known values are: "http" and "soap". + :vartype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol + """ + + url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Runtime Url of the Backend.""" + protocol: Optional[Union[str, "_models.BackendProtocol"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Backend communication protocol. Known values are: \"http\" and \"soap\".""" + + @overload + def __init__( + self, + *, + title: Optional[str] = None, + description: Optional[str] = None, + resource_id: Optional[str] = None, + properties: Optional["_models.BackendProperties"] = None, + credentials: Optional["_models.BackendCredentialsContract"] = None, + proxy: Optional["_models.BackendProxyContract"] = None, + tls: Optional["_models.BackendTlsProperties"] = None, + circuit_breaker: Optional["_models.BackendCircuitBreaker"] = None, + azure_region: Optional[str] = None, + pool: Optional["_models.BackendBaseParametersPool"] = None, + type: Optional[Union[str, "_models.BackendType"]] = None, + url: Optional[str] = None, + protocol: Optional[Union[str, "_models.BackendProtocol"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BackendUpdateParameters(_Model): + """Backend update parameters. + + :ivar properties: Backend entity update contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.BackendUpdateParameterProperties + """ + + properties: Optional["_models.BackendUpdateParameterProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Backend entity update contract properties.""" + + __flattened_items = [ + "title", + "description", + "resource_id", + "properties", + "credentials", + "proxy", + "tls", + "circuit_breaker", + "azure_region", + "pool", + "type", + "url", + "protocol", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.BackendUpdateParameterProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class BodyDiagnosticSettings(_Model): + """Body logging settings. + + :ivar bytes: Number of request body bytes to log. + :vartype bytes: int + """ + + bytes: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Number of request body bytes to log.""" + + @overload + def __init__( + self, + *, + bytes: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CacheContract(ProxyResource): + """Cache details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Cache properties details. + :vartype properties: ~azure.mgmt.apimanagement.models.CacheContractProperties + """ + + properties: Optional["_models.CacheContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Cache properties details.""" + + __flattened_items = ["description", "connection_string", "use_from_location", "resource_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.CacheContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class CacheContractProperties(_Model): + """Properties of the Cache contract. + + :ivar description: Cache description. + :vartype description: str + :ivar connection_string: Runtime connection string to cache. Required. + :vartype connection_string: str + :ivar use_from_location: Location identifier to use cache from (should be either 'default' or + valid Azure region identifier). Required. + :vartype use_from_location: str + :ivar resource_id: Original uri of entity in external system cache points to. + :vartype resource_id: str + """ + + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Cache description.""" + connection_string: str = rest_field( + name="connectionString", visibility=["read", "create", "update", "delete", "query"] + ) + """Runtime connection string to cache. Required.""" + use_from_location: str = rest_field( + name="useFromLocation", visibility=["read", "create", "update", "delete", "query"] + ) + """Location identifier to use cache from (should be either 'default' or valid Azure region + identifier). Required.""" + resource_id: Optional[str] = rest_field( + name="resourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Original uri of entity in external system cache points to.""" + + @overload + def __init__( + self, + *, + connection_string: str, + use_from_location: str, + description: Optional[str] = None, + resource_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CacheUpdateParameters(_Model): + """Cache update details. + + :ivar properties: Cache update properties details. + :vartype properties: ~azure.mgmt.apimanagement.models.CacheUpdateProperties + """ + + properties: Optional["_models.CacheUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Cache update properties details.""" + + __flattened_items = ["description", "connection_string", "use_from_location", "resource_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.CacheUpdateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class CacheUpdateProperties(_Model): + """Parameters supplied to the Update Cache operation. + + :ivar description: Cache description. + :vartype description: str + :ivar connection_string: Runtime connection string to cache. + :vartype connection_string: str + :ivar use_from_location: Location identifier to use cache from (should be either 'default' or + valid Azure region identifier). + :vartype use_from_location: str + :ivar resource_id: Original uri of entity in external system cache points to. + :vartype resource_id: str + """ + + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Cache description.""" + connection_string: Optional[str] = rest_field( + name="connectionString", visibility=["read", "create", "update", "delete", "query"] + ) + """Runtime connection string to cache.""" + use_from_location: Optional[str] = rest_field( + name="useFromLocation", visibility=["read", "create", "update", "delete", "query"] + ) + """Location identifier to use cache from (should be either 'default' or valid Azure region + identifier).""" + resource_id: Optional[str] = rest_field( + name="resourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Original uri of entity in external system cache points to.""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + connection_string: Optional[str] = None, + use_from_location: Optional[str] = None, + resource_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CertificateConfiguration(_Model): + """Certificate configuration which consist of non-trusted intermediates and root certificates. + + :ivar encoded_certificate: Base64 Encoded certificate. + :vartype encoded_certificate: str + :ivar certificate_password: Certificate Password. + :vartype certificate_password: str + :ivar store_name: The System.Security.Cryptography.x509certificates.StoreName certificate store + location. Only Root and CertificateAuthority are valid locations. Required. Known values are: + "CertificateAuthority" and "Root". + :vartype store_name: str or ~azure.mgmt.apimanagement.models.CertificateConfigurationStoreName + :ivar certificate: Certificate information. + :vartype certificate: ~azure.mgmt.apimanagement.models.CertificateInformation + """ + + encoded_certificate: Optional[str] = rest_field( + name="encodedCertificate", visibility=["read", "create", "update", "delete", "query"] + ) + """Base64 Encoded certificate.""" + certificate_password: Optional[str] = rest_field( + name="certificatePassword", visibility=["read", "create", "update", "delete", "query"] + ) + """Certificate Password.""" + store_name: Union[str, "_models.CertificateConfigurationStoreName"] = rest_field( + name="storeName", visibility=["read", "create", "update", "delete", "query"] + ) + """The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only + Root and CertificateAuthority are valid locations. Required. Known values are: + \"CertificateAuthority\" and \"Root\".""" + certificate: Optional["_models.CertificateInformation"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Certificate information.""" + + @overload + def __init__( + self, + *, + store_name: Union[str, "_models.CertificateConfigurationStoreName"], + encoded_certificate: Optional[str] = None, + certificate_password: Optional[str] = None, + certificate: Optional["_models.CertificateInformation"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CertificateContract(ProxyResource): + """Certificate details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Certificate properties details. + :vartype properties: ~azure.mgmt.apimanagement.models.CertificateContractProperties + """ + + properties: Optional["_models.CertificateContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Certificate properties details.""" + + __flattened_items = ["subject", "thumbprint", "expiration_date", "key_vault"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.CertificateContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class CertificateContractProperties(_Model): + """Properties of the Certificate contract. + + :ivar subject: Subject attribute of the certificate. Required. + :vartype subject: str + :ivar thumbprint: Thumbprint of the certificate. Required. + :vartype thumbprint: str + :ivar expiration_date: Expiration date of the certificate. The date conforms to the following + format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required. + :vartype expiration_date: ~datetime.datetime + :ivar key_vault: KeyVault location details of the certificate. + :vartype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractProperties + """ + + subject: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Subject attribute of the certificate. Required.""" + thumbprint: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Thumbprint of the certificate. Required.""" + expiration_date: datetime.datetime = rest_field( + name="expirationDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Expiration date of the certificate. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required.""" + key_vault: Optional["_models.KeyVaultContractProperties"] = rest_field( + name="keyVault", visibility=["read", "create", "update", "delete", "query"] + ) + """KeyVault location details of the certificate.""" + + @overload + def __init__( + self, + *, + subject: str, + thumbprint: str, + expiration_date: datetime.datetime, + key_vault: Optional["_models.KeyVaultContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CertificateCreateOrUpdateParameters(_Model): + """Certificate create or update details. + + :ivar properties: Certificate create or update properties details. + :vartype properties: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateProperties + """ + + properties: Optional["_models.CertificateCreateOrUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Certificate create or update properties details.""" + + __flattened_items = ["data", "password", "key_vault"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.CertificateCreateOrUpdateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class CertificateCreateOrUpdateProperties(_Model): + """Parameters supplied to the CreateOrUpdate certificate operation. + + :ivar data: Base 64 encoded certificate using the application/x-pkcs12 representation. + :vartype data: str + :ivar password: Password for the Certificate. + :vartype password: str + :ivar key_vault: KeyVault location details of the certificate. + :vartype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties + """ + + data: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Base 64 encoded certificate using the application/x-pkcs12 representation.""" + password: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Password for the Certificate.""" + key_vault: Optional["_models.KeyVaultContractCreateProperties"] = rest_field( + name="keyVault", visibility=["read", "create", "update", "delete", "query"] + ) + """KeyVault location details of the certificate.""" + + @overload + def __init__( + self, + *, + data: Optional[str] = None, + password: Optional[str] = None, + key_vault: Optional["_models.KeyVaultContractCreateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CertificateInformation(_Model): + """SSL certificate information. + + :ivar expiry: Expiration date of the certificate. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required. + :vartype expiry: ~datetime.datetime + :ivar thumbprint: Thumbprint of the certificate. Required. + :vartype thumbprint: str + :ivar subject: Subject of the certificate. Required. + :vartype subject: str + """ + + expiry: datetime.datetime = rest_field(visibility=["read", "create", "update", "delete", "query"], format="rfc3339") + """Expiration date of the certificate. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required.""" + thumbprint: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Thumbprint of the certificate. Required.""" + subject: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Subject of the certificate. Required.""" + + @overload + def __init__( + self, + *, + expiry: datetime.datetime, + thumbprint: str, + subject: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CircuitBreakerFailureCondition(_Model): + """The trip conditions of the circuit breaker. + + :ivar count: The threshold for opening the circuit. + :vartype count: int + :ivar percentage: The threshold for opening the circuit. + :vartype percentage: int + :ivar interval: The interval during which the failures are counted. + :vartype interval: ~datetime.timedelta + :ivar status_code_ranges: The status code ranges which are considered as failure. + :vartype status_code_ranges: list[~azure.mgmt.apimanagement.models.FailureStatusCodeRange] + :ivar error_reasons: The error reasons which are considered as failure. + :vartype error_reasons: list[str] + """ + + count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The threshold for opening the circuit.""" + percentage: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The threshold for opening the circuit.""" + interval: Optional[datetime.timedelta] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The interval during which the failures are counted.""" + status_code_ranges: Optional[list["_models.FailureStatusCodeRange"]] = rest_field( + name="statusCodeRanges", visibility=["read", "create", "update", "delete", "query"] + ) + """The status code ranges which are considered as failure.""" + error_reasons: Optional[list[str]] = rest_field( + name="errorReasons", visibility=["read", "create", "update", "delete", "query"] + ) + """The error reasons which are considered as failure.""" + + @overload + def __init__( + self, + *, + count: Optional[int] = None, + percentage: Optional[int] = None, + interval: Optional[datetime.timedelta] = None, + status_code_ranges: Optional[list["_models.FailureStatusCodeRange"]] = None, + error_reasons: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CircuitBreakerRule(_Model): + """Rule configuration to trip the backend. + + :ivar name: The rule name. + :vartype name: str + :ivar failure_condition: The conditions for tripping the circuit breaker. + :vartype failure_condition: ~azure.mgmt.apimanagement.models.CircuitBreakerFailureCondition + :ivar trip_duration: The duration for which the circuit will be tripped. + :vartype trip_duration: ~datetime.timedelta + :ivar accept_retry_after: flag to accept Retry-After header from the backend. + :vartype accept_retry_after: bool + :ivar failure_response: The response of the backend when the circuit breaker gets open. + :vartype failure_response: ~azure.mgmt.apimanagement.models.BackendFailureResponse + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The rule name.""" + failure_condition: Optional["_models.CircuitBreakerFailureCondition"] = rest_field( + name="failureCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """The conditions for tripping the circuit breaker.""" + trip_duration: Optional[datetime.timedelta] = rest_field( + name="tripDuration", visibility=["read", "create", "update", "delete", "query"] + ) + """The duration for which the circuit will be tripped.""" + accept_retry_after: Optional[bool] = rest_field( + name="acceptRetryAfter", visibility=["read", "create", "update", "delete", "query"] + ) + """flag to accept Retry-After header from the backend.""" + failure_response: Optional["_models.BackendFailureResponse"] = rest_field( + name="failureResponse", visibility=["read", "create", "update", "delete", "query"] + ) + """The response of the backend when the circuit breaker gets open.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + failure_condition: Optional["_models.CircuitBreakerFailureCondition"] = None, + trip_duration: Optional[datetime.timedelta] = None, + accept_retry_after: Optional[bool] = None, + failure_response: Optional["_models.BackendFailureResponse"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClientApplicationContract(ProxyResource): + """Client application details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Client application entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.ClientApplicationContractProperties + """ + + properties: Optional["_models.ClientApplicationContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Client application entity contract properties.""" + + __flattened_items = ["display_name", "description", "owner_id", "entra_application_id", "entra_tenant_id", "state"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ClientApplicationContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ClientApplicationContractProperties(_Model): + """Client Application Entity Properties. + + :ivar display_name: Client application name. Required. + :vartype display_name: str + :ivar description: Client application description. + :vartype description: str + :ivar owner_id: A resource identifier for the user who owns the application. Required. + :vartype owner_id: str + :ivar entra_application_id: Microsoft EntraID Application ID (Client ID). This is the value + that is used to identify the application when it is requesting access tokens from Microsoft + EntraID. This property is read-only and will be set by the system when the application is + created. + :vartype entra_application_id: str + :ivar entra_tenant_id: Tenant ID is a unique identifier (a GUID) for an organization directory + in Microsoft’s cloud. It’s used to identify tenants across Microsoft services. + :vartype entra_tenant_id: str + :ivar state: Client application state. The value derives the state of an application based on + the statuses of its associated ClientApplicationProductLinks. Known values are: "pending", + "active", "rejected", and "approved". + :vartype state: str or ~azure.mgmt.apimanagement.models.ClientApplicationState + """ + + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """Client application name. Required.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Client application description.""" + owner_id: str = rest_field(name="ownerId", visibility=["read", "create", "update", "delete", "query"]) + """A resource identifier for the user who owns the application. Required.""" + entra_application_id: Optional[str] = rest_field(name="entraApplicationId", visibility=["read"]) + """Microsoft EntraID Application ID (Client ID). This is the value that is used to identify the + application when it is requesting access tokens from Microsoft EntraID. This property is + read-only and will be set by the system when the application is created.""" + entra_tenant_id: Optional[str] = rest_field(name="entraTenantId", visibility=["read"]) + """Tenant ID is a unique identifier (a GUID) for an organization directory in Microsoft’s cloud. + It’s used to identify tenants across Microsoft services.""" + state: Optional[Union[str, "_models.ClientApplicationState"]] = rest_field(visibility=["read"]) + """Client application state. The value derives the state of an application based on the statuses + of its associated ClientApplicationProductLinks. Known values are: \"pending\", \"active\", + \"rejected\", and \"approved\".""" + + @overload + def __init__( + self, + *, + display_name: str, + owner_id: str, + description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClientApplicationProductLinkContract(ProxyResource): + """Specifies Client Application - Product link assignment. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Client application - product link entity contract properties. + :vartype properties: + ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContractProperties + """ + + properties: Optional["_models.ClientApplicationProductLinkContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Client application - product link entity contract properties.""" + + __flattened_items = ["product_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ClientApplicationProductLinkContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ClientApplicationProductLinkContractProperties(_Model): # pylint: disable=name-too-long + """ClientApplicationProductLinkContractProperties. + + :ivar product_id: The unique resource identifier of the Product. Required. + :vartype product_id: str + """ + + product_id: str = rest_field(name="productId", visibility=["read", "create", "update", "delete", "query"]) + """The unique resource identifier of the Product. Required.""" + + @overload + def __init__( + self, + *, + product_id: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClientApplicationSecretsContract(_Model): + """Specifies client application secrets needed to authorize applications API calls. + + :ivar entra: Microsoft EntraID client application secrets. + :vartype entra: ~azure.mgmt.apimanagement.models.ClientApplicationSecretsContractEntra + """ + + entra: Optional["_models.ClientApplicationSecretsContractEntra"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Microsoft EntraID client application secrets.""" + + @overload + def __init__( + self, + *, + entra: Optional["_models.ClientApplicationSecretsContractEntra"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClientApplicationSecretsContractEntra(_Model): + """Microsoft EntraID client application secrets. + + :ivar client_secret: EntraID client application secret. + :vartype client_secret: str + :ivar expires_at: EntraID client application secret expiration date. + :vartype expires_at: ~datetime.datetime + """ + + client_secret: Optional[str] = rest_field( + name="clientSecret", visibility=["read", "create", "update", "delete", "query"] + ) + """EntraID client application secret.""" + expires_at: Optional[datetime.datetime] = rest_field(name="expiresAt", visibility=["read"], format="rfc3339") + """EntraID client application secret expiration date.""" + + @overload + def __init__( + self, + *, + client_secret: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClientSecretContract(_Model): + """Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + + :ivar client_secret: Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + :vartype client_secret: str + """ + + client_secret: Optional[str] = rest_field( + name="clientSecret", visibility=["read", "create", "update", "delete", "query"] + ) + """Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.""" + + @overload + def __init__( + self, + *, + client_secret: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ConfigurationApi(_Model): + """Information regarding the Configuration API of the API Management service. + + :ivar legacy_api: Indication whether or not the legacy Configuration API (v1) should be exposed + on the API Management service. Value is optional but must be 'Enabled' or 'Disabled'. If + 'Disabled', legacy Configuration API (v1) will not be available for self-hosted gateways. + Default value is 'Enabled'. Known values are: "Enabled" and "Disabled". + :vartype legacy_api: str or ~azure.mgmt.apimanagement.models.LegacyApiState + """ + + legacy_api: Optional[Union[str, "_models.LegacyApiState"]] = rest_field( + name="legacyApi", visibility=["read", "create", "update", "delete", "query"] + ) + """Indication whether or not the legacy Configuration API (v1) should be exposed on the API + Management service. Value is optional but must be 'Enabled' or 'Disabled'. If 'Disabled', + legacy Configuration API (v1) will not be available for self-hosted gateways. Default value is + 'Enabled'. Known values are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + legacy_api: Optional[Union[str, "_models.LegacyApiState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ConnectivityCheckRequest(_Model): + """A request to perform the connectivity check operation on a API Management service. + + :ivar source: Definitions about the connectivity check origin. Required. + :vartype source: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestSource + :ivar destination: The connectivity check operation destination. Required. + :vartype destination: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestDestination + :ivar preferred_ip_version: The IP version to be used. Only IPv4 is supported for now. "IPv4" + :vartype preferred_ip_version: str or ~azure.mgmt.apimanagement.models.PreferredIPVersion + :ivar protocol: The request's protocol. Specific protocol configuration can be available based + on this selection. The specified destination address must be coherent with this value. Known + values are: "TCP", "HTTP", and "HTTPS". + :vartype protocol: str or ~azure.mgmt.apimanagement.models.ConnectivityCheckProtocol + :ivar protocol_configuration: Protocol-specific configuration. + :vartype protocol_configuration: + ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfiguration + """ + + source: "_models.ConnectivityCheckRequestSource" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Definitions about the connectivity check origin. Required.""" + destination: "_models.ConnectivityCheckRequestDestination" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The connectivity check operation destination. Required.""" + preferred_ip_version: Optional[Union[str, "_models.PreferredIPVersion"]] = rest_field( + name="preferredIPVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The IP version to be used. Only IPv4 is supported for now. \"IPv4\"""" + protocol: Optional[Union[str, "_models.ConnectivityCheckProtocol"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The request's protocol. Specific protocol configuration can be available based on this + selection. The specified destination address must be coherent with this value. Known values + are: \"TCP\", \"HTTP\", and \"HTTPS\".""" + protocol_configuration: Optional["_models.ConnectivityCheckRequestProtocolConfiguration"] = rest_field( + name="protocolConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Protocol-specific configuration.""" + + @overload + def __init__( + self, + *, + source: "_models.ConnectivityCheckRequestSource", + destination: "_models.ConnectivityCheckRequestDestination", + preferred_ip_version: Optional[Union[str, "_models.PreferredIPVersion"]] = None, + protocol: Optional[Union[str, "_models.ConnectivityCheckProtocol"]] = None, + protocol_configuration: Optional["_models.ConnectivityCheckRequestProtocolConfiguration"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ConnectivityCheckRequestDestination(_Model): + """The connectivity check operation destination. + + :ivar address: Destination address. Can either be an IP address or a FQDN. Required. + :vartype address: str + :ivar port: Destination port. Required. + :vartype port: int + """ + + address: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Destination address. Can either be an IP address or a FQDN. Required.""" + port: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Destination port. Required.""" + + @overload + def __init__( + self, + *, + address: str, + port: int, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ConnectivityCheckRequestProtocolConfiguration(_Model): # pylint: disable=name-too-long + """Protocol-specific configuration. + + :ivar http_configuration: Configuration for HTTP or HTTPS requests. + :vartype http_configuration: + ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfigurationHttpConfiguration + """ + + http_configuration: Optional["_models.ConnectivityCheckRequestProtocolConfigurationHttpConfiguration"] = rest_field( + name="HTTPConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration for HTTP or HTTPS requests.""" + + @overload + def __init__( + self, + *, + http_configuration: Optional["_models.ConnectivityCheckRequestProtocolConfigurationHttpConfiguration"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ConnectivityCheckRequestProtocolConfigurationHttpConfiguration(_Model): # pylint: disable=name-too-long + """Configuration for HTTP or HTTPS requests. + + :ivar method: The HTTP method to be used. Known values are: "GET" and "POST". + :vartype method: str or ~azure.mgmt.apimanagement.models.Method + :ivar valid_status_codes: List of HTTP status codes considered valid for the request response. + :vartype valid_status_codes: list[int] + :ivar headers: List of headers to be included in the request. + :vartype headers: list[~azure.mgmt.apimanagement.models.HTTPHeader] + """ + + method: Optional[Union[str, "_models.Method"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The HTTP method to be used. Known values are: \"GET\" and \"POST\".""" + valid_status_codes: Optional[list[int]] = rest_field( + name="validStatusCodes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of HTTP status codes considered valid for the request response.""" + headers: Optional[list["_models.HTTPHeader"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of headers to be included in the request.""" + + @overload + def __init__( + self, + *, + method: Optional[Union[str, "_models.Method"]] = None, + valid_status_codes: Optional[list[int]] = None, + headers: Optional[list["_models.HTTPHeader"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ConnectivityCheckRequestSource(_Model): + """Definitions about the connectivity check origin. + + :ivar region: The API Management service region from where to start the connectivity check + operation. Required. + :vartype region: str + :ivar instance: The particular VMSS instance from which to fire the request. + :vartype instance: int + """ + + region: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The API Management service region from where to start the connectivity check operation. + Required.""" + instance: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The particular VMSS instance from which to fire the request.""" + + @overload + def __init__( + self, + *, + region: str, + instance: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ConnectivityCheckResponse(_Model): + """Information on the connectivity status. + + :ivar hops: List of hops between the source and the destination. + :vartype hops: list[~azure.mgmt.apimanagement.models.ConnectivityHop] + :ivar connection_status: The connection status. Known values are: "Unknown", "Connected", + "Disconnected", and "Degraded". + :vartype connection_status: str or ~azure.mgmt.apimanagement.models.ConnectionStatus + :ivar avg_latency_in_ms: Average latency in milliseconds. + :vartype avg_latency_in_ms: int + :ivar min_latency_in_ms: Minimum latency in milliseconds. + :vartype min_latency_in_ms: int + :ivar max_latency_in_ms: Maximum latency in milliseconds. + :vartype max_latency_in_ms: int + :ivar probes_sent: Total number of probes sent. + :vartype probes_sent: int + :ivar probes_failed: Number of failed probes. + :vartype probes_failed: int + """ + + hops: Optional[list["_models.ConnectivityHop"]] = rest_field(visibility=["read"]) + """List of hops between the source and the destination.""" + connection_status: Optional[Union[str, "_models.ConnectionStatus"]] = rest_field( + name="connectionStatus", visibility=["read"] + ) + """The connection status. Known values are: \"Unknown\", \"Connected\", \"Disconnected\", and + \"Degraded\".""" + avg_latency_in_ms: Optional[int] = rest_field(name="avgLatencyInMs", visibility=["read"]) + """Average latency in milliseconds.""" + min_latency_in_ms: Optional[int] = rest_field(name="minLatencyInMs", visibility=["read"]) + """Minimum latency in milliseconds.""" + max_latency_in_ms: Optional[int] = rest_field(name="maxLatencyInMs", visibility=["read"]) + """Maximum latency in milliseconds.""" + probes_sent: Optional[int] = rest_field(name="probesSent", visibility=["read"]) + """Total number of probes sent.""" + probes_failed: Optional[int] = rest_field(name="probesFailed", visibility=["read"]) + """Number of failed probes.""" + + +class ConnectivityHop(_Model): + """Information about a hop between the source and the destination. + + :ivar type: The type of the hop. + :vartype type: str + :ivar id: The ID of the hop. + :vartype id: str + :ivar address: The IP address of the hop. + :vartype address: str + :ivar resource_id: The ID of the resource corresponding to this hop. + :vartype resource_id: str + :ivar next_hop_ids: List of next hop identifiers. + :vartype next_hop_ids: list[str] + :ivar issues: List of issues. + :vartype issues: list[~azure.mgmt.apimanagement.models.ConnectivityIssue] + """ + + type: Optional[str] = rest_field(visibility=["read"]) + """The type of the hop.""" + id: Optional[str] = rest_field(visibility=["read"]) + """The ID of the hop.""" + address: Optional[str] = rest_field(visibility=["read"]) + """The IP address of the hop.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """The ID of the resource corresponding to this hop.""" + next_hop_ids: Optional[list[str]] = rest_field(name="nextHopIds", visibility=["read"]) + """List of next hop identifiers.""" + issues: Optional[list["_models.ConnectivityIssue"]] = rest_field(visibility=["read"]) + """List of issues.""" + + +class ConnectivityIssue(_Model): + """Information about an issue encountered in the process of checking for connectivity. + + :ivar origin: The origin of the issue. Known values are: "Local", "Inbound", and "Outbound". + :vartype origin: str or ~azure.mgmt.apimanagement.models.Origin + :ivar severity: The severity of the issue. Known values are: "Error" and "Warning". + :vartype severity: str or ~azure.mgmt.apimanagement.models.Severity + :ivar type: The type of issue. Known values are: "Unknown", "AgentStopped", "GuestFirewall", + "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", "PortThrottled", and + "Platform". + :vartype type: str or ~azure.mgmt.apimanagement.models.IssueType + :ivar context: Provides additional context on the issue. + :vartype context: list[dict[str, str]] + """ + + origin: Optional[Union[str, "_models.Origin"]] = rest_field(visibility=["read"]) + """The origin of the issue. Known values are: \"Local\", \"Inbound\", and \"Outbound\".""" + severity: Optional[Union[str, "_models.Severity"]] = rest_field(visibility=["read"]) + """The severity of the issue. Known values are: \"Error\" and \"Warning\".""" + type: Optional[Union[str, "_models.IssueType"]] = rest_field(visibility=["read"]) + """The type of issue. Known values are: \"Unknown\", \"AgentStopped\", \"GuestFirewall\", + \"DnsResolution\", \"SocketBind\", \"NetworkSecurityRule\", \"UserDefinedRoute\", + \"PortThrottled\", and \"Platform\".""" + context: Optional[list[dict[str, str]]] = rest_field(visibility=["read"]) + """Provides additional context on the issue.""" + + +class ConnectivityStatusContract(_Model): + """Details about connectivity to a resource. + + :ivar name: The hostname of the resource which the service depends on. This can be the + database, storage or any other azure resource on which the service depends upon. Required. + :vartype name: str + :ivar status: Resource Connectivity Status Type identifier. Required. Known values are: + "initializing", "success", and "failure". + :vartype status: str or ~azure.mgmt.apimanagement.models.ConnectivityStatusType + :ivar error: Error details of the connectivity to the resource. + :vartype error: str + :ivar last_updated: The date when the resource connectivity status was last updated. This + status should be updated every 15 minutes. If this status has not been updated, then it means + that the service has lost network connectivity to the resource, from inside the Virtual + Network.The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the + ISO 8601 standard. Required. + :vartype last_updated: ~datetime.datetime + :ivar last_status_change: The date when the resource connectivity status last Changed from + success to failure or vice-versa. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required. + :vartype last_status_change: ~datetime.datetime + :ivar resource_type: Resource Type. Required. + :vartype resource_type: str + :ivar is_optional: Whether this is optional. Required. + :vartype is_optional: bool + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The hostname of the resource which the service depends on. This can be the database, storage or + any other azure resource on which the service depends upon. Required.""" + status: Union[str, "_models.ConnectivityStatusType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Resource Connectivity Status Type identifier. Required. Known values are: \"initializing\", + \"success\", and \"failure\".""" + error: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Error details of the connectivity to the resource.""" + last_updated: datetime.datetime = rest_field( + name="lastUpdated", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The date when the resource connectivity status was last updated. This status should be updated + every 15 minutes. If this status has not been updated, then it means that the service has lost + network connectivity to the resource, from inside the Virtual Network.The date conforms to the + following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required.""" + last_status_change: datetime.datetime = rest_field( + name="lastStatusChange", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The date when the resource connectivity status last Changed from success to failure or + vice-versa. The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by + the ISO 8601 standard. Required.""" + resource_type: str = rest_field(name="resourceType", visibility=["read", "create", "update", "delete", "query"]) + """Resource Type. Required.""" + is_optional: bool = rest_field(name="isOptional", visibility=["read", "create", "update", "delete", "query"]) + """Whether this is optional. Required.""" + + @overload + def __init__( + self, + *, + name: str, + status: Union[str, "_models.ConnectivityStatusType"], + last_updated: datetime.datetime, + last_status_change: datetime.datetime, + resource_type: str, + is_optional: bool, + error: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ContentItemContract(ProxyResource): + """Content type contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the content item. + :vartype properties: dict[str, any] + """ + + properties: Optional[dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Properties of the content item.""" + + __flattened_items = [""] + + @overload + def __init__( + self, + *, + properties: Optional[dict[str, Any]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ContentTypeContract(ProxyResource): + """Content type contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the content type. + :vartype properties: ~azure.mgmt.apimanagement.models.ContentTypeContractProperties + """ + + properties: Optional["_models.ContentTypeContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the content type.""" + + __flattened_items = ["id", "name", "description", "schema", "version"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ContentTypeContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ContentTypeContractProperties(_Model): + """ContentTypeContractProperties. + + :ivar id: Content type identifier. + :vartype id: str + :ivar name: Content type name. Must be 1 to 250 characters long. + :vartype name: str + :ivar description: Content type description. + :vartype description: str + :ivar schema: Content type schema. + :vartype schema: any + :ivar version: Content type version. + :vartype version: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Content type identifier.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Content type name. Must be 1 to 250 characters long.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Content type description.""" + schema: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Content type schema.""" + version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Content type version.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + description: Optional[str] = None, + schema: Optional[Any] = None, + version: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DataMasking(_Model): + """DataMasking. + + :ivar query_params: Masking settings for Url query parameters. + :vartype query_params: list[~azure.mgmt.apimanagement.models.DataMaskingEntity] + :ivar headers: Masking settings for headers. + :vartype headers: list[~azure.mgmt.apimanagement.models.DataMaskingEntity] + """ + + query_params: Optional[list["_models.DataMaskingEntity"]] = rest_field( + name="queryParams", visibility=["read", "create", "update", "delete", "query"] + ) + """Masking settings for Url query parameters.""" + headers: Optional[list["_models.DataMaskingEntity"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Masking settings for headers.""" + + @overload + def __init__( + self, + *, + query_params: Optional[list["_models.DataMaskingEntity"]] = None, + headers: Optional[list["_models.DataMaskingEntity"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DataMaskingEntity(_Model): + """DataMaskingEntity. + + :ivar value: The name of an entity to mask (e.g. a name of a header or a query parameter). + :vartype value: str + :ivar mode: Data masking mode. Known values are: "Mask" and "Hide". + :vartype mode: str or ~azure.mgmt.apimanagement.models.DataMaskingMode + """ + + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of an entity to mask (e.g. a name of a header or a query parameter).""" + mode: Optional[Union[str, "_models.DataMaskingMode"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Data masking mode. Known values are: \"Mask\" and \"Hide\".""" + + @overload + def __init__( + self, + *, + value: Optional[str] = None, + mode: Optional[Union[str, "_models.DataMaskingMode"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeletedServiceContract(ProxyResource): + """Deleted API Management Service information. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Deleted API Management Service details. + :vartype properties: ~azure.mgmt.apimanagement.models.DeletedServiceContractProperties + :ivar location: API Management Service Master Location. + :vartype location: str + """ + + properties: Optional["_models.DeletedServiceContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Deleted API Management Service details.""" + location: Optional[str] = rest_field(visibility=["read"]) + """API Management Service Master Location.""" + + __flattened_items = ["service_id", "scheduled_purge_date", "deletion_date"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.DeletedServiceContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DeletedServiceContractProperties(_Model): + """DeletedServiceContractProperties. + + :ivar service_id: Fully-qualified API Management Service Resource ID. + :vartype service_id: str + :ivar scheduled_purge_date: UTC Date and Time when the service will be automatically purged. + The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 + standard. + :vartype scheduled_purge_date: ~datetime.datetime + :ivar deletion_date: UTC Timestamp when the service was soft-deleted. The date conforms to the + following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + :vartype deletion_date: ~datetime.datetime + """ + + service_id: Optional[str] = rest_field(name="serviceId", visibility=["read", "create", "update", "delete", "query"]) + """Fully-qualified API Management Service Resource ID.""" + scheduled_purge_date: Optional[datetime.datetime] = rest_field( + name="scheduledPurgeDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """UTC Date and Time when the service will be automatically purged. The date conforms to the + following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.""" + deletion_date: Optional[datetime.datetime] = rest_field( + name="deletionDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """UTC Timestamp when the service was soft-deleted. The date conforms to the following format: + yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.""" + + @overload + def __init__( + self, + *, + service_id: Optional[str] = None, + scheduled_purge_date: Optional[datetime.datetime] = None, + deletion_date: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeployConfigurationParameterProperties(_Model): + """Parameters supplied to the Deploy Configuration operation. + + :ivar branch: The name of the Git branch from which the configuration is to be deployed to the + configuration database. Required. + :vartype branch: str + :ivar force: The value enforcing deleting subscriptions to products that are deleted in this + update. + :vartype force: bool + """ + + branch: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the Git branch from which the configuration is to be deployed to the configuration + database. Required.""" + force: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The value enforcing deleting subscriptions to products that are deleted in this update.""" + + @overload + def __init__( + self, + *, + branch: str, + force: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeployConfigurationParameters(_Model): + """Deploy Tenant Configuration Contract. + + :ivar properties: Deploy Configuration Parameter contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.DeployConfigurationParameterProperties + """ + + properties: Optional["_models.DeployConfigurationParameterProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Deploy Configuration Parameter contract properties.""" + + __flattened_items = ["branch", "force"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.DeployConfigurationParameterProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DiagnosticContract(ProxyResource): + """Diagnostic details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Diagnostic entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.DiagnosticContractProperties + """ + + properties: Optional["_models.DiagnosticContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Diagnostic entity contract properties.""" + + __flattened_items = [ + "always_log", + "logger_id", + "sampling", + "frontend", + "backend", + "large_language_model", + "log_client_ip", + "http_correlation_protocol", + "verbosity", + "operation_name_format", + "metrics", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.DiagnosticContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DiagnosticContractProperties(_Model): + """Diagnostic Entity Properties. + + :ivar always_log: Specifies for what type of messages sampling settings should not apply. + "allErrors" + :vartype always_log: str or ~azure.mgmt.apimanagement.models.AlwaysLog + :ivar logger_id: Resource Id of a target logger. Required. + :vartype logger_id: str + :ivar sampling: Sampling settings for Diagnostic. + :vartype sampling: ~azure.mgmt.apimanagement.models.SamplingSettings + :ivar frontend: Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + :vartype frontend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :ivar backend: Diagnostic settings for incoming/outgoing HTTP messages to the Backend. + :vartype backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :ivar large_language_model: Large Language Models diagnostic settings. + :vartype large_language_model: ~azure.mgmt.apimanagement.models.LLMDiagnosticSettings + :ivar log_client_ip: Log the ClientIP. Default is false. + :vartype log_client_ip: bool + :ivar http_correlation_protocol: Sets correlation protocol to use for Application Insights + diagnostics. Known values are: "None", "Legacy", and "W3C". + :vartype http_correlation_protocol: str or + ~azure.mgmt.apimanagement.models.HttpCorrelationProtocol + :ivar verbosity: The verbosity level applied to traces emitted by trace policies. Known values + are: "verbose", "information", and "error". + :vartype verbosity: str or ~azure.mgmt.apimanagement.models.Verbosity + :ivar operation_name_format: The format of the Operation Name for Application Insights + telemetries. Default is Name. Known values are: "Name" and "Url". + :vartype operation_name_format: str or ~azure.mgmt.apimanagement.models.OperationNameFormat + :ivar metrics: Emit custom metrics via emit-metric policy. Applicable only to Application + Insights diagnostic settings. + :vartype metrics: bool + """ + + always_log: Optional[Union[str, "_models.AlwaysLog"]] = rest_field( + name="alwaysLog", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies for what type of messages sampling settings should not apply. \"allErrors\"""" + logger_id: str = rest_field(name="loggerId", visibility=["read", "create", "update", "delete", "query"]) + """Resource Id of a target logger. Required.""" + sampling: Optional["_models.SamplingSettings"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Sampling settings for Diagnostic.""" + frontend: Optional["_models.PipelineDiagnosticSettings"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.""" + backend: Optional["_models.PipelineDiagnosticSettings"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Diagnostic settings for incoming/outgoing HTTP messages to the Backend.""" + large_language_model: Optional["_models.LLMDiagnosticSettings"] = rest_field( + name="largeLanguageModel", visibility=["read", "create", "update", "delete", "query"] + ) + """Large Language Models diagnostic settings.""" + log_client_ip: Optional[bool] = rest_field( + name="logClientIp", visibility=["read", "create", "update", "delete", "query"] + ) + """Log the ClientIP. Default is false.""" + http_correlation_protocol: Optional[Union[str, "_models.HttpCorrelationProtocol"]] = rest_field( + name="httpCorrelationProtocol", visibility=["read", "create", "update", "delete", "query"] + ) + """Sets correlation protocol to use for Application Insights diagnostics. Known values are: + \"None\", \"Legacy\", and \"W3C\".""" + verbosity: Optional[Union[str, "_models.Verbosity"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The verbosity level applied to traces emitted by trace policies. Known values are: \"verbose\", + \"information\", and \"error\".""" + operation_name_format: Optional[Union[str, "_models.OperationNameFormat"]] = rest_field( + name="operationNameFormat", visibility=["read", "create", "update", "delete", "query"] + ) + """The format of the Operation Name for Application Insights telemetries. Default is Name. Known + values are: \"Name\" and \"Url\".""" + metrics: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic + settings.""" + + @overload + def __init__( + self, + *, + logger_id: str, + always_log: Optional[Union[str, "_models.AlwaysLog"]] = None, + sampling: Optional["_models.SamplingSettings"] = None, + frontend: Optional["_models.PipelineDiagnosticSettings"] = None, + backend: Optional["_models.PipelineDiagnosticSettings"] = None, + large_language_model: Optional["_models.LLMDiagnosticSettings"] = None, + log_client_ip: Optional[bool] = None, + http_correlation_protocol: Optional[Union[str, "_models.HttpCorrelationProtocol"]] = None, + verbosity: Optional[Union[str, "_models.Verbosity"]] = None, + operation_name_format: Optional[Union[str, "_models.OperationNameFormat"]] = None, + metrics: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DiagnosticContractUpdateProperties(_Model): + """Diagnostic Entity Properties. + + :ivar always_log: Specifies for what type of messages sampling settings should not apply. + "allErrors" + :vartype always_log: str or ~azure.mgmt.apimanagement.models.AlwaysLog + :ivar logger_id: Resource Id of a target logger. + :vartype logger_id: str + :ivar sampling: Sampling settings for Diagnostic. + :vartype sampling: ~azure.mgmt.apimanagement.models.SamplingSettings + :ivar frontend: Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + :vartype frontend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :ivar backend: Diagnostic settings for incoming/outgoing HTTP messages to the Backend. + :vartype backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :ivar log_client_ip: Log the ClientIP. Default is false. + :vartype log_client_ip: bool + :ivar http_correlation_protocol: Sets correlation protocol to use for Application Insights + diagnostics. Known values are: "None", "Legacy", and "W3C". + :vartype http_correlation_protocol: str or + ~azure.mgmt.apimanagement.models.HttpCorrelationProtocol + :ivar verbosity: The verbosity level applied to traces emitted by trace policies. Known values + are: "verbose", "information", and "error". + :vartype verbosity: str or ~azure.mgmt.apimanagement.models.Verbosity + :ivar operation_name_format: The format of the Operation Name for Application Insights + telemetries. Default is Name. Known values are: "Name" and "Url". + :vartype operation_name_format: str or ~azure.mgmt.apimanagement.models.OperationNameFormat + :ivar metrics: Emit custom metrics via emit-metric policy. Applicable only to Application + Insights diagnostic settings. + :vartype metrics: bool + """ + + always_log: Optional[Union[str, "_models.AlwaysLog"]] = rest_field( + name="alwaysLog", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies for what type of messages sampling settings should not apply. \"allErrors\"""" + logger_id: Optional[str] = rest_field(name="loggerId", visibility=["read", "create", "update", "delete", "query"]) + """Resource Id of a target logger.""" + sampling: Optional["_models.SamplingSettings"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Sampling settings for Diagnostic.""" + frontend: Optional["_models.PipelineDiagnosticSettings"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.""" + backend: Optional["_models.PipelineDiagnosticSettings"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Diagnostic settings for incoming/outgoing HTTP messages to the Backend.""" + log_client_ip: Optional[bool] = rest_field( + name="logClientIp", visibility=["read", "create", "update", "delete", "query"] + ) + """Log the ClientIP. Default is false.""" + http_correlation_protocol: Optional[Union[str, "_models.HttpCorrelationProtocol"]] = rest_field( + name="httpCorrelationProtocol", visibility=["read", "create", "update", "delete", "query"] + ) + """Sets correlation protocol to use for Application Insights diagnostics. Known values are: + \"None\", \"Legacy\", and \"W3C\".""" + verbosity: Optional[Union[str, "_models.Verbosity"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The verbosity level applied to traces emitted by trace policies. Known values are: \"verbose\", + \"information\", and \"error\".""" + operation_name_format: Optional[Union[str, "_models.OperationNameFormat"]] = rest_field( + name="operationNameFormat", visibility=["read", "create", "update", "delete", "query"] + ) + """The format of the Operation Name for Application Insights telemetries. Default is Name. Known + values are: \"Name\" and \"Url\".""" + metrics: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic + settings.""" + + @overload + def __init__( + self, + *, + always_log: Optional[Union[str, "_models.AlwaysLog"]] = None, + logger_id: Optional[str] = None, + sampling: Optional["_models.SamplingSettings"] = None, + frontend: Optional["_models.PipelineDiagnosticSettings"] = None, + backend: Optional["_models.PipelineDiagnosticSettings"] = None, + log_client_ip: Optional[bool] = None, + http_correlation_protocol: Optional[Union[str, "_models.HttpCorrelationProtocol"]] = None, + verbosity: Optional[Union[str, "_models.Verbosity"]] = None, + operation_name_format: Optional[Union[str, "_models.OperationNameFormat"]] = None, + metrics: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DiagnosticUpdateContract(ProxyResource): + """Diagnostic details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Diagnostic entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.DiagnosticContractUpdateProperties + """ + + properties: Optional["_models.DiagnosticContractUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Diagnostic entity contract properties.""" + + __flattened_items = [ + "always_log", + "logger_id", + "sampling", + "frontend", + "backend", + "log_client_ip", + "http_correlation_protocol", + "verbosity", + "operation_name_format", + "metrics", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.DiagnosticContractUpdateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DocumentationContract(ProxyResource): + """Markdown documentation details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Markdown Documentation details. + :vartype properties: ~azure.mgmt.apimanagement.models.DocumentationContractProperties + """ + + properties: Optional["_models.DocumentationContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Markdown Documentation details.""" + + __flattened_items = ["title", "content"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.DocumentationContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DocumentationContractProperties(_Model): + """Markdown documentation details. + + :ivar title: documentation title. + :vartype title: str + :ivar content: Markdown documentation content. + :vartype content: str + """ + + title: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """documentation title.""" + content: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Markdown documentation content.""" + + @overload + def __init__( + self, + *, + title: Optional[str] = None, + content: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DocumentationUpdateContract(_Model): + """Documentation update contract details. + + :ivar properties: Markdown Documentation details. + :vartype properties: ~azure.mgmt.apimanagement.models.DocumentationContractProperties + """ + + properties: Optional["_models.DocumentationContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Markdown Documentation details.""" + + __flattened_items = ["title", "content"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.DocumentationContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class EmailTemplateContract(ProxyResource): + """Email Template details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Email Template entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.EmailTemplateContractProperties + """ + + properties: Optional["_models.EmailTemplateContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Email Template entity contract properties.""" + + __flattened_items = ["subject", "body", "title", "description", "is_default", "parameters"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.EmailTemplateContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class EmailTemplateContractProperties(_Model): + """Email Template Contract properties. + + :ivar subject: Subject of the Template. Required. + :vartype subject: str + :ivar body: Email Template Body. This should be a valid XDocument. Required. + :vartype body: str + :ivar title: Title of the Template. + :vartype title: str + :ivar description: Description of the Email Template. + :vartype description: str + :ivar is_default: Whether the template is the default template provided by API Management or + has been edited. + :vartype is_default: bool + :ivar parameters: Email Template Parameter values. + :vartype parameters: + list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] + """ + + subject: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Subject of the Template. Required.""" + body: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Email Template Body. This should be a valid XDocument. Required.""" + title: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Title of the Template.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of the Email Template.""" + is_default: Optional[bool] = rest_field(name="isDefault", visibility=["read"]) + """Whether the template is the default template provided by API Management or has been edited.""" + parameters: Optional[list["_models.EmailTemplateParametersContractProperties"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Email Template Parameter values.""" + + @overload + def __init__( + self, + *, + subject: str, + body: str, + title: Optional[str] = None, + description: Optional[str] = None, + parameters: Optional[list["_models.EmailTemplateParametersContractProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EmailTemplateParametersContractProperties(_Model): # pylint: disable=name-too-long + """Email Template Parameter contract. + + :ivar name: Template parameter name. + :vartype name: str + :ivar title: Template parameter title. + :vartype title: str + :ivar description: Template parameter description. + :vartype description: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Template parameter name.""" + title: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Template parameter title.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Template parameter description.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + title: Optional[str] = None, + description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EmailTemplateUpdateParameterProperties(_Model): + """Email Template Update Contract properties. + + :ivar subject: Subject of the Template. + :vartype subject: str + :ivar title: Title of the Template. + :vartype title: str + :ivar description: Description of the Email Template. + :vartype description: str + :ivar body: Email Template Body. This should be a valid XDocument. + :vartype body: str + :ivar parameters: Email Template Parameter values. + :vartype parameters: + list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] + """ + + subject: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Subject of the Template.""" + title: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Title of the Template.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of the Email Template.""" + body: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Email Template Body. This should be a valid XDocument.""" + parameters: Optional[list["_models.EmailTemplateParametersContractProperties"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Email Template Parameter values.""" + + @overload + def __init__( + self, + *, + subject: Optional[str] = None, + title: Optional[str] = None, + description: Optional[str] = None, + body: Optional[str] = None, + parameters: Optional[list["_models.EmailTemplateParametersContractProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EmailTemplateUpdateParameters(_Model): + """Email Template update Parameters. + + :ivar properties: Email Template Update contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameterProperties + """ + + properties: Optional["_models.EmailTemplateUpdateParameterProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Email Template Update contract properties.""" + + __flattened_items = ["subject", "title", "description", "body", "parameters"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.EmailTemplateUpdateParameterProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class EndpointDependency(_Model): + """A domain name that a service is reached at. + + :ivar domain_name: The domain name of the dependency. + :vartype domain_name: str + :ivar endpoint_details: The Ports used when connecting to DomainName. + :vartype endpoint_details: list[~azure.mgmt.apimanagement.models.EndpointDetail] + """ + + domain_name: Optional[str] = rest_field( + name="domainName", visibility=["read", "create", "update", "delete", "query"] + ) + """The domain name of the dependency.""" + endpoint_details: Optional[list["_models.EndpointDetail"]] = rest_field( + name="endpointDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """The Ports used when connecting to DomainName.""" + + @overload + def __init__( + self, + *, + domain_name: Optional[str] = None, + endpoint_details: Optional[list["_models.EndpointDetail"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EndpointDetail(_Model): + """Current TCP connectivity information from the Api Management Service to a single endpoint. + + :ivar port: The port an endpoint is connected to. + :vartype port: int + :ivar region: The region of the dependency. + :vartype region: str + """ + + port: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The port an endpoint is connected to.""" + region: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The region of the dependency.""" + + @overload + def __init__( + self, + *, + port: Optional[int] = None, + region: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ErrorAdditionalInfo(_Model): + """The resource management error additional info. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + type: Optional[str] = rest_field(visibility=["read"]) + """The additional info type.""" + info: Optional[Any] = rest_field(visibility=["read"]) + """The additional info.""" + + +class ErrorDetail(_Model): + """The error detail. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.apimanagement.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.apimanagement.models.ErrorAdditionalInfo] + """ + + code: Optional[str] = rest_field(visibility=["read"]) + """The error code.""" + message: Optional[str] = rest_field(visibility=["read"]) + """The error message.""" + target: Optional[str] = rest_field(visibility=["read"]) + """The error target.""" + details: Optional[list["_models.ErrorDetail"]] = rest_field(visibility=["read"]) + """The error details.""" + additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = rest_field( + name="additionalInfo", visibility=["read"] + ) + """The error additional info.""" + + +class ErrorFieldContract(_Model): + """Error Field contract. + + :ivar code: Property level error code. + :vartype code: str + :ivar message: Human-readable representation of property-level error. + :vartype message: str + :ivar target: Property name. + :vartype target: str + """ + + code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Property level error code.""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Human-readable representation of property-level error.""" + target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Property name.""" + + @overload + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ErrorResponse(_Model): + """Error response. + + :ivar error: The error object. + :vartype error: ~azure.mgmt.apimanagement.models.ErrorDetail + """ + + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error object.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ErrorResponseBody(_Model): + """Error Body contract. + + :ivar code: Service-defined error code. This code serves as a sub-status for the HTTP error + code specified in the response. + :vartype code: str + :ivar message: Human-readable representation of the error. + :vartype message: str + :ivar details: The list of invalid fields send in request, in case of validation error. + :vartype details: list[~azure.mgmt.apimanagement.models.ErrorFieldContract] + """ + + code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Service-defined error code. This code serves as a sub-status for the HTTP error code specified + in the response.""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Human-readable representation of the error.""" + details: Optional[list["_models.ErrorFieldContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The list of invalid fields send in request, in case of validation error.""" + + @overload + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + details: Optional[list["_models.ErrorFieldContract"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FailureStatusCodeRange(_Model): + """The failure http status code range. + + :ivar min: The minimum http status code. + :vartype min: int + :ivar max: The maximum http status code. + :vartype max: int + """ + + min: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The minimum http status code.""" + max: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The maximum http status code.""" + + @overload + def __init__( + self, + *, + min: Optional[int] = None, # pylint: disable=redefined-builtin + max: Optional[int] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FrontendConfiguration(_Model): + """Information regarding how the gateway should be exposed. + + :ivar default_hostname: The default hostname of the data-plane gateway to which requests can be + sent. This is only applicable for API gateway with Standard SKU. + :vartype default_hostname: str + """ + + default_hostname: Optional[str] = rest_field(name="defaultHostname", visibility=["read"]) + """The default hostname of the data-plane gateway to which requests can be sent. This is only + applicable for API gateway with Standard SKU.""" + + +class GatewayCertificateAuthorityContract(ProxyResource): + """Gateway certificate authority details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Gateway certificate authority details. + :vartype properties: + ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContractProperties + """ + + properties: Optional["_models.GatewayCertificateAuthorityContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Gateway certificate authority details.""" + + __flattened_items = ["is_trusted"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.GatewayCertificateAuthorityContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class GatewayCertificateAuthorityContractProperties(_Model): # pylint: disable=name-too-long + """Gateway certificate authority details. + + :ivar is_trusted: Determines whether certificate authority is trusted. + :vartype is_trusted: bool + """ + + is_trusted: Optional[bool] = rest_field( + name="isTrusted", visibility=["read", "create", "update", "delete", "query"] + ) + """Determines whether certificate authority is trusted.""" + + @overload + def __init__( + self, + *, + is_trusted: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GatewayConfigConnectionBaseProperties(_Model): + """GatewayConfigConnectionBaseProperties. + + :ivar provisioning_state: The current provisioning state of the API Management gateway config + connection. + :vartype provisioning_state: str + :ivar source_id: The link to the API Management service workspace. + :vartype source_id: str + :ivar default_hostname: The default hostname of the data-plane gateway. + :vartype default_hostname: str + :ivar hostnames: The hostnames of the data-plane gateway to which requests can be sent. + :vartype hostnames: list[str] + """ + + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The current provisioning state of the API Management gateway config connection.""" + source_id: Optional[str] = rest_field(name="sourceId", visibility=["read", "create", "update", "delete", "query"]) + """The link to the API Management service workspace.""" + default_hostname: Optional[str] = rest_field(name="defaultHostname", visibility=["read"]) + """The default hostname of the data-plane gateway.""" + hostnames: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The hostnames of the data-plane gateway to which requests can be sent.""" + + @overload + def __init__( + self, + *, + source_id: Optional[str] = None, + hostnames: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GatewayConfigurationApi(_Model): + """Information regarding the Configuration API of the API Management gateway. This is only + applicable for API gateway with Standard SKU. + + :ivar hostname: Hostname to which the agent connects to propagate configuration to the cloud. + :vartype hostname: str + """ + + hostname: Optional[str] = rest_field(visibility=["read"]) + """Hostname to which the agent connects to propagate configuration to the cloud.""" + + +class GatewayContract(ProxyResource): + """Gateway details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Gateway details. + :vartype properties: ~azure.mgmt.apimanagement.models.GatewayContractProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.apimanagement.models.ManagedServiceIdentity + """ + + properties: Optional["_models.GatewayContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Gateway details.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = ["location_data", "description"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.GatewayContractProperties"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class GatewayContractProperties(_Model): + """Properties of the Gateway contract. + + :ivar location_data: Gateway location. + :vartype location_data: ~azure.mgmt.apimanagement.models.ResourceLocationDataContract + :ivar description: Gateway description. + :vartype description: str + """ + + location_data: Optional["_models.ResourceLocationDataContract"] = rest_field( + name="locationData", visibility=["read", "create", "update", "delete", "query"] + ) + """Gateway location.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Gateway description.""" + + @overload + def __init__( + self, + *, + location_data: Optional["_models.ResourceLocationDataContract"] = None, + description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GatewayDebugCredentialsContract(_Model): + """Gateway debug credentials. + + :ivar token: Gateway debug token. + :vartype token: str + """ + + token: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Gateway debug token.""" + + @overload + def __init__( + self, + *, + token: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GatewayHostnameBindingBaseProperties(_Model): + """GatewayHostnameBindingBaseProperties. + + :ivar provisioning_state: The current provisioning state of the API Management gateway hostname + binding. + :vartype provisioning_state: str + :ivar hostname: The default hostname of the data-plane gateway. Required. + :vartype hostname: str + :ivar key_vault: The link to the API Management service workspace. Required. + :vartype key_vault: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVault + :ivar certificate: The hostnames of the data-plane gateway to which requests can be sent. + :vartype certificate: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingCertificate + """ + + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The current provisioning state of the API Management gateway hostname binding.""" + hostname: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The default hostname of the data-plane gateway. Required.""" + key_vault: "_models.GatewayHostnameBindingKeyVault" = rest_field( + name="keyVault", visibility=["read", "create", "update", "delete", "query"] + ) + """The link to the API Management service workspace. Required.""" + certificate: Optional["_models.GatewayHostnameBindingCertificate"] = rest_field(visibility=["read"]) + """The hostnames of the data-plane gateway to which requests can be sent.""" + + @overload + def __init__( + self, + *, + hostname: str, + key_vault: "_models.GatewayHostnameBindingKeyVault", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GatewayHostnameBindingCertificate(_Model): + """GatewayHostnameBindingCertificate. + + :ivar thumbprint: The thumbprint of the certificate. + :vartype thumbprint: str + :ivar subject: The subject of the certificate. + :vartype subject: str + :ivar expiry: The expiration date of the certificate. + :vartype expiry: ~datetime.datetime + """ + + thumbprint: Optional[str] = rest_field(visibility=["read"]) + """The thumbprint of the certificate.""" + subject: Optional[str] = rest_field(visibility=["read"]) + """The subject of the certificate.""" + expiry: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc3339") + """The expiration date of the certificate.""" + + +class GatewayHostnameBindingKeyVault(_Model): + """GatewayHostnameBindingKeyVault. + + :ivar secret_id: The current provisioning state of the API Management gateway hostname binding. + Required. + :vartype secret_id: str + :ivar identity_client_id: The default hostname of the data-plane gateway. + :vartype identity_client_id: str + :ivar last_status: The last status of the Key Vault certificate fetch process. + :vartype last_status: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVaultLastStatus + """ + + secret_id: str = rest_field(name="secretId", visibility=["read", "create", "update", "delete", "query"]) + """The current provisioning state of the API Management gateway hostname binding. Required.""" + identity_client_id: Optional[str] = rest_field( + name="identityClientId", visibility=["read", "create", "update", "delete", "query"] + ) + """The default hostname of the data-plane gateway.""" + last_status: Optional["_models.GatewayHostnameBindingKeyVaultLastStatus"] = rest_field( + name="lastStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """The last status of the Key Vault certificate fetch process.""" + + @overload + def __init__( + self, + *, + secret_id: str, + identity_client_id: Optional[str] = None, + last_status: Optional["_models.GatewayHostnameBindingKeyVaultLastStatus"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GatewayHostnameBindingKeyVaultLastStatus(_Model): + """GatewayHostnameBindingKeyVaultLastStatus. + + :ivar code: The last status of the Key Vault certificate fetch process. Known values are: + "Success" and "Failed". + :vartype code: str or ~azure.mgmt.apimanagement.models.KeyVaultFetchCode + :ivar time_stamp_utc: The last time the Key Vault certificate fetch process was attempted. The + date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 + standard. + :vartype time_stamp_utc: ~datetime.datetime + :ivar last_success_time_stamp_utc: The last time the Key Vault certificate fetch process was + successful. Only when the fetch process has succeeded at least once and current state is + failed. The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by + the ISO 8601 standard. + :vartype last_success_time_stamp_utc: ~datetime.datetime + """ + + code: Optional[Union[str, "_models.KeyVaultFetchCode"]] = rest_field(visibility=["read"]) + """The last status of the Key Vault certificate fetch process. Known values are: \"Success\" and + \"Failed\".""" + time_stamp_utc: Optional[datetime.datetime] = rest_field(name="timeStampUtc", visibility=["read"], format="rfc3339") + """The last time the Key Vault certificate fetch process was attempted. The date conforms to the + following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard.""" + last_success_time_stamp_utc: Optional[datetime.datetime] = rest_field( + name="lastSuccessTimeStampUtc", visibility=["read"], format="rfc3339" + ) + """The last time the Key Vault certificate fetch process was successful. Only when the fetch + process has succeeded at least once and current state is failed. The date conforms to the + following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard.""" + + +class GatewayHostnameBindingResource(ProxyResource): + """A single API Management gateway hostname binding resource in List or Get response. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the API Management gateway hostname binding. Required. + :vartype properties: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingBaseProperties + :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per + the normal etag convention. Entity tags are used for comparing two or more entities from the + same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match + (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + :vartype e_tag: str + """ + + properties: "_models.GatewayHostnameBindingBaseProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the API Management gateway hostname binding. Required.""" + e_tag: Optional[str] = rest_field(name="etag", visibility=["read"]) + """If eTag is provided in the response body, it may also be provided as a header per the normal + etag convention. Entity tags are used for comparing two or more entities from the same + requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section + 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.""" + + __flattened_items = ["provisioning_state", "hostname", "key_vault", "certificate"] + + @overload + def __init__( + self, + *, + properties: "_models.GatewayHostnameBindingBaseProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class GatewayHostnameConfigurationContract(ProxyResource): + """Gateway hostname configuration details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Gateway hostname configuration details. + :vartype properties: + ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContractProperties + """ + + properties: Optional["_models.GatewayHostnameConfigurationContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Gateway hostname configuration details.""" + + __flattened_items = [ + "hostname", + "certificate_id", + "negotiate_client_certificate", + "tls10_enabled", + "tls11_enabled", + "http2_enabled", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.GatewayHostnameConfigurationContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class GatewayHostnameConfigurationContractProperties(_Model): # pylint: disable=name-too-long + """Gateway hostname configuration details. + + :ivar hostname: Hostname value. Supports valid domain name, partial or full wildcard. + :vartype hostname: str + :ivar certificate_id: Identifier of Certificate entity that will be used for TLS connection + establishment. + :vartype certificate_id: str + :ivar negotiate_client_certificate: Determines whether gateway requests client certificate. + :vartype negotiate_client_certificate: bool + :ivar tls10_enabled: Specifies if TLS 1.0 is supported. + :vartype tls10_enabled: bool + :ivar tls11_enabled: Specifies if TLS 1.1 is supported. + :vartype tls11_enabled: bool + :ivar http2_enabled: Specifies if HTTP/2.0 is supported. + :vartype http2_enabled: bool + """ + + hostname: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Hostname value. Supports valid domain name, partial or full wildcard.""" + certificate_id: Optional[str] = rest_field( + name="certificateId", visibility=["read", "create", "update", "delete", "query"] + ) + """Identifier of Certificate entity that will be used for TLS connection establishment.""" + negotiate_client_certificate: Optional[bool] = rest_field( + name="negotiateClientCertificate", visibility=["read", "create", "update", "delete", "query"] + ) + """Determines whether gateway requests client certificate.""" + tls10_enabled: Optional[bool] = rest_field( + name="tls10Enabled", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies if TLS 1.0 is supported.""" + tls11_enabled: Optional[bool] = rest_field( + name="tls11Enabled", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies if TLS 1.1 is supported.""" + http2_enabled: Optional[bool] = rest_field( + name="http2Enabled", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies if HTTP/2.0 is supported.""" + + @overload + def __init__( + self, + *, + hostname: Optional[str] = None, + certificate_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + tls10_enabled: Optional[bool] = None, + tls11_enabled: Optional[bool] = None, + http2_enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GatewayKeyRegenerationRequestContract(_Model): + """Gateway key regeneration request contract properties. + + :ivar key_type: The Key being regenerated. Required. Known values are: "primary" and + "secondary". + :vartype key_type: str or ~azure.mgmt.apimanagement.models.KeyType + """ + + key_type: Union[str, "_models.KeyType"] = rest_field( + name="keyType", visibility=["read", "create", "update", "delete", "query"] + ) + """The Key being regenerated. Required. Known values are: \"primary\" and \"secondary\".""" + + @overload + def __init__( + self, + *, + key_type: Union[str, "_models.KeyType"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GatewayKeysContract(_Model): + """Gateway authentication keys. + + :ivar primary: Primary gateway key. + :vartype primary: str + :ivar secondary: Secondary gateway key. + :vartype secondary: str + """ + + primary: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Primary gateway key.""" + secondary: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Secondary gateway key.""" + + @overload + def __init__( + self, + *, + primary: Optional[str] = None, + secondary: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GatewayListDebugCredentialsContract(_Model): + """List debug credentials properties. + + :ivar credentials_expire_after: Credentials expiration in ISO8601 format. Maximum duration of + the credentials is PT1H. When property is not specified, them value PT1H is used. + :vartype credentials_expire_after: ~datetime.timedelta + :ivar purposes: Purposes of debug credential. Required. + :vartype purposes: list[str or + ~azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContractPurpose] + :ivar api_id: Full resource Id of an API. Required. + :vartype api_id: str + """ + + credentials_expire_after: Optional[datetime.timedelta] = rest_field( + name="credentialsExpireAfter", visibility=["read", "create", "update", "delete", "query"] + ) + """Credentials expiration in ISO8601 format. Maximum duration of the credentials is PT1H. When + property is not specified, them value PT1H is used.""" + purposes: list[Union[str, "_models.GatewayListDebugCredentialsContractPurpose"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Purposes of debug credential. Required.""" + api_id: str = rest_field(name="apiId", visibility=["read", "create", "update", "delete", "query"]) + """Full resource Id of an API. Required.""" + + @overload + def __init__( + self, + *, + purposes: list[Union[str, "_models.GatewayListDebugCredentialsContractPurpose"]], + api_id: str, + credentials_expire_after: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GatewayListTraceContract(_Model): + """List trace properties. + + :ivar trace_id: Trace id. + :vartype trace_id: str + """ + + trace_id: Optional[str] = rest_field(name="traceId", visibility=["read", "create", "update", "delete", "query"]) + """Trace id.""" + + @overload + def __init__( + self, + *, + trace_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GatewayResourceSkuResult(_Model): + """Describes an available API Management gateway SKU. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar sku: Specifies API Management gateway SKU. + :vartype sku: ~azure.mgmt.apimanagement.models.GatewaySku + :ivar capacity: Specifies the number of API Management gateway units. + :vartype capacity: ~azure.mgmt.apimanagement.models.GatewaySkuCapacity + """ + + resource_type: Optional[str] = rest_field(name="resourceType", visibility=["read"]) + """The type of resource the SKU applies to.""" + sku: Optional["_models.GatewaySku"] = rest_field(visibility=["read"]) + """Specifies API Management gateway SKU.""" + capacity: Optional["_models.GatewaySkuCapacity"] = rest_field(visibility=["read"]) + """Specifies the number of API Management gateway units.""" + + +class GatewaySku(_Model): + """Describes an available API Management SKU for gateways. + + :ivar name: Name of the Sku. Known values are: "Standard", "WorkspaceGatewayStandard", and + "WorkspaceGatewayPremium". + :vartype name: str or ~azure.mgmt.apimanagement.models.ApiGatewaySkuType + """ + + name: Optional[Union[str, "_models.ApiGatewaySkuType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Name of the Sku. Known values are: \"Standard\", \"WorkspaceGatewayStandard\", and + \"WorkspaceGatewayPremium\".""" + + @overload + def __init__( + self, + *, + name: Optional[Union[str, "_models.ApiGatewaySkuType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GatewaySkuCapacity(_Model): + """Describes scaling information of a SKU. + + :ivar minimum: The minimum capacity. + :vartype minimum: int + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: int + :ivar default: The default capacity. + :vartype default: int + :ivar scale_type: The scale type applicable to the sku. Known values are: "Automatic", + "Manual", and "None". + :vartype scale_type: str or ~azure.mgmt.apimanagement.models.GatewaySkuCapacityScaleType + """ + + minimum: Optional[int] = rest_field(visibility=["read"]) + """The minimum capacity.""" + maximum: Optional[int] = rest_field(visibility=["read"]) + """The maximum capacity that can be set.""" + default: Optional[int] = rest_field(visibility=["read"]) + """The default capacity.""" + scale_type: Optional[Union[str, "_models.GatewaySkuCapacityScaleType"]] = rest_field( + name="scaleType", visibility=["read"] + ) + """The scale type applicable to the sku. Known values are: \"Automatic\", \"Manual\", and + \"None\".""" + + +class GatewayTokenContract(_Model): + """Gateway access token. + + :ivar value: Shared Access Authentication token value for the Gateway. + :vartype value: str + """ + + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Shared Access Authentication token value for the Gateway.""" + + @overload + def __init__( + self, + *, + value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GatewayTokenRequestContract(_Model): + """Gateway token request contract properties. + + :ivar key_type: The Key to be used to generate gateway token. Required. Known values are: + "primary" and "secondary". + :vartype key_type: str or ~azure.mgmt.apimanagement.models.KeyType + :ivar expiry: The Expiry time of the Token. Maximum token expiry time is set to 30 days. The + date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 + standard. Required. + :vartype expiry: ~datetime.datetime + """ + + key_type: Union[str, "_models.KeyType"] = rest_field( + name="keyType", visibility=["read", "create", "update", "delete", "query"] + ) + """The Key to be used to generate gateway token. Required. Known values are: \"primary\" and + \"secondary\".""" + expiry: datetime.datetime = rest_field(visibility=["read", "create", "update", "delete", "query"], format="rfc3339") + """The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to + the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required.""" + + @overload + def __init__( + self, + *, + key_type: Union[str, "_models.KeyType"], + expiry: datetime.datetime, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GenerateSsoUrlResult(_Model): + """Generate SSO Url operations response details. + + :ivar value: Redirect Url containing the SSO URL value. + :vartype value: str + """ + + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Redirect Url containing the SSO URL value.""" + + @overload + def __init__( + self, + *, + value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GlobalSchemaContract(ProxyResource): + """Global Schema Contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Global Schema. + :vartype properties: ~azure.mgmt.apimanagement.models.GlobalSchemaContractProperties + """ + + properties: Optional["_models.GlobalSchemaContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Global Schema.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.GlobalSchemaContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GlobalSchemaContractProperties(_Model): + """Schema create or update contract Properties. + + :ivar schema_type: Schema Type. Immutable. Required. Known values are: "xml" and "json". + :vartype schema_type: str or ~azure.mgmt.apimanagement.models.SchemaType + :ivar description: Free-form schema entity description. + :vartype description: str + :ivar value: Json-encoded string for non json-based schema. + :vartype value: any + :ivar document: Global Schema document object for json-based schema formats(e.g. json schema). + :vartype document: any + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + schema_type: Union[str, "_models.SchemaType"] = rest_field( + name="schemaType", visibility=["read", "create", "update", "delete", "query"] + ) + """Schema Type. Immutable. Required. Known values are: \"xml\" and \"json\".""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Free-form schema entity description.""" + value: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Json-encoded string for non json-based schema.""" + document: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Global Schema document object for json-based schema formats(e.g. json schema).""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The provisioning state.""" + + __flattened_items = [""] + + @overload + def __init__( + self, + *, + schema_type: Union[str, "_models.SchemaType"], + description: Optional[str] = None, + value: Optional[Any] = None, + document: Optional[Any] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.document is None: + return None + return getattr(self.document, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.document is None: + self.document = self._attr_to_rest_field["document"]._class_type() + setattr(self.document, key, value) + else: + super().__setattr__(key, value) + + +class GroupContract(ProxyResource): + """Contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Group entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.GroupContractProperties + """ + + properties: Optional["_models.GroupContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Group entity contract properties.""" + + __flattened_items = ["display_name", "description", "built_in", "type", "external_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.GroupContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class GroupContractProperties(_Model): + """Group contract Properties. + + :ivar display_name: Group name. Required. + :vartype display_name: str + :ivar description: Group description. Can contain HTML formatting tags. + :vartype description: str + :ivar built_in: true if the group is one of the three system groups (Administrators, + Developers, or Guests); otherwise false. + :vartype built_in: bool + :ivar type: Group type. Known values are: "custom", "system", and "external". + :vartype type: str or ~azure.mgmt.apimanagement.models.GroupType + :ivar external_id: For external groups, this property contains the id of the group from the + external identity provider, e.g. for Azure Active Directory + ``aad://.onmicrosoft.com/groups/``; otherwise the value is null. + :vartype external_id: str + """ + + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """Group name. Required.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Group description. Can contain HTML formatting tags.""" + built_in: Optional[bool] = rest_field(name="builtIn", visibility=["read"]) + """true if the group is one of the three system groups (Administrators, Developers, or Guests); + otherwise false.""" + type: Optional[Union[str, "_models.GroupType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Group type. Known values are: \"custom\", \"system\", and \"external\".""" + external_id: Optional[str] = rest_field( + name="externalId", visibility=["read", "create", "update", "delete", "query"] + ) + """For external groups, this property contains the id of the group from the external identity + provider, e.g. for Azure Active Directory ``aad://.onmicrosoft.com/groups/``; otherwise the value is null.""" + + @overload + def __init__( + self, + *, + display_name: str, + description: Optional[str] = None, + type: Optional[Union[str, "_models.GroupType"]] = None, + external_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GroupCreateParameters(_Model): + """Parameters supplied to the Create Group operation. + + :ivar properties: Properties supplied to Create Group operation. + :vartype properties: ~azure.mgmt.apimanagement.models.GroupCreateParametersProperties + """ + + properties: Optional["_models.GroupCreateParametersProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties supplied to Create Group operation.""" + + __flattened_items = ["display_name", "description", "type", "external_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.GroupCreateParametersProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class GroupCreateParametersProperties(_Model): + """Parameters supplied to the Create Group operation. + + :ivar display_name: Group name. Required. + :vartype display_name: str + :ivar description: Group description. + :vartype description: str + :ivar type: Group type. Known values are: "custom", "system", and "external". + :vartype type: str or ~azure.mgmt.apimanagement.models.GroupType + :ivar external_id: Identifier of the external groups, this property contains the id of the + group from the external identity provider, e.g. for Azure Active Directory + ``aad://.onmicrosoft.com/groups/``; otherwise the value is null. + :vartype external_id: str + """ + + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """Group name. Required.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Group description.""" + type: Optional[Union[str, "_models.GroupType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Group type. Known values are: \"custom\", \"system\", and \"external\".""" + external_id: Optional[str] = rest_field( + name="externalId", visibility=["read", "create", "update", "delete", "query"] + ) + """Identifier of the external groups, this property contains the id of the group from the external + identity provider, e.g. for Azure Active Directory + ``aad://.onmicrosoft.com/groups/``; otherwise the value is null.""" + + @overload + def __init__( + self, + *, + display_name: str, + description: Optional[str] = None, + type: Optional[Union[str, "_models.GroupType"]] = None, + external_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GroupUpdateParameters(_Model): + """Parameters supplied to the Update Group operation. + + :ivar properties: Group entity update contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.GroupUpdateParametersProperties + """ + + properties: Optional["_models.GroupUpdateParametersProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Group entity update contract properties.""" + + __flattened_items = ["display_name", "description", "type", "external_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.GroupUpdateParametersProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class GroupUpdateParametersProperties(_Model): + """Parameters supplied to the Update Group operation. + + :ivar display_name: Group name. + :vartype display_name: str + :ivar description: Group description. + :vartype description: str + :ivar type: Group type. Known values are: "custom", "system", and "external". + :vartype type: str or ~azure.mgmt.apimanagement.models.GroupType + :ivar external_id: Identifier of the external groups, this property contains the id of the + group from the external identity provider, e.g. for Azure Active Directory + ``aad://.onmicrosoft.com/groups/``; otherwise the value is null. + :vartype external_id: str + """ + + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Group name.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Group description.""" + type: Optional[Union[str, "_models.GroupType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Group type. Known values are: \"custom\", \"system\", and \"external\".""" + external_id: Optional[str] = rest_field( + name="externalId", visibility=["read", "create", "update", "delete", "query"] + ) + """Identifier of the external groups, this property contains the id of the group from the external + identity provider, e.g. for Azure Active Directory + ``aad://.onmicrosoft.com/groups/``; otherwise the value is null.""" + + @overload + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + type: Optional[Union[str, "_models.GroupType"]] = None, + external_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class HostnameConfiguration(_Model): + """Custom hostname configuration. + + :ivar type: Hostname type. Required. Known values are: "Proxy", "Portal", "Management", "Scm", + "DeveloperPortal", and "ConfigurationApi". + :vartype type: str or ~azure.mgmt.apimanagement.models.HostnameType + :ivar host_name: Hostname to configure on the Api Management service. Required. + :vartype host_name: str + :ivar key_vault_id: Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url + containing version is provided, auto-update of ssl certificate will not work. This requires Api + Management service to be configured with aka.ms/apimmsi. The secret should be of type + *application/x-pkcs12*. + :vartype key_vault_id: str + :ivar identity_client_id: System or User Assigned Managed identity clientId as generated by + Azure AD, which has GET access to the keyVault containing the SSL certificate. + :vartype identity_client_id: str + :ivar encoded_certificate: Base64 Encoded certificate. + :vartype encoded_certificate: str + :ivar certificate_password: Certificate Password. + :vartype certificate_password: str + :ivar default_ssl_binding: Specify true to setup the certificate associated with this Hostname + as the Default SSL Certificate. If a client does not send the SNI header, then this will be the + certificate that will be challenged. The property is useful if a service has multiple custom + hostname enabled and it needs to decide on the default ssl certificate. The setting only + applied to gateway Hostname Type. + :vartype default_ssl_binding: bool + :ivar negotiate_client_certificate: Specify true to always negotiate client certificate on the + hostname. Default Value is false. + :vartype negotiate_client_certificate: bool + :ivar certificate: Certificate information. + :vartype certificate: ~azure.mgmt.apimanagement.models.CertificateInformation + :ivar certificate_source: Certificate Source. Known values are: "Managed", "KeyVault", + "Custom", and "BuiltIn". + :vartype certificate_source: str or ~azure.mgmt.apimanagement.models.CertificateSource + :ivar certificate_status: Certificate Status. Known values are: "Completed", "Failed", and + "InProgress". + :vartype certificate_status: str or ~azure.mgmt.apimanagement.models.CertificateStatus + """ + + type: Union[str, "_models.HostnameType"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Hostname type. Required. Known values are: \"Proxy\", \"Portal\", \"Management\", \"Scm\", + \"DeveloperPortal\", and \"ConfigurationApi\".""" + host_name: str = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """Hostname to configure on the Api Management service. Required.""" + key_vault_id: Optional[str] = rest_field( + name="keyVaultId", visibility=["read", "create", "update", "delete", "query"] + ) + """Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version + is provided, auto-update of ssl certificate will not work. This requires Api Management service + to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12*.""" + identity_client_id: Optional[str] = rest_field( + name="identityClientId", visibility=["read", "create", "update", "delete", "query"] + ) + """System or User Assigned Managed identity clientId as generated by Azure AD, which has GET + access to the keyVault containing the SSL certificate.""" + encoded_certificate: Optional[str] = rest_field( + name="encodedCertificate", visibility=["read", "create", "update", "delete", "query"] + ) + """Base64 Encoded certificate.""" + certificate_password: Optional[str] = rest_field( + name="certificatePassword", visibility=["read", "create", "update", "delete", "query"] + ) + """Certificate Password.""" + default_ssl_binding: Optional[bool] = rest_field( + name="defaultSslBinding", visibility=["read", "create", "update", "delete", "query"] + ) + """Specify true to setup the certificate associated with this Hostname as the Default SSL + Certificate. If a client does not send the SNI header, then this will be the certificate that + will be challenged. The property is useful if a service has multiple custom hostname enabled + and it needs to decide on the default ssl certificate. The setting only applied to gateway + Hostname Type.""" + negotiate_client_certificate: Optional[bool] = rest_field( + name="negotiateClientCertificate", visibility=["read", "create", "update", "delete", "query"] + ) + """Specify true to always negotiate client certificate on the hostname. Default Value is false.""" + certificate: Optional["_models.CertificateInformation"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Certificate information.""" + certificate_source: Optional[Union[str, "_models.CertificateSource"]] = rest_field( + name="certificateSource", visibility=["read", "create", "update", "delete", "query"] + ) + """Certificate Source. Known values are: \"Managed\", \"KeyVault\", \"Custom\", and \"BuiltIn\".""" + certificate_status: Optional[Union[str, "_models.CertificateStatus"]] = rest_field( + name="certificateStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Certificate Status. Known values are: \"Completed\", \"Failed\", and \"InProgress\".""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.HostnameType"], + host_name: str, + key_vault_id: Optional[str] = None, + identity_client_id: Optional[str] = None, + encoded_certificate: Optional[str] = None, + certificate_password: Optional[str] = None, + default_ssl_binding: Optional[bool] = None, + negotiate_client_certificate: Optional[bool] = None, + certificate: Optional["_models.CertificateInformation"] = None, + certificate_source: Optional[Union[str, "_models.CertificateSource"]] = None, + certificate_status: Optional[Union[str, "_models.CertificateStatus"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class HTTPHeader(_Model): + """HTTP header and it's value. + + :ivar name: Header name. Required. + :vartype name: str + :ivar value: Header value. Required. + :vartype value: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Header name. Required.""" + value: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Header value. Required.""" + + @overload + def __init__( + self, + *, + name: str, + value: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class HttpMessageDiagnostic(_Model): + """Http message diagnostic settings. + + :ivar headers: Array of HTTP Headers to log. + :vartype headers: list[str] + :ivar body: Body logging settings. + :vartype body: ~azure.mgmt.apimanagement.models.BodyDiagnosticSettings + :ivar data_masking: Data masking settings. + :vartype data_masking: ~azure.mgmt.apimanagement.models.DataMasking + """ + + headers: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Array of HTTP Headers to log.""" + body: Optional["_models.BodyDiagnosticSettings"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Body logging settings.""" + data_masking: Optional["_models.DataMasking"] = rest_field( + name="dataMasking", visibility=["read", "create", "update", "delete", "query"] + ) + """Data masking settings.""" + + @overload + def __init__( + self, + *, + headers: Optional[list[str]] = None, + body: Optional["_models.BodyDiagnosticSettings"] = None, + data_masking: Optional["_models.DataMasking"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IdentityProviderBaseParameters(_Model): + """Identity Provider Base Parameter Properties. + + :ivar type: Identity Provider Type identifier. Known values are: "facebook", "google", + "microsoft", "twitter", "aad", and "aadB2C". + :vartype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :ivar signin_tenant: The TenantId to use instead of Common when logging into Active Directory. + :vartype signin_tenant: str + :ivar allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. + :vartype allowed_tenants: list[str] + :ivar authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + :vartype authority: str + :ivar signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. + :vartype signup_policy_name: str + :ivar signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. + :vartype signin_policy_name: str + :ivar profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C + Identity Provider. + :vartype profile_editing_policy_name: str + :ivar password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C Identity + Provider. + :vartype password_reset_policy_name: str + :ivar client_library: The client library to be used in the developer portal. Only applies to + AAD and AAD B2C Identity Provider. + :vartype client_library: str + """ + + type: Optional[Union[str, "_models.IdentityProviderType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Identity Provider Type identifier. Known values are: \"facebook\", \"google\", \"microsoft\", + \"twitter\", \"aad\", and \"aadB2C\".""" + signin_tenant: Optional[str] = rest_field( + name="signinTenant", visibility=["read", "create", "update", "delete", "query"] + ) + """The TenantId to use instead of Common when logging into Active Directory.""" + allowed_tenants: Optional[list[str]] = rest_field( + name="allowedTenants", visibility=["read", "create", "update", "delete", "query"] + ) + """List of Allowed Tenants when configuring Azure Active Directory login.""" + authority: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """OpenID Connect discovery endpoint hostname for AAD or AAD B2C.""" + signup_policy_name: Optional[str] = rest_field( + name="signupPolicyName", visibility=["read", "create", "update", "delete", "query"] + ) + """Signup Policy Name. Only applies to AAD B2C Identity Provider.""" + signin_policy_name: Optional[str] = rest_field( + name="signinPolicyName", visibility=["read", "create", "update", "delete", "query"] + ) + """Signin Policy Name. Only applies to AAD B2C Identity Provider.""" + profile_editing_policy_name: Optional[str] = rest_field( + name="profileEditingPolicyName", visibility=["read", "create", "update", "delete", "query"] + ) + """Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.""" + password_reset_policy_name: Optional[str] = rest_field( + name="passwordResetPolicyName", visibility=["read", "create", "update", "delete", "query"] + ) + """Password Reset Policy Name. Only applies to AAD B2C Identity Provider.""" + client_library: Optional[str] = rest_field( + name="clientLibrary", visibility=["read", "create", "update", "delete", "query"] + ) + """The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity + Provider.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.IdentityProviderType"]] = None, + signin_tenant: Optional[str] = None, + allowed_tenants: Optional[list[str]] = None, + authority: Optional[str] = None, + signup_policy_name: Optional[str] = None, + signin_policy_name: Optional[str] = None, + profile_editing_policy_name: Optional[str] = None, + password_reset_policy_name: Optional[str] = None, + client_library: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IdentityProviderContract(ProxyResource): + """Identity Provider details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Identity Provider contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.IdentityProviderContractProperties + """ + + properties: Optional["_models.IdentityProviderContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Identity Provider contract properties.""" + + __flattened_items = [ + "type", + "signin_tenant", + "allowed_tenants", + "authority", + "signup_policy_name", + "signin_policy_name", + "profile_editing_policy_name", + "password_reset_policy_name", + "client_library", + "client_id", + "client_secret", + "certificate_id", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.IdentityProviderContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IdentityProviderContractProperties(IdentityProviderBaseParameters): + """The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active + Directory which can be used to enable access to the API Management service developer portal for + all users. + + :ivar type: Identity Provider Type identifier. Known values are: "facebook", "google", + "microsoft", "twitter", "aad", and "aadB2C". + :vartype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :ivar signin_tenant: The TenantId to use instead of Common when logging into Active Directory. + :vartype signin_tenant: str + :ivar allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. + :vartype allowed_tenants: list[str] + :ivar authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + :vartype authority: str + :ivar signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. + :vartype signup_policy_name: str + :ivar signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. + :vartype signin_policy_name: str + :ivar profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C + Identity Provider. + :vartype profile_editing_policy_name: str + :ivar password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C Identity + Provider. + :vartype password_reset_policy_name: str + :ivar client_library: The client library to be used in the developer portal. Only applies to + AAD and AAD B2C Identity Provider. + :vartype client_library: str + :ivar client_id: Client Id of the Application in the external Identity Provider. It is App ID + for Facebook login, Client ID for Google login, App ID for Microsoft. Required. + :vartype client_id: str + :ivar client_secret: Client secret of the Application in external Identity Provider, used to + authenticate login request. For example, it is App Secret for Facebook login, API Key for + Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! + Use '/listSecrets' POST request to get the value. + :vartype client_secret: str + :ivar certificate_id: Certificate full resource ID used in external Identity Provider. + :vartype certificate_id: str + """ + + client_id: str = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"]) + """Client Id of the Application in the external Identity Provider. It is App ID for Facebook + login, Client ID for Google login, App ID for Microsoft. Required.""" + client_secret: Optional[str] = rest_field( + name="clientSecret", visibility=["read", "create", "update", "delete", "query"] + ) + """Client secret of the Application in external Identity Provider, used to authenticate login + request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key + for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST + request to get the value.""" + certificate_id: Optional[str] = rest_field( + name="certificateId", visibility=["read", "create", "update", "delete", "query"] + ) + """Certificate full resource ID used in external Identity Provider.""" + + @overload + def __init__( + self, + *, + client_id: str, + type: Optional[Union[str, "_models.IdentityProviderType"]] = None, + signin_tenant: Optional[str] = None, + allowed_tenants: Optional[list[str]] = None, + authority: Optional[str] = None, + signup_policy_name: Optional[str] = None, + signin_policy_name: Optional[str] = None, + profile_editing_policy_name: Optional[str] = None, + password_reset_policy_name: Optional[str] = None, + client_library: Optional[str] = None, + client_secret: Optional[str] = None, + certificate_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IdentityProviderCreateContract(ProxyResource): + """Identity Provider details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Identity Provider contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.IdentityProviderCreateContractProperties + """ + + properties: Optional["_models.IdentityProviderCreateContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Identity Provider contract properties.""" + + __flattened_items = [ + "type", + "signin_tenant", + "allowed_tenants", + "authority", + "signup_policy_name", + "signin_policy_name", + "profile_editing_policy_name", + "password_reset_policy_name", + "client_library", + "client_id", + "client_secret", + "certificate_id", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.IdentityProviderCreateContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IdentityProviderCreateContractProperties(IdentityProviderBaseParameters): + """The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active + Directory which can be used to enable access to the API Management service developer portal for + all users. + + :ivar type: Identity Provider Type identifier. Known values are: "facebook", "google", + "microsoft", "twitter", "aad", and "aadB2C". + :vartype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :ivar signin_tenant: The TenantId to use instead of Common when logging into Active Directory. + :vartype signin_tenant: str + :ivar allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. + :vartype allowed_tenants: list[str] + :ivar authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + :vartype authority: str + :ivar signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. + :vartype signup_policy_name: str + :ivar signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. + :vartype signin_policy_name: str + :ivar profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C + Identity Provider. + :vartype profile_editing_policy_name: str + :ivar password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C Identity + Provider. + :vartype password_reset_policy_name: str + :ivar client_library: The client library to be used in the developer portal. Only applies to + AAD and AAD B2C Identity Provider. + :vartype client_library: str + :ivar client_id: Client Id of the Application in the external Identity Provider. It is App ID + for Facebook login, Client ID for Google login, App ID for Microsoft. Required. + :vartype client_id: str + :ivar client_secret: Client secret of the Application in external Identity Provider, used to + authenticate login request. For example, it is App Secret for Facebook login, API Key for + Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! + Use '/listSecrets' POST request to get the value. Required. + :vartype client_secret: str + :ivar certificate_id: Certificate full resource ID used in external Identity Provider. + :vartype certificate_id: str + """ + + client_id: str = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"]) + """Client Id of the Application in the external Identity Provider. It is App ID for Facebook + login, Client ID for Google login, App ID for Microsoft. Required.""" + client_secret: str = rest_field(name="clientSecret", visibility=["read", "create", "update", "delete", "query"]) + """Client secret of the Application in external Identity Provider, used to authenticate login + request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key + for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST + request to get the value. Required.""" + certificate_id: Optional[str] = rest_field( + name="certificateId", visibility=["read", "create", "update", "delete", "query"] + ) + """Certificate full resource ID used in external Identity Provider.""" + + @overload + def __init__( + self, + *, + client_id: str, + client_secret: str, + type: Optional[Union[str, "_models.IdentityProviderType"]] = None, + signin_tenant: Optional[str] = None, + allowed_tenants: Optional[list[str]] = None, + authority: Optional[str] = None, + signup_policy_name: Optional[str] = None, + signin_policy_name: Optional[str] = None, + profile_editing_policy_name: Optional[str] = None, + password_reset_policy_name: Optional[str] = None, + client_library: Optional[str] = None, + certificate_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IdentityProviderUpdateParameters(_Model): + """Parameters supplied to update Identity Provider. + + :ivar properties: Identity Provider update properties. + :vartype properties: ~azure.mgmt.apimanagement.models.IdentityProviderUpdateProperties + """ + + properties: Optional["_models.IdentityProviderUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Identity Provider update properties.""" + + __flattened_items = [ + "type", + "signin_tenant", + "allowed_tenants", + "authority", + "signup_policy_name", + "signin_policy_name", + "profile_editing_policy_name", + "password_reset_policy_name", + "client_library", + "client_id", + "client_secret", + "certificate_id", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.IdentityProviderUpdateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IdentityProviderUpdateProperties(IdentityProviderBaseParameters): + """Parameters supplied to the Update Identity Provider operation. + + :ivar type: Identity Provider Type identifier. Known values are: "facebook", "google", + "microsoft", "twitter", "aad", and "aadB2C". + :vartype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :ivar signin_tenant: The TenantId to use instead of Common when logging into Active Directory. + :vartype signin_tenant: str + :ivar allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. + :vartype allowed_tenants: list[str] + :ivar authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + :vartype authority: str + :ivar signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. + :vartype signup_policy_name: str + :ivar signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. + :vartype signin_policy_name: str + :ivar profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C + Identity Provider. + :vartype profile_editing_policy_name: str + :ivar password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C Identity + Provider. + :vartype password_reset_policy_name: str + :ivar client_library: The client library to be used in the developer portal. Only applies to + AAD and AAD B2C Identity Provider. + :vartype client_library: str + :ivar client_id: Client Id of the Application in the external Identity Provider. It is App ID + for Facebook login, Client ID for Google login, App ID for Microsoft. + :vartype client_id: str + :ivar client_secret: Client secret of the Application in external Identity Provider, used to + authenticate login request. For example, it is App Secret for Facebook login, API Key for + Google login, Public Key for Microsoft. + :vartype client_secret: str + :ivar certificate_id: Certificate full resource ID used in external Identity Provider. + :vartype certificate_id: str + """ + + client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"]) + """Client Id of the Application in the external Identity Provider. It is App ID for Facebook + login, Client ID for Google login, App ID for Microsoft.""" + client_secret: Optional[str] = rest_field( + name="clientSecret", visibility=["read", "create", "update", "delete", "query"] + ) + """Client secret of the Application in external Identity Provider, used to authenticate login + request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key + for Microsoft.""" + certificate_id: Optional[str] = rest_field( + name="certificateId", visibility=["read", "create", "update", "delete", "query"] + ) + """Certificate full resource ID used in external Identity Provider.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.IdentityProviderType"]] = None, + signin_tenant: Optional[str] = None, + allowed_tenants: Optional[list[str]] = None, + authority: Optional[str] = None, + signup_policy_name: Optional[str] = None, + signin_policy_name: Optional[str] = None, + profile_editing_policy_name: Optional[str] = None, + password_reset_policy_name: Optional[str] = None, + client_library: Optional[str] = None, + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + certificate_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IssueAttachmentContract(ProxyResource): + """Issue Attachment Contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Issue Attachment. + :vartype properties: ~azure.mgmt.apimanagement.models.IssueAttachmentContractProperties + """ + + properties: Optional["_models.IssueAttachmentContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Issue Attachment.""" + + __flattened_items = ["title", "content_format", "content"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.IssueAttachmentContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IssueAttachmentContractProperties(_Model): + """Issue Attachment contract Properties. + + :ivar title: Filename by which the binary data will be saved. Required. + :vartype title: str + :ivar content_format: Either 'link' if content is provided via an HTTP link or the MIME type of + the Base64-encoded binary data provided in the 'content' property. Required. + :vartype content_format: str + :ivar content: An HTTP link or Base64-encoded binary data. Required. + :vartype content: str + """ + + title: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Filename by which the binary data will be saved. Required.""" + content_format: str = rest_field(name="contentFormat", visibility=["read", "create", "update", "delete", "query"]) + """Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded + binary data provided in the 'content' property. Required.""" + content: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """An HTTP link or Base64-encoded binary data. Required.""" + + @overload + def __init__( + self, + *, + title: str, + content_format: str, + content: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IssueCommentContract(ProxyResource): + """Issue Comment Contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Issue Comment. + :vartype properties: ~azure.mgmt.apimanagement.models.IssueCommentContractProperties + """ + + properties: Optional["_models.IssueCommentContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Issue Comment.""" + + __flattened_items = ["text", "created_date", "user_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.IssueCommentContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IssueCommentContractProperties(_Model): + """Issue Comment contract Properties. + + :ivar text: Comment text. Required. + :vartype text: str + :ivar created_date: Date and time when the comment was created. + :vartype created_date: ~datetime.datetime + :ivar user_id: A resource identifier for the user who left the comment. Required. + :vartype user_id: str + """ + + text: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Comment text. Required.""" + created_date: Optional[datetime.datetime] = rest_field( + name="createdDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Date and time when the comment was created.""" + user_id: str = rest_field(name="userId", visibility=["read", "create", "update", "delete", "query"]) + """A resource identifier for the user who left the comment. Required.""" + + @overload + def __init__( + self, + *, + text: str, + user_id: str, + created_date: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IssueContract(ProxyResource): + """Issue Contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Issue. + :vartype properties: ~azure.mgmt.apimanagement.models.IssueContractProperties + """ + + properties: Optional["_models.IssueContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Issue.""" + + __flattened_items = ["created_date", "state", "api_id", "title", "description", "user_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.IssueContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IssueContractBaseProperties(_Model): + """Issue contract Base Properties. + + :ivar created_date: Date and time when the issue was created. + :vartype created_date: ~datetime.datetime + :ivar state: Status of the issue. Known values are: "proposed", "open", "removed", "resolved", + and "closed". + :vartype state: str or ~azure.mgmt.apimanagement.models.State + :ivar api_id: A resource identifier for the API the issue was created for. + :vartype api_id: str + """ + + created_date: Optional[datetime.datetime] = rest_field( + name="createdDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Date and time when the issue was created.""" + state: Optional[Union[str, "_models.State"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Status of the issue. Known values are: \"proposed\", \"open\", \"removed\", \"resolved\", and + \"closed\".""" + api_id: Optional[str] = rest_field(name="apiId", visibility=["read", "create", "update", "delete", "query"]) + """A resource identifier for the API the issue was created for.""" + + @overload + def __init__( + self, + *, + created_date: Optional[datetime.datetime] = None, + state: Optional[Union[str, "_models.State"]] = None, + api_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IssueContractProperties(IssueContractBaseProperties): + """Issue contract Properties. + + :ivar created_date: Date and time when the issue was created. + :vartype created_date: ~datetime.datetime + :ivar state: Status of the issue. Known values are: "proposed", "open", "removed", "resolved", + and "closed". + :vartype state: str or ~azure.mgmt.apimanagement.models.State + :ivar api_id: A resource identifier for the API the issue was created for. + :vartype api_id: str + :ivar title: The issue title. Required. + :vartype title: str + :ivar description: Text describing the issue. Required. + :vartype description: str + :ivar user_id: A resource identifier for the user created the issue. Required. + :vartype user_id: str + """ + + title: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The issue title. Required.""" + description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Text describing the issue. Required.""" + user_id: str = rest_field(name="userId", visibility=["read", "create", "update", "delete", "query"]) + """A resource identifier for the user created the issue. Required.""" + + @overload + def __init__( + self, + *, + title: str, + description: str, + user_id: str, + created_date: Optional[datetime.datetime] = None, + state: Optional[Union[str, "_models.State"]] = None, + api_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IssueUpdateContract(_Model): + """Issue update Parameters. + + :ivar properties: Issue entity Update contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.IssueUpdateContractProperties + """ + + properties: Optional["_models.IssueUpdateContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Issue entity Update contract properties.""" + + __flattened_items = ["created_date", "state", "api_id", "title", "description", "user_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.IssueUpdateContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IssueUpdateContractProperties(IssueContractBaseProperties): + """Issue contract Update Properties. + + :ivar created_date: Date and time when the issue was created. + :vartype created_date: ~datetime.datetime + :ivar state: Status of the issue. Known values are: "proposed", "open", "removed", "resolved", + and "closed". + :vartype state: str or ~azure.mgmt.apimanagement.models.State + :ivar api_id: A resource identifier for the API the issue was created for. + :vartype api_id: str + :ivar title: The issue title. + :vartype title: str + :ivar description: Text describing the issue. + :vartype description: str + :ivar user_id: A resource identifier for the user created the issue. + :vartype user_id: str + """ + + title: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The issue title.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Text describing the issue.""" + user_id: Optional[str] = rest_field(name="userId", visibility=["read", "create", "update", "delete", "query"]) + """A resource identifier for the user created the issue.""" + + @overload + def __init__( + self, + *, + created_date: Optional[datetime.datetime] = None, + state: Optional[Union[str, "_models.State"]] = None, + api_id: Optional[str] = None, + title: Optional[str] = None, + description: Optional[str] = None, + user_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KeyVaultContractCreateProperties(_Model): + """Create keyVault contract details. + + :ivar secret_identifier: Key vault secret identifier for fetching secret. Providing a versioned + secret will prevent auto-refresh. This requires API Management service to be configured with + aka.ms/apimmsi. + :vartype secret_identifier: str + :ivar identity_client_id: Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity + , which will be used to access key vault secret. + :vartype identity_client_id: str + """ + + secret_identifier: Optional[str] = rest_field( + name="secretIdentifier", visibility=["read", "create", "update", "delete", "query"] + ) + """Key vault secret identifier for fetching secret. Providing a versioned secret will prevent + auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi.""" + identity_client_id: Optional[str] = rest_field( + name="identityClientId", visibility=["read", "create", "update", "delete", "query"] + ) + """Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to + access key vault secret.""" + + @overload + def __init__( + self, + *, + secret_identifier: Optional[str] = None, + identity_client_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KeyVaultContractProperties(KeyVaultContractCreateProperties): + """KeyVault contract details. + + :ivar secret_identifier: Key vault secret identifier for fetching secret. Providing a versioned + secret will prevent auto-refresh. This requires API Management service to be configured with + aka.ms/apimmsi. + :vartype secret_identifier: str + :ivar identity_client_id: Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity + , which will be used to access key vault secret. + :vartype identity_client_id: str + :ivar last_status: Last time sync and refresh status of secret from key vault. + :vartype last_status: + ~azure.mgmt.apimanagement.models.KeyVaultLastAccessStatusContractProperties + """ + + last_status: Optional["_models.KeyVaultLastAccessStatusContractProperties"] = rest_field( + name="lastStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Last time sync and refresh status of secret from key vault.""" + + @overload + def __init__( + self, + *, + secret_identifier: Optional[str] = None, + identity_client_id: Optional[str] = None, + last_status: Optional["_models.KeyVaultLastAccessStatusContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KeyVaultLastAccessStatusContractProperties(_Model): # pylint: disable=name-too-long + """Issue contract Update Properties. + + :ivar code: Last status code for sync and refresh of secret from key vault. + :vartype code: str + :ivar message: Details of the error else empty. + :vartype message: str + :ivar time_stamp_utc: Last time secret was accessed. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype time_stamp_utc: ~datetime.datetime + """ + + code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Last status code for sync and refresh of secret from key vault.""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Details of the error else empty.""" + time_stamp_utc: Optional[datetime.datetime] = rest_field( + name="timeStampUtc", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Last time secret was accessed. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard.""" + + @overload + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + time_stamp_utc: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LLMDiagnosticSettings(_Model): + """Diagnostic settings for Large Language Models. + + :ivar logs: Specifies whether default diagnostic should be enabled for Large Language Models or + not. Known values are: "enabled" and "disabled". + :vartype logs: str or ~azure.mgmt.apimanagement.models.LlmDiagnosticSettings + :ivar requests: Diagnostic settings for Large Language Models requests. + :vartype requests: ~azure.mgmt.apimanagement.models.LLMMessageDiagnosticSettings + :ivar responses: Diagnostic settings for Large Language Models responses. + :vartype responses: ~azure.mgmt.apimanagement.models.LLMMessageDiagnosticSettings + """ + + logs: Optional[Union[str, "_models.LlmDiagnosticSettings"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether default diagnostic should be enabled for Large Language Models or not. Known + values are: \"enabled\" and \"disabled\".""" + requests: Optional["_models.LLMMessageDiagnosticSettings"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Diagnostic settings for Large Language Models requests.""" + responses: Optional["_models.LLMMessageDiagnosticSettings"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Diagnostic settings for Large Language Models responses.""" + + @overload + def __init__( + self, + *, + logs: Optional[Union[str, "_models.LlmDiagnosticSettings"]] = None, + requests: Optional["_models.LLMMessageDiagnosticSettings"] = None, + responses: Optional["_models.LLMMessageDiagnosticSettings"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LLMMessageDiagnosticSettings(_Model): + """Diagnostic settings for Large Language Models Messages. + + :ivar messages: Specifies which message should be logged. Currently there is only 'all' option. + "all" + :vartype messages: str or ~azure.mgmt.apimanagement.models.LlmMessageLogTypes + :ivar max_size_in_bytes: Maximum size of message to logs in bytes. The default size is 32KB. + :vartype max_size_in_bytes: int + """ + + messages: Optional[Union[str, "_models.LlmMessageLogTypes"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies which message should be logged. Currently there is only 'all' option. \"all\"""" + max_size_in_bytes: Optional[int] = rest_field( + name="maxSizeInBytes", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum size of message to logs in bytes. The default size is 32KB.""" + + @overload + def __init__( + self, + *, + messages: Optional[Union[str, "_models.LlmMessageLogTypes"]] = None, + max_size_in_bytes: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LoggerContract(ProxyResource): + """Logger details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Logger entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.LoggerContractProperties + """ + + properties: Optional["_models.LoggerContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Logger entity contract properties.""" + + __flattened_items = ["logger_type", "description", "credentials", "is_buffered", "resource_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.LoggerContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class LoggerContractProperties(_Model): + """The Logger entity in API Management represents an event sink that you can use to log API + Management events. Currently the Logger entity supports logging API Management events to Azure + Event Hubs. + + :ivar logger_type: Logger type. Required. Known values are: "azureEventHub", + "applicationInsights", and "azureMonitor". + :vartype logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType + :ivar description: Logger description. + :vartype description: str + :ivar credentials: The name and SendRule connection string of the event hub for azureEventHub + logger. Instrumentation key for applicationInsights logger. + :vartype credentials: dict[str, str] + :ivar is_buffered: Whether records are buffered in the logger before publishing. Default is + assumed to be true. + :vartype is_buffered: bool + :ivar resource_id: Azure Resource Id of a log target (either Azure Event Hub resource or Azure + Application Insights resource). + :vartype resource_id: str + """ + + logger_type: Union[str, "_models.LoggerType"] = rest_field( + name="loggerType", visibility=["read", "create", "update", "delete", "query"] + ) + """Logger type. Required. Known values are: \"azureEventHub\", \"applicationInsights\", and + \"azureMonitor\".""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Logger description.""" + credentials: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name and SendRule connection string of the event hub for azureEventHub logger. + Instrumentation key for applicationInsights logger.""" + is_buffered: Optional[bool] = rest_field( + name="isBuffered", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether records are buffered in the logger before publishing. Default is assumed to be true.""" + resource_id: Optional[str] = rest_field( + name="resourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application + Insights resource).""" + + @overload + def __init__( + self, + *, + logger_type: Union[str, "_models.LoggerType"], + description: Optional[str] = None, + credentials: Optional[dict[str, str]] = None, + is_buffered: Optional[bool] = None, + resource_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LoggerUpdateContract(_Model): + """Logger update contract. + + :ivar properties: Logger entity update contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.LoggerUpdateParameters + """ + + properties: Optional["_models.LoggerUpdateParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Logger entity update contract properties.""" + + __flattened_items = ["logger_type", "description", "credentials", "is_buffered"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.LoggerUpdateParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class LoggerUpdateParameters(_Model): + """Parameters supplied to the Update Logger operation. + + :ivar logger_type: Logger type. Known values are: "azureEventHub", "applicationInsights", and + "azureMonitor". + :vartype logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType + :ivar description: Logger description. + :vartype description: str + :ivar credentials: Logger credentials. + :vartype credentials: dict[str, str] + :ivar is_buffered: Whether records are buffered in the logger before publishing. Default is + assumed to be true. + :vartype is_buffered: bool + """ + + logger_type: Optional[Union[str, "_models.LoggerType"]] = rest_field( + name="loggerType", visibility=["read", "create", "update", "delete", "query"] + ) + """Logger type. Known values are: \"azureEventHub\", \"applicationInsights\", and + \"azureMonitor\".""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Logger description.""" + credentials: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Logger credentials.""" + is_buffered: Optional[bool] = rest_field( + name="isBuffered", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether records are buffered in the logger before publishing. Default is assumed to be true.""" + + @overload + def __init__( + self, + *, + logger_type: Optional[Union[str, "_models.LoggerType"]] = None, + description: Optional[str] = None, + credentials: Optional[dict[str, str]] = None, + is_buffered: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedServiceIdentity(_Model): + """Managed service identity (system assigned and/or user assigned identities). + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: The type of managed identity assigned to this resource. Required. Known values are: + "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". + :vartype type: str or ~azure.mgmt.apimanagement.models.ManagedServiceIdentityType + :ivar user_assigned_identities: The identities assigned to this resource by the user. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.apimanagement.models.UserAssignedIdentity] + """ + + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The service principal ID of the system assigned identity. This property will only be provided + for a system assigned identity.""" + tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"]) + """The tenant ID of the system assigned identity. This property will only be provided for a system + assigned identity.""" + type: Union[str, "_models.ManagedServiceIdentityType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of managed identity assigned to this resource. Required. Known values are: \"None\", + \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\".""" + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = rest_field( + name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"] + ) + """The identities assigned to this resource by the user.""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.ManagedServiceIdentityType"], + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MigrateToStv2Contract(_Model): + """Describes an available API Management SKU. + + :ivar mode: Mode of Migration to stv2. Default is PreserveIp. Known values are: "PreserveIp" + and "NewIP". + :vartype mode: str or ~azure.mgmt.apimanagement.models.MigrateToStv2Mode + """ + + mode: Optional[Union[str, "_models.MigrateToStv2Mode"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Mode of Migration to stv2. Default is PreserveIp. Known values are: \"PreserveIp\" and + \"NewIP\".""" + + @overload + def __init__( + self, + *, + mode: Optional[Union[str, "_models.MigrateToStv2Mode"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NamedValueContract(ProxyResource): + """NamedValue details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: NamedValue entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.NamedValueContractProperties + """ + + properties: Optional["_models.NamedValueContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """NamedValue entity contract properties.""" + + __flattened_items = ["tags", "secret", "display_name", "value", "key_vault", "provisioning_state"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.NamedValueContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NamedValueEntityBaseParameters(_Model): + """NamedValue Entity Base Parameters set. + + :ivar tags: Optional tags that when provided can be used to filter the NamedValue list. + :vartype tags: list[str] + :ivar secret: Determines whether the value is a secret and should be encrypted or not. Default + value is false. + :vartype secret: bool + """ + + tags: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Optional tags that when provided can be used to filter the NamedValue list.""" + secret: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Determines whether the value is a secret and should be encrypted or not. Default value is + false.""" + + @overload + def __init__( + self, + *, + tags: Optional[list[str]] = None, + secret: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NamedValueContractProperties(NamedValueEntityBaseParameters): + """NamedValue Contract properties. + + :ivar tags: Optional tags that when provided can be used to filter the NamedValue list. + :vartype tags: list[str] + :ivar secret: Determines whether the value is a secret and should be encrypted or not. Default + value is false. + :vartype secret: bool + :ivar display_name: Unique name of NamedValue. It may contain only letters, digits, period, + dash, and underscore characters. Required. + :vartype display_name: str + :ivar value: Value of the NamedValue. Can contain policy expressions. It may not be empty or + consist only of whitespace. This property will not be filled on 'GET' operations! Use + '/listSecrets' POST request to get the value. + :vartype value: str + :ivar key_vault: KeyVault location details of the namedValue. + :vartype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractProperties + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore + characters. Required.""" + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of + whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST + request to get the value.""" + key_vault: Optional["_models.KeyVaultContractProperties"] = rest_field( + name="keyVault", visibility=["read", "create", "update", "delete", "query"] + ) + """KeyVault location details of the namedValue.""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The provisioning state.""" + + @overload + def __init__( + self, + *, + display_name: str, + tags: Optional[list[str]] = None, + secret: Optional[bool] = None, + value: Optional[str] = None, + key_vault: Optional["_models.KeyVaultContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NamedValueCreateContract(ProxyResource): + """NamedValue details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: NamedValue entity contract properties for PUT operation. + :vartype properties: ~azure.mgmt.apimanagement.models.NamedValueCreateContractProperties + """ + + properties: Optional["_models.NamedValueCreateContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """NamedValue entity contract properties for PUT operation.""" + + __flattened_items = ["tags", "secret", "display_name", "value", "key_vault"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.NamedValueCreateContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NamedValueCreateContractProperties(NamedValueEntityBaseParameters): + """NamedValue Contract properties. + + :ivar tags: Optional tags that when provided can be used to filter the NamedValue list. + :vartype tags: list[str] + :ivar secret: Determines whether the value is a secret and should be encrypted or not. Default + value is false. + :vartype secret: bool + :ivar display_name: Unique name of NamedValue. It may contain only letters, digits, period, + dash, and underscore characters. Required. + :vartype display_name: str + :ivar value: Value of the NamedValue. Can contain policy expressions. It may not be empty or + consist only of whitespace. This property will not be filled on 'GET' operations! Use + '/listSecrets' POST request to get the value. + :vartype value: str + :ivar key_vault: KeyVault location details of the namedValue. + :vartype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties + """ + + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore + characters. Required.""" + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of + whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST + request to get the value.""" + key_vault: Optional["_models.KeyVaultContractCreateProperties"] = rest_field( + name="keyVault", visibility=["read", "create", "update", "delete", "query"] + ) + """KeyVault location details of the namedValue.""" + + @overload + def __init__( + self, + *, + display_name: str, + tags: Optional[list[str]] = None, + secret: Optional[bool] = None, + value: Optional[str] = None, + key_vault: Optional["_models.KeyVaultContractCreateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NamedValueSecretContract(_Model): + """Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + + :ivar value: This is secret value of the NamedValue entity. + :vartype value: str + """ + + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """This is secret value of the NamedValue entity.""" + + @overload + def __init__( + self, + *, + value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NamedValueUpdateParameterProperties(NamedValueEntityBaseParameters): + """NamedValue Contract properties. + + :ivar tags: Optional tags that when provided can be used to filter the NamedValue list. + :vartype tags: list[str] + :ivar secret: Determines whether the value is a secret and should be encrypted or not. Default + value is false. + :vartype secret: bool + :ivar display_name: Unique name of NamedValue. It may contain only letters, digits, period, + dash, and underscore characters. + :vartype display_name: str + :ivar value: Value of the NamedValue. Can contain policy expressions. It may not be empty or + consist only of whitespace. + :vartype value: str + :ivar key_vault: KeyVault location details of the namedValue. + :vartype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties + """ + + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore + characters.""" + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of + whitespace.""" + key_vault: Optional["_models.KeyVaultContractCreateProperties"] = rest_field( + name="keyVault", visibility=["read", "create", "update", "delete", "query"] + ) + """KeyVault location details of the namedValue.""" + + @overload + def __init__( + self, + *, + tags: Optional[list[str]] = None, + secret: Optional[bool] = None, + display_name: Optional[str] = None, + value: Optional[str] = None, + key_vault: Optional["_models.KeyVaultContractCreateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NamedValueUpdateParameters(_Model): + """NamedValue update Parameters. + + :ivar properties: NamedValue entity Update contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameterProperties + """ + + properties: Optional["_models.NamedValueUpdateParameterProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """NamedValue entity Update contract properties.""" + + __flattened_items = ["tags", "secret", "display_name", "value", "key_vault"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.NamedValueUpdateParameterProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkStatusContract(_Model): + """Network Status details. + + :ivar dns_servers: Gets the list of DNS servers IPV4 addresses. Required. + :vartype dns_servers: list[str] + :ivar connectivity_status: Gets the list of Connectivity Status to the Resources on which the + service depends upon. Required. + :vartype connectivity_status: list[~azure.mgmt.apimanagement.models.ConnectivityStatusContract] + """ + + dns_servers: list[str] = rest_field(name="dnsServers", visibility=["read", "create", "update", "delete", "query"]) + """Gets the list of DNS servers IPV4 addresses. Required.""" + connectivity_status: list["_models.ConnectivityStatusContract"] = rest_field( + name="connectivityStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Gets the list of Connectivity Status to the Resources on which the service depends upon. + Required.""" + + @overload + def __init__( + self, + *, + dns_servers: list[str], + connectivity_status: list["_models.ConnectivityStatusContract"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkStatusContractByLocation(_Model): + """Network Status in the Location. + + :ivar location: Location of service. + :vartype location: str + :ivar network_status: Network status in Location. + :vartype network_status: ~azure.mgmt.apimanagement.models.NetworkStatusContract + """ + + location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Location of service.""" + network_status: Optional["_models.NetworkStatusContract"] = rest_field( + name="networkStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Network status in Location.""" + + @overload + def __init__( + self, + *, + location: Optional[str] = None, + network_status: Optional["_models.NetworkStatusContract"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NotificationContract(ProxyResource): + """Notification details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Notification entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.NotificationContractProperties + """ + + properties: Optional["_models.NotificationContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Notification entity contract properties.""" + + __flattened_items = ["title", "description", "recipients"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.NotificationContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NotificationContractProperties(_Model): + """Notification Contract properties. + + :ivar title: Title of the Notification. Required. + :vartype title: str + :ivar description: Description of the Notification. + :vartype description: str + :ivar recipients: Recipient Parameter values. + :vartype recipients: ~azure.mgmt.apimanagement.models.RecipientsContractProperties + """ + + title: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Title of the Notification. Required.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of the Notification.""" + recipients: Optional["_models.RecipientsContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Recipient Parameter values.""" + + @overload + def __init__( + self, + *, + title: str, + description: Optional[str] = None, + recipients: Optional["_models.RecipientsContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OAuth2AuthenticationSettingsContract(_Model): + """API OAuth2 Authentication settings details. + + :ivar authorization_server_id: OAuth authorization server identifier. + :vartype authorization_server_id: str + :ivar scope: operations scope. + :vartype scope: str + """ + + authorization_server_id: Optional[str] = rest_field( + name="authorizationServerId", visibility=["read", "create", "update", "delete", "query"] + ) + """OAuth authorization server identifier.""" + scope: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """operations scope.""" + + @overload + def __init__( + self, + *, + authorization_server_id: Optional[str] = None, + scope: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OpenIdAuthenticationSettingsContract(_Model): + """API OAuth2 Authentication settings details. + + :ivar openid_provider_id: OAuth authorization server identifier. + :vartype openid_provider_id: str + :ivar bearer_token_sending_methods: How to send token to the server. + :vartype bearer_token_sending_methods: list[str or + ~azure.mgmt.apimanagement.models.BearerTokenSendingMethods] + """ + + openid_provider_id: Optional[str] = rest_field( + name="openidProviderId", visibility=["read", "create", "update", "delete", "query"] + ) + """OAuth authorization server identifier.""" + bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethods"]]] = rest_field( + name="bearerTokenSendingMethods", visibility=["read", "create", "update", "delete", "query"] + ) + """How to send token to the server.""" + + @overload + def __init__( + self, + *, + openid_provider_id: Optional[str] = None, + bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethods"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OpenidConnectProviderContract(ProxyResource): + """OpenId Connect Provider details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: OpenId Connect Provider contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContractProperties + """ + + properties: Optional["_models.OpenidConnectProviderContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """OpenId Connect Provider contract properties.""" + + __flattened_items = [ + "display_name", + "description", + "metadata_endpoint", + "client_id", + "client_secret", + "use_in_test_console", + "use_in_api_documentation", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.OpenidConnectProviderContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OpenidConnectProviderContractProperties(_Model): + """OpenID Connect Providers Contract. + + :ivar display_name: User-friendly OpenID Connect Provider name. Required. + :vartype display_name: str + :ivar description: User-friendly description of OpenID Connect Provider. + :vartype description: str + :ivar metadata_endpoint: Metadata endpoint URI. Required. + :vartype metadata_endpoint: str + :ivar client_id: Client ID of developer console which is the client application. Required. + :vartype client_id: str + :ivar client_secret: Client Secret of developer console which is the client application. + :vartype client_secret: str + :ivar use_in_test_console: If true, the Open ID Connect provider may be used in the developer + portal test console. True by default if no value is provided. + :vartype use_in_test_console: bool + :ivar use_in_api_documentation: If true, the Open ID Connect provider will be used in the API + documentation in the developer portal. False by default if no value is provided. + :vartype use_in_api_documentation: bool + """ + + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """User-friendly OpenID Connect Provider name. Required.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """User-friendly description of OpenID Connect Provider.""" + metadata_endpoint: str = rest_field( + name="metadataEndpoint", visibility=["read", "create", "update", "delete", "query"] + ) + """Metadata endpoint URI. Required.""" + client_id: str = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"]) + """Client ID of developer console which is the client application. Required.""" + client_secret: Optional[str] = rest_field( + name="clientSecret", visibility=["read", "create", "update", "delete", "query"] + ) + """Client Secret of developer console which is the client application.""" + use_in_test_console: Optional[bool] = rest_field( + name="useInTestConsole", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, the Open ID Connect provider may be used in the developer portal test console. True by + default if no value is provided.""" + use_in_api_documentation: Optional[bool] = rest_field( + name="useInApiDocumentation", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, the Open ID Connect provider will be used in the API documentation in the developer + portal. False by default if no value is provided.""" + + @overload + def __init__( + self, + *, + display_name: str, + metadata_endpoint: str, + client_id: str, + description: Optional[str] = None, + client_secret: Optional[str] = None, + use_in_test_console: Optional[bool] = None, + use_in_api_documentation: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OpenidConnectProviderUpdateContract(_Model): + """Parameters supplied to the Update OpenID Connect Provider operation. + + :ivar properties: OpenId Connect Provider Update contract properties. + :vartype properties: + ~azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContractProperties + """ + + properties: Optional["_models.OpenidConnectProviderUpdateContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """OpenId Connect Provider Update contract properties.""" + + __flattened_items = [ + "display_name", + "description", + "metadata_endpoint", + "client_id", + "client_secret", + "use_in_test_console", + "use_in_api_documentation", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.OpenidConnectProviderUpdateContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OpenidConnectProviderUpdateContractProperties(_Model): # pylint: disable=name-too-long + """Parameters supplied to the Update OpenID Connect Provider operation. + + :ivar display_name: User-friendly OpenID Connect Provider name. + :vartype display_name: str + :ivar description: User-friendly description of OpenID Connect Provider. + :vartype description: str + :ivar metadata_endpoint: Metadata endpoint URI. + :vartype metadata_endpoint: str + :ivar client_id: Client ID of developer console which is the client application. + :vartype client_id: str + :ivar client_secret: Client Secret of developer console which is the client application. + :vartype client_secret: str + :ivar use_in_test_console: If true, the Open ID Connect provider may be used in the developer + portal test console. True by default if no value is provided. + :vartype use_in_test_console: bool + :ivar use_in_api_documentation: If true, the Open ID Connect provider will be used in the API + documentation in the developer portal. False by default if no value is provided. + :vartype use_in_api_documentation: bool + """ + + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """User-friendly OpenID Connect Provider name.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """User-friendly description of OpenID Connect Provider.""" + metadata_endpoint: Optional[str] = rest_field( + name="metadataEndpoint", visibility=["read", "create", "update", "delete", "query"] + ) + """Metadata endpoint URI.""" + client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"]) + """Client ID of developer console which is the client application.""" + client_secret: Optional[str] = rest_field( + name="clientSecret", visibility=["read", "create", "update", "delete", "query"] + ) + """Client Secret of developer console which is the client application.""" + use_in_test_console: Optional[bool] = rest_field( + name="useInTestConsole", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, the Open ID Connect provider may be used in the developer portal test console. True by + default if no value is provided.""" + use_in_api_documentation: Optional[bool] = rest_field( + name="useInApiDocumentation", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, the Open ID Connect provider will be used in the API documentation in the developer + portal. False by default if no value is provided.""" + + @overload + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + metadata_endpoint: Optional[str] = None, + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + use_in_test_console: Optional[bool] = None, + use_in_api_documentation: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Operation(_Model): + """REST API operation. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :ivar display: The object that describes the operation. + :vartype display: ~azure.mgmt.apimanagement.models.OperationDisplay + :ivar origin: The operation origin. + :vartype origin: str + :ivar properties: The operation properties. + :vartype properties: any + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation name: {provider}/{resource}/{operation}.""" + display: Optional["_models.OperationDisplay"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The object that describes the operation.""" + origin: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The operation origin.""" + properties: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The operation properties.""" + + __flattened_items = [""] + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["_models.OperationDisplay"] = None, + origin: Optional[str] = None, + properties: Optional[Any] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OperationContract(ProxyResource): + """API Operation details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Operation Contract. + :vartype properties: ~azure.mgmt.apimanagement.models.OperationContractProperties + """ + + properties: Optional["_models.OperationContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Operation Contract.""" + + __flattened_items = [ + "template_parameters", + "description", + "request", + "responses", + "policies", + "display_name", + "method", + "url_template", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.OperationContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OperationEntityBaseContract(_Model): + """API Operation Entity Base Contract details. + + :ivar template_parameters: Collection of URL template parameters. + :vartype template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] + :ivar description: Description of the operation. May include HTML formatting tags. + :vartype description: str + :ivar request: An entity containing request details. + :vartype request: ~azure.mgmt.apimanagement.models.RequestContract + :ivar responses: Array of Operation responses. + :vartype responses: list[~azure.mgmt.apimanagement.models.ResponseContract] + :ivar policies: Operation Policies. + :vartype policies: str + """ + + template_parameters: Optional[list["_models.ParameterContract"]] = rest_field( + name="templateParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """Collection of URL template parameters.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of the operation. May include HTML formatting tags.""" + request: Optional["_models.RequestContract"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """An entity containing request details.""" + responses: Optional[list["_models.ResponseContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Array of Operation responses.""" + policies: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation Policies.""" + + @overload + def __init__( + self, + *, + template_parameters: Optional[list["_models.ParameterContract"]] = None, + description: Optional[str] = None, + request: Optional["_models.RequestContract"] = None, + responses: Optional[list["_models.ResponseContract"]] = None, + policies: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationContractProperties(OperationEntityBaseContract): + """Operation Contract Properties. + + :ivar template_parameters: Collection of URL template parameters. + :vartype template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] + :ivar description: Description of the operation. May include HTML formatting tags. + :vartype description: str + :ivar request: An entity containing request details. + :vartype request: ~azure.mgmt.apimanagement.models.RequestContract + :ivar responses: Array of Operation responses. + :vartype responses: list[~azure.mgmt.apimanagement.models.ResponseContract] + :ivar policies: Operation Policies. + :vartype policies: str + :ivar display_name: Operation Name. Required. + :vartype display_name: str + :ivar method: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not + limited by only them. Required. + :vartype method: str + :ivar url_template: Relative URL template identifying the target resource for this operation. + May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. Required. + :vartype url_template: str + """ + + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """Operation Name. Required.""" + method: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only + them. Required.""" + url_template: str = rest_field(name="urlTemplate", visibility=["read", "create", "update", "delete", "query"]) + """Relative URL template identifying the target resource for this operation. May include + parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. Required.""" + + @overload + def __init__( + self, + *, + display_name: str, + method: str, + url_template: str, + template_parameters: Optional[list["_models.ParameterContract"]] = None, + description: Optional[str] = None, + request: Optional["_models.RequestContract"] = None, + responses: Optional[list["_models.ResponseContract"]] = None, + policies: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationDisplay(_Model): + """The object that describes the operation. + + :ivar provider: Friendly name of the resource provider. + :vartype provider: str + :ivar operation: Operation type: read, write, delete, listKeys/action, etc. + :vartype operation: str + :ivar resource: Resource type on which the operation is performed. + :vartype resource: str + :ivar description: Friendly name of the operation. + :vartype description: str + """ + + provider: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Friendly name of the resource provider.""" + operation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation type: read, write, delete, listKeys/action, etc.""" + resource: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource type on which the operation is performed.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Friendly name of the operation.""" + + @overload + def __init__( + self, + *, + provider: Optional[str] = None, + operation: Optional[str] = None, + resource: Optional[str] = None, + description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationResultContract(ProxyResource): + """Long Running Git Operation Results. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Operation Contract. + :vartype properties: ~azure.mgmt.apimanagement.models.OperationResultContractProperties + """ + + properties: Optional["_models.OperationResultContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Operation Contract.""" + + __flattened_items = ["id", "status", "started", "updated", "result_info", "error", "action_log"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.OperationResultContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OperationResultContractProperties(_Model): + """Operation Result. + + :ivar id: Operation result identifier. + :vartype id: str + :ivar status: Status of an async operation. Known values are: "Started", "InProgress", + "Succeeded", and "Failed". + :vartype status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus + :ivar started: Start time of an async operation. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype started: ~datetime.datetime + :ivar updated: Last update time of an async operation. The date conforms to the following + format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype updated: ~datetime.datetime + :ivar result_info: Optional result info. + :vartype result_info: str + :ivar error: Error Body Contract. + :vartype error: ~azure.mgmt.apimanagement.models.ErrorResponseBody + :ivar action_log: This property if only provided as part of the TenantConfiguration_Validate + operation. It contains the log the entities which will be updated/created/deleted as part of + the TenantConfiguration_Deploy operation. + :vartype action_log: list[~azure.mgmt.apimanagement.models.OperationResultLogItemContract] + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation result identifier.""" + status: Optional[Union[str, "_models.AsyncOperationStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Status of an async operation. Known values are: \"Started\", \"InProgress\", \"Succeeded\", and + \"Failed\".""" + started: Optional[datetime.datetime] = rest_field( + visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Start time of an async operation. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard.""" + updated: Optional[datetime.datetime] = rest_field( + visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Last update time of an async operation. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard.""" + result_info: Optional[str] = rest_field( + name="resultInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """Optional result info.""" + error: Optional["_models.ErrorResponseBody"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Error Body Contract.""" + action_log: Optional[list["_models.OperationResultLogItemContract"]] = rest_field( + name="actionLog", visibility=["read"] + ) + """This property if only provided as part of the TenantConfiguration_Validate operation. It + contains the log the entities which will be updated/created/deleted as part of the + TenantConfiguration_Deploy operation.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + status: Optional[Union[str, "_models.AsyncOperationStatus"]] = None, + started: Optional[datetime.datetime] = None, + updated: Optional[datetime.datetime] = None, + result_info: Optional[str] = None, + error: Optional["_models.ErrorResponseBody"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationResultLogItemContract(_Model): + """Log of the entity being created, updated or deleted. + + :ivar object_type: The type of entity contract. + :vartype object_type: str + :ivar action: Action like create/update/delete. + :vartype action: str + :ivar object_key: Identifier of the entity being created/updated/deleted. + :vartype object_key: str + """ + + object_type: Optional[str] = rest_field( + name="objectType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of entity contract.""" + action: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Action like create/update/delete.""" + object_key: Optional[str] = rest_field(name="objectKey", visibility=["read", "create", "update", "delete", "query"]) + """Identifier of the entity being created/updated/deleted.""" + + @overload + def __init__( + self, + *, + object_type: Optional[str] = None, + action: Optional[str] = None, + object_key: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationStatusResult(_Model): + """The current status of an async operation. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.apimanagement.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.apimanagement.models.ErrorDetail + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationTagResourceContractProperties(_Model): + """Operation Entity contract Properties. + + :ivar id: Identifier of the operation in form /operations/{operationId}. + :vartype id: str + :ivar name: Operation name. + :vartype name: str + :ivar api_name: API Name. + :vartype api_name: str + :ivar api_revision: API Revision. + :vartype api_revision: str + :ivar api_version: API Version. + :vartype api_version: str + :ivar description: Operation Description. + :vartype description: str + :ivar method: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not + limited by only them. + :vartype method: str + :ivar url_template: Relative URL template identifying the target resource for this operation. + May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. + :vartype url_template: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Identifier of the operation in form /operations/{operationId}.""" + name: Optional[str] = rest_field(visibility=["read"]) + """Operation name.""" + api_name: Optional[str] = rest_field(name="apiName", visibility=["read"]) + """API Name.""" + api_revision: Optional[str] = rest_field(name="apiRevision", visibility=["read"]) + """API Revision.""" + api_version: Optional[str] = rest_field(name="apiVersion", visibility=["read"]) + """API Version.""" + description: Optional[str] = rest_field(visibility=["read"]) + """Operation Description.""" + method: Optional[str] = rest_field(visibility=["read"]) + """A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only + them.""" + url_template: Optional[str] = rest_field(name="urlTemplate", visibility=["read"]) + """Relative URL template identifying the target resource for this operation. May include + parameters. Example: /customers/{cid}/orders/{oid}/?date={date}.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationUpdateContract(_Model): + """API Operation Update Contract details. + + :ivar properties: Properties of the API Operation entity that can be updated. + :vartype properties: ~azure.mgmt.apimanagement.models.OperationUpdateContractProperties + """ + + properties: Optional["_models.OperationUpdateContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the API Operation entity that can be updated.""" + + __flattened_items = [ + "template_parameters", + "description", + "request", + "responses", + "policies", + "display_name", + "method", + "url_template", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.OperationUpdateContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OperationUpdateContractProperties(OperationEntityBaseContract): + """Operation Update Contract Properties. + + :ivar template_parameters: Collection of URL template parameters. + :vartype template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] + :ivar description: Description of the operation. May include HTML formatting tags. + :vartype description: str + :ivar request: An entity containing request details. + :vartype request: ~azure.mgmt.apimanagement.models.RequestContract + :ivar responses: Array of Operation responses. + :vartype responses: list[~azure.mgmt.apimanagement.models.ResponseContract] + :ivar policies: Operation Policies. + :vartype policies: str + :ivar display_name: Operation Name. + :vartype display_name: str + :ivar method: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not + limited by only them. + :vartype method: str + :ivar url_template: Relative URL template identifying the target resource for this operation. + May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. + :vartype url_template: str + """ + + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Operation Name.""" + method: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only + them.""" + url_template: Optional[str] = rest_field( + name="urlTemplate", visibility=["read", "create", "update", "delete", "query"] + ) + """Relative URL template identifying the target resource for this operation. May include + parameters. Example: /customers/{cid}/orders/{oid}/?date={date}.""" + + @overload + def __init__( + self, + *, + template_parameters: Optional[list["_models.ParameterContract"]] = None, + description: Optional[str] = None, + request: Optional["_models.RequestContract"] = None, + responses: Optional[list["_models.ResponseContract"]] = None, + policies: Optional[str] = None, + display_name: Optional[str] = None, + method: Optional[str] = None, + url_template: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OutboundEnvironmentEndpoint(_Model): + """Endpoints accessed for a common purpose that the Api Management Service requires outbound + network access to. + + :ivar category: The type of service accessed by the Api Management Service, e.g., Azure + Storage, Azure SQL Database, and Azure Active Directory. + :vartype category: str + :ivar endpoints: The endpoints that the Api Management Service reaches the service at. + :vartype endpoints: list[~azure.mgmt.apimanagement.models.EndpointDependency] + """ + + category: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL + Database, and Azure Active Directory.""" + endpoints: Optional[list["_models.EndpointDependency"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The endpoints that the Api Management Service reaches the service at.""" + + @overload + def __init__( + self, + *, + category: Optional[str] = None, + endpoints: Optional[list["_models.EndpointDependency"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OutboundEnvironmentEndpointList(_Model): + """Collection of Outbound Environment Endpoints. + + :ivar value: Collection of resources. Required. + :vartype value: list[~azure.mgmt.apimanagement.models.OutboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + value: list["_models.OutboundEnvironmentEndpoint"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Collection of resources. Required.""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read"]) + """Link to next page of resources.""" + + @overload + def __init__( + self, + *, + value: list["_models.OutboundEnvironmentEndpoint"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ParameterContract(_Model): + """Operation parameters details. + + :ivar name: Parameter name. Required. + :vartype name: str + :ivar description: Parameter description. + :vartype description: str + :ivar type: Parameter type. Required. + :vartype type: str + :ivar default_value: Default parameter value. + :vartype default_value: str + :ivar required: Specifies whether parameter is required or not. + :vartype required: bool + :ivar values_property: Parameter values. + :vartype values_property: list[str] + :ivar schema_id: Schema identifier. + :vartype schema_id: str + :ivar type_name: Type name defined by the schema. + :vartype type_name: str + :ivar examples: Exampled defined for the parameter. + :vartype examples: dict[str, ~azure.mgmt.apimanagement.models.ParameterExampleContract] + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Parameter name. Required.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Parameter description.""" + type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Parameter type. Required.""" + default_value: Optional[str] = rest_field( + name="defaultValue", visibility=["read", "create", "update", "delete", "query"] + ) + """Default parameter value.""" + required: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies whether parameter is required or not.""" + values_property: Optional[list[str]] = rest_field( + name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values" + ) + """Parameter values.""" + schema_id: Optional[str] = rest_field(name="schemaId", visibility=["read", "create", "update", "delete", "query"]) + """Schema identifier.""" + type_name: Optional[str] = rest_field(name="typeName", visibility=["read", "create", "update", "delete", "query"]) + """Type name defined by the schema.""" + examples: Optional[dict[str, "_models.ParameterExampleContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Exampled defined for the parameter.""" + + @overload + def __init__( + self, + *, + name: str, + type: str, + description: Optional[str] = None, + default_value: Optional[str] = None, + required: Optional[bool] = None, + values_property: Optional[list[str]] = None, + schema_id: Optional[str] = None, + type_name: Optional[str] = None, + examples: Optional[dict[str, "_models.ParameterExampleContract"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ParameterExampleContract(_Model): + """Parameter example. + + :ivar summary: Short description for the example. + :vartype summary: str + :ivar description: Long description for the example. + :vartype description: str + :ivar value: Example value. May be a primitive value, or an object. + :vartype value: any + :ivar external_value: A URL that points to the literal example. + :vartype external_value: str + """ + + summary: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Short description for the example.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Long description for the example.""" + value: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Example value. May be a primitive value, or an object.""" + external_value: Optional[str] = rest_field( + name="externalValue", visibility=["read", "create", "update", "delete", "query"] + ) + """A URL that points to the literal example.""" + + @overload + def __init__( + self, + *, + summary: Optional[str] = None, + description: Optional[str] = None, + value: Optional[Any] = None, + external_value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PipelineDiagnosticSettings(_Model): + """Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + + :ivar request: Diagnostic settings for request. + :vartype request: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic + :ivar response: Diagnostic settings for response. + :vartype response: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic + """ + + request: Optional["_models.HttpMessageDiagnostic"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Diagnostic settings for request.""" + response: Optional["_models.HttpMessageDiagnostic"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Diagnostic settings for response.""" + + @overload + def __init__( + self, + *, + request: Optional["_models.HttpMessageDiagnostic"] = None, + response: Optional["_models.HttpMessageDiagnostic"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PolicyCollection(_Model): + """The response of the list policy operation. + + :ivar value: Policy Contract value. + :vartype value: list[~azure.mgmt.apimanagement.models.PolicyContract] + :ivar count: Total record count number. + :vartype count: int + :ivar next_link: Next page link if any. + :vartype next_link: str + """ + + value: Optional[list["_models.PolicyContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Policy Contract value.""" + count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Total record count number.""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"]) + """Next page link if any.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.PolicyContract"]] = None, + count: Optional[int] = None, + next_link: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PolicyContract(ProxyResource): + """Policy Contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Policy. + :vartype properties: ~azure.mgmt.apimanagement.models.PolicyContractProperties + """ + + properties: Optional["_models.PolicyContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Policy.""" + + __flattened_items = ["value", "format"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PolicyContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PolicyContractProperties(_Model): + """Policy contract Properties. + + :ivar value: Contents of the Policy as defined by the format. Required. + :vartype value: str + :ivar format: Format of the policyContent. Known values are: "xml", "xml-link", "rawxml", and + "rawxml-link". + :vartype format: str or ~azure.mgmt.apimanagement.models.PolicyContentFormat + """ + + value: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Contents of the Policy as defined by the format. Required.""" + format: Optional[Union[str, "_models.PolicyContentFormat"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Format of the policyContent. Known values are: \"xml\", \"xml-link\", \"rawxml\", and + \"rawxml-link\".""" + + @overload + def __init__( + self, + *, + value: str, + format: Optional[Union[str, "_models.PolicyContentFormat"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PolicyDescriptionCollection(_Model): + """Descriptions of API Management policies. + + :ivar value: Descriptions of API Management policies. + :vartype value: list[~azure.mgmt.apimanagement.models.PolicyDescriptionContract] + :ivar count: Total record count number. + :vartype count: int + """ + + value: Optional[list["_models.PolicyDescriptionContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Descriptions of API Management policies.""" + count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Total record count number.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.PolicyDescriptionContract"]] = None, + count: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PolicyDescriptionContract(ProxyResource): + """Policy description details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Policy description contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.PolicyDescriptionContractProperties + """ + + properties: Optional["_models.PolicyDescriptionContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Policy description contract properties.""" + + __flattened_items = ["description", "scope"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PolicyDescriptionContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PolicyDescriptionContractProperties(_Model): + """Policy description properties. + + :ivar description: Policy description. + :vartype description: str + :ivar scope: Binary OR value of the Snippet scope. + :vartype scope: int + """ + + description: Optional[str] = rest_field(visibility=["read"]) + """Policy description.""" + scope: Optional[int] = rest_field(visibility=["read"]) + """Binary OR value of the Snippet scope.""" + + +class PolicyFragmentContract(ProxyResource): + """Policy fragment contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Policy Fragment. + :vartype properties: ~azure.mgmt.apimanagement.models.PolicyFragmentContractProperties + """ + + properties: Optional["_models.PolicyFragmentContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Policy Fragment.""" + + __flattened_items = ["value", "description", "format", "provisioning_state"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PolicyFragmentContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PolicyFragmentContractProperties(_Model): + """Policy fragment contract properties. + + :ivar value: Contents of the policy fragment. Required. + :vartype value: str + :ivar description: Policy fragment description. + :vartype description: str + :ivar format: Format of the policy fragment content. Known values are: "xml" and "rawxml". + :vartype format: str or ~azure.mgmt.apimanagement.models.PolicyFragmentContentFormat + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + value: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Contents of the policy fragment. Required.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Policy fragment description.""" + format: Optional[Union[str, "_models.PolicyFragmentContentFormat"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Format of the policy fragment content. Known values are: \"xml\" and \"rawxml\".""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The provisioning state.""" + + @overload + def __init__( + self, + *, + value: str, + description: Optional[str] = None, + format: Optional[Union[str, "_models.PolicyFragmentContentFormat"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PolicyRestrictionContract(ProxyResource): + """Policy restriction contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Policy Restriction. + :vartype properties: ~azure.mgmt.apimanagement.models.PolicyRestrictionContractProperties + """ + + properties: Optional["_models.PolicyRestrictionContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Policy Restriction.""" + + __flattened_items = ["scope", "require_base"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PolicyRestrictionContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PolicyRestrictionContractProperties(_Model): + """Policy restrictions contract properties. + + :ivar scope: Path to the policy document. + :vartype scope: str + :ivar require_base: Indicates if base policy should be enforced for the policy document. Known + values are: "true" and "false". + :vartype require_base: str or ~azure.mgmt.apimanagement.models.PolicyRestrictionRequireBase + """ + + scope: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Path to the policy document.""" + require_base: Optional[Union[str, "_models.PolicyRestrictionRequireBase"]] = rest_field( + name="requireBase", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates if base policy should be enforced for the policy document. Known values are: \"true\" + and \"false\".""" + + @overload + def __init__( + self, + *, + scope: Optional[str] = None, + require_base: Optional[Union[str, "_models.PolicyRestrictionRequireBase"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PolicyRestrictionUpdateContract(_Model): + """Policy restriction contract details. + + :ivar properties: Properties of the Policy Restriction. + :vartype properties: ~azure.mgmt.apimanagement.models.PolicyRestrictionContractProperties + """ + + properties: Optional["_models.PolicyRestrictionContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Policy Restriction.""" + + __flattened_items = ["scope", "require_base"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PolicyRestrictionContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PortalConfigContract(ProxyResource): + """The developer portal configuration contract. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: The developer portal configuration contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.PortalConfigProperties + """ + + properties: Optional["_models.PortalConfigProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The developer portal configuration contract properties.""" + + __flattened_items = ["enable_basic_auth", "signin", "signup", "delegation", "cors", "csp"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PortalConfigProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PortalConfigCorsProperties(_Model): + """The developer portal Cross-Origin Resource Sharing (CORS) settings. + + :ivar allowed_origins: Allowed origins, e.g. ``https://trusted.com``. + :vartype allowed_origins: list[str] + """ + + allowed_origins: Optional[list[str]] = rest_field( + name="allowedOrigins", visibility=["read", "create", "update", "delete", "query"] + ) + """Allowed origins, e.g. ``https://trusted.com``.""" + + @overload + def __init__( + self, + *, + allowed_origins: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortalConfigCspProperties(_Model): + """The developer portal Content Security Policy (CSP) settings. + + :ivar mode: The mode of the developer portal Content Security Policy (CSP). Known values are: + "enabled", "disabled", and "reportOnly". + :vartype mode: str or ~azure.mgmt.apimanagement.models.PortalSettingsCspMode + :ivar report_uri: The URLs used by the browser to report CSP violations. + :vartype report_uri: list[str] + :ivar allowed_sources: Allowed sources, e.g. ``*.trusted.com``, ``trusted.com``, ``https://``. + :vartype allowed_sources: list[str] + """ + + mode: Optional[Union[str, "_models.PortalSettingsCspMode"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The mode of the developer portal Content Security Policy (CSP). Known values are: \"enabled\", + \"disabled\", and \"reportOnly\".""" + report_uri: Optional[list[str]] = rest_field( + name="reportUri", visibility=["read", "create", "update", "delete", "query"] + ) + """The URLs used by the browser to report CSP violations.""" + allowed_sources: Optional[list[str]] = rest_field( + name="allowedSources", visibility=["read", "create", "update", "delete", "query"] + ) + """Allowed sources, e.g. ``*.trusted.com``, ``trusted.com``, ``https://``.""" + + @overload + def __init__( + self, + *, + mode: Optional[Union[str, "_models.PortalSettingsCspMode"]] = None, + report_uri: Optional[list[str]] = None, + allowed_sources: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortalConfigDelegationProperties(_Model): + """PortalConfigDelegationProperties. + + :ivar delegate_registration: Enable or disable delegation for user registration. + :vartype delegate_registration: bool + :ivar delegate_subscription: Enable or disable delegation for product subscriptions. + :vartype delegate_subscription: bool + :ivar delegation_url: A delegation endpoint URL. + :vartype delegation_url: str + :ivar validation_key: A base64-encoded validation key to ensure requests originate from Azure + API Management service. + :vartype validation_key: str + """ + + delegate_registration: Optional[bool] = rest_field( + name="delegateRegistration", visibility=["read", "create", "update", "delete", "query"] + ) + """Enable or disable delegation for user registration.""" + delegate_subscription: Optional[bool] = rest_field( + name="delegateSubscription", visibility=["read", "create", "update", "delete", "query"] + ) + """Enable or disable delegation for product subscriptions.""" + delegation_url: Optional[str] = rest_field( + name="delegationUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """A delegation endpoint URL.""" + validation_key: Optional[str] = rest_field( + name="validationKey", visibility=["read", "create", "update", "delete", "query"] + ) + """A base64-encoded validation key to ensure requests originate from Azure API Management service.""" + + @overload + def __init__( + self, + *, + delegate_registration: Optional[bool] = None, + delegate_subscription: Optional[bool] = None, + delegation_url: Optional[str] = None, + validation_key: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortalConfigProperties(_Model): + """The developer portal configuration contract properties. + + :ivar enable_basic_auth: Enable or disable Basic authentication method. + :vartype enable_basic_auth: bool + :ivar signin: + :vartype signin: ~azure.mgmt.apimanagement.models.PortalConfigPropertiesSignin + :ivar signup: + :vartype signup: ~azure.mgmt.apimanagement.models.PortalConfigPropertiesSignup + :ivar delegation: The developer portal delegation settings. + :vartype delegation: ~azure.mgmt.apimanagement.models.PortalConfigDelegationProperties + :ivar cors: The developer portal Cross-Origin Resource Sharing (CORS) settings. + :vartype cors: ~azure.mgmt.apimanagement.models.PortalConfigCorsProperties + :ivar csp: The developer portal Content Security Policy (CSP) settings. + :vartype csp: ~azure.mgmt.apimanagement.models.PortalConfigCspProperties + """ + + enable_basic_auth: Optional[bool] = rest_field( + name="enableBasicAuth", visibility=["read", "create", "update", "delete", "query"] + ) + """Enable or disable Basic authentication method.""" + signin: Optional["_models.PortalConfigPropertiesSignin"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + signup: Optional["_models.PortalConfigPropertiesSignup"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + delegation: Optional["_models.PortalConfigDelegationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The developer portal delegation settings.""" + cors: Optional["_models.PortalConfigCorsProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The developer portal Cross-Origin Resource Sharing (CORS) settings.""" + csp: Optional["_models.PortalConfigCspProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The developer portal Content Security Policy (CSP) settings.""" + + @overload + def __init__( + self, + *, + enable_basic_auth: Optional[bool] = None, + signin: Optional["_models.PortalConfigPropertiesSignin"] = None, + signup: Optional["_models.PortalConfigPropertiesSignup"] = None, + delegation: Optional["_models.PortalConfigDelegationProperties"] = None, + cors: Optional["_models.PortalConfigCorsProperties"] = None, + csp: Optional["_models.PortalConfigCspProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortalConfigPropertiesSignin(_Model): + """PortalConfigPropertiesSignin. + + :ivar require: Redirect anonymous users to the sign-in page. + :vartype require: bool + """ + + require: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Redirect anonymous users to the sign-in page.""" + + @overload + def __init__( + self, + *, + require: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortalConfigPropertiesSignup(_Model): + """PortalConfigPropertiesSignup. + + :ivar terms_of_service: Terms of service settings. + :vartype terms_of_service: + ~azure.mgmt.apimanagement.models.PortalConfigTermsOfServiceProperties + """ + + terms_of_service: Optional["_models.PortalConfigTermsOfServiceProperties"] = rest_field( + name="termsOfService", visibility=["read", "create", "update", "delete", "query"] + ) + """Terms of service settings.""" + + @overload + def __init__( + self, + *, + terms_of_service: Optional["_models.PortalConfigTermsOfServiceProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortalConfigTermsOfServiceProperties(_Model): + """Terms of service contract properties. + + :ivar text: A terms of service text. + :vartype text: str + :ivar require_consent: Ask user for consent to the terms of service. + :vartype require_consent: bool + """ + + text: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A terms of service text.""" + require_consent: Optional[bool] = rest_field( + name="requireConsent", visibility=["read", "create", "update", "delete", "query"] + ) + """Ask user for consent to the terms of service.""" + + @overload + def __init__( + self, + *, + text: Optional[str] = None, + require_consent: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortalDelegationSettings(ProxyResource): + """Delegation settings for a developer portal. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Delegation settings contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.PortalDelegationSettingsProperties + """ + + properties: Optional["_models.PortalDelegationSettingsProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Delegation settings contract properties.""" + + __flattened_items = ["url", "validation_key", "subscriptions", "user_registration"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PortalDelegationSettingsProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PortalDelegationSettingsProperties(_Model): + """Delegation settings contract properties. + + :ivar url: A delegation Url. + :vartype url: str + :ivar validation_key: A base64-encoded validation key to validate, that a request is coming + from Azure API Management. + :vartype validation_key: str + :ivar subscriptions: Subscriptions delegation settings. + :vartype subscriptions: + ~azure.mgmt.apimanagement.models.SubscriptionsDelegationSettingsProperties + :ivar user_registration: User registration delegation settings. + :vartype user_registration: + ~azure.mgmt.apimanagement.models.RegistrationDelegationSettingsProperties + """ + + url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A delegation Url.""" + validation_key: Optional[str] = rest_field( + name="validationKey", visibility=["read", "create", "update", "delete", "query"] + ) + """A base64-encoded validation key to validate, that a request is coming from Azure API + Management.""" + subscriptions: Optional["_models.SubscriptionsDelegationSettingsProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Subscriptions delegation settings.""" + user_registration: Optional["_models.RegistrationDelegationSettingsProperties"] = rest_field( + name="userRegistration", visibility=["read", "create", "update", "delete", "query"] + ) + """User registration delegation settings.""" + + @overload + def __init__( + self, + *, + url: Optional[str] = None, + validation_key: Optional[str] = None, + subscriptions: Optional["_models.SubscriptionsDelegationSettingsProperties"] = None, + user_registration: Optional["_models.RegistrationDelegationSettingsProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortalRevisionContract(ProxyResource): + """Portal Revision's contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the portal revisions. + :vartype properties: ~azure.mgmt.apimanagement.models.PortalRevisionContractProperties + """ + + properties: Optional["_models.PortalRevisionContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the portal revisions.""" + + __flattened_items = [ + "description", + "status_details", + "status", + "is_current", + "created_date_time", + "updated_date_time", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PortalRevisionContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PortalRevisionContractProperties(_Model): + """PortalRevisionContractProperties. + + :ivar description: Portal revision description. + :vartype description: str + :ivar status_details: Portal revision publishing status details. + :vartype status_details: str + :ivar status: Status of the portal's revision. Known values are: "pending", "publishing", + "completed", and "failed". + :vartype status: str or ~azure.mgmt.apimanagement.models.PortalRevisionStatus + :ivar is_current: Indicates if the portal's revision is public. + :vartype is_current: bool + :ivar created_date_time: Portal's revision creation date and time. + :vartype created_date_time: ~datetime.datetime + :ivar updated_date_time: Last updated date and time. + :vartype updated_date_time: ~datetime.datetime + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Portal revision description.""" + status_details: Optional[str] = rest_field(name="statusDetails", visibility=["read"]) + """Portal revision publishing status details.""" + status: Optional[Union[str, "_models.PortalRevisionStatus"]] = rest_field(visibility=["read"]) + """Status of the portal's revision. Known values are: \"pending\", \"publishing\", \"completed\", + and \"failed\".""" + is_current: Optional[bool] = rest_field( + name="isCurrent", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates if the portal's revision is public.""" + created_date_time: Optional[datetime.datetime] = rest_field( + name="createdDateTime", visibility=["read"], format="rfc3339" + ) + """Portal's revision creation date and time.""" + updated_date_time: Optional[datetime.datetime] = rest_field( + name="updatedDateTime", visibility=["read"], format="rfc3339" + ) + """Last updated date and time.""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The provisioning state.""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + is_current: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortalSettingsCollection(_Model): + """Descriptions of API Management policies. + + :ivar value: Descriptions of API Management policies. + :vartype value: list[~azure.mgmt.apimanagement.models.PortalSettingsContract] + :ivar count: Total record count number. + :vartype count: int + """ + + value: Optional[list["_models.PortalSettingsContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Descriptions of API Management policies.""" + count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Total record count number.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.PortalSettingsContract"]] = None, + count: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortalSettingsContract(ProxyResource): + """Portal Settings for the Developer Portal. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Portal Settings contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.PortalSettingsContractProperties + """ + + properties: Optional["_models.PortalSettingsContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Portal Settings contract properties.""" + + __flattened_items = ["url", "validation_key", "subscriptions", "user_registration", "enabled", "terms_of_service"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PortalSettingsContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PortalSettingsContractProperties(_Model): + """Sign-in settings contract properties. + + :ivar url: A delegation Url. + :vartype url: str + :ivar validation_key: A base64-encoded validation key to validate, that a request is coming + from Azure API Management. + :vartype validation_key: str + :ivar subscriptions: Subscriptions delegation settings. + :vartype subscriptions: + ~azure.mgmt.apimanagement.models.SubscriptionsDelegationSettingsProperties + :ivar user_registration: User registration delegation settings. + :vartype user_registration: + ~azure.mgmt.apimanagement.models.RegistrationDelegationSettingsProperties + :ivar enabled: Redirect Anonymous users to the Sign-In page. + :vartype enabled: bool + :ivar terms_of_service: Terms of service contract properties. + :vartype terms_of_service: ~azure.mgmt.apimanagement.models.TermsOfServiceProperties + """ + + url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A delegation Url.""" + validation_key: Optional[str] = rest_field( + name="validationKey", visibility=["read", "create", "update", "delete", "query"] + ) + """A base64-encoded validation key to validate, that a request is coming from Azure API + Management.""" + subscriptions: Optional["_models.SubscriptionsDelegationSettingsProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Subscriptions delegation settings.""" + user_registration: Optional["_models.RegistrationDelegationSettingsProperties"] = rest_field( + name="userRegistration", visibility=["read", "create", "update", "delete", "query"] + ) + """User registration delegation settings.""" + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Redirect Anonymous users to the Sign-In page.""" + terms_of_service: Optional["_models.TermsOfServiceProperties"] = rest_field( + name="termsOfService", visibility=["read", "create", "update", "delete", "query"] + ) + """Terms of service contract properties.""" + + @overload + def __init__( + self, + *, + url: Optional[str] = None, + validation_key: Optional[str] = None, + subscriptions: Optional["_models.SubscriptionsDelegationSettingsProperties"] = None, + user_registration: Optional["_models.RegistrationDelegationSettingsProperties"] = None, + enabled: Optional[bool] = None, + terms_of_service: Optional["_models.TermsOfServiceProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortalSettingValidationKeyContract(_Model): + """Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + + :ivar validation_key: This is secret value of the validation key in portal settings. + :vartype validation_key: str + """ + + validation_key: Optional[str] = rest_field( + name="validationKey", visibility=["read", "create", "update", "delete", "query"] + ) + """This is secret value of the validation key in portal settings.""" + + @overload + def __init__( + self, + *, + validation_key: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortalSigninSettingProperties(_Model): + """Sign-in settings contract properties. + + :ivar enabled: Redirect Anonymous users to the Sign-In page. + :vartype enabled: bool + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Redirect Anonymous users to the Sign-In page.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortalSigninSettings(ProxyResource): + """Sign-In settings for the Developer Portal. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Sign-in settings contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.PortalSigninSettingProperties + """ + + properties: Optional["_models.PortalSigninSettingProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Sign-in settings contract properties.""" + + __flattened_items = ["enabled"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PortalSigninSettingProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PortalSignupSettings(ProxyResource): + """Sign-Up settings for a developer portal. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Sign-up settings contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.PortalSignupSettingsProperties + """ + + properties: Optional["_models.PortalSignupSettingsProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Sign-up settings contract properties.""" + + __flattened_items = ["enabled", "terms_of_service"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PortalSignupSettingsProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PortalSignupSettingsProperties(_Model): + """Sign-up settings contract properties. + + :ivar enabled: Allow users to sign up on a developer portal. + :vartype enabled: bool + :ivar terms_of_service: Terms of service contract properties. + :vartype terms_of_service: ~azure.mgmt.apimanagement.models.TermsOfServiceProperties + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Allow users to sign up on a developer portal.""" + terms_of_service: Optional["_models.TermsOfServiceProperties"] = rest_field( + name="termsOfService", visibility=["read", "create", "update", "delete", "query"] + ) + """Terms of service contract properties.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + terms_of_service: Optional["_models.TermsOfServiceProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateEndpoint(_Model): + """The private endpoint resource. + + :ivar id: The resource identifier of the private endpoint. + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """The resource identifier of the private endpoint.""" + + +class PrivateEndpointConnection(Resource): + """A private endpoint connection resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Resource properties. + :vartype properties: ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionProperties + """ + + properties: Optional["_models.PrivateEndpointConnectionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Resource properties.""" + + __flattened_items = ["private_endpoint", "private_link_service_connection_state", "provisioning_state"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PrivateEndpointConnectionProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PrivateEndpointConnectionProperties(_Model): + """Properties of the private endpoint connection. + + :ivar private_endpoint: The private endpoint resource. + :vartype private_endpoint: ~azure.mgmt.apimanagement.models.PrivateEndpoint + :ivar private_link_service_connection_state: A collection of information about the state of the + connection between service consumer and provider. Required. + :vartype private_link_service_connection_state: + ~azure.mgmt.apimanagement.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Known values are: "Succeeded", "Creating", "Deleting", and "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionProvisioningState + """ + + private_endpoint: Optional["_models.PrivateEndpoint"] = rest_field( + name="privateEndpoint", visibility=["read", "create", "update", "delete", "query"] + ) + """The private endpoint resource.""" + private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState" = rest_field( + name="privateLinkServiceConnectionState", visibility=["read", "create", "update", "delete", "query"] + ) + """A collection of information about the state of the connection between service consumer and + provider. Required.""" + provisioning_state: Optional[Union[str, "_models.PrivateEndpointConnectionProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioning state of the private endpoint connection resource. Known values are: + \"Succeeded\", \"Creating\", \"Deleting\", and \"Failed\".""" + + @overload + def __init__( + self, + *, + private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState", + private_endpoint: Optional["_models.PrivateEndpoint"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateEndpointConnectionRequest(_Model): + """A request to approve or reject a private endpoint connection. + + :ivar id: Private Endpoint Connection Resource Id. + :vartype id: str + :ivar properties: The connection state of the private endpoint connection. + :vartype properties: + ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequestProperties + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Private Endpoint Connection Resource Id.""" + properties: Optional["_models.PrivateEndpointConnectionRequestProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The connection state of the private endpoint connection.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + properties: Optional["_models.PrivateEndpointConnectionRequestProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateEndpointConnectionRequestProperties(_Model): # pylint: disable=name-too-long + """The connection state of the private endpoint connection. + + :ivar private_link_service_connection_state: A collection of information about the state of the + connection between service consumer and provider. + :vartype private_link_service_connection_state: + ~azure.mgmt.apimanagement.models.PrivateLinkServiceConnectionState + """ + + private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = rest_field( + name="privateLinkServiceConnectionState", visibility=["read", "create", "update", "delete", "query"] + ) + """A collection of information about the state of the connection between service consumer and + provider.""" + + @overload + def __init__( + self, + *, + private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateEndpointConnectionWrapperProperties(_Model): # pylint: disable=name-too-long + """Properties of the PrivateEndpointConnectProperties. + + :ivar private_endpoint: The resource of private end point. + :vartype private_endpoint: ~azure.mgmt.apimanagement.models.ArmIdWrapper + :ivar private_link_service_connection_state: A collection of information about the state of the + connection between service consumer and provider. Required. + :vartype private_link_service_connection_state: + ~azure.mgmt.apimanagement.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + :vartype provisioning_state: str + :ivar group_ids: All the Group ids. + :vartype group_ids: list[str] + """ + + private_endpoint: Optional["_models.ArmIdWrapper"] = rest_field( + name="privateEndpoint", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource of private end point.""" + private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState" = rest_field( + name="privateLinkServiceConnectionState", visibility=["read", "create", "update", "delete", "query"] + ) + """A collection of information about the state of the connection between service consumer and + provider. Required.""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The provisioning state of the private endpoint connection resource.""" + group_ids: Optional[list[str]] = rest_field(name="groupIds", visibility=["read"]) + """All the Group ids.""" + + @overload + def __init__( + self, + *, + private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState", + private_endpoint: Optional["_models.ArmIdWrapper"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateLinkResource(Resource): + """A private link resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Resource properties. + :vartype properties: ~azure.mgmt.apimanagement.models.PrivateLinkResourceProperties + """ + + properties: Optional["_models.PrivateLinkResourceProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Resource properties.""" + + __flattened_items = ["group_id", "required_members", "required_zone_names"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PrivateLinkResourceProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PrivateLinkResourceListResult(_Model): + """The response of a PrivateLinkResource list operation. + + :ivar value: The PrivateLinkResource items on this page. Required. + :vartype value: list[~azure.mgmt.apimanagement.models.PrivateLinkResource] + :ivar next_link: The link to the next page of items. + :vartype next_link: str + """ + + value: list["_models.PrivateLinkResource"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The PrivateLinkResource items on this page. Required.""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"]) + """The link to the next page of items.""" + + @overload + def __init__( + self, + *, + value: list["_models.PrivateLinkResource"], + next_link: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateLinkResourceProperties(_Model): + """Properties of a private link resource. + + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :ivar required_zone_names: The private link resource private link DNS zone name. + :vartype required_zone_names: list[str] + """ + + group_id: Optional[str] = rest_field(name="groupId", visibility=["read"]) + """The private link resource group id.""" + required_members: Optional[list[str]] = rest_field(name="requiredMembers", visibility=["read"]) + """The private link resource required member names.""" + required_zone_names: Optional[list[str]] = rest_field( + name="requiredZoneNames", visibility=["read", "create", "update", "delete", "query"] + ) + """The private link resource private link DNS zone name.""" + + @overload + def __init__( + self, + *, + required_zone_names: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateLinkServiceConnectionState(_Model): + """A collection of information about the state of the connection between service consumer and + provider. + + :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Known values are: "Pending", "Approved", and "Rejected". + :vartype status: str or ~azure.mgmt.apimanagement.models.PrivateEndpointServiceConnectionStatus + :ivar description: The reason for approval/rejection of the connection. + :vartype description: str + :ivar actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :vartype actions_required: str + """ + + status: Optional[Union[str, "_models.PrivateEndpointServiceConnectionStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + service. Known values are: \"Pending\", \"Approved\", and \"Rejected\".""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The reason for approval/rejection of the connection.""" + actions_required: Optional[str] = rest_field( + name="actionsRequired", visibility=["read", "create", "update", "delete", "query"] + ) + """A message indicating if changes on the service provider require any updates on the consumer.""" + + @overload + def __init__( + self, + *, + status: Optional[Union[str, "_models.PrivateEndpointServiceConnectionStatus"]] = None, + description: Optional[str] = None, + actions_required: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProductApiLinkContract(ProxyResource): + """Product-API link details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Product-API link entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.ProductApiLinkContractProperties + """ + + properties: Optional["_models.ProductApiLinkContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Product-API link entity contract properties.""" + + __flattened_items = ["api_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ProductApiLinkContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ProductApiLinkContractProperties(_Model): + """Product-API link entity properties. + + :ivar api_id: Full resource Id of an API. Required. + :vartype api_id: str + """ + + api_id: str = rest_field(name="apiId", visibility=["read", "create", "update", "delete", "query"]) + """Full resource Id of an API. Required.""" + + @overload + def __init__( + self, + *, + api_id: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProductApplicationContract(_Model): + """Specifies Microsoft Entra settings needed to authorize product API calls using client + applications. + + :ivar entra: Specifies Microsoft Entra settings needed to authorize product API calls using + client application with Microsoft Entra OAuth token. + :vartype entra: ~azure.mgmt.apimanagement.models.ProductApplicationContractEntra + """ + + entra: Optional["_models.ProductApplicationContractEntra"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies Microsoft Entra settings needed to authorize product API calls using client + application with Microsoft Entra OAuth token.""" + + @overload + def __init__( + self, + *, + entra: Optional["_models.ProductApplicationContractEntra"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProductApplicationContractEntra(_Model): + """Specifies Microsoft Entra settings needed to authorize product API calls using client + application with Microsoft Entra OAuth token. + + :ivar application_id: Product facing EntraID application client ID. + :vartype application_id: str + :ivar audience: The EntraID application audience claim. The audience claim is used to validate + the token. + :vartype audience: str + """ + + application_id: Optional[str] = rest_field( + name="applicationId", visibility=["read", "create", "update", "delete", "query"] + ) + """Product facing EntraID application client ID.""" + audience: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The EntraID application audience claim. The audience claim is used to validate the token.""" + + @overload + def __init__( + self, + *, + application_id: Optional[str] = None, + audience: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProductContract(ProxyResource): + """Product details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Product entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.ProductContractProperties + """ + + properties: Optional["_models.ProductContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Product entity contract properties.""" + + __flattened_items = [ + "description", + "terms", + "subscription_required", + "approval_required", + "subscriptions_limit", + "authentication_type", + "application", + "state", + "display_name", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ProductContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ProductEntityBaseParameters(_Model): + """Product Entity Base Parameters. + + :ivar description: Product description. May include HTML formatting tags. + :vartype description: str + :ivar terms: Product terms of use. Developers trying to subscribe to the product will be + presented and required to accept these terms before they can complete the subscription process. + :vartype terms: str + :ivar subscription_required: Whether a product subscription is required for accessing APIs + included in this product. If true, the product is referred to as "protected" and a valid + subscription key is required for a request to an API included in the product to succeed. If + false, the product is referred to as "open" and requests to an API included in the product can + be made without a subscription key. If property is omitted when creating a new product it's + value is assumed to be true. + :vartype subscription_required: bool + :ivar approval_required: whether subscription approval is required. If false, new subscriptions + will be approved automatically enabling developers to call the product’s APIs immediately after + subscribing. If true, administrators must manually approve the subscription before the + developer can any of the product’s APIs. Can be present only if subscriptionRequired property + is present and has a value of false. + :vartype approval_required: bool + :ivar subscriptions_limit: Whether the number of subscriptions a user can have to this product + at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present + only if subscriptionRequired property is present and has a value of false. + :vartype subscriptions_limit: int + :ivar authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :ivar application: Specifies identity provider settings needed to authorize applications API + calls. + :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication + :ivar state: whether product is published or not. Published products are discoverable by users + of developer portal. Non published products are visible only to administrators. Default state + of Product is notPublished. Known values are: "notPublished" and "published". + :vartype state: str or ~azure.mgmt.apimanagement.models.ProductState + """ + + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Product description. May include HTML formatting tags.""" + terms: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Product terms of use. Developers trying to subscribe to the product will be presented and + required to accept these terms before they can complete the subscription process.""" + subscription_required: Optional[bool] = rest_field( + name="subscriptionRequired", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether a product subscription is required for accessing APIs included in this product. If + true, the product is referred to as \"protected\" and a valid subscription key is required for + a request to an API included in the product to succeed. If false, the product is referred to as + \"open\" and requests to an API included in the product can be made without a subscription key. + If property is omitted when creating a new product it's value is assumed to be true.""" + approval_required: Optional[bool] = rest_field( + name="approvalRequired", visibility=["read", "create", "update", "delete", "query"] + ) + """whether subscription approval is required. If false, new subscriptions will be approved + automatically enabling developers to call the product’s APIs immediately after subscribing. If + true, administrators must manually approve the subscription before the developer can any of the + product’s APIs. Can be present only if subscriptionRequired property is present and has a value + of false.""" + subscriptions_limit: Optional[int] = rest_field( + name="subscriptionsLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether the number of subscriptions a user can have to this product at the same time. Set to + null or omit to allow unlimited per user subscriptions. Can be present only if + subscriptionRequired property is present and has a value of false.""" + authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = rest_field( + name="authenticationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of supported authentication for the product. The application configuration is required for + application-token authentication type. The subscription-key authentication type is used by + default. If the property is omitted, the subscription-key authentication type is used.""" + application: Optional["_models.ProductEntityBaseParametersApplication"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies identity provider settings needed to authorize applications API calls.""" + state: Optional[Union[str, "_models.ProductState"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """whether product is published or not. Published products are discoverable by users of developer + portal. Non published products are visible only to administrators. Default state of Product is + notPublished. Known values are: \"notPublished\" and \"published\".""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + terms: Optional[str] = None, + subscription_required: Optional[bool] = None, + approval_required: Optional[bool] = None, + subscriptions_limit: Optional[int] = None, + authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, + application: Optional["_models.ProductEntityBaseParametersApplication"] = None, + state: Optional[Union[str, "_models.ProductState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProductContractProperties(ProductEntityBaseParameters): + """Product profile. + + :ivar description: Product description. May include HTML formatting tags. + :vartype description: str + :ivar terms: Product terms of use. Developers trying to subscribe to the product will be + presented and required to accept these terms before they can complete the subscription process. + :vartype terms: str + :ivar subscription_required: Whether a product subscription is required for accessing APIs + included in this product. If true, the product is referred to as "protected" and a valid + subscription key is required for a request to an API included in the product to succeed. If + false, the product is referred to as "open" and requests to an API included in the product can + be made without a subscription key. If property is omitted when creating a new product it's + value is assumed to be true. + :vartype subscription_required: bool + :ivar approval_required: whether subscription approval is required. If false, new subscriptions + will be approved automatically enabling developers to call the product’s APIs immediately after + subscribing. If true, administrators must manually approve the subscription before the + developer can any of the product’s APIs. Can be present only if subscriptionRequired property + is present and has a value of false. + :vartype approval_required: bool + :ivar subscriptions_limit: Whether the number of subscriptions a user can have to this product + at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present + only if subscriptionRequired property is present and has a value of false. + :vartype subscriptions_limit: int + :ivar authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :ivar application: Specifies identity provider settings needed to authorize applications API + calls. + :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication + :ivar state: whether product is published or not. Published products are discoverable by users + of developer portal. Non published products are visible only to administrators. Default state + of Product is notPublished. Known values are: "notPublished" and "published". + :vartype state: str or ~azure.mgmt.apimanagement.models.ProductState + :ivar display_name: Product name. Required. + :vartype display_name: str + """ + + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """Product name. Required.""" + + @overload + def __init__( + self, + *, + display_name: str, + description: Optional[str] = None, + terms: Optional[str] = None, + subscription_required: Optional[bool] = None, + approval_required: Optional[bool] = None, + subscriptions_limit: Optional[int] = None, + authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, + application: Optional["_models.ProductEntityBaseParametersApplication"] = None, + state: Optional[Union[str, "_models.ProductState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProductEntityBaseParametersApplication(ProductApplicationContract): + """Specifies identity provider settings needed to authorize applications API calls. + + :ivar entra: Specifies Microsoft Entra settings needed to authorize product API calls using + client application with Microsoft Entra OAuth token. + :vartype entra: ~azure.mgmt.apimanagement.models.ProductApplicationContractEntra + """ + + @overload + def __init__( + self, + *, + entra: Optional["_models.ProductApplicationContractEntra"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProductGroupLinkContract(ProxyResource): + """Product-group link details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Product-group link entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.ProductGroupLinkContractProperties + """ + + properties: Optional["_models.ProductGroupLinkContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Product-group link entity contract properties.""" + + __flattened_items = ["group_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ProductGroupLinkContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ProductGroupLinkContractProperties(_Model): + """Product-group link entity properties. + + :ivar group_id: Full resource Id of a group. Required. + :vartype group_id: str + """ + + group_id: str = rest_field(name="groupId", visibility=["read", "create", "update", "delete", "query"]) + """Full resource Id of a group. Required.""" + + @overload + def __init__( + self, + *, + group_id: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProductTagResourceContractProperties(ProductEntityBaseParameters): + """Product profile. + + :ivar description: Product description. May include HTML formatting tags. + :vartype description: str + :ivar terms: Product terms of use. Developers trying to subscribe to the product will be + presented and required to accept these terms before they can complete the subscription process. + :vartype terms: str + :ivar subscription_required: Whether a product subscription is required for accessing APIs + included in this product. If true, the product is referred to as "protected" and a valid + subscription key is required for a request to an API included in the product to succeed. If + false, the product is referred to as "open" and requests to an API included in the product can + be made without a subscription key. If property is omitted when creating a new product it's + value is assumed to be true. + :vartype subscription_required: bool + :ivar approval_required: whether subscription approval is required. If false, new subscriptions + will be approved automatically enabling developers to call the product’s APIs immediately after + subscribing. If true, administrators must manually approve the subscription before the + developer can any of the product’s APIs. Can be present only if subscriptionRequired property + is present and has a value of false. + :vartype approval_required: bool + :ivar subscriptions_limit: Whether the number of subscriptions a user can have to this product + at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present + only if subscriptionRequired property is present and has a value of false. + :vartype subscriptions_limit: int + :ivar authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :ivar application: Specifies identity provider settings needed to authorize applications API + calls. + :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication + :ivar state: whether product is published or not. Published products are discoverable by users + of developer portal. Non published products are visible only to administrators. Default state + of Product is notPublished. Known values are: "notPublished" and "published". + :vartype state: str or ~azure.mgmt.apimanagement.models.ProductState + :ivar id: Identifier of the product in the form of /products/{productId}. + :vartype id: str + :ivar name: Product name. Required. + :vartype name: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Identifier of the product in the form of /products/{productId}.""" + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Product name. Required.""" + + @overload + def __init__( + self, + *, + name: str, + description: Optional[str] = None, + terms: Optional[str] = None, + subscription_required: Optional[bool] = None, + approval_required: Optional[bool] = None, + subscriptions_limit: Optional[int] = None, + authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, + application: Optional["_models.ProductEntityBaseParametersApplication"] = None, + state: Optional[Union[str, "_models.ProductState"]] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProductUpdateParameters(_Model): + """Product Update parameters. + + :ivar properties: Product entity Update contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.ProductUpdateProperties + """ + + properties: Optional["_models.ProductUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Product entity Update contract properties.""" + + __flattened_items = [ + "description", + "terms", + "subscription_required", + "approval_required", + "subscriptions_limit", + "authentication_type", + "application", + "state", + "display_name", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ProductUpdateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ProductUpdateProperties(ProductEntityBaseParameters): + """Parameters supplied to the Update Product operation. + + :ivar description: Product description. May include HTML formatting tags. + :vartype description: str + :ivar terms: Product terms of use. Developers trying to subscribe to the product will be + presented and required to accept these terms before they can complete the subscription process. + :vartype terms: str + :ivar subscription_required: Whether a product subscription is required for accessing APIs + included in this product. If true, the product is referred to as "protected" and a valid + subscription key is required for a request to an API included in the product to succeed. If + false, the product is referred to as "open" and requests to an API included in the product can + be made without a subscription key. If property is omitted when creating a new product it's + value is assumed to be true. + :vartype subscription_required: bool + :ivar approval_required: whether subscription approval is required. If false, new subscriptions + will be approved automatically enabling developers to call the product’s APIs immediately after + subscribing. If true, administrators must manually approve the subscription before the + developer can any of the product’s APIs. Can be present only if subscriptionRequired property + is present and has a value of false. + :vartype approval_required: bool + :ivar subscriptions_limit: Whether the number of subscriptions a user can have to this product + at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present + only if subscriptionRequired property is present and has a value of false. + :vartype subscriptions_limit: int + :ivar authentication_type: Type of supported authentication for the product. The application + configuration is required for application-token authentication type. The subscription-key + authentication type is used by default. If the property is omitted, the subscription-key + authentication type is used. + :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] + :ivar application: Specifies identity provider settings needed to authorize applications API + calls. + :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication + :ivar state: whether product is published or not. Published products are discoverable by users + of developer portal. Non published products are visible only to administrators. Default state + of Product is notPublished. Known values are: "notPublished" and "published". + :vartype state: str or ~azure.mgmt.apimanagement.models.ProductState + :ivar display_name: Product name. + :vartype display_name: str + """ + + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Product name.""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + terms: Optional[str] = None, + subscription_required: Optional[bool] = None, + approval_required: Optional[bool] = None, + subscriptions_limit: Optional[int] = None, + authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, + application: Optional["_models.ProductEntityBaseParametersApplication"] = None, + state: Optional[Union[str, "_models.ProductState"]] = None, + display_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QuotaCounterCollection(_Model): + """Paged Quota Counter list representation. + + :ivar value: Quota counter values. + :vartype value: list[~azure.mgmt.apimanagement.models.QuotaCounterContract] + :ivar count: Total record count number across all pages. + :vartype count: int + :ivar next_link: Next page link if any. + :vartype next_link: str + """ + + value: Optional[list["_models.QuotaCounterContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Quota counter values.""" + count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Total record count number across all pages.""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"]) + """Next page link if any.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.QuotaCounterContract"]] = None, + count: Optional[int] = None, + next_link: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QuotaCounterContract(_Model): + """Quota counter details. + + :ivar counter_key: The Key value of the Counter. Must not be empty. Required. + :vartype counter_key: str + :ivar period_key: Identifier of the Period for which the counter was collected. Must not be + empty. Required. + :vartype period_key: str + :ivar period_start_time: The date of the start of Counter Period. The date conforms to the + following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required. + :vartype period_start_time: ~datetime.datetime + :ivar period_end_time: The date of the end of Counter Period. The date conforms to the + following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required. + :vartype period_end_time: ~datetime.datetime + :ivar value: Quota Value Properties. + :vartype value: ~azure.mgmt.apimanagement.models.QuotaCounterValueContractProperties + """ + + counter_key: str = rest_field(name="counterKey", visibility=["read", "create", "update", "delete", "query"]) + """The Key value of the Counter. Must not be empty. Required.""" + period_key: str = rest_field(name="periodKey", visibility=["read", "create", "update", "delete", "query"]) + """Identifier of the Period for which the counter was collected. Must not be empty. Required.""" + period_start_time: datetime.datetime = rest_field( + name="periodStartTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The date of the start of Counter Period. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required.""" + period_end_time: datetime.datetime = rest_field( + name="periodEndTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The date of the end of Counter Period. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required.""" + value: Optional["_models.QuotaCounterValueContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Quota Value Properties.""" + + @overload + def __init__( + self, + *, + counter_key: str, + period_key: str, + period_start_time: datetime.datetime, + period_end_time: datetime.datetime, + value: Optional["_models.QuotaCounterValueContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QuotaCounterValueContractProperties(_Model): + """Quota counter value details. + + :ivar calls_count: Number of times Counter was called. + :vartype calls_count: int + :ivar kb_transferred: Data Transferred in KiloBytes. + :vartype kb_transferred: float + """ + + calls_count: Optional[int] = rest_field( + name="callsCount", visibility=["read", "create", "update", "delete", "query"] + ) + """Number of times Counter was called.""" + kb_transferred: Optional[float] = rest_field( + name="kbTransferred", visibility=["read", "create", "update", "delete", "query"] + ) + """Data Transferred in KiloBytes.""" + + @overload + def __init__( + self, + *, + calls_count: Optional[int] = None, + kb_transferred: Optional[float] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QuotaCounterValueUpdateContract(_Model): + """Quota counter value details. + + :ivar properties: Quota counter value details. + :vartype properties: ~azure.mgmt.apimanagement.models.QuotaCounterValueContractProperties + """ + + properties: Optional["_models.QuotaCounterValueContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Quota counter value details.""" + + __flattened_items = ["calls_count", "kb_transferred"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.QuotaCounterValueContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class RecipientEmailCollection(_Model): + """Paged Recipient User list representation. + + :ivar value: Page values. + :vartype value: list[~azure.mgmt.apimanagement.models.RecipientEmailContract] + :ivar count: Total record count number across all pages. + :vartype count: int + :ivar next_link: Next page link if any. + :vartype next_link: str + """ + + value: Optional[list["_models.RecipientEmailContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Page values.""" + count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Total record count number across all pages.""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"]) + """Next page link if any.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.RecipientEmailContract"]] = None, + count: Optional[int] = None, + next_link: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RecipientEmailContract(ProxyResource): + """Recipient Email details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Recipient Email contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.RecipientEmailContractProperties + """ + + properties: Optional["_models.RecipientEmailContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Recipient Email contract properties.""" + + __flattened_items = ["email"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.RecipientEmailContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class RecipientEmailContractProperties(_Model): + """Recipient Email Contract Properties. + + :ivar email: User Email subscribed to notification. + :vartype email: str + """ + + email: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """User Email subscribed to notification.""" + + @overload + def __init__( + self, + *, + email: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RecipientsContractProperties(_Model): + """Notification Parameter contract. + + :ivar emails: List of Emails subscribed for the notification. + :vartype emails: list[str] + :ivar users: List of Users subscribed for the notification. + :vartype users: list[str] + """ + + emails: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of Emails subscribed for the notification.""" + users: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of Users subscribed for the notification.""" + + @overload + def __init__( + self, + *, + emails: Optional[list[str]] = None, + users: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RecipientUserCollection(_Model): + """Paged Recipient User list representation. + + :ivar value: Page values. + :vartype value: list[~azure.mgmt.apimanagement.models.RecipientUserContract] + :ivar count: Total record count number across all pages. + :vartype count: int + :ivar next_link: Next page link if any. + :vartype next_link: str + """ + + value: Optional[list["_models.RecipientUserContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Page values.""" + count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Total record count number across all pages.""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"]) + """Next page link if any.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.RecipientUserContract"]] = None, + count: Optional[int] = None, + next_link: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RecipientUserContract(ProxyResource): + """Recipient User details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Recipient User entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.RecipientUsersContractProperties + """ + + properties: Optional["_models.RecipientUsersContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Recipient User entity contract properties.""" + + __flattened_items = ["user_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.RecipientUsersContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class RecipientUsersContractProperties(_Model): + """Recipient User Contract Properties. + + :ivar user_id: API Management UserId subscribed to notification. + :vartype user_id: str + """ + + user_id: Optional[str] = rest_field(name="userId", visibility=["read", "create", "update", "delete", "query"]) + """API Management UserId subscribed to notification.""" + + @overload + def __init__( + self, + *, + user_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RegionContract(_Model): + """Region profile. + + :ivar name: Region name. + :vartype name: str + :ivar is_master_region: whether Region is the master region. + :vartype is_master_region: bool + :ivar is_deleted: whether Region is deleted. + :vartype is_deleted: bool + """ + + name: Optional[str] = rest_field(visibility=["read"]) + """Region name.""" + is_master_region: Optional[bool] = rest_field( + name="isMasterRegion", visibility=["read", "create", "update", "delete", "query"] + ) + """whether Region is the master region.""" + is_deleted: Optional[bool] = rest_field( + name="isDeleted", visibility=["read", "create", "update", "delete", "query"] + ) + """whether Region is deleted.""" + + @overload + def __init__( + self, + *, + is_master_region: Optional[bool] = None, + is_deleted: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RegistrationDelegationSettingsProperties(_Model): + """User registration delegation settings properties. + + :ivar enabled: Enable or disable delegation for user registration. + :vartype enabled: bool + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Enable or disable delegation for user registration.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RemotePrivateEndpointConnectionWrapper(_Model): + """Remote Private Endpoint Connection resource. + + :ivar id: Private Endpoint connection resource id. + :vartype id: str + :ivar name: Private Endpoint Connection Name. + :vartype name: str + :ivar type: Private Endpoint Connection Resource Type. + :vartype type: str + :ivar properties: Resource properties. + :vartype properties: + ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionWrapperProperties + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Private Endpoint connection resource id.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Private Endpoint Connection Name.""" + type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Private Endpoint Connection Resource Type.""" + properties: Optional["_models.PrivateEndpointConnectionWrapperProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Resource properties.""" + + __flattened_items = ["private_endpoint", "private_link_service_connection_state", "provisioning_state", "group_ids"] + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + type: Optional[str] = None, + properties: Optional["_models.PrivateEndpointConnectionWrapperProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ReportRecordContract(_Model): + """Report data. + + :ivar name: Name depending on report endpoint specifies product, API, operation or developer + name. + :vartype name: str + :ivar timestamp: Start of aggregation period. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype timestamp: ~datetime.datetime + :ivar interval: Length of aggregation period. Interval must be multiple of 15 minutes and may + not be zero. The value should be in ISO 8601 format + (`http://en.wikipedia.org/wiki/ISO_8601#Durations + `_). + :vartype interval: str + :ivar country: Country to which this record data is related. + :vartype country: str + :ivar region: Country region to which this record data is related. + :vartype region: str + :ivar zip: Zip code to which this record data is related. + :vartype zip: str + :ivar user_id: User identifier path. /users/{userId}. + :vartype user_id: str + :ivar product_id: Product identifier path. /products/{productId}. + :vartype product_id: str + :ivar api_id: API identifier path. /apis/{apiId}. + :vartype api_id: str + :ivar operation_id: Operation identifier path. /apis/{apiId}/operations/{operationId}. + :vartype operation_id: str + :ivar api_region: API region identifier. + :vartype api_region: str + :ivar subscription_id: Subscription identifier path. /subscriptions/{subscriptionId}. + :vartype subscription_id: str + :ivar call_count_success: Number of successful calls. This includes calls returning + HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect. + :vartype call_count_success: int + :ivar call_count_blocked: Number of calls blocked due to invalid credentials. This includes + calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and + HttpStatusCode.TooManyRequests. + :vartype call_count_blocked: int + :ivar call_count_failed: Number of calls failed due to gateway or backend errors. This includes + calls returning HttpStatusCode.BadRequest(400) and any Code between + HttpStatusCode.InternalServerError (500) and 600. + :vartype call_count_failed: int + :ivar call_count_other: Number of other calls. + :vartype call_count_other: int + :ivar call_count_total: Total number of calls. + :vartype call_count_total: int + :ivar bandwidth: Bandwidth consumed. + :vartype bandwidth: int + :ivar cache_hit_count: Number of times when content was served from cache policy. + :vartype cache_hit_count: int + :ivar cache_miss_count: Number of times content was fetched from backend. + :vartype cache_miss_count: int + :ivar api_time_avg: Average time it took to process request. + :vartype api_time_avg: float + :ivar api_time_min: Minimum time it took to process request. + :vartype api_time_min: float + :ivar api_time_max: Maximum time it took to process request. + :vartype api_time_max: float + :ivar service_time_avg: Average time it took to process request on backend. + :vartype service_time_avg: float + :ivar service_time_min: Minimum time it took to process request on backend. + :vartype service_time_min: float + :ivar service_time_max: Maximum time it took to process request on backend. + :vartype service_time_max: float + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name depending on report endpoint specifies product, API, operation or developer name.""" + timestamp: Optional[datetime.datetime] = rest_field( + visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Start of aggregation period. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard.""" + interval: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The + value should be in ISO 8601 format (`http://en.wikipedia.org/wiki/ISO_8601#Durations + `_).""" + country: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Country to which this record data is related.""" + region: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Country region to which this record data is related.""" + zip: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Zip code to which this record data is related.""" + user_id: Optional[str] = rest_field(name="userId", visibility=["read"]) + """User identifier path. /users/{userId}.""" + product_id: Optional[str] = rest_field(name="productId", visibility=["read"]) + """Product identifier path. /products/{productId}.""" + api_id: Optional[str] = rest_field(name="apiId", visibility=["read", "create", "update", "delete", "query"]) + """API identifier path. /apis/{apiId}.""" + operation_id: Optional[str] = rest_field( + name="operationId", visibility=["read", "create", "update", "delete", "query"] + ) + """Operation identifier path. /apis/{apiId}/operations/{operationId}.""" + api_region: Optional[str] = rest_field(name="apiRegion", visibility=["read", "create", "update", "delete", "query"]) + """API region identifier.""" + subscription_id: Optional[str] = rest_field( + name="subscriptionId", visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription identifier path. /subscriptions/{subscriptionId}.""" + call_count_success: Optional[int] = rest_field( + name="callCountSuccess", visibility=["read", "create", "update", "delete", "query"] + ) + """Number of successful calls. This includes calls returning HttpStatusCode <= 301 and + HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect.""" + call_count_blocked: Optional[int] = rest_field( + name="callCountBlocked", visibility=["read", "create", "update", "delete", "query"] + ) + """Number of calls blocked due to invalid credentials. This includes calls returning + HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests.""" + call_count_failed: Optional[int] = rest_field( + name="callCountFailed", visibility=["read", "create", "update", "delete", "query"] + ) + """Number of calls failed due to gateway or backend errors. This includes calls returning + HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) + and 600.""" + call_count_other: Optional[int] = rest_field( + name="callCountOther", visibility=["read", "create", "update", "delete", "query"] + ) + """Number of other calls.""" + call_count_total: Optional[int] = rest_field( + name="callCountTotal", visibility=["read", "create", "update", "delete", "query"] + ) + """Total number of calls.""" + bandwidth: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Bandwidth consumed.""" + cache_hit_count: Optional[int] = rest_field( + name="cacheHitCount", visibility=["read", "create", "update", "delete", "query"] + ) + """Number of times when content was served from cache policy.""" + cache_miss_count: Optional[int] = rest_field( + name="cacheMissCount", visibility=["read", "create", "update", "delete", "query"] + ) + """Number of times content was fetched from backend.""" + api_time_avg: Optional[float] = rest_field( + name="apiTimeAvg", visibility=["read", "create", "update", "delete", "query"] + ) + """Average time it took to process request.""" + api_time_min: Optional[float] = rest_field( + name="apiTimeMin", visibility=["read", "create", "update", "delete", "query"] + ) + """Minimum time it took to process request.""" + api_time_max: Optional[float] = rest_field( + name="apiTimeMax", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum time it took to process request.""" + service_time_avg: Optional[float] = rest_field( + name="serviceTimeAvg", visibility=["read", "create", "update", "delete", "query"] + ) + """Average time it took to process request on backend.""" + service_time_min: Optional[float] = rest_field( + name="serviceTimeMin", visibility=["read", "create", "update", "delete", "query"] + ) + """Minimum time it took to process request on backend.""" + service_time_max: Optional[float] = rest_field( + name="serviceTimeMax", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum time it took to process request on backend.""" + + @overload + def __init__( # pylint: disable=too-many-locals + self, + *, + name: Optional[str] = None, + timestamp: Optional[datetime.datetime] = None, + interval: Optional[str] = None, + country: Optional[str] = None, + region: Optional[str] = None, + zip: Optional[str] = None, + api_id: Optional[str] = None, + operation_id: Optional[str] = None, + api_region: Optional[str] = None, + subscription_id: Optional[str] = None, + call_count_success: Optional[int] = None, + call_count_blocked: Optional[int] = None, + call_count_failed: Optional[int] = None, + call_count_other: Optional[int] = None, + call_count_total: Optional[int] = None, + bandwidth: Optional[int] = None, + cache_hit_count: Optional[int] = None, + cache_miss_count: Optional[int] = None, + api_time_avg: Optional[float] = None, + api_time_min: Optional[float] = None, + api_time_max: Optional[float] = None, + service_time_avg: Optional[float] = None, + service_time_min: Optional[float] = None, + service_time_max: Optional[float] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RepresentationContract(_Model): + """Operation request/response representation details. + + :ivar content_type: Specifies a registered or custom content type for this representation, e.g. + application/xml. Required. + :vartype content_type: str + :ivar schema_id: Schema identifier. Applicable only if 'contentType' value is neither + 'application/x-www-form-urlencoded' nor 'multipart/form-data'. + :vartype schema_id: str + :ivar type_name: Type name defined by the schema. Applicable only if 'contentType' value is + neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. + :vartype type_name: str + :ivar form_parameters: Collection of form parameters. Required if 'contentType' value is either + 'application/x-www-form-urlencoded' or 'multipart/form-data'.. + :vartype form_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] + :ivar examples: Exampled defined for the representation. + :vartype examples: dict[str, ~azure.mgmt.apimanagement.models.ParameterExampleContract] + """ + + content_type: str = rest_field(name="contentType", visibility=["read", "create", "update", "delete", "query"]) + """Specifies a registered or custom content type for this representation, e.g. application/xml. + Required.""" + schema_id: Optional[str] = rest_field(name="schemaId", visibility=["read", "create", "update", "delete", "query"]) + """Schema identifier. Applicable only if 'contentType' value is neither + 'application/x-www-form-urlencoded' nor 'multipart/form-data'.""" + type_name: Optional[str] = rest_field(name="typeName", visibility=["read", "create", "update", "delete", "query"]) + """Type name defined by the schema. Applicable only if 'contentType' value is neither + 'application/x-www-form-urlencoded' nor 'multipart/form-data'.""" + form_parameters: Optional[list["_models.ParameterContract"]] = rest_field( + name="formParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """Collection of form parameters. Required if 'contentType' value is either + 'application/x-www-form-urlencoded' or 'multipart/form-data'..""" + examples: Optional[dict[str, "_models.ParameterExampleContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Exampled defined for the representation.""" + + @overload + def __init__( + self, + *, + content_type: str, + schema_id: Optional[str] = None, + type_name: Optional[str] = None, + form_parameters: Optional[list["_models.ParameterContract"]] = None, + examples: Optional[dict[str, "_models.ParameterExampleContract"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RequestContract(_Model): + """Operation request details. + + :ivar description: Operation request description. + :vartype description: str + :ivar query_parameters: Collection of operation request query parameters. + :vartype query_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] + :ivar headers: Collection of operation request headers. + :vartype headers: list[~azure.mgmt.apimanagement.models.ParameterContract] + :ivar representations: Collection of operation request representations. + :vartype representations: list[~azure.mgmt.apimanagement.models.RepresentationContract] + """ + + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation request description.""" + query_parameters: Optional[list["_models.ParameterContract"]] = rest_field( + name="queryParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """Collection of operation request query parameters.""" + headers: Optional[list["_models.ParameterContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Collection of operation request headers.""" + representations: Optional[list["_models.RepresentationContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Collection of operation request representations.""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + query_parameters: Optional[list["_models.ParameterContract"]] = None, + headers: Optional[list["_models.ParameterContract"]] = None, + representations: Optional[list["_models.RepresentationContract"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RequestReportRecordContract(_Model): + """Request Report data. + + :ivar api_id: API identifier path. /apis/{apiId}. + :vartype api_id: str + :ivar operation_id: Operation identifier path. /apis/{apiId}/operations/{operationId}. + :vartype operation_id: str + :ivar product_id: Product identifier path. /products/{productId}. + :vartype product_id: str + :ivar user_id: User identifier path. /users/{userId}. + :vartype user_id: str + :ivar method: The HTTP method associated with this request.. + :vartype method: str + :ivar url: The full URL associated with this request. + :vartype url: str + :ivar ip_address: The client IP address associated with this request. + :vartype ip_address: str + :ivar backend_response_code: The HTTP status code received by the gateway as a result of + forwarding this request to the backend. + :vartype backend_response_code: str + :ivar response_code: The HTTP status code returned by the gateway. + :vartype response_code: int + :ivar response_size: The size of the response returned by the gateway. + :vartype response_size: int + :ivar timestamp: The date and time when this request was received by the gateway in ISO 8601 + format. + :vartype timestamp: ~datetime.datetime + :ivar cache: Specifies if response cache was involved in generating the response. If the value + is none, the cache was not used. If the value is hit, cached response was returned. If the + value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by + the backend. + :vartype cache: str + :ivar api_time: The total time it took to process this request. + :vartype api_time: float + :ivar service_time: he time it took to forward this request to the backend and get the response + back. + :vartype service_time: float + :ivar api_region: Azure region where the gateway that processed this request is located. + :vartype api_region: str + :ivar subscription_id: Subscription identifier path. /subscriptions/{subscriptionId}. + :vartype subscription_id: str + :ivar request_id: Request Identifier. + :vartype request_id: str + :ivar request_size: The size of this request.. + :vartype request_size: int + """ + + api_id: Optional[str] = rest_field(name="apiId", visibility=["read", "create", "update", "delete", "query"]) + """API identifier path. /apis/{apiId}.""" + operation_id: Optional[str] = rest_field( + name="operationId", visibility=["read", "create", "update", "delete", "query"] + ) + """Operation identifier path. /apis/{apiId}/operations/{operationId}.""" + product_id: Optional[str] = rest_field(name="productId", visibility=["read"]) + """Product identifier path. /products/{productId}.""" + user_id: Optional[str] = rest_field(name="userId", visibility=["read"]) + """User identifier path. /users/{userId}.""" + method: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The HTTP method associated with this request..""" + url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The full URL associated with this request.""" + ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read", "create", "update", "delete", "query"]) + """The client IP address associated with this request.""" + backend_response_code: Optional[str] = rest_field( + name="backendResponseCode", visibility=["read", "create", "update", "delete", "query"] + ) + """The HTTP status code received by the gateway as a result of forwarding this request to the + backend.""" + response_code: Optional[int] = rest_field( + name="responseCode", visibility=["read", "create", "update", "delete", "query"] + ) + """The HTTP status code returned by the gateway.""" + response_size: Optional[int] = rest_field( + name="responseSize", visibility=["read", "create", "update", "delete", "query"] + ) + """The size of the response returned by the gateway.""" + timestamp: Optional[datetime.datetime] = rest_field( + visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The date and time when this request was received by the gateway in ISO 8601 format.""" + cache: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies if response cache was involved in generating the response. If the value is none, the + cache was not used. If the value is hit, cached response was returned. If the value is miss, + the cache was used but lookup resulted in a miss and request was fulfilled by the backend.""" + api_time: Optional[float] = rest_field(name="apiTime", visibility=["read", "create", "update", "delete", "query"]) + """The total time it took to process this request.""" + service_time: Optional[float] = rest_field( + name="serviceTime", visibility=["read", "create", "update", "delete", "query"] + ) + """he time it took to forward this request to the backend and get the response back.""" + api_region: Optional[str] = rest_field(name="apiRegion", visibility=["read", "create", "update", "delete", "query"]) + """Azure region where the gateway that processed this request is located.""" + subscription_id: Optional[str] = rest_field( + name="subscriptionId", visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription identifier path. /subscriptions/{subscriptionId}.""" + request_id: Optional[str] = rest_field(name="requestId", visibility=["read", "create", "update", "delete", "query"]) + """Request Identifier.""" + request_size: Optional[int] = rest_field( + name="requestSize", visibility=["read", "create", "update", "delete", "query"] + ) + """The size of this request..""" + + @overload + def __init__( + self, + *, + api_id: Optional[str] = None, + operation_id: Optional[str] = None, + method: Optional[str] = None, + url: Optional[str] = None, + ip_address: Optional[str] = None, + backend_response_code: Optional[str] = None, + response_code: Optional[int] = None, + response_size: Optional[int] = None, + timestamp: Optional[datetime.datetime] = None, + cache: Optional[str] = None, + api_time: Optional[float] = None, + service_time: Optional[float] = None, + api_region: Optional[str] = None, + subscription_id: Optional[str] = None, + request_id: Optional[str] = None, + request_size: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResolverContract(ProxyResource): + """GraphQL API Resolver details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Resolver Contract. + :vartype properties: ~azure.mgmt.apimanagement.models.ResolverEntityBaseContract + """ + + properties: Optional["_models.ResolverEntityBaseContract"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Resolver Contract.""" + + __flattened_items = ["display_name", "path", "description"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ResolverEntityBaseContract"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ResolverEntityBaseContract(_Model): + """GraphQL API Resolver Entity Base Contract details. + + :ivar display_name: Resolver Name. + :vartype display_name: str + :ivar path: Path is type/field being resolved. + :vartype path: str + :ivar description: Description of the resolver. May include HTML formatting tags. + :vartype description: str + """ + + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Resolver Name.""" + path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Path is type/field being resolved.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of the resolver. May include HTML formatting tags.""" + + @overload + def __init__( + self, + *, + display_name: Optional[str] = None, + path: Optional[str] = None, + description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResolverUpdateContract(_Model): + """GraphQL API Resolver Update Contract details. + + :ivar properties: Properties of the GraphQL API Resolver entity that can be updated. + :vartype properties: ~azure.mgmt.apimanagement.models.ResolverUpdateContractProperties + """ + + properties: Optional["_models.ResolverUpdateContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the GraphQL API Resolver entity that can be updated.""" + + __flattened_items = ["display_name", "path", "description"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ResolverUpdateContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ResolverUpdateContractProperties(_Model): + """Resolver Update Contract Properties. + + :ivar display_name: Resolver Name. + :vartype display_name: str + :ivar path: Path is type/field being resolved. + :vartype path: str + :ivar description: Description of the resolver. May include HTML formatting tags. + :vartype description: str + """ + + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Resolver Name.""" + path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Path is type/field being resolved.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of the resolver. May include HTML formatting tags.""" + + @overload + def __init__( + self, + *, + display_name: Optional[str] = None, + path: Optional[str] = None, + description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceCollection(_Model): + """A collection of resources. + + :ivar value: A collection of resources. + :vartype value: list[~azure.mgmt.apimanagement.models.ResourceCollectionValueItem] + :ivar count: Total record count number. + :vartype count: int + :ivar next_link: Next page link if any. + :vartype next_link: str + """ + + value: Optional[list["_models.ResourceCollectionValueItem"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """A collection of resources.""" + count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Total record count number.""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"]) + """Next page link if any.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.ResourceCollectionValueItem"]] = None, + count: Optional[int] = None, + next_link: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceCollectionValueItem(ProxyResource): + """ResourceCollectionValueItem. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + """ + + +class ResourceLocationDataContract(_Model): + """Resource location data properties. + + :ivar name: A canonical name for the geographic or physical location. Required. + :vartype name: str + :ivar city: The city or locality where the resource is located. + :vartype city: str + :ivar district: The district, state, or province where the resource is located. + :vartype district: str + :ivar country_or_region: The country or region where the resource is located. + :vartype country_or_region: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A canonical name for the geographic or physical location. Required.""" + city: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The city or locality where the resource is located.""" + district: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The district, state, or province where the resource is located.""" + country_or_region: Optional[str] = rest_field( + name="countryOrRegion", visibility=["read", "create", "update", "delete", "query"] + ) + """The country or region where the resource is located.""" + + @overload + def __init__( + self, + *, + name: str, + city: Optional[str] = None, + district: Optional[str] = None, + country_or_region: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceSku(_Model): + """Describes an available API Management SKU. + + :ivar name: Name of the Sku. Known values are: "Developer", "Standard", "Premium", "Basic", + "Consumption", "Isolated", "BasicV2", "StandardV2", and "PremiumV2". + :vartype name: str or ~azure.mgmt.apimanagement.models.SkuType + """ + + name: Optional[Union[str, "_models.SkuType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Name of the Sku. Known values are: \"Developer\", \"Standard\", \"Premium\", \"Basic\", + \"Consumption\", \"Isolated\", \"BasicV2\", \"StandardV2\", and \"PremiumV2\".""" + + @overload + def __init__( + self, + *, + name: Optional[Union[str, "_models.SkuType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceSkuCapacity(_Model): + """Describes scaling information of a SKU. + + :ivar minimum: The minimum capacity. + :vartype minimum: int + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: int + :ivar default: The default capacity. + :vartype default: int + :ivar scale_type: The scale type applicable to the sku. Known values are: "automatic", + "manual", and "none". + :vartype scale_type: str or ~azure.mgmt.apimanagement.models.ResourceSkuCapacityScaleType + """ + + minimum: Optional[int] = rest_field(visibility=["read"]) + """The minimum capacity.""" + maximum: Optional[int] = rest_field(visibility=["read"]) + """The maximum capacity that can be set.""" + default: Optional[int] = rest_field(visibility=["read"]) + """The default capacity.""" + scale_type: Optional[Union[str, "_models.ResourceSkuCapacityScaleType"]] = rest_field( + name="scaleType", visibility=["read"] + ) + """The scale type applicable to the sku. Known values are: \"automatic\", \"manual\", and + \"none\".""" + + +class ResourceSkuResult(_Model): + """Describes an available API Management service SKU. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar sku: Specifies API Management SKU. + :vartype sku: ~azure.mgmt.apimanagement.models.ResourceSku + :ivar capacity: Specifies the number of API Management units. + :vartype capacity: ~azure.mgmt.apimanagement.models.ResourceSkuCapacity + """ + + resource_type: Optional[str] = rest_field(name="resourceType", visibility=["read"]) + """The type of resource the SKU applies to.""" + sku: Optional["_models.ResourceSku"] = rest_field(visibility=["read"]) + """Specifies API Management SKU.""" + capacity: Optional["_models.ResourceSkuCapacity"] = rest_field(visibility=["read"]) + """Specifies the number of API Management units.""" + + +class ResponseContract(_Model): + """Operation response details. + + :ivar status_code: Operation response HTTP status code. Required. + :vartype status_code: int + :ivar description: Operation response description. + :vartype description: str + :ivar representations: Collection of operation response representations. + :vartype representations: list[~azure.mgmt.apimanagement.models.RepresentationContract] + :ivar headers: Collection of operation response headers. + :vartype headers: list[~azure.mgmt.apimanagement.models.ParameterContract] + """ + + status_code: int = rest_field(name="statusCode", visibility=["read", "create", "update", "delete", "query"]) + """Operation response HTTP status code. Required.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation response description.""" + representations: Optional[list["_models.RepresentationContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Collection of operation response representations.""" + headers: Optional[list["_models.ParameterContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Collection of operation response headers.""" + + @overload + def __init__( + self, + *, + status_code: int, + description: Optional[str] = None, + representations: Optional[list["_models.RepresentationContract"]] = None, + headers: Optional[list["_models.ParameterContract"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SamplingSettings(_Model): + """Sampling settings for Diagnostic. + + :ivar sampling_type: Sampling type. "fixed" + :vartype sampling_type: str or ~azure.mgmt.apimanagement.models.SamplingType + :ivar percentage: Rate of sampling for fixed-rate sampling. + :vartype percentage: float + """ + + sampling_type: Optional[Union[str, "_models.SamplingType"]] = rest_field( + name="samplingType", visibility=["read", "create", "update", "delete", "query"] + ) + """Sampling type. \"fixed\"""" + percentage: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Rate of sampling for fixed-rate sampling.""" + + @overload + def __init__( + self, + *, + sampling_type: Optional[Union[str, "_models.SamplingType"]] = None, + percentage: Optional[float] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SaveConfigurationParameter(_Model): + """Save Tenant Configuration Contract details. + + :ivar properties: Properties of the Save Configuration Parameters. + :vartype properties: ~azure.mgmt.apimanagement.models.SaveConfigurationParameterProperties + """ + + properties: Optional["_models.SaveConfigurationParameterProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Save Configuration Parameters.""" + + __flattened_items = ["branch", "force"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.SaveConfigurationParameterProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class SaveConfigurationParameterProperties(_Model): + """Parameters supplied to the Save Tenant Configuration operation. + + :ivar branch: The name of the Git branch in which to commit the current configuration snapshot. + Required. + :vartype branch: str + :ivar force: The value if true, the current configuration database is committed to the Git + repository, even if the Git repository has newer changes that would be overwritten. + :vartype force: bool + """ + + branch: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the Git branch in which to commit the current configuration snapshot. Required.""" + force: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The value if true, the current configuration database is committed to the Git repository, even + if the Git repository has newer changes that would be overwritten.""" + + @overload + def __init__( + self, + *, + branch: str, + force: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SchemaContract(ProxyResource): + """API Schema Contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the API Schema. + :vartype properties: ~azure.mgmt.apimanagement.models.SchemaContractProperties + """ + + properties: Optional["_models.SchemaContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the API Schema.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.SchemaContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SchemaContractProperties(_Model): + """API Schema create or update contract Properties. + + :ivar content_type: Must be a valid a media type used in a Content-Type header as defined in + the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
+ - ``Swagger`` Schema use ``application/vnd.ms-azure-apim.swagger.definitions+json``
- + ``WSDL`` Schema use ``application/vnd.ms-azure-apim.xsd+xml``
- ``OpenApi`` Schema use + ``application/vnd.oai.openapi.components+json``
- ``WADL Schema`` use + ``application/vnd.ms-azure-apim.wadl.grammars+xml``
- ``OData Schema`` use + ``application/vnd.ms-azure-apim.odata.schema``
- ``gRPC Schema`` use ``text/protobuf``. + Required. + :vartype content_type: str + :ivar document: Create or update Properties of the API Schema Document. Required. + :vartype document: ~azure.mgmt.apimanagement.models.SchemaDocumentProperties + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + """ + + content_type: str = rest_field(name="contentType", visibility=["read", "create", "update", "delete", "query"]) + """Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media + type of the schema document (e.g. application/json, application/xml).
- ``Swagger`` + Schema use ``application/vnd.ms-azure-apim.swagger.definitions+json``
- ``WSDL`` Schema + use ``application/vnd.ms-azure-apim.xsd+xml``
- ``OpenApi`` Schema use + ``application/vnd.oai.openapi.components+json``
- ``WADL Schema`` use + ``application/vnd.ms-azure-apim.wadl.grammars+xml``
- ``OData Schema`` use + ``application/vnd.ms-azure-apim.odata.schema``
- ``gRPC Schema`` use ``text/protobuf``. + Required.""" + document: "_models.SchemaDocumentProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Create or update Properties of the API Schema Document. Required.""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The provisioning state.""" + + __flattened_items = ["value", "definitions", "components"] + + @overload + def __init__( + self, + *, + content_type: str, + document: "_models.SchemaDocumentProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.document is None: + return None + return getattr(self.document, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.document is None: + self.document = self._attr_to_rest_field["document"]._class_type() + setattr(self.document, key, value) + else: + super().__setattr__(key, value) + + +class SchemaDocumentProperties(_Model): + """Api Schema Document Properties. + + :ivar value: Json escaped string defining the document representing the Schema. Used for + schemas other than Swagger/OpenAPI. + :vartype value: str + :ivar definitions: Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. + :vartype definitions: any + :ivar components: Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null + otherwise. + :vartype components: any + """ + + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Json escaped string defining the document representing the Schema. Used for schemas other than + Swagger/OpenAPI.""" + definitions: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise.""" + components: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise.""" + + @overload + def __init__( + self, + *, + value: Optional[str] = None, + definitions: Optional[Any] = None, + components: Optional[Any] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubscriptionContract(ProxyResource): + """Subscription details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Subscription contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.SubscriptionContractProperties + """ + + properties: Optional["_models.SubscriptionContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription contract properties.""" + + __flattened_items = [ + "owner_id", + "scope", + "display_name", + "state", + "created_date", + "start_date", + "expiration_date", + "end_date", + "notification_date", + "primary_key", + "secondary_key", + "state_comment", + "allow_tracing", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.SubscriptionContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class SubscriptionContractProperties(_Model): + """Subscription details. + + :ivar owner_id: The user resource identifier of the subscription owner. The value is a valid + relative URL in the format of /users/{userId} where {userId} is a user identifier. + :vartype owner_id: str + :ivar scope: Scope like /products/{productId} or /apis or /apis/{apiId}. Required. + :vartype scope: str + :ivar display_name: The name of the subscription, or null if the subscription has no name. + :vartype display_name: str + :ivar state: Subscription state. Possible states are * active – the subscription is active, * + suspended – the subscription is blocked, and the subscriber cannot call any APIs of the + product, * submitted – the subscription request has been made by the developer, but has not yet + been approved or rejected, * rejected – the subscription request has been denied by an + administrator, * cancelled – the subscription has been cancelled by the developer or + administrator, * expired – the subscription reached its expiration date and was deactivated. + Required. Known values are: "suspended", "active", "expired", "submitted", "rejected", and + "cancelled". + :vartype state: str or ~azure.mgmt.apimanagement.models.SubscriptionState + :ivar created_date: Subscription creation date. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype created_date: ~datetime.datetime + :ivar start_date: Subscription activation date. The setting is for audit purposes only and the + subscription is not automatically activated. The subscription lifecycle can be managed by using + the ``state`` property. The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as + specified by the ISO 8601 standard. + :vartype start_date: ~datetime.datetime + :ivar expiration_date: Subscription expiration date. The setting is for audit purposes only and + the subscription is not automatically expired. The subscription lifecycle can be managed by + using the ``state`` property. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype expiration_date: ~datetime.datetime + :ivar end_date: Date when subscription was cancelled or expired. The setting is for audit + purposes only and the subscription is not automatically cancelled. The subscription lifecycle + can be managed by using the ``state`` property. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype end_date: ~datetime.datetime + :ivar notification_date: Upcoming subscription expiration notification date. The date conforms + to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype notification_date: ~datetime.datetime + :ivar primary_key: Subscription primary key. This property will not be filled on 'GET' + operations! Use '/listSecrets' POST request to get the value. + :vartype primary_key: str + :ivar secondary_key: Subscription secondary key. This property will not be filled on 'GET' + operations! Use '/listSecrets' POST request to get the value. + :vartype secondary_key: str + :ivar state_comment: Optional subscription comment added by an administrator when the state is + changed to the 'rejected'. + :vartype state_comment: str + :ivar allow_tracing: Determines whether tracing is enabled. + :vartype allow_tracing: bool + """ + + owner_id: Optional[str] = rest_field(name="ownerId", visibility=["read", "create", "update", "delete", "query"]) + """The user resource identifier of the subscription owner. The value is a valid relative URL in + the format of /users/{userId} where {userId} is a user identifier.""" + scope: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Scope like /products/{productId} or /apis or /apis/{apiId}. Required.""" + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the subscription, or null if the subscription has no name.""" + state: Union[str, "_models.SubscriptionState"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription state. Possible states are * active – the subscription is active, * suspended – + the subscription is blocked, and the subscriber cannot call any APIs of the product, * + submitted – the subscription request has been made by the developer, but has not yet been + approved or rejected, * rejected – the subscription request has been denied by an + administrator, * cancelled – the subscription has been cancelled by the developer or + administrator, * expired – the subscription reached its expiration date and was deactivated. + Required. Known values are: \"suspended\", \"active\", \"expired\", \"submitted\", + \"rejected\", and \"cancelled\".""" + created_date: Optional[datetime.datetime] = rest_field(name="createdDate", visibility=["read"], format="rfc3339") + """Subscription creation date. The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` + as specified by the ISO 8601 standard.""" + start_date: Optional[datetime.datetime] = rest_field( + name="startDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Subscription activation date. The setting is for audit purposes only and the subscription is + not automatically activated. The subscription lifecycle can be managed by using the ``state`` + property. The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by + the ISO 8601 standard.""" + expiration_date: Optional[datetime.datetime] = rest_field( + name="expirationDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Subscription expiration date. The setting is for audit purposes only and the subscription is + not automatically expired. The subscription lifecycle can be managed by using the ``state`` + property. The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by + the ISO 8601 standard.""" + end_date: Optional[datetime.datetime] = rest_field( + name="endDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Date when subscription was cancelled or expired. The setting is for audit purposes only and the + subscription is not automatically cancelled. The subscription lifecycle can be managed by using + the ``state`` property. The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as + specified by the ISO 8601 standard.""" + notification_date: Optional[datetime.datetime] = rest_field( + name="notificationDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Upcoming subscription expiration notification date. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard.""" + primary_key: Optional[str] = rest_field( + name="primaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription primary key. This property will not be filled on 'GET' operations! Use + '/listSecrets' POST request to get the value.""" + secondary_key: Optional[str] = rest_field( + name="secondaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription secondary key. This property will not be filled on 'GET' operations! Use + '/listSecrets' POST request to get the value.""" + state_comment: Optional[str] = rest_field( + name="stateComment", visibility=["read", "create", "update", "delete", "query"] + ) + """Optional subscription comment added by an administrator when the state is changed to the + 'rejected'.""" + allow_tracing: Optional[bool] = rest_field( + name="allowTracing", visibility=["read", "create", "update", "delete", "query"] + ) + """Determines whether tracing is enabled.""" + + @overload + def __init__( + self, + *, + scope: str, + state: Union[str, "_models.SubscriptionState"], + owner_id: Optional[str] = None, + display_name: Optional[str] = None, + start_date: Optional[datetime.datetime] = None, + expiration_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + notification_date: Optional[datetime.datetime] = None, + primary_key: Optional[str] = None, + secondary_key: Optional[str] = None, + state_comment: Optional[str] = None, + allow_tracing: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubscriptionCreateParameterProperties(_Model): + """Parameters supplied to the Create subscription operation. + + :ivar owner_id: User (user id path) for whom subscription is being created in form + /users/{userId}. + :vartype owner_id: str + :ivar scope: Scope like /products/{productId} or /apis or /apis/{apiId}. Required. + :vartype scope: str + :ivar display_name: Subscription name. Required. + :vartype display_name: str + :ivar primary_key: Primary subscription key. If not specified during request key will be + generated automatically. + :vartype primary_key: str + :ivar secondary_key: Secondary subscription key. If not specified during request key will be + generated automatically. + :vartype secondary_key: str + :ivar state: Initial subscription state. If no value is specified, subscription is created with + Submitted state. Possible states are * active – the subscription is active, * suspended – the + subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – + the subscription request has been made by the developer, but has not yet been approved or + rejected, * rejected – the subscription request has been denied by an administrator, * + cancelled – the subscription has been cancelled by the developer or administrator, * expired – + the subscription reached its expiration date and was deactivated. Known values are: + "suspended", "active", "expired", "submitted", "rejected", and "cancelled". + :vartype state: str or ~azure.mgmt.apimanagement.models.SubscriptionState + :ivar allow_tracing: Determines whether tracing can be enabled. + :vartype allow_tracing: bool + """ + + owner_id: Optional[str] = rest_field(name="ownerId", visibility=["read", "create", "update", "delete", "query"]) + """User (user id path) for whom subscription is being created in form /users/{userId}.""" + scope: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Scope like /products/{productId} or /apis or /apis/{apiId}. Required.""" + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """Subscription name. Required.""" + primary_key: Optional[str] = rest_field( + name="primaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Primary subscription key. If not specified during request key will be generated automatically.""" + secondary_key: Optional[str] = rest_field( + name="secondaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary subscription key. If not specified during request key will be generated + automatically.""" + state: Optional[Union[str, "_models.SubscriptionState"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Initial subscription state. If no value is specified, subscription is created with Submitted + state. Possible states are * active – the subscription is active, * suspended – the + subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – + the subscription request has been made by the developer, but has not yet been approved or + rejected, * rejected – the subscription request has been denied by an administrator, * + cancelled – the subscription has been cancelled by the developer or administrator, * expired – + the subscription reached its expiration date and was deactivated. Known values are: + \"suspended\", \"active\", \"expired\", \"submitted\", \"rejected\", and \"cancelled\".""" + allow_tracing: Optional[bool] = rest_field( + name="allowTracing", visibility=["read", "create", "update", "delete", "query"] + ) + """Determines whether tracing can be enabled.""" + + @overload + def __init__( + self, + *, + scope: str, + display_name: str, + owner_id: Optional[str] = None, + primary_key: Optional[str] = None, + secondary_key: Optional[str] = None, + state: Optional[Union[str, "_models.SubscriptionState"]] = None, + allow_tracing: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubscriptionCreateParameters(_Model): + """Subscription create details. + + :ivar properties: Subscription contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameterProperties + """ + + properties: Optional["_models.SubscriptionCreateParameterProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription contract properties.""" + + __flattened_items = ["owner_id", "scope", "display_name", "primary_key", "secondary_key", "state", "allow_tracing"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.SubscriptionCreateParameterProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class SubscriptionKeyParameterNamesContract(_Model): + """Subscription key parameter names details. + + :ivar header: Subscription key header name. + :vartype header: str + :ivar query: Subscription key query string parameter name. + :vartype query: str + """ + + header: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Subscription key header name.""" + query: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Subscription key query string parameter name.""" + + @overload + def __init__( + self, + *, + header: Optional[str] = None, + query: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubscriptionKeysContract(_Model): + """Subscription keys. + + :ivar primary_key: Subscription primary key. + :vartype primary_key: str + :ivar secondary_key: Subscription secondary key. + :vartype secondary_key: str + """ + + primary_key: Optional[str] = rest_field( + name="primaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription primary key.""" + secondary_key: Optional[str] = rest_field( + name="secondaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription secondary key.""" + + @overload + def __init__( + self, + *, + primary_key: Optional[str] = None, + secondary_key: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubscriptionsDelegationSettingsProperties(_Model): # pylint: disable=name-too-long + """Subscriptions delegation settings properties. + + :ivar enabled: Enable or disable delegation for subscriptions. + :vartype enabled: bool + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Enable or disable delegation for subscriptions.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubscriptionUpdateParameterProperties(_Model): + """Parameters supplied to the Update subscription operation. + + :ivar owner_id: User identifier path: /users/{userId}. + :vartype owner_id: str + :ivar scope: Scope like /products/{productId} or /apis or /apis/{apiId}. + :vartype scope: str + :ivar expiration_date: Subscription expiration date. The setting is for audit purposes only and + the subscription is not automatically expired. The subscription lifecycle can be managed by + using the ``state`` property. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype expiration_date: ~datetime.datetime + :ivar display_name: Subscription name. + :vartype display_name: str + :ivar primary_key: Primary subscription key. + :vartype primary_key: str + :ivar secondary_key: Secondary subscription key. + :vartype secondary_key: str + :ivar state: Subscription state. Possible states are * active – the subscription is active, * + suspended – the subscription is blocked, and the subscriber cannot call any APIs of the + product, * submitted – the subscription request has been made by the developer, but has not yet + been approved or rejected, * rejected – the subscription request has been denied by an + administrator, * cancelled – the subscription has been cancelled by the developer or + administrator, * expired – the subscription reached its expiration date and was deactivated. + Known values are: "suspended", "active", "expired", "submitted", "rejected", and "cancelled". + :vartype state: str or ~azure.mgmt.apimanagement.models.SubscriptionState + :ivar state_comment: Comments describing subscription state change by the administrator when + the state is changed to the 'rejected'. + :vartype state_comment: str + :ivar allow_tracing: Determines whether tracing can be enabled. + :vartype allow_tracing: bool + """ + + owner_id: Optional[str] = rest_field(name="ownerId", visibility=["read", "create", "update", "delete", "query"]) + """User identifier path: /users/{userId}.""" + scope: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Scope like /products/{productId} or /apis or /apis/{apiId}.""" + expiration_date: Optional[datetime.datetime] = rest_field( + name="expirationDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Subscription expiration date. The setting is for audit purposes only and the subscription is + not automatically expired. The subscription lifecycle can be managed by using the ``state`` + property. The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by + the ISO 8601 standard.""" + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription name.""" + primary_key: Optional[str] = rest_field( + name="primaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Primary subscription key.""" + secondary_key: Optional[str] = rest_field( + name="secondaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary subscription key.""" + state: Optional[Union[str, "_models.SubscriptionState"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription state. Possible states are * active – the subscription is active, * suspended – + the subscription is blocked, and the subscriber cannot call any APIs of the product, * + submitted – the subscription request has been made by the developer, but has not yet been + approved or rejected, * rejected – the subscription request has been denied by an + administrator, * cancelled – the subscription has been cancelled by the developer or + administrator, * expired – the subscription reached its expiration date and was deactivated. + Known values are: \"suspended\", \"active\", \"expired\", \"submitted\", \"rejected\", and + \"cancelled\".""" + state_comment: Optional[str] = rest_field( + name="stateComment", visibility=["read", "create", "update", "delete", "query"] + ) + """Comments describing subscription state change by the administrator when the state is changed to + the 'rejected'.""" + allow_tracing: Optional[bool] = rest_field( + name="allowTracing", visibility=["read", "create", "update", "delete", "query"] + ) + """Determines whether tracing can be enabled.""" + + @overload + def __init__( + self, + *, + owner_id: Optional[str] = None, + scope: Optional[str] = None, + expiration_date: Optional[datetime.datetime] = None, + display_name: Optional[str] = None, + primary_key: Optional[str] = None, + secondary_key: Optional[str] = None, + state: Optional[Union[str, "_models.SubscriptionState"]] = None, + state_comment: Optional[str] = None, + allow_tracing: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubscriptionUpdateParameters(_Model): + """Subscription update details. + + :ivar properties: Subscription Update contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameterProperties + """ + + properties: Optional["_models.SubscriptionUpdateParameterProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription Update contract properties.""" + + __flattened_items = [ + "owner_id", + "scope", + "expiration_date", + "display_name", + "primary_key", + "secondary_key", + "state", + "state_comment", + "allow_tracing", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.SubscriptionUpdateParameterProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class SystemData(_Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or ~azure.mgmt.apimanagement.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.apimanagement.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) + """The identity that created the resource.""" + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="createdByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that created the resource. Known values are: \"User\", \"Application\", + \"ManagedIdentity\", and \"Key\".""" + created_at: Optional[datetime.datetime] = rest_field( + name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource creation (UTC).""" + last_modified_by: Optional[str] = rest_field( + name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"] + ) + """The identity that last modified the resource.""" + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that last modified the resource. Known values are: \"User\", + \"Application\", \"ManagedIdentity\", and \"Key\".""" + last_modified_at: Optional[datetime.datetime] = rest_field( + name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource last modification (UTC).""" + + @overload + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TagApiLinkContract(ProxyResource): + """Tag-API link details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Tag-API link entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.TagApiLinkContractProperties + """ + + properties: Optional["_models.TagApiLinkContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Tag-API link entity contract properties.""" + + __flattened_items = ["api_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.TagApiLinkContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class TagApiLinkContractProperties(_Model): + """Tag-API link entity properties. + + :ivar api_id: Full resource Id of an API. Required. + :vartype api_id: str + """ + + api_id: str = rest_field(name="apiId", visibility=["read", "create", "update", "delete", "query"]) + """Full resource Id of an API. Required.""" + + @overload + def __init__( + self, + *, + api_id: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TagContract(ProxyResource): + """Tag Contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Tag entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.TagContractProperties + """ + + properties: Optional["_models.TagContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Tag entity contract properties.""" + + __flattened_items = ["display_name"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.TagContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class TagContractProperties(_Model): + """Tag contract Properties. + + :ivar display_name: Tag name. Required. + :vartype display_name: str + """ + + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """Tag name. Required.""" + + @overload + def __init__( + self, + *, + display_name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TagCreateUpdateParameters(_Model): + """Parameters supplied to Create/Update Tag operations. + + :ivar properties: Properties supplied to Create Tag operation. + :vartype properties: ~azure.mgmt.apimanagement.models.TagContractProperties + """ + + properties: Optional["_models.TagContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties supplied to Create Tag operation.""" + + __flattened_items = ["display_name"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.TagContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class TagDescriptionBaseProperties(_Model): + """Parameters supplied to the Create TagDescription operation. + + :ivar description: Description of the Tag. + :vartype description: str + :ivar external_docs_url: Absolute URL of external resources describing the tag. + :vartype external_docs_url: str + :ivar external_docs_description: Description of the external resources describing the tag. + :vartype external_docs_description: str + """ + + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of the Tag.""" + external_docs_url: Optional[str] = rest_field( + name="externalDocsUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Absolute URL of external resources describing the tag.""" + external_docs_description: Optional[str] = rest_field( + name="externalDocsDescription", visibility=["read", "create", "update", "delete", "query"] + ) + """Description of the external resources describing the tag.""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + external_docs_url: Optional[str] = None, + external_docs_description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TagDescriptionContract(ProxyResource): + """Contract details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: TagDescription entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.TagDescriptionContractProperties + """ + + properties: Optional["_models.TagDescriptionContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """TagDescription entity contract properties.""" + + __flattened_items = ["description", "external_docs_url", "external_docs_description", "tag_id", "display_name"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.TagDescriptionContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class TagDescriptionContractProperties(TagDescriptionBaseProperties): + """TagDescription contract Properties. + + :ivar description: Description of the Tag. + :vartype description: str + :ivar external_docs_url: Absolute URL of external resources describing the tag. + :vartype external_docs_url: str + :ivar external_docs_description: Description of the external resources describing the tag. + :vartype external_docs_description: str + :ivar tag_id: Identifier of the tag in the form of /tags/{tagId}. + :vartype tag_id: str + :ivar display_name: Tag name. + :vartype display_name: str + """ + + tag_id: Optional[str] = rest_field(name="tagId", visibility=["read", "create", "update", "delete", "query"]) + """Identifier of the tag in the form of /tags/{tagId}.""" + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Tag name.""" + + @overload + def __init__( + self, + *, + description: Optional[str] = None, + external_docs_url: Optional[str] = None, + external_docs_description: Optional[str] = None, + tag_id: Optional[str] = None, + display_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TagDescriptionCreateParameters(_Model): + """Parameters supplied to the Create TagDescription operation. + + :ivar properties: Properties supplied to Create TagDescription operation. + :vartype properties: ~azure.mgmt.apimanagement.models.TagDescriptionBaseProperties + """ + + properties: Optional["_models.TagDescriptionBaseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties supplied to Create TagDescription operation.""" + + __flattened_items = ["description", "external_docs_url", "external_docs_description"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.TagDescriptionBaseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class TagOperationLinkContract(ProxyResource): + """Tag-operation link details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Tag-API link entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.TagOperationLinkContractProperties + """ + + properties: Optional["_models.TagOperationLinkContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Tag-API link entity contract properties.""" + + __flattened_items = ["operation_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.TagOperationLinkContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class TagOperationLinkContractProperties(_Model): + """Tag-operation link entity properties. + + :ivar operation_id: Full resource Id of an API operation. Required. + :vartype operation_id: str + """ + + operation_id: str = rest_field(name="operationId", visibility=["read", "create", "update", "delete", "query"]) + """Full resource Id of an API operation. Required.""" + + @overload + def __init__( + self, + *, + operation_id: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TagProductLinkContract(ProxyResource): + """Tag-product link details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Tag-API link entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.TagProductLinkContractProperties + """ + + properties: Optional["_models.TagProductLinkContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Tag-API link entity contract properties.""" + + __flattened_items = ["product_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.TagProductLinkContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class TagProductLinkContractProperties(_Model): + """Tag-product link entity properties. + + :ivar product_id: Full resource Id of a product. Required. + :vartype product_id: str + """ + + product_id: str = rest_field(name="productId", visibility=["read", "create", "update", "delete", "query"]) + """Full resource Id of a product. Required.""" + + @overload + def __init__( + self, + *, + product_id: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TagResourceContract(_Model): + """TagResource contract properties. + + :ivar tag: Tag associated with the resource. Required. + :vartype tag: ~azure.mgmt.apimanagement.models.TagResourceContractProperties + :ivar api: API associated with the tag. + :vartype api: ~azure.mgmt.apimanagement.models.ApiTagResourceContractProperties + :ivar operation: Operation associated with the tag. + :vartype operation: ~azure.mgmt.apimanagement.models.OperationTagResourceContractProperties + :ivar product: Product associated with the tag. + :vartype product: ~azure.mgmt.apimanagement.models.ProductTagResourceContractProperties + """ + + tag: "_models.TagResourceContractProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Tag associated with the resource. Required.""" + api: Optional["_models.ApiTagResourceContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """API associated with the tag.""" + operation: Optional["_models.OperationTagResourceContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Operation associated with the tag.""" + product: Optional["_models.ProductTagResourceContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Product associated with the tag.""" + + @overload + def __init__( + self, + *, + tag: "_models.TagResourceContractProperties", + api: Optional["_models.ApiTagResourceContractProperties"] = None, + operation: Optional["_models.OperationTagResourceContractProperties"] = None, + product: Optional["_models.ProductTagResourceContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TagResourceContractProperties(_Model): + """Contract defining the Tag property in the Tag Resource Contract. + + :ivar id: Tag identifier. + :vartype id: str + :ivar name: Tag Name. + :vartype name: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Tag identifier.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Tag Name.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TenantConfigurationSyncStateContract(ProxyResource): + """Result of Tenant Configuration Sync State. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties returned Tenant Configuration Sync State check. + :vartype properties: + ~azure.mgmt.apimanagement.models.TenantConfigurationSyncStateContractProperties + """ + + properties: Optional["_models.TenantConfigurationSyncStateContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties returned Tenant Configuration Sync State check.""" + + __flattened_items = [ + "branch", + "commit_id", + "is_export", + "is_synced", + "is_git_enabled", + "sync_date", + "configuration_change_date", + "last_operation_id", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.TenantConfigurationSyncStateContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class TenantConfigurationSyncStateContractProperties(_Model): # pylint: disable=name-too-long + """Tenant Configuration Synchronization State. + + :ivar branch: The name of Git branch. + :vartype branch: str + :ivar commit_id: The latest commit Id. + :vartype commit_id: str + :ivar is_export: value indicating if last sync was save (true) or deploy (false) operation. + :vartype is_export: bool + :ivar is_synced: value indicating if last synchronization was later than the configuration + change. + :vartype is_synced: bool + :ivar is_git_enabled: value indicating whether Git configuration access is enabled. + :vartype is_git_enabled: bool + :ivar sync_date: The date of the latest synchronization. The date conforms to the following + format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype sync_date: ~datetime.datetime + :ivar configuration_change_date: The date of the latest configuration change. The date conforms + to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype configuration_change_date: ~datetime.datetime + :ivar last_operation_id: Most recent tenant configuration operation identifier. + :vartype last_operation_id: str + """ + + branch: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of Git branch.""" + commit_id: Optional[str] = rest_field(name="commitId", visibility=["read", "create", "update", "delete", "query"]) + """The latest commit Id.""" + is_export: Optional[bool] = rest_field(name="isExport", visibility=["read", "create", "update", "delete", "query"]) + """value indicating if last sync was save (true) or deploy (false) operation.""" + is_synced: Optional[bool] = rest_field(name="isSynced", visibility=["read", "create", "update", "delete", "query"]) + """value indicating if last synchronization was later than the configuration change.""" + is_git_enabled: Optional[bool] = rest_field( + name="isGitEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """value indicating whether Git configuration access is enabled.""" + sync_date: Optional[datetime.datetime] = rest_field( + name="syncDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The date of the latest synchronization. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard.""" + configuration_change_date: Optional[datetime.datetime] = rest_field( + name="configurationChangeDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The date of the latest configuration change. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard.""" + last_operation_id: Optional[str] = rest_field( + name="lastOperationId", visibility=["read", "create", "update", "delete", "query"] + ) + """Most recent tenant configuration operation identifier.""" + + @overload + def __init__( + self, + *, + branch: Optional[str] = None, + commit_id: Optional[str] = None, + is_export: Optional[bool] = None, + is_synced: Optional[bool] = None, + is_git_enabled: Optional[bool] = None, + sync_date: Optional[datetime.datetime] = None, + configuration_change_date: Optional[datetime.datetime] = None, + last_operation_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TenantSettingsContract(ProxyResource): + """Tenant Settings. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: TenantSettings entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.TenantSettingsContractProperties + """ + + properties: Optional["_models.TenantSettingsContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """TenantSettings entity contract properties.""" + + __flattened_items = ["settings"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.TenantSettingsContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class TenantSettingsContractProperties(_Model): + """Tenant access information contract of the API Management service. + + :ivar settings: Tenant settings. + :vartype settings: dict[str, str] + """ + + settings: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Tenant settings.""" + + @overload + def __init__( + self, + *, + settings: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TermsOfServiceProperties(_Model): + """Terms of service contract properties. + + :ivar text: A terms of service text. + :vartype text: str + :ivar enabled: Display terms of service during a sign-up process. + :vartype enabled: bool + :ivar consent_required: Ask user for consent to the terms of service. + :vartype consent_required: bool + """ + + text: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A terms of service text.""" + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Display terms of service during a sign-up process.""" + consent_required: Optional[bool] = rest_field( + name="consentRequired", visibility=["read", "create", "update", "delete", "query"] + ) + """Ask user for consent to the terms of service.""" + + @overload + def __init__( + self, + *, + text: Optional[str] = None, + enabled: Optional[bool] = None, + consent_required: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TokenBodyParameterContract(_Model): + """OAuth acquire token request body parameter (www-url-form-encoded). + + :ivar name: body parameter name. Required. + :vartype name: str + :ivar value: body parameter value. Required. + :vartype value: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """body parameter name. Required.""" + value: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """body parameter value. Required.""" + + @overload + def __init__( + self, + *, + name: str, + value: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ToolContract(ProxyResource): + """Tool details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Properties of the Tool Contract. + :vartype properties: ~azure.mgmt.apimanagement.models.ToolContractProperties + """ + + properties: Optional["_models.ToolContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the Tool Contract.""" + + __flattened_items = ["display_name", "description", "operation_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ToolContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ToolContractProperties(_Model): + """ToolContractProperties. + + :ivar display_name: Tool Name. MCP tool name must contain only letters, numbers, underscores, + and hyphens. + :vartype display_name: str + :ivar description: Description of the tool. + :vartype description: str + :ivar operation_id: Identifier of the operation this MCP tool is associated with in the form of + /apis/{apiId}/operations/{operationId}. + :vartype operation_id: str + """ + + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Tool Name. MCP tool name must contain only letters, numbers, underscores, and hyphens.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of the tool.""" + operation_id: Optional[str] = rest_field( + name="operationId", visibility=["read", "create", "update", "delete", "query"] + ) + """Identifier of the operation this MCP tool is associated with in the form of + /apis/{apiId}/operations/{operationId}.""" + + @overload + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + operation_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UserAssignedIdentity(_Model): + """User assigned identity properties. + + :ivar principal_id: The principal ID of the assigned identity. + :vartype principal_id: str + :ivar client_id: The client ID of the assigned identity. + :vartype client_id: str + """ + + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The principal ID of the assigned identity.""" + client_id: Optional[str] = rest_field(name="clientId", visibility=["read"]) + """The client ID of the assigned identity.""" + + +class UserContract(ProxyResource): + """User details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: User entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.UserContractProperties + """ + + properties: Optional["_models.UserContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """User entity contract properties.""" + + __flattened_items = [ + "state", + "note", + "identities", + "first_name", + "last_name", + "email", + "registration_date", + "groups", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.UserContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class UserEntityBaseParameters(_Model): + """User Entity Base Parameters set. + + :ivar state: Account state. Specifies whether the user is active or not. Blocked users are + unable to sign into the developer portal or call any APIs of subscribed products. Default state + is Active. Known values are: "active", "blocked", "pending", and "deleted". + :vartype state: str or ~azure.mgmt.apimanagement.models.UserState + :ivar note: Optional note about a user set by the administrator. + :vartype note: str + :ivar identities: Collection of user identities. + :vartype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] + """ + + state: Optional[Union[str, "_models.UserState"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Account state. Specifies whether the user is active or not. Blocked users are unable to sign + into the developer portal or call any APIs of subscribed products. Default state is Active. + Known values are: \"active\", \"blocked\", \"pending\", and \"deleted\".""" + note: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Optional note about a user set by the administrator.""" + identities: Optional[list["_models.UserIdentityContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Collection of user identities.""" + + @overload + def __init__( + self, + *, + state: Optional[Union[str, "_models.UserState"]] = None, + note: Optional[str] = None, + identities: Optional[list["_models.UserIdentityContract"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UserContractProperties(UserEntityBaseParameters): + """User profile. + + :ivar state: Account state. Specifies whether the user is active or not. Blocked users are + unable to sign into the developer portal or call any APIs of subscribed products. Default state + is Active. Known values are: "active", "blocked", "pending", and "deleted". + :vartype state: str or ~azure.mgmt.apimanagement.models.UserState + :ivar note: Optional note about a user set by the administrator. + :vartype note: str + :ivar identities: Collection of user identities. + :vartype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] + :ivar first_name: First name. + :vartype first_name: str + :ivar last_name: Last name. + :vartype last_name: str + :ivar email: Email address. + :vartype email: str + :ivar registration_date: Date of user registration. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + :vartype registration_date: ~datetime.datetime + :ivar groups: Collection of groups user is part of. + :vartype groups: list[~azure.mgmt.apimanagement.models.GroupContractProperties] + """ + + first_name: Optional[str] = rest_field(name="firstName", visibility=["read", "create", "update", "delete", "query"]) + """First name.""" + last_name: Optional[str] = rest_field(name="lastName", visibility=["read", "create", "update", "delete", "query"]) + """Last name.""" + email: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Email address.""" + registration_date: Optional[datetime.datetime] = rest_field( + name="registrationDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Date of user registration. The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` + as specified by the ISO 8601 standard.""" + groups: Optional[list["_models.GroupContractProperties"]] = rest_field(visibility=["read"]) + """Collection of groups user is part of.""" + + @overload + def __init__( + self, + *, + state: Optional[Union[str, "_models.UserState"]] = None, + note: Optional[str] = None, + identities: Optional[list["_models.UserIdentityContract"]] = None, + first_name: Optional[str] = None, + last_name: Optional[str] = None, + email: Optional[str] = None, + registration_date: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UserCreateParameterProperties(UserEntityBaseParameters): + """Parameters supplied to the Create User operation. + + :ivar state: Account state. Specifies whether the user is active or not. Blocked users are + unable to sign into the developer portal or call any APIs of subscribed products. Default state + is Active. Known values are: "active", "blocked", "pending", and "deleted". + :vartype state: str or ~azure.mgmt.apimanagement.models.UserState + :ivar note: Optional note about a user set by the administrator. + :vartype note: str + :ivar identities: Collection of user identities. + :vartype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] + :ivar email: Email address. Must not be empty and must be unique within the service instance. + Required. + :vartype email: str + :ivar first_name: First name. Required. + :vartype first_name: str + :ivar last_name: Last name. Required. + :vartype last_name: str + :ivar password: User Password. If no value is provided, a default password is generated. + :vartype password: str + :ivar app_type: Determines the type of application which send the create user request. Default + is legacy portal. Known values are: "portal" and "developerPortal". + :vartype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :ivar confirmation: Determines the type of confirmation e-mail that will be sent to the newly + created user. Known values are: "signup" and "invite". + :vartype confirmation: str or ~azure.mgmt.apimanagement.models.Confirmation + """ + + email: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Email address. Must not be empty and must be unique within the service instance. Required.""" + first_name: str = rest_field(name="firstName", visibility=["read", "create", "update", "delete", "query"]) + """First name. Required.""" + last_name: str = rest_field(name="lastName", visibility=["read", "create", "update", "delete", "query"]) + """Last name. Required.""" + password: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """User Password. If no value is provided, a default password is generated.""" + app_type: Optional[Union[str, "_models.AppType"]] = rest_field( + name="appType", visibility=["read", "create", "update", "delete", "query"] + ) + """Determines the type of application which send the create user request. Default is legacy + portal. Known values are: \"portal\" and \"developerPortal\".""" + confirmation: Optional[Union[str, "_models.Confirmation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Determines the type of confirmation e-mail that will be sent to the newly created user. Known + values are: \"signup\" and \"invite\".""" + + @overload + def __init__( + self, + *, + email: str, + first_name: str, + last_name: str, + state: Optional[Union[str, "_models.UserState"]] = None, + note: Optional[str] = None, + identities: Optional[list["_models.UserIdentityContract"]] = None, + password: Optional[str] = None, + app_type: Optional[Union[str, "_models.AppType"]] = None, + confirmation: Optional[Union[str, "_models.Confirmation"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UserCreateParameters(_Model): + """User create details. + + :ivar properties: User entity create contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.UserCreateParameterProperties + """ + + properties: Optional["_models.UserCreateParameterProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """User entity create contract properties.""" + + __flattened_items = [ + "state", + "note", + "identities", + "email", + "first_name", + "last_name", + "password", + "app_type", + "confirmation", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.UserCreateParameterProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class UserIdentityContract(_Model): + """User identity details. + + :ivar provider: Identity provider name. + :vartype provider: str + :ivar id: Identifier value within provider. + :vartype id: str + """ + + provider: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Identity provider name.""" + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Identifier value within provider.""" + + @overload + def __init__( + self, + *, + provider: Optional[str] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UserIdentityProperties(_Model): + """UserIdentityProperties. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + principal_id: Optional[str] = rest_field( + name="principalId", visibility=["read", "create", "update", "delete", "query"] + ) + """The principal id of user assigned identity.""" + client_id: Optional[str] = rest_field(name="clientId", visibility=["read", "create", "update", "delete", "query"]) + """The client id of user assigned identity.""" + + @overload + def __init__( + self, + *, + principal_id: Optional[str] = None, + client_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UserTokenParameterProperties(_Model): + """Parameters supplied to the Get User Token operation. + + :ivar key_type: The Key to be used to generate token for user. Required. Known values are: + "primary" and "secondary". + :vartype key_type: str or ~azure.mgmt.apimanagement.models.KeyType + :ivar expiry: The Expiry time of the Token. Maximum token expiry time is set to 30 days. The + date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 + standard. Required. + :vartype expiry: ~datetime.datetime + """ + + key_type: Union[str, "_models.KeyType"] = rest_field( + name="keyType", visibility=["read", "create", "update", "delete", "query"] + ) + """The Key to be used to generate token for user. Required. Known values are: \"primary\" and + \"secondary\".""" + expiry: datetime.datetime = rest_field(visibility=["read", "create", "update", "delete", "query"], format="rfc3339") + """The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to + the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required.""" + + @overload + def __init__( + self, + *, + key_type: Union[str, "_models.KeyType"], + expiry: datetime.datetime, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UserTokenParameters(_Model): + """Get User Token parameters. + + :ivar properties: User Token Parameter contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.UserTokenParameterProperties + """ + + properties: Optional["_models.UserTokenParameterProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """User Token Parameter contract properties.""" + + __flattened_items = ["key_type", "expiry"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.UserTokenParameterProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class UserTokenResult(_Model): + """Get User Token response details. + + :ivar value: Shared Access Authorization token for the User. + :vartype value: str + """ + + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Shared Access Authorization token for the User.""" + + @overload + def __init__( + self, + *, + value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UserUpdateParameters(_Model): + """User update parameters. + + :ivar properties: User entity update contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.UserUpdateParametersProperties + """ + + properties: Optional["_models.UserUpdateParametersProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """User entity update contract properties.""" + + __flattened_items = ["state", "note", "identities", "email", "password", "first_name", "last_name"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.UserUpdateParametersProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class UserUpdateParametersProperties(UserEntityBaseParameters): + """Parameters supplied to the Update User operation. + + :ivar state: Account state. Specifies whether the user is active or not. Blocked users are + unable to sign into the developer portal or call any APIs of subscribed products. Default state + is Active. Known values are: "active", "blocked", "pending", and "deleted". + :vartype state: str or ~azure.mgmt.apimanagement.models.UserState + :ivar note: Optional note about a user set by the administrator. + :vartype note: str + :ivar identities: Collection of user identities. + :vartype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] + :ivar email: Email address. Must not be empty and must be unique within the service instance. + :vartype email: str + :ivar password: User Password. + :vartype password: str + :ivar first_name: First name. + :vartype first_name: str + :ivar last_name: Last name. + :vartype last_name: str + """ + + email: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Email address. Must not be empty and must be unique within the service instance.""" + password: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """User Password.""" + first_name: Optional[str] = rest_field(name="firstName", visibility=["read", "create", "update", "delete", "query"]) + """First name.""" + last_name: Optional[str] = rest_field(name="lastName", visibility=["read", "create", "update", "delete", "query"]) + """Last name.""" + + @overload + def __init__( + self, + *, + state: Optional[Union[str, "_models.UserState"]] = None, + note: Optional[str] = None, + identities: Optional[list["_models.UserIdentityContract"]] = None, + email: Optional[str] = None, + password: Optional[str] = None, + first_name: Optional[str] = None, + last_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VirtualNetworkConfiguration(_Model): + """Configuration of a virtual network to which API Management service is deployed. + + :ivar vnetid: The virtual network ID. This is typically a GUID. Expect a null GUID by default. + :vartype vnetid: str + :ivar subnetname: The name of the subnet. + :vartype subnetname: str + :ivar subnet_resource_id: The full resource ID of a subnet in a virtual network to deploy the + API Management service in. + :vartype subnet_resource_id: str + """ + + vnetid: Optional[str] = rest_field(visibility=["read"]) + """The virtual network ID. This is typically a GUID. Expect a null GUID by default.""" + subnetname: Optional[str] = rest_field(visibility=["read"]) + """The name of the subnet.""" + subnet_resource_id: Optional[str] = rest_field( + name="subnetResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The full resource ID of a subnet in a virtual network to deploy the API Management service in.""" + + @overload + def __init__( + self, + *, + subnet_resource_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class WikiContract(ProxyResource): + """Wiki properties. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Wiki details. + :vartype properties: ~azure.mgmt.apimanagement.models.WikiContractProperties + """ + + properties: Optional["_models.WikiContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Wiki details.""" + + __flattened_items = ["documents"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.WikiContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class WikiContractProperties(_Model): + """Wiki contract details. + + :ivar documents: Collection wiki documents included into this wiki. + :vartype documents: list[~azure.mgmt.apimanagement.models.WikiDocumentationContract] + """ + + documents: Optional[list["_models.WikiDocumentationContract"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Collection wiki documents included into this wiki.""" + + @overload + def __init__( + self, + *, + documents: Optional[list["_models.WikiDocumentationContract"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class WikiDocumentationContract(_Model): + """Wiki documentation details. + + :ivar documentation_id: Documentation Identifier. + :vartype documentation_id: str + """ + + documentation_id: Optional[str] = rest_field( + name="documentationId", visibility=["read", "create", "update", "delete", "query"] + ) + """Documentation Identifier.""" + + @overload + def __init__( + self, + *, + documentation_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class WikiUpdateContract(_Model): + """Wiki update contract details. + + :ivar properties: Wiki details. + :vartype properties: ~azure.mgmt.apimanagement.models.WikiContractProperties + """ + + properties: Optional["_models.WikiContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Wiki details.""" + + __flattened_items = ["documents"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.WikiContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class WorkspaceContract(ProxyResource): + """Workspace details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData + :ivar properties: Workspace entity contract properties. + :vartype properties: ~azure.mgmt.apimanagement.models.WorkspaceContractProperties + """ + + properties: Optional["_models.WorkspaceContractProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Workspace entity contract properties.""" + + __flattened_items = ["display_name", "description"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.WorkspaceContractProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class WorkspaceContractProperties(_Model): + """Workspace entity properties. + + :ivar display_name: Name of the workspace. Required. + :vartype display_name: str + :ivar description: Description of the workspace. + :vartype description: str + """ + + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """Name of the workspace. Required.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of the workspace.""" + + @overload + def __init__( + self, + *, + display_name: str, + description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class WorkspaceLinksGateway(_Model): + """WorkspaceLinksGateway. + + :ivar id: The link to the API Management gateway. + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The link to the API Management gateway.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class X509CertificateName(_Model): + """Properties of server X509Names. + + :ivar name: Common Name of the Certificate. + :vartype name: str + :ivar issuer_certificate_thumbprint: Thumbprint for the Issuer of the Certificate. + :vartype issuer_certificate_thumbprint: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Common Name of the Certificate.""" + issuer_certificate_thumbprint: Optional[str] = rest_field( + name="issuerCertificateThumbprint", visibility=["read", "create", "update", "delete", "query"] + ) + """Thumbprint for the Issuer of the Certificate.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + issuer_certificate_thumbprint: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py deleted file mode 100644 index 5f32d3fc75ab..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py +++ /dev/null @@ -1,24292 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from collections.abc import MutableMapping -import datetime -from typing import Any, Literal, Optional, TYPE_CHECKING, Union - -from .._utils import serialization as _serialization - -if TYPE_CHECKING: - from .. import models as _models -JSON = MutableMapping[str, Any] - - -class AccessInformationCollection(_serialization.Model): - """Paged AccessInformation list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.AccessInformationContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[AccessInformationContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword count: Total record count number across all pages. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.AccessInformationContract"]] = None - self.count = count - self.next_link: Optional[str] = None - - -class Resource(_serialization.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - - -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have - tags and a location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - -class AccessInformationContract(ProxyResource): - """Tenant Settings. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar id_properties_id: Access Information type ('access' or 'gitAccess'). - :vartype id_properties_id: str - :ivar principal_id: Principal (User) Identifier. - :vartype principal_id: str - :ivar enabled: Determines whether direct access is enabled. - :vartype enabled: bool - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "id_properties_id": {"key": "properties.id", "type": "str"}, - "principal_id": {"key": "properties.principalId", "type": "str"}, - "enabled": {"key": "properties.enabled", "type": "bool"}, - } - - def __init__( - self, - *, - id_properties_id: Optional[str] = None, - principal_id: Optional[str] = None, - enabled: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword id_properties_id: Access Information type ('access' or 'gitAccess'). - :paramtype id_properties_id: str - :keyword principal_id: Principal (User) Identifier. - :paramtype principal_id: str - :keyword enabled: Determines whether direct access is enabled. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.id_properties_id = id_properties_id - self.principal_id = principal_id - self.enabled = enabled - - -class AccessInformationCreateParameters(_serialization.Model): - """Tenant access information update parameters. - - :ivar principal_id: Principal (User) Identifier. - :vartype principal_id: str - :ivar primary_key: Primary access key. This property will not be filled on 'GET' operations! - Use '/listSecrets' POST request to get the value. - :vartype primary_key: str - :ivar secondary_key: Secondary access key. This property will not be filled on 'GET' - operations! Use '/listSecrets' POST request to get the value. - :vartype secondary_key: str - :ivar enabled: Determines whether direct access is enabled. - :vartype enabled: bool - """ - - _attribute_map = { - "principal_id": {"key": "properties.principalId", "type": "str"}, - "primary_key": {"key": "properties.primaryKey", "type": "str"}, - "secondary_key": {"key": "properties.secondaryKey", "type": "str"}, - "enabled": {"key": "properties.enabled", "type": "bool"}, - } - - def __init__( - self, - *, - principal_id: Optional[str] = None, - primary_key: Optional[str] = None, - secondary_key: Optional[str] = None, - enabled: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword principal_id: Principal (User) Identifier. - :paramtype principal_id: str - :keyword primary_key: Primary access key. This property will not be filled on 'GET' operations! - Use '/listSecrets' POST request to get the value. - :paramtype primary_key: str - :keyword secondary_key: Secondary access key. This property will not be filled on 'GET' - operations! Use '/listSecrets' POST request to get the value. - :paramtype secondary_key: str - :keyword enabled: Determines whether direct access is enabled. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.principal_id = principal_id - self.primary_key = primary_key - self.secondary_key = secondary_key - self.enabled = enabled - - -class AccessInformationSecretsContract(_serialization.Model): - """Tenant access information contract of the API Management service. - - :ivar id: Access Information type ('access' or 'gitAccess'). - :vartype id: str - :ivar principal_id: Principal (User) Identifier. - :vartype principal_id: str - :ivar primary_key: Primary access key. This property will not be filled on 'GET' operations! - Use '/listSecrets' POST request to get the value. - :vartype primary_key: str - :ivar secondary_key: Secondary access key. This property will not be filled on 'GET' - operations! Use '/listSecrets' POST request to get the value. - :vartype secondary_key: str - :ivar enabled: Determines whether direct access is enabled. - :vartype enabled: bool - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "principal_id": {"key": "principalId", "type": "str"}, - "primary_key": {"key": "primaryKey", "type": "str"}, - "secondary_key": {"key": "secondaryKey", "type": "str"}, - "enabled": {"key": "enabled", "type": "bool"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - principal_id: Optional[str] = None, - primary_key: Optional[str] = None, - secondary_key: Optional[str] = None, - enabled: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: Access Information type ('access' or 'gitAccess'). - :paramtype id: str - :keyword principal_id: Principal (User) Identifier. - :paramtype principal_id: str - :keyword primary_key: Primary access key. This property will not be filled on 'GET' operations! - Use '/listSecrets' POST request to get the value. - :paramtype primary_key: str - :keyword secondary_key: Secondary access key. This property will not be filled on 'GET' - operations! Use '/listSecrets' POST request to get the value. - :paramtype secondary_key: str - :keyword enabled: Determines whether direct access is enabled. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.id = id - self.principal_id = principal_id - self.primary_key = primary_key - self.secondary_key = secondary_key - self.enabled = enabled - - -class AccessInformationUpdateParameters(_serialization.Model): - """Tenant access information update parameters. - - :ivar enabled: Determines whether direct access is enabled. - :vartype enabled: bool - """ - - _attribute_map = { - "enabled": {"key": "properties.enabled", "type": "bool"}, - } - - def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword enabled: Determines whether direct access is enabled. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.enabled = enabled - - -class AdditionalLocation(_serialization.Model): - """Description of an additional API Management resource location. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar location: The location name of the additional region among Azure Data center regions. - Required. - :vartype location: str - :ivar sku: SKU properties of the API Management service. Required. - :vartype sku: ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties - :ivar zones: A list of availability zones denoting where the resource needs to come from. - :vartype zones: list[str] - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management - service in the additional location. Available only for Basic, Standard, Premium and Isolated - SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management - service which is deployed in an Internal Virtual Network in a particular additional location. - Available only for Basic, Standard, Premium and Isolated SKU. - :vartype private_ip_addresses: list[str] - :ivar public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with - Virtual Network deployed service in the location. Supported only for Premium SKU being deployed - in Virtual Network. - :vartype public_ip_address_id: str - :ivar virtual_network_configuration: Virtual network configuration for the location. - :vartype virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :ivar gateway_regional_url: Gateway URL of the API Management service in the Region. - :vartype gateway_regional_url: str - :ivar nat_gateway_state: Property can be used to enable NAT Gateway for this API Management - service. Known values are: "Enabled" and "Disabled". - :vartype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState - :ivar outbound_public_ip_addresses: Outbound public IPV4 address prefixes associated with NAT - Gateway deployed service. Available only for Premium SKU on stv2 platform. - :vartype outbound_public_ip_addresses: list[str] - :ivar disable_gateway: Property only valid for an Api Management service deployed in multiple - locations. This can be used to disable the gateway in this additional location. - :vartype disable_gateway: bool - :ivar platform_version: Compute Platform Version running the service. Known values are: - "undetermined", "stv1", "stv2", "mtv1", and "stv2.1". - :vartype platform_version: str or ~azure.mgmt.apimanagement.models.PlatformVersion - """ - - _validation = { - "location": {"required": True}, - "sku": {"required": True}, - "public_ip_addresses": {"readonly": True}, - "private_ip_addresses": {"readonly": True}, - "gateway_regional_url": {"readonly": True}, - "outbound_public_ip_addresses": {"readonly": True}, - "platform_version": {"readonly": True}, - } - - _attribute_map = { - "location": {"key": "location", "type": "str"}, - "sku": {"key": "sku", "type": "ApiManagementServiceSkuProperties"}, - "zones": {"key": "zones", "type": "[str]"}, - "public_ip_addresses": {"key": "publicIPAddresses", "type": "[str]"}, - "private_ip_addresses": {"key": "privateIPAddresses", "type": "[str]"}, - "public_ip_address_id": {"key": "publicIpAddressId", "type": "str"}, - "virtual_network_configuration": {"key": "virtualNetworkConfiguration", "type": "VirtualNetworkConfiguration"}, - "gateway_regional_url": {"key": "gatewayRegionalUrl", "type": "str"}, - "nat_gateway_state": {"key": "natGatewayState", "type": "str"}, - "outbound_public_ip_addresses": {"key": "outboundPublicIPAddresses", "type": "[str]"}, - "disable_gateway": {"key": "disableGateway", "type": "bool"}, - "platform_version": {"key": "platformVersion", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - sku: "_models.ApiManagementServiceSkuProperties", - zones: Optional[list[str]] = None, - public_ip_address_id: Optional[str] = None, - virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, - nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, - disable_gateway: bool = False, - **kwargs: Any - ) -> None: - """ - :keyword location: The location name of the additional region among Azure Data center regions. - Required. - :paramtype location: str - :keyword sku: SKU properties of the API Management service. Required. - :paramtype sku: ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties - :keyword zones: A list of availability zones denoting where the resource needs to come from. - :paramtype zones: list[str] - :keyword public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with - Virtual Network deployed service in the location. Supported only for Premium SKU being deployed - in Virtual Network. - :paramtype public_ip_address_id: str - :keyword virtual_network_configuration: Virtual network configuration for the location. - :paramtype virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :keyword nat_gateway_state: Property can be used to enable NAT Gateway for this API Management - service. Known values are: "Enabled" and "Disabled". - :paramtype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState - :keyword disable_gateway: Property only valid for an Api Management service deployed in - multiple locations. This can be used to disable the gateway in this additional location. - :paramtype disable_gateway: bool - """ - super().__init__(**kwargs) - self.location = location - self.sku = sku - self.zones = zones - self.public_ip_addresses: Optional[list[str]] = None - self.private_ip_addresses: Optional[list[str]] = None - self.public_ip_address_id = public_ip_address_id - self.virtual_network_configuration = virtual_network_configuration - self.gateway_regional_url: Optional[str] = None - self.nat_gateway_state = nat_gateway_state - self.outbound_public_ip_addresses: Optional[list[str]] = None - self.disable_gateway = disable_gateway - self.platform_version: Optional[Union[str, "_models.PlatformVersion"]] = None - - -class AllPoliciesCollection(_serialization.Model): - """The response of All Policies. - - :ivar value: AllPolicies Contract value. - :vartype value: list[~azure.mgmt.apimanagement.models.AllPoliciesContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[AllPoliciesContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.AllPoliciesContract"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: AllPolicies Contract value. - :paramtype value: list[~azure.mgmt.apimanagement.models.AllPoliciesContract] - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class AllPoliciesContract(ProxyResource): - """AllPolicies Contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar reference_policy_id: Policy Identifier. - :vartype reference_policy_id: str - :ivar compliance_state: Policy Restriction Compliance State. Known values are: "Pending", - "NonCompliant", and "Compliant". - :vartype compliance_state: str or ~azure.mgmt.apimanagement.models.PolicyComplianceState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "reference_policy_id": {"key": "properties.referencePolicyId", "type": "str"}, - "compliance_state": {"key": "properties.complianceState", "type": "str"}, - } - - def __init__( - self, - *, - reference_policy_id: Optional[str] = None, - compliance_state: Optional[Union[str, "_models.PolicyComplianceState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword reference_policy_id: Policy Identifier. - :paramtype reference_policy_id: str - :keyword compliance_state: Policy Restriction Compliance State. Known values are: "Pending", - "NonCompliant", and "Compliant". - :paramtype compliance_state: str or ~azure.mgmt.apimanagement.models.PolicyComplianceState - """ - super().__init__(**kwargs) - self.reference_policy_id = reference_policy_id - self.compliance_state = compliance_state - - -class ApiCollection(_serialization.Model): - """Paged API list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.ApiContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ApiContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword count: Total record count number across all pages. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.ApiContract"]] = None - self.count = count - self.next_link: Optional[str] = None - - -class ApiContactInformation(_serialization.Model): - """API contact information. - - :ivar name: The identifying name of the contact person/organization. - :vartype name: str - :ivar url: The URL pointing to the contact information. MUST be in the format of a URL. - :vartype url: str - :ivar email: The email address of the contact person/organization. MUST be in the format of an - email address. - :vartype email: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "url": {"key": "url", "type": "str"}, - "email": {"key": "email", "type": "str"}, - } - - def __init__( - self, *, name: Optional[str] = None, url: Optional[str] = None, email: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword name: The identifying name of the contact person/organization. - :paramtype name: str - :keyword url: The URL pointing to the contact information. MUST be in the format of a URL. - :paramtype url: str - :keyword email: The email address of the contact person/organization. MUST be in the format of - an email address. - :paramtype email: str - """ - super().__init__(**kwargs) - self.name = name - self.url = url - self.email = email - - -class ApiContract(ProxyResource): - """API details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar description: Description of the API. May include HTML formatting tags. - :vartype description: str - :ivar authentication_settings: Collection of authentication settings included into this API. - :vartype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :ivar subscription_key_parameter_names: Protocols over which API is made available. - :vartype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :ivar api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", "odata", - and "grpc". - :vartype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :ivar api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :vartype api_revision: str - :ivar api_version: Indicates the version identifier of the API if the API is versioned. - :vartype api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :ivar api_revision_description: Description of the API Revision. - :vartype api_revision_description: str - :ivar api_version_description: Description of the API Version. - :vartype api_version_description: str - :ivar api_version_set_id: A resource identifier for the related ApiVersionSet. - :vartype api_version_set_id: str - :ivar subscription_required: Specifies whether an API or Product subscription is required for - accessing the API. - :vartype subscription_required: bool - :ivar terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format of - a URL. - :vartype terms_of_service_url: str - :ivar contact: Contact information for the API. - :vartype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :ivar license: License information for the API. - :vartype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :ivar source_api_id: API identifier of the source API. - :vartype source_api_id: str - :ivar display_name: API name. Must be 1 to 300 characters long. - :vartype display_name: str - :ivar service_url: Absolute URL of the backend service implementing this API. Cannot be more - than 2000 characters long. - :vartype service_url: str - :ivar path: Relative URL uniquely identifying this API and all of its resource paths within the - API Management service instance. It is appended to the API endpoint base URL specified during - the service instance creation to form a public URL for this API. - :vartype path: str - :ivar protocols: Describes on which protocols the operations in this API can be invoked. - :vartype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :ivar api_version_set: Version set details. - :vartype api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "api_revision": {"max_length": 100, "min_length": 1}, - "api_version": {"max_length": 100}, - "is_online": {"readonly": True}, - "api_revision_description": {"max_length": 256}, - "api_version_description": {"max_length": 256}, - "display_name": {"max_length": 300, "min_length": 1}, - "service_url": {"max_length": 2000}, - "path": {"max_length": 400}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "authentication_settings": { - "key": "properties.authenticationSettings", - "type": "AuthenticationSettingsContract", - }, - "subscription_key_parameter_names": { - "key": "properties.subscriptionKeyParameterNames", - "type": "SubscriptionKeyParameterNamesContract", - }, - "api_type": {"key": "properties.type", "type": "str"}, - "api_revision": {"key": "properties.apiRevision", "type": "str"}, - "api_version": {"key": "properties.apiVersion", "type": "str"}, - "is_current": {"key": "properties.isCurrent", "type": "bool"}, - "is_online": {"key": "properties.isOnline", "type": "bool"}, - "api_revision_description": {"key": "properties.apiRevisionDescription", "type": "str"}, - "api_version_description": {"key": "properties.apiVersionDescription", "type": "str"}, - "api_version_set_id": {"key": "properties.apiVersionSetId", "type": "str"}, - "subscription_required": {"key": "properties.subscriptionRequired", "type": "bool"}, - "terms_of_service_url": {"key": "properties.termsOfServiceUrl", "type": "str"}, - "contact": {"key": "properties.contact", "type": "ApiContactInformation"}, - "license": {"key": "properties.license", "type": "ApiLicenseInformation"}, - "source_api_id": {"key": "properties.sourceApiId", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "service_url": {"key": "properties.serviceUrl", "type": "str"}, - "path": {"key": "properties.path", "type": "str"}, - "protocols": {"key": "properties.protocols", "type": "[str]"}, - "api_version_set": {"key": "properties.apiVersionSet", "type": "ApiVersionSetContractDetails"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - authentication_settings: Optional["_models.AuthenticationSettingsContract"] = None, - subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = None, - api_type: Optional[Union[str, "_models.ApiType"]] = None, - api_revision: Optional[str] = None, - api_version: Optional[str] = None, - is_current: Optional[bool] = None, - api_revision_description: Optional[str] = None, - api_version_description: Optional[str] = None, - api_version_set_id: Optional[str] = None, - subscription_required: Optional[bool] = None, - terms_of_service_url: Optional[str] = None, - contact: Optional["_models.ApiContactInformation"] = None, - license: Optional["_models.ApiLicenseInformation"] = None, - source_api_id: Optional[str] = None, - display_name: Optional[str] = None, - service_url: Optional[str] = None, - path: Optional[str] = None, - protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, - api_version_set: Optional["_models.ApiVersionSetContractDetails"] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the API. May include HTML formatting tags. - :paramtype description: str - :keyword authentication_settings: Collection of authentication settings included into this API. - :paramtype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :keyword subscription_key_parameter_names: Protocols over which API is made available. - :paramtype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :keyword api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", - "odata", and "grpc". - :paramtype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :keyword api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :paramtype api_revision: str - :keyword api_version: Indicates the version identifier of the API if the API is versioned. - :paramtype api_version: str - :keyword is_current: Indicates if API revision is current api revision. - :paramtype is_current: bool - :keyword api_revision_description: Description of the API Revision. - :paramtype api_revision_description: str - :keyword api_version_description: Description of the API Version. - :paramtype api_version_description: str - :keyword api_version_set_id: A resource identifier for the related ApiVersionSet. - :paramtype api_version_set_id: str - :keyword subscription_required: Specifies whether an API or Product subscription is required - for accessing the API. - :paramtype subscription_required: bool - :keyword terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format - of a URL. - :paramtype terms_of_service_url: str - :keyword contact: Contact information for the API. - :paramtype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :keyword license: License information for the API. - :paramtype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :keyword source_api_id: API identifier of the source API. - :paramtype source_api_id: str - :keyword display_name: API name. Must be 1 to 300 characters long. - :paramtype display_name: str - :keyword service_url: Absolute URL of the backend service implementing this API. Cannot be more - than 2000 characters long. - :paramtype service_url: str - :keyword path: Relative URL uniquely identifying this API and all of its resource paths within - the API Management service instance. It is appended to the API endpoint base URL specified - during the service instance creation to form a public URL for this API. - :paramtype path: str - :keyword protocols: Describes on which protocols the operations in this API can be invoked. - :paramtype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :keyword api_version_set: Version set details. - :paramtype api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - """ - super().__init__(**kwargs) - self.description = description - self.authentication_settings = authentication_settings - self.subscription_key_parameter_names = subscription_key_parameter_names - self.api_type = api_type - self.api_revision = api_revision - self.api_version = api_version - self.is_current = is_current - self.is_online: Optional[bool] = None - self.api_revision_description = api_revision_description - self.api_version_description = api_version_description - self.api_version_set_id = api_version_set_id - self.subscription_required = subscription_required - self.terms_of_service_url = terms_of_service_url - self.contact = contact - self.license = license - self.source_api_id = source_api_id - self.display_name = display_name - self.service_url = service_url - self.path = path - self.protocols = protocols - self.api_version_set = api_version_set - self.provisioning_state: Optional[str] = None - - -class ApiEntityBaseContract(_serialization.Model): - """API base contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar description: Description of the API. May include HTML formatting tags. - :vartype description: str - :ivar authentication_settings: Collection of authentication settings included into this API. - :vartype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :ivar subscription_key_parameter_names: Protocols over which API is made available. - :vartype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :ivar api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", "odata", - and "grpc". - :vartype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :ivar api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :vartype api_revision: str - :ivar api_version: Indicates the version identifier of the API if the API is versioned. - :vartype api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :ivar api_revision_description: Description of the API Revision. - :vartype api_revision_description: str - :ivar api_version_description: Description of the API Version. - :vartype api_version_description: str - :ivar api_version_set_id: A resource identifier for the related ApiVersionSet. - :vartype api_version_set_id: str - :ivar subscription_required: Specifies whether an API or Product subscription is required for - accessing the API. - :vartype subscription_required: bool - :ivar terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format of - a URL. - :vartype terms_of_service_url: str - :ivar contact: Contact information for the API. - :vartype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :ivar license: License information for the API. - :vartype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - """ - - _validation = { - "api_revision": {"max_length": 100, "min_length": 1}, - "api_version": {"max_length": 100}, - "is_online": {"readonly": True}, - "api_revision_description": {"max_length": 256}, - "api_version_description": {"max_length": 256}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "authentication_settings": {"key": "authenticationSettings", "type": "AuthenticationSettingsContract"}, - "subscription_key_parameter_names": { - "key": "subscriptionKeyParameterNames", - "type": "SubscriptionKeyParameterNamesContract", - }, - "api_type": {"key": "type", "type": "str"}, - "api_revision": {"key": "apiRevision", "type": "str"}, - "api_version": {"key": "apiVersion", "type": "str"}, - "is_current": {"key": "isCurrent", "type": "bool"}, - "is_online": {"key": "isOnline", "type": "bool"}, - "api_revision_description": {"key": "apiRevisionDescription", "type": "str"}, - "api_version_description": {"key": "apiVersionDescription", "type": "str"}, - "api_version_set_id": {"key": "apiVersionSetId", "type": "str"}, - "subscription_required": {"key": "subscriptionRequired", "type": "bool"}, - "terms_of_service_url": {"key": "termsOfServiceUrl", "type": "str"}, - "contact": {"key": "contact", "type": "ApiContactInformation"}, - "license": {"key": "license", "type": "ApiLicenseInformation"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - authentication_settings: Optional["_models.AuthenticationSettingsContract"] = None, - subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = None, - api_type: Optional[Union[str, "_models.ApiType"]] = None, - api_revision: Optional[str] = None, - api_version: Optional[str] = None, - is_current: Optional[bool] = None, - api_revision_description: Optional[str] = None, - api_version_description: Optional[str] = None, - api_version_set_id: Optional[str] = None, - subscription_required: Optional[bool] = None, - terms_of_service_url: Optional[str] = None, - contact: Optional["_models.ApiContactInformation"] = None, - license: Optional["_models.ApiLicenseInformation"] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the API. May include HTML formatting tags. - :paramtype description: str - :keyword authentication_settings: Collection of authentication settings included into this API. - :paramtype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :keyword subscription_key_parameter_names: Protocols over which API is made available. - :paramtype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :keyword api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", - "odata", and "grpc". - :paramtype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :keyword api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :paramtype api_revision: str - :keyword api_version: Indicates the version identifier of the API if the API is versioned. - :paramtype api_version: str - :keyword is_current: Indicates if API revision is current api revision. - :paramtype is_current: bool - :keyword api_revision_description: Description of the API Revision. - :paramtype api_revision_description: str - :keyword api_version_description: Description of the API Version. - :paramtype api_version_description: str - :keyword api_version_set_id: A resource identifier for the related ApiVersionSet. - :paramtype api_version_set_id: str - :keyword subscription_required: Specifies whether an API or Product subscription is required - for accessing the API. - :paramtype subscription_required: bool - :keyword terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format - of a URL. - :paramtype terms_of_service_url: str - :keyword contact: Contact information for the API. - :paramtype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :keyword license: License information for the API. - :paramtype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - """ - super().__init__(**kwargs) - self.description = description - self.authentication_settings = authentication_settings - self.subscription_key_parameter_names = subscription_key_parameter_names - self.api_type = api_type - self.api_revision = api_revision - self.api_version = api_version - self.is_current = is_current - self.is_online: Optional[bool] = None - self.api_revision_description = api_revision_description - self.api_version_description = api_version_description - self.api_version_set_id = api_version_set_id - self.subscription_required = subscription_required - self.terms_of_service_url = terms_of_service_url - self.contact = contact - self.license = license - - -class ApiContractProperties(ApiEntityBaseContract): - """API Entity Properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar description: Description of the API. May include HTML formatting tags. - :vartype description: str - :ivar authentication_settings: Collection of authentication settings included into this API. - :vartype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :ivar subscription_key_parameter_names: Protocols over which API is made available. - :vartype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :ivar api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", "odata", - and "grpc". - :vartype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :ivar api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :vartype api_revision: str - :ivar api_version: Indicates the version identifier of the API if the API is versioned. - :vartype api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :ivar api_revision_description: Description of the API Revision. - :vartype api_revision_description: str - :ivar api_version_description: Description of the API Version. - :vartype api_version_description: str - :ivar api_version_set_id: A resource identifier for the related ApiVersionSet. - :vartype api_version_set_id: str - :ivar subscription_required: Specifies whether an API or Product subscription is required for - accessing the API. - :vartype subscription_required: bool - :ivar terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format of - a URL. - :vartype terms_of_service_url: str - :ivar contact: Contact information for the API. - :vartype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :ivar license: License information for the API. - :vartype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :ivar source_api_id: API identifier of the source API. - :vartype source_api_id: str - :ivar display_name: API name. Must be 1 to 300 characters long. - :vartype display_name: str - :ivar service_url: Absolute URL of the backend service implementing this API. Cannot be more - than 2000 characters long. - :vartype service_url: str - :ivar path: Relative URL uniquely identifying this API and all of its resource paths within the - API Management service instance. It is appended to the API endpoint base URL specified during - the service instance creation to form a public URL for this API. Required. - :vartype path: str - :ivar protocols: Describes on which protocols the operations in this API can be invoked. - :vartype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :ivar api_version_set: Version set details. - :vartype api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - "api_revision": {"max_length": 100, "min_length": 1}, - "api_version": {"max_length": 100}, - "is_online": {"readonly": True}, - "api_revision_description": {"max_length": 256}, - "api_version_description": {"max_length": 256}, - "display_name": {"max_length": 300, "min_length": 1}, - "service_url": {"max_length": 2000}, - "path": {"required": True, "max_length": 400}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "authentication_settings": {"key": "authenticationSettings", "type": "AuthenticationSettingsContract"}, - "subscription_key_parameter_names": { - "key": "subscriptionKeyParameterNames", - "type": "SubscriptionKeyParameterNamesContract", - }, - "api_type": {"key": "type", "type": "str"}, - "api_revision": {"key": "apiRevision", "type": "str"}, - "api_version": {"key": "apiVersion", "type": "str"}, - "is_current": {"key": "isCurrent", "type": "bool"}, - "is_online": {"key": "isOnline", "type": "bool"}, - "api_revision_description": {"key": "apiRevisionDescription", "type": "str"}, - "api_version_description": {"key": "apiVersionDescription", "type": "str"}, - "api_version_set_id": {"key": "apiVersionSetId", "type": "str"}, - "subscription_required": {"key": "subscriptionRequired", "type": "bool"}, - "terms_of_service_url": {"key": "termsOfServiceUrl", "type": "str"}, - "contact": {"key": "contact", "type": "ApiContactInformation"}, - "license": {"key": "license", "type": "ApiLicenseInformation"}, - "source_api_id": {"key": "sourceApiId", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "service_url": {"key": "serviceUrl", "type": "str"}, - "path": {"key": "path", "type": "str"}, - "protocols": {"key": "protocols", "type": "[str]"}, - "api_version_set": {"key": "apiVersionSet", "type": "ApiVersionSetContractDetails"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - path: str, - description: Optional[str] = None, - authentication_settings: Optional["_models.AuthenticationSettingsContract"] = None, - subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = None, - api_type: Optional[Union[str, "_models.ApiType"]] = None, - api_revision: Optional[str] = None, - api_version: Optional[str] = None, - is_current: Optional[bool] = None, - api_revision_description: Optional[str] = None, - api_version_description: Optional[str] = None, - api_version_set_id: Optional[str] = None, - subscription_required: Optional[bool] = None, - terms_of_service_url: Optional[str] = None, - contact: Optional["_models.ApiContactInformation"] = None, - license: Optional["_models.ApiLicenseInformation"] = None, - source_api_id: Optional[str] = None, - display_name: Optional[str] = None, - service_url: Optional[str] = None, - protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, - api_version_set: Optional["_models.ApiVersionSetContractDetails"] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the API. May include HTML formatting tags. - :paramtype description: str - :keyword authentication_settings: Collection of authentication settings included into this API. - :paramtype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :keyword subscription_key_parameter_names: Protocols over which API is made available. - :paramtype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :keyword api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", - "odata", and "grpc". - :paramtype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :keyword api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :paramtype api_revision: str - :keyword api_version: Indicates the version identifier of the API if the API is versioned. - :paramtype api_version: str - :keyword is_current: Indicates if API revision is current api revision. - :paramtype is_current: bool - :keyword api_revision_description: Description of the API Revision. - :paramtype api_revision_description: str - :keyword api_version_description: Description of the API Version. - :paramtype api_version_description: str - :keyword api_version_set_id: A resource identifier for the related ApiVersionSet. - :paramtype api_version_set_id: str - :keyword subscription_required: Specifies whether an API or Product subscription is required - for accessing the API. - :paramtype subscription_required: bool - :keyword terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format - of a URL. - :paramtype terms_of_service_url: str - :keyword contact: Contact information for the API. - :paramtype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :keyword license: License information for the API. - :paramtype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :keyword source_api_id: API identifier of the source API. - :paramtype source_api_id: str - :keyword display_name: API name. Must be 1 to 300 characters long. - :paramtype display_name: str - :keyword service_url: Absolute URL of the backend service implementing this API. Cannot be more - than 2000 characters long. - :paramtype service_url: str - :keyword path: Relative URL uniquely identifying this API and all of its resource paths within - the API Management service instance. It is appended to the API endpoint base URL specified - during the service instance creation to form a public URL for this API. Required. - :paramtype path: str - :keyword protocols: Describes on which protocols the operations in this API can be invoked. - :paramtype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :keyword api_version_set: Version set details. - :paramtype api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - """ - super().__init__( - description=description, - authentication_settings=authentication_settings, - subscription_key_parameter_names=subscription_key_parameter_names, - api_type=api_type, - api_revision=api_revision, - api_version=api_version, - is_current=is_current, - api_revision_description=api_revision_description, - api_version_description=api_version_description, - api_version_set_id=api_version_set_id, - subscription_required=subscription_required, - terms_of_service_url=terms_of_service_url, - contact=contact, - license=license, - **kwargs - ) - self.source_api_id = source_api_id - self.display_name = display_name - self.service_url = service_url - self.path = path - self.protocols = protocols - self.api_version_set = api_version_set - self.provisioning_state: Optional[str] = None - - -class ApiContractUpdateProperties(ApiEntityBaseContract): - """API update contract properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar description: Description of the API. May include HTML formatting tags. - :vartype description: str - :ivar authentication_settings: Collection of authentication settings included into this API. - :vartype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :ivar subscription_key_parameter_names: Protocols over which API is made available. - :vartype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :ivar api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", "odata", - and "grpc". - :vartype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :ivar api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :vartype api_revision: str - :ivar api_version: Indicates the version identifier of the API if the API is versioned. - :vartype api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :ivar api_revision_description: Description of the API Revision. - :vartype api_revision_description: str - :ivar api_version_description: Description of the API Version. - :vartype api_version_description: str - :ivar api_version_set_id: A resource identifier for the related ApiVersionSet. - :vartype api_version_set_id: str - :ivar subscription_required: Specifies whether an API or Product subscription is required for - accessing the API. - :vartype subscription_required: bool - :ivar terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format of - a URL. - :vartype terms_of_service_url: str - :ivar contact: Contact information for the API. - :vartype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :ivar license: License information for the API. - :vartype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :ivar display_name: API name. - :vartype display_name: str - :ivar service_url: Absolute URL of the backend service implementing this API. - :vartype service_url: str - :ivar path: Relative URL uniquely identifying this API and all of its resource paths within the - API Management service instance. It is appended to the API endpoint base URL specified during - the service instance creation to form a public URL for this API. - :vartype path: str - :ivar protocols: Describes on which protocols the operations in this API can be invoked. - :vartype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - """ - - _validation = { - "api_revision": {"max_length": 100, "min_length": 1}, - "api_version": {"max_length": 100}, - "is_online": {"readonly": True}, - "api_revision_description": {"max_length": 256}, - "api_version_description": {"max_length": 256}, - "display_name": {"max_length": 300, "min_length": 1}, - "service_url": {"max_length": 2000, "min_length": 1}, - "path": {"max_length": 400}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "authentication_settings": {"key": "authenticationSettings", "type": "AuthenticationSettingsContract"}, - "subscription_key_parameter_names": { - "key": "subscriptionKeyParameterNames", - "type": "SubscriptionKeyParameterNamesContract", - }, - "api_type": {"key": "type", "type": "str"}, - "api_revision": {"key": "apiRevision", "type": "str"}, - "api_version": {"key": "apiVersion", "type": "str"}, - "is_current": {"key": "isCurrent", "type": "bool"}, - "is_online": {"key": "isOnline", "type": "bool"}, - "api_revision_description": {"key": "apiRevisionDescription", "type": "str"}, - "api_version_description": {"key": "apiVersionDescription", "type": "str"}, - "api_version_set_id": {"key": "apiVersionSetId", "type": "str"}, - "subscription_required": {"key": "subscriptionRequired", "type": "bool"}, - "terms_of_service_url": {"key": "termsOfServiceUrl", "type": "str"}, - "contact": {"key": "contact", "type": "ApiContactInformation"}, - "license": {"key": "license", "type": "ApiLicenseInformation"}, - "display_name": {"key": "displayName", "type": "str"}, - "service_url": {"key": "serviceUrl", "type": "str"}, - "path": {"key": "path", "type": "str"}, - "protocols": {"key": "protocols", "type": "[str]"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - authentication_settings: Optional["_models.AuthenticationSettingsContract"] = None, - subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = None, - api_type: Optional[Union[str, "_models.ApiType"]] = None, - api_revision: Optional[str] = None, - api_version: Optional[str] = None, - is_current: Optional[bool] = None, - api_revision_description: Optional[str] = None, - api_version_description: Optional[str] = None, - api_version_set_id: Optional[str] = None, - subscription_required: Optional[bool] = None, - terms_of_service_url: Optional[str] = None, - contact: Optional["_models.ApiContactInformation"] = None, - license: Optional["_models.ApiLicenseInformation"] = None, - display_name: Optional[str] = None, - service_url: Optional[str] = None, - path: Optional[str] = None, - protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the API. May include HTML formatting tags. - :paramtype description: str - :keyword authentication_settings: Collection of authentication settings included into this API. - :paramtype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :keyword subscription_key_parameter_names: Protocols over which API is made available. - :paramtype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :keyword api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", - "odata", and "grpc". - :paramtype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :keyword api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :paramtype api_revision: str - :keyword api_version: Indicates the version identifier of the API if the API is versioned. - :paramtype api_version: str - :keyword is_current: Indicates if API revision is current api revision. - :paramtype is_current: bool - :keyword api_revision_description: Description of the API Revision. - :paramtype api_revision_description: str - :keyword api_version_description: Description of the API Version. - :paramtype api_version_description: str - :keyword api_version_set_id: A resource identifier for the related ApiVersionSet. - :paramtype api_version_set_id: str - :keyword subscription_required: Specifies whether an API or Product subscription is required - for accessing the API. - :paramtype subscription_required: bool - :keyword terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format - of a URL. - :paramtype terms_of_service_url: str - :keyword contact: Contact information for the API. - :paramtype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :keyword license: License information for the API. - :paramtype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :keyword display_name: API name. - :paramtype display_name: str - :keyword service_url: Absolute URL of the backend service implementing this API. - :paramtype service_url: str - :keyword path: Relative URL uniquely identifying this API and all of its resource paths within - the API Management service instance. It is appended to the API endpoint base URL specified - during the service instance creation to form a public URL for this API. - :paramtype path: str - :keyword protocols: Describes on which protocols the operations in this API can be invoked. - :paramtype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - """ - super().__init__( - description=description, - authentication_settings=authentication_settings, - subscription_key_parameter_names=subscription_key_parameter_names, - api_type=api_type, - api_revision=api_revision, - api_version=api_version, - is_current=is_current, - api_revision_description=api_revision_description, - api_version_description=api_version_description, - api_version_set_id=api_version_set_id, - subscription_required=subscription_required, - terms_of_service_url=terms_of_service_url, - contact=contact, - license=license, - **kwargs - ) - self.display_name = display_name - self.service_url = service_url - self.path = path - self.protocols = protocols - - -class ApiCreateOrUpdateParameter(_serialization.Model): - """API Create or Update Parameters. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar description: Description of the API. May include HTML formatting tags. - :vartype description: str - :ivar authentication_settings: Collection of authentication settings included into this API. - :vartype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :ivar subscription_key_parameter_names: Protocols over which API is made available. - :vartype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :ivar api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", "odata", - and "grpc". - :vartype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :ivar api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :vartype api_revision: str - :ivar api_version: Indicates the version identifier of the API if the API is versioned. - :vartype api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :ivar api_revision_description: Description of the API Revision. - :vartype api_revision_description: str - :ivar api_version_description: Description of the API Version. - :vartype api_version_description: str - :ivar api_version_set_id: A resource identifier for the related ApiVersionSet. - :vartype api_version_set_id: str - :ivar subscription_required: Specifies whether an API or Product subscription is required for - accessing the API. - :vartype subscription_required: bool - :ivar terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format of - a URL. - :vartype terms_of_service_url: str - :ivar contact: Contact information for the API. - :vartype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :ivar license: License information for the API. - :vartype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :ivar source_api_id: API identifier of the source API. - :vartype source_api_id: str - :ivar display_name: API name. Must be 1 to 300 characters long. - :vartype display_name: str - :ivar service_url: Absolute URL of the backend service implementing this API. Cannot be more - than 2000 characters long. - :vartype service_url: str - :ivar path: Relative URL uniquely identifying this API and all of its resource paths within the - API Management service instance. It is appended to the API endpoint base URL specified during - the service instance creation to form a public URL for this API. - :vartype path: str - :ivar protocols: Describes on which protocols the operations in this API can be invoked. - :vartype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :ivar api_version_set: Version set details. - :vartype api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - :ivar value: Content value when Importing an API. - :vartype value: str - :ivar format: Format of the Content in which the API is getting imported. New formats can be - added in the future. Known values are: "wadl-xml", "wadl-link-json", "swagger-json", - "swagger-link-json", "wsdl", "wsdl-link", "openapi", "openapi+json", "openapi-link", - "openapi+json-link", "graphql-link", "odata", "odata-link", "grpc", and "grpc-link". - :vartype format: str or ~azure.mgmt.apimanagement.models.ContentFormat - :ivar wsdl_selector: Criteria to limit import of WSDL to a subset of the document. - :vartype wsdl_selector: - ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector - :ivar soap_api_type: Type of API to create. - - * ``http`` creates a REST API - * ``soap`` creates a SOAP pass-through API - * ``websocket`` creates websocket API - * ``graphql`` creates GraphQL API. - New types can be added in the future. Known values are: "http", "soap", "websocket", - "graphql", "odata", and "grpc". - :vartype soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType - :ivar translate_required_query_parameters_conduct: Strategy of translating required query - parameters to template ones. By default has value 'template'. Possible values: 'template', - 'query'. Known values are: "template" and "query". - :vartype translate_required_query_parameters_conduct: str or - ~azure.mgmt.apimanagement.models.TranslateRequiredQueryParametersConduct - """ - - _validation = { - "api_revision": {"max_length": 100, "min_length": 1}, - "api_version": {"max_length": 100}, - "is_online": {"readonly": True}, - "api_revision_description": {"max_length": 256}, - "api_version_description": {"max_length": 256}, - "display_name": {"max_length": 300, "min_length": 1}, - "service_url": {"max_length": 2000}, - "path": {"max_length": 400}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "description": {"key": "properties.description", "type": "str"}, - "authentication_settings": { - "key": "properties.authenticationSettings", - "type": "AuthenticationSettingsContract", - }, - "subscription_key_parameter_names": { - "key": "properties.subscriptionKeyParameterNames", - "type": "SubscriptionKeyParameterNamesContract", - }, - "api_type": {"key": "properties.type", "type": "str"}, - "api_revision": {"key": "properties.apiRevision", "type": "str"}, - "api_version": {"key": "properties.apiVersion", "type": "str"}, - "is_current": {"key": "properties.isCurrent", "type": "bool"}, - "is_online": {"key": "properties.isOnline", "type": "bool"}, - "api_revision_description": {"key": "properties.apiRevisionDescription", "type": "str"}, - "api_version_description": {"key": "properties.apiVersionDescription", "type": "str"}, - "api_version_set_id": {"key": "properties.apiVersionSetId", "type": "str"}, - "subscription_required": {"key": "properties.subscriptionRequired", "type": "bool"}, - "terms_of_service_url": {"key": "properties.termsOfServiceUrl", "type": "str"}, - "contact": {"key": "properties.contact", "type": "ApiContactInformation"}, - "license": {"key": "properties.license", "type": "ApiLicenseInformation"}, - "source_api_id": {"key": "properties.sourceApiId", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "service_url": {"key": "properties.serviceUrl", "type": "str"}, - "path": {"key": "properties.path", "type": "str"}, - "protocols": {"key": "properties.protocols", "type": "[str]"}, - "api_version_set": {"key": "properties.apiVersionSet", "type": "ApiVersionSetContractDetails"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "value": {"key": "properties.value", "type": "str"}, - "format": {"key": "properties.format", "type": "str"}, - "wsdl_selector": {"key": "properties.wsdlSelector", "type": "ApiCreateOrUpdatePropertiesWsdlSelector"}, - "soap_api_type": {"key": "properties.apiType", "type": "str"}, - "translate_required_query_parameters_conduct": { - "key": "properties.translateRequiredQueryParameters", - "type": "str", - }, - } - - def __init__( # pylint: disable=too-many-locals - self, - *, - description: Optional[str] = None, - authentication_settings: Optional["_models.AuthenticationSettingsContract"] = None, - subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = None, - api_type: Optional[Union[str, "_models.ApiType"]] = None, - api_revision: Optional[str] = None, - api_version: Optional[str] = None, - is_current: Optional[bool] = None, - api_revision_description: Optional[str] = None, - api_version_description: Optional[str] = None, - api_version_set_id: Optional[str] = None, - subscription_required: Optional[bool] = None, - terms_of_service_url: Optional[str] = None, - contact: Optional["_models.ApiContactInformation"] = None, - license: Optional["_models.ApiLicenseInformation"] = None, - source_api_id: Optional[str] = None, - display_name: Optional[str] = None, - service_url: Optional[str] = None, - path: Optional[str] = None, - protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, - api_version_set: Optional["_models.ApiVersionSetContractDetails"] = None, - value: Optional[str] = None, - format: Optional[Union[str, "_models.ContentFormat"]] = None, - wsdl_selector: Optional["_models.ApiCreateOrUpdatePropertiesWsdlSelector"] = None, - soap_api_type: Optional[Union[str, "_models.SoapApiType"]] = None, - translate_required_query_parameters_conduct: Optional[ - Union[str, "_models.TranslateRequiredQueryParametersConduct"] - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the API. May include HTML formatting tags. - :paramtype description: str - :keyword authentication_settings: Collection of authentication settings included into this API. - :paramtype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :keyword subscription_key_parameter_names: Protocols over which API is made available. - :paramtype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :keyword api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", - "odata", and "grpc". - :paramtype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :keyword api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :paramtype api_revision: str - :keyword api_version: Indicates the version identifier of the API if the API is versioned. - :paramtype api_version: str - :keyword is_current: Indicates if API revision is current api revision. - :paramtype is_current: bool - :keyword api_revision_description: Description of the API Revision. - :paramtype api_revision_description: str - :keyword api_version_description: Description of the API Version. - :paramtype api_version_description: str - :keyword api_version_set_id: A resource identifier for the related ApiVersionSet. - :paramtype api_version_set_id: str - :keyword subscription_required: Specifies whether an API or Product subscription is required - for accessing the API. - :paramtype subscription_required: bool - :keyword terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format - of a URL. - :paramtype terms_of_service_url: str - :keyword contact: Contact information for the API. - :paramtype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :keyword license: License information for the API. - :paramtype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :keyword source_api_id: API identifier of the source API. - :paramtype source_api_id: str - :keyword display_name: API name. Must be 1 to 300 characters long. - :paramtype display_name: str - :keyword service_url: Absolute URL of the backend service implementing this API. Cannot be more - than 2000 characters long. - :paramtype service_url: str - :keyword path: Relative URL uniquely identifying this API and all of its resource paths within - the API Management service instance. It is appended to the API endpoint base URL specified - during the service instance creation to form a public URL for this API. - :paramtype path: str - :keyword protocols: Describes on which protocols the operations in this API can be invoked. - :paramtype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :keyword api_version_set: Version set details. - :paramtype api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - :keyword value: Content value when Importing an API. - :paramtype value: str - :keyword format: Format of the Content in which the API is getting imported. New formats can be - added in the future. Known values are: "wadl-xml", "wadl-link-json", "swagger-json", - "swagger-link-json", "wsdl", "wsdl-link", "openapi", "openapi+json", "openapi-link", - "openapi+json-link", "graphql-link", "odata", "odata-link", "grpc", and "grpc-link". - :paramtype format: str or ~azure.mgmt.apimanagement.models.ContentFormat - :keyword wsdl_selector: Criteria to limit import of WSDL to a subset of the document. - :paramtype wsdl_selector: - ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector - :keyword soap_api_type: Type of API to create. - - * ``http`` creates a REST API - * ``soap`` creates a SOAP pass-through API - * ``websocket`` creates websocket API - * ``graphql`` creates GraphQL API. - New types can be added in the future. Known values are: "http", "soap", "websocket", - "graphql", "odata", and "grpc". - :paramtype soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType - :keyword translate_required_query_parameters_conduct: Strategy of translating required query - parameters to template ones. By default has value 'template'. Possible values: 'template', - 'query'. Known values are: "template" and "query". - :paramtype translate_required_query_parameters_conduct: str or - ~azure.mgmt.apimanagement.models.TranslateRequiredQueryParametersConduct - """ - super().__init__(**kwargs) - self.description = description - self.authentication_settings = authentication_settings - self.subscription_key_parameter_names = subscription_key_parameter_names - self.api_type = api_type - self.api_revision = api_revision - self.api_version = api_version - self.is_current = is_current - self.is_online: Optional[bool] = None - self.api_revision_description = api_revision_description - self.api_version_description = api_version_description - self.api_version_set_id = api_version_set_id - self.subscription_required = subscription_required - self.terms_of_service_url = terms_of_service_url - self.contact = contact - self.license = license - self.source_api_id = source_api_id - self.display_name = display_name - self.service_url = service_url - self.path = path - self.protocols = protocols - self.api_version_set = api_version_set - self.provisioning_state: Optional[str] = None - self.value = value - self.format = format - self.wsdl_selector = wsdl_selector - self.soap_api_type = soap_api_type - self.translate_required_query_parameters_conduct = translate_required_query_parameters_conduct - - -class ApiCreateOrUpdateProperties(ApiContractProperties): - """API Create or Update Properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar description: Description of the API. May include HTML formatting tags. - :vartype description: str - :ivar authentication_settings: Collection of authentication settings included into this API. - :vartype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :ivar subscription_key_parameter_names: Protocols over which API is made available. - :vartype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :ivar api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", "odata", - and "grpc". - :vartype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :ivar api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :vartype api_revision: str - :ivar api_version: Indicates the version identifier of the API if the API is versioned. - :vartype api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :ivar api_revision_description: Description of the API Revision. - :vartype api_revision_description: str - :ivar api_version_description: Description of the API Version. - :vartype api_version_description: str - :ivar api_version_set_id: A resource identifier for the related ApiVersionSet. - :vartype api_version_set_id: str - :ivar subscription_required: Specifies whether an API or Product subscription is required for - accessing the API. - :vartype subscription_required: bool - :ivar terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format of - a URL. - :vartype terms_of_service_url: str - :ivar contact: Contact information for the API. - :vartype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :ivar license: License information for the API. - :vartype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :ivar source_api_id: API identifier of the source API. - :vartype source_api_id: str - :ivar display_name: API name. Must be 1 to 300 characters long. - :vartype display_name: str - :ivar service_url: Absolute URL of the backend service implementing this API. Cannot be more - than 2000 characters long. - :vartype service_url: str - :ivar path: Relative URL uniquely identifying this API and all of its resource paths within the - API Management service instance. It is appended to the API endpoint base URL specified during - the service instance creation to form a public URL for this API. Required. - :vartype path: str - :ivar protocols: Describes on which protocols the operations in this API can be invoked. - :vartype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :ivar api_version_set: Version set details. - :vartype api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - :ivar value: Content value when Importing an API. - :vartype value: str - :ivar format: Format of the Content in which the API is getting imported. New formats can be - added in the future. Known values are: "wadl-xml", "wadl-link-json", "swagger-json", - "swagger-link-json", "wsdl", "wsdl-link", "openapi", "openapi+json", "openapi-link", - "openapi+json-link", "graphql-link", "odata", "odata-link", "grpc", and "grpc-link". - :vartype format: str or ~azure.mgmt.apimanagement.models.ContentFormat - :ivar wsdl_selector: Criteria to limit import of WSDL to a subset of the document. - :vartype wsdl_selector: - ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector - :ivar soap_api_type: Type of API to create. - - * ``http`` creates a REST API - * ``soap`` creates a SOAP pass-through API - * ``websocket`` creates websocket API - * ``graphql`` creates GraphQL API. - New types can be added in the future. Known values are: "http", "soap", "websocket", - "graphql", "odata", and "grpc". - :vartype soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType - :ivar translate_required_query_parameters_conduct: Strategy of translating required query - parameters to template ones. By default has value 'template'. Possible values: 'template', - 'query'. Known values are: "template" and "query". - :vartype translate_required_query_parameters_conduct: str or - ~azure.mgmt.apimanagement.models.TranslateRequiredQueryParametersConduct - """ - - _validation = { - "api_revision": {"max_length": 100, "min_length": 1}, - "api_version": {"max_length": 100}, - "is_online": {"readonly": True}, - "api_revision_description": {"max_length": 256}, - "api_version_description": {"max_length": 256}, - "display_name": {"max_length": 300, "min_length": 1}, - "service_url": {"max_length": 2000}, - "path": {"required": True, "max_length": 400}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "authentication_settings": {"key": "authenticationSettings", "type": "AuthenticationSettingsContract"}, - "subscription_key_parameter_names": { - "key": "subscriptionKeyParameterNames", - "type": "SubscriptionKeyParameterNamesContract", - }, - "api_type": {"key": "type", "type": "str"}, - "api_revision": {"key": "apiRevision", "type": "str"}, - "api_version": {"key": "apiVersion", "type": "str"}, - "is_current": {"key": "isCurrent", "type": "bool"}, - "is_online": {"key": "isOnline", "type": "bool"}, - "api_revision_description": {"key": "apiRevisionDescription", "type": "str"}, - "api_version_description": {"key": "apiVersionDescription", "type": "str"}, - "api_version_set_id": {"key": "apiVersionSetId", "type": "str"}, - "subscription_required": {"key": "subscriptionRequired", "type": "bool"}, - "terms_of_service_url": {"key": "termsOfServiceUrl", "type": "str"}, - "contact": {"key": "contact", "type": "ApiContactInformation"}, - "license": {"key": "license", "type": "ApiLicenseInformation"}, - "source_api_id": {"key": "sourceApiId", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "service_url": {"key": "serviceUrl", "type": "str"}, - "path": {"key": "path", "type": "str"}, - "protocols": {"key": "protocols", "type": "[str]"}, - "api_version_set": {"key": "apiVersionSet", "type": "ApiVersionSetContractDetails"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "value": {"key": "value", "type": "str"}, - "format": {"key": "format", "type": "str"}, - "wsdl_selector": {"key": "wsdlSelector", "type": "ApiCreateOrUpdatePropertiesWsdlSelector"}, - "soap_api_type": {"key": "apiType", "type": "str"}, - "translate_required_query_parameters_conduct": {"key": "translateRequiredQueryParameters", "type": "str"}, - } - - def __init__( # pylint: disable=too-many-locals - self, - *, - path: str, - description: Optional[str] = None, - authentication_settings: Optional["_models.AuthenticationSettingsContract"] = None, - subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = None, - api_type: Optional[Union[str, "_models.ApiType"]] = None, - api_revision: Optional[str] = None, - api_version: Optional[str] = None, - is_current: Optional[bool] = None, - api_revision_description: Optional[str] = None, - api_version_description: Optional[str] = None, - api_version_set_id: Optional[str] = None, - subscription_required: Optional[bool] = None, - terms_of_service_url: Optional[str] = None, - contact: Optional["_models.ApiContactInformation"] = None, - license: Optional["_models.ApiLicenseInformation"] = None, - source_api_id: Optional[str] = None, - display_name: Optional[str] = None, - service_url: Optional[str] = None, - protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, - api_version_set: Optional["_models.ApiVersionSetContractDetails"] = None, - value: Optional[str] = None, - format: Optional[Union[str, "_models.ContentFormat"]] = None, - wsdl_selector: Optional["_models.ApiCreateOrUpdatePropertiesWsdlSelector"] = None, - soap_api_type: Optional[Union[str, "_models.SoapApiType"]] = None, - translate_required_query_parameters_conduct: Optional[ - Union[str, "_models.TranslateRequiredQueryParametersConduct"] - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the API. May include HTML formatting tags. - :paramtype description: str - :keyword authentication_settings: Collection of authentication settings included into this API. - :paramtype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :keyword subscription_key_parameter_names: Protocols over which API is made available. - :paramtype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :keyword api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", - "odata", and "grpc". - :paramtype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :keyword api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :paramtype api_revision: str - :keyword api_version: Indicates the version identifier of the API if the API is versioned. - :paramtype api_version: str - :keyword is_current: Indicates if API revision is current api revision. - :paramtype is_current: bool - :keyword api_revision_description: Description of the API Revision. - :paramtype api_revision_description: str - :keyword api_version_description: Description of the API Version. - :paramtype api_version_description: str - :keyword api_version_set_id: A resource identifier for the related ApiVersionSet. - :paramtype api_version_set_id: str - :keyword subscription_required: Specifies whether an API or Product subscription is required - for accessing the API. - :paramtype subscription_required: bool - :keyword terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format - of a URL. - :paramtype terms_of_service_url: str - :keyword contact: Contact information for the API. - :paramtype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :keyword license: License information for the API. - :paramtype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :keyword source_api_id: API identifier of the source API. - :paramtype source_api_id: str - :keyword display_name: API name. Must be 1 to 300 characters long. - :paramtype display_name: str - :keyword service_url: Absolute URL of the backend service implementing this API. Cannot be more - than 2000 characters long. - :paramtype service_url: str - :keyword path: Relative URL uniquely identifying this API and all of its resource paths within - the API Management service instance. It is appended to the API endpoint base URL specified - during the service instance creation to form a public URL for this API. Required. - :paramtype path: str - :keyword protocols: Describes on which protocols the operations in this API can be invoked. - :paramtype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :keyword api_version_set: Version set details. - :paramtype api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - :keyword value: Content value when Importing an API. - :paramtype value: str - :keyword format: Format of the Content in which the API is getting imported. New formats can be - added in the future. Known values are: "wadl-xml", "wadl-link-json", "swagger-json", - "swagger-link-json", "wsdl", "wsdl-link", "openapi", "openapi+json", "openapi-link", - "openapi+json-link", "graphql-link", "odata", "odata-link", "grpc", and "grpc-link". - :paramtype format: str or ~azure.mgmt.apimanagement.models.ContentFormat - :keyword wsdl_selector: Criteria to limit import of WSDL to a subset of the document. - :paramtype wsdl_selector: - ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector - :keyword soap_api_type: Type of API to create. - - * ``http`` creates a REST API - * ``soap`` creates a SOAP pass-through API - * ``websocket`` creates websocket API - * ``graphql`` creates GraphQL API. - New types can be added in the future. Known values are: "http", "soap", "websocket", - "graphql", "odata", and "grpc". - :paramtype soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType - :keyword translate_required_query_parameters_conduct: Strategy of translating required query - parameters to template ones. By default has value 'template'. Possible values: 'template', - 'query'. Known values are: "template" and "query". - :paramtype translate_required_query_parameters_conduct: str or - ~azure.mgmt.apimanagement.models.TranslateRequiredQueryParametersConduct - """ - super().__init__( - description=description, - authentication_settings=authentication_settings, - subscription_key_parameter_names=subscription_key_parameter_names, - api_type=api_type, - api_revision=api_revision, - api_version=api_version, - is_current=is_current, - api_revision_description=api_revision_description, - api_version_description=api_version_description, - api_version_set_id=api_version_set_id, - subscription_required=subscription_required, - terms_of_service_url=terms_of_service_url, - contact=contact, - license=license, - source_api_id=source_api_id, - display_name=display_name, - service_url=service_url, - path=path, - protocols=protocols, - api_version_set=api_version_set, - **kwargs - ) - self.value = value - self.format = format - self.wsdl_selector = wsdl_selector - self.soap_api_type = soap_api_type - self.translate_required_query_parameters_conduct = translate_required_query_parameters_conduct - - -class ApiCreateOrUpdatePropertiesWsdlSelector(_serialization.Model): - """Criteria to limit import of WSDL to a subset of the document. - - :ivar wsdl_service_name: Name of service to import from WSDL. - :vartype wsdl_service_name: str - :ivar wsdl_endpoint_name: Name of endpoint(port) to import from WSDL. - :vartype wsdl_endpoint_name: str - """ - - _attribute_map = { - "wsdl_service_name": {"key": "wsdlServiceName", "type": "str"}, - "wsdl_endpoint_name": {"key": "wsdlEndpointName", "type": "str"}, - } - - def __init__( - self, *, wsdl_service_name: Optional[str] = None, wsdl_endpoint_name: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword wsdl_service_name: Name of service to import from WSDL. - :paramtype wsdl_service_name: str - :keyword wsdl_endpoint_name: Name of endpoint(port) to import from WSDL. - :paramtype wsdl_endpoint_name: str - """ - super().__init__(**kwargs) - self.wsdl_service_name = wsdl_service_name - self.wsdl_endpoint_name = wsdl_endpoint_name - - -class ApiExportResult(_serialization.Model): - """API Export result. - - :ivar id: ResourceId of the API which was exported. - :vartype id: str - :ivar export_result_format: Format in which the API Details are exported to the Storage Blob - with Sas Key valid for 5 minutes. Known values are: "swagger-link-json", "wsdl-link+xml", - "wadl-link-json", and "openapi-link". - :vartype export_result_format: str or ~azure.mgmt.apimanagement.models.ExportResultFormat - :ivar value: The object defining the schema of the exported API Detail. - :vartype value: ~azure.mgmt.apimanagement.models.ApiExportResultValue - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "export_result_format": {"key": "format", "type": "str"}, - "value": {"key": "value", "type": "ApiExportResultValue"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - export_result_format: Optional[Union[str, "_models.ExportResultFormat"]] = None, - value: Optional["_models.ApiExportResultValue"] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: ResourceId of the API which was exported. - :paramtype id: str - :keyword export_result_format: Format in which the API Details are exported to the Storage Blob - with Sas Key valid for 5 minutes. Known values are: "swagger-link-json", "wsdl-link+xml", - "wadl-link-json", and "openapi-link". - :paramtype export_result_format: str or ~azure.mgmt.apimanagement.models.ExportResultFormat - :keyword value: The object defining the schema of the exported API Detail. - :paramtype value: ~azure.mgmt.apimanagement.models.ApiExportResultValue - """ - super().__init__(**kwargs) - self.id = id - self.export_result_format = export_result_format - self.value = value - - -class ApiExportResultValue(_serialization.Model): - """The object defining the schema of the exported API Detail. - - :ivar link: Link to the Storage Blob containing the result of the export operation. The Blob - Uri is only valid for 5 minutes. - :vartype link: str - """ - - _attribute_map = { - "link": {"key": "link", "type": "str"}, - } - - def __init__(self, *, link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword link: Link to the Storage Blob containing the result of the export operation. The Blob - Uri is only valid for 5 minutes. - :paramtype link: str - """ - super().__init__(**kwargs) - self.link = link - - -class ApiLicenseInformation(_serialization.Model): - """API license information. - - :ivar name: The license name used for the API. - :vartype name: str - :ivar url: A URL to the license used for the API. MUST be in the format of a URL. - :vartype url: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "url": {"key": "url", "type": "str"}, - } - - def __init__(self, *, name: Optional[str] = None, url: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword name: The license name used for the API. - :paramtype name: str - :keyword url: A URL to the license used for the API. MUST be in the format of a URL. - :paramtype url: str - """ - super().__init__(**kwargs) - self.name = name - self.url = url - - -class ApiManagementGatewayBaseProperties(_serialization.Model): - """Base Properties of an API Management gateway resource description. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: The current provisioning state of the API Management gateway which - can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API Management gateway, which is - targeted by the long running operation started on the gateway. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management gateway.The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype created_at_utc: ~datetime.datetime - :ivar frontend: Information regarding how the gateway should be exposed. - :vartype frontend: ~azure.mgmt.apimanagement.models.FrontendConfiguration - :ivar backend: Information regarding how the gateway should integrate with backend systems. - :vartype backend: ~azure.mgmt.apimanagement.models.BackendConfiguration - :ivar configuration_api: Information regarding the Configuration API of the API Management - gateway. This is only applicable for API gateway with Standard SKU. - :vartype configuration_api: ~azure.mgmt.apimanagement.models.GatewayConfigurationApi - :ivar virtual_network_type: The type of VPN in which API Management gateway needs to be - configured in. Known values are: "None", "External", and "Internal". - :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "target_provisioning_state": {"readonly": True}, - "created_at_utc": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "target_provisioning_state": {"key": "targetProvisioningState", "type": "str"}, - "created_at_utc": {"key": "createdAtUtc", "type": "iso-8601"}, - "frontend": {"key": "frontend", "type": "FrontendConfiguration"}, - "backend": {"key": "backend", "type": "BackendConfiguration"}, - "configuration_api": {"key": "configurationApi", "type": "GatewayConfigurationApi"}, - "virtual_network_type": {"key": "virtualNetworkType", "type": "str"}, - } - - def __init__( - self, - *, - frontend: Optional["_models.FrontendConfiguration"] = None, - backend: Optional["_models.BackendConfiguration"] = None, - configuration_api: Optional["_models.GatewayConfigurationApi"] = None, - virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword frontend: Information regarding how the gateway should be exposed. - :paramtype frontend: ~azure.mgmt.apimanagement.models.FrontendConfiguration - :keyword backend: Information regarding how the gateway should integrate with backend systems. - :paramtype backend: ~azure.mgmt.apimanagement.models.BackendConfiguration - :keyword configuration_api: Information regarding the Configuration API of the API Management - gateway. This is only applicable for API gateway with Standard SKU. - :paramtype configuration_api: ~azure.mgmt.apimanagement.models.GatewayConfigurationApi - :keyword virtual_network_type: The type of VPN in which API Management gateway needs to be - configured in. Known values are: "None", "External", and "Internal". - :paramtype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - """ - super().__init__(**kwargs) - self.provisioning_state: Optional[str] = None - self.target_provisioning_state: Optional[str] = None - self.created_at_utc: Optional[datetime.datetime] = None - self.frontend = frontend - self.backend = backend - self.configuration_api = configuration_api - self.virtual_network_type = virtual_network_type - - -class ApiManagementGatewayConfigConnectionListResult(_serialization.Model): # pylint: disable=name-too-long - """The response of the List API Management gateway operation. - - All required parameters must be populated in order to send to server. - - :ivar value: Result of the List API Management gateway config connection operation. Required. - :vartype value: - list[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] - :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list - of API Management services. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ApiManagementGatewayConfigConnectionResource]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: list["_models.ApiManagementGatewayConfigConnectionResource"], - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Result of the List API Management gateway config connection operation. - Required. - :paramtype value: - list[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] - :keyword next_link: Link to the next set of results. Not empty if Value contains incomplete - list of API Management services. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ApiManagementGatewayConfigConnectionResource(ProxyResource): # pylint: disable=name-too-long - """A single API Management gateway resource in List or Get response. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar etag: ETag of the resource. - :vartype etag: str - :ivar provisioning_state: The current provisioning state of the API Management gateway config - connection. - :vartype provisioning_state: str - :ivar source_id: The link to the API Management service workspace. - :vartype source_id: str - :ivar default_hostname: The default hostname of the data-plane gateway. - :vartype default_hostname: str - :ivar hostnames: The hostnames of the data-plane gateway to which requests can be sent. - :vartype hostnames: list[str] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "etag": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "default_hostname": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "etag": {"key": "etag", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "source_id": {"key": "properties.sourceId", "type": "str"}, - "default_hostname": {"key": "properties.defaultHostname", "type": "str"}, - "hostnames": {"key": "properties.hostnames", "type": "[str]"}, - } - - def __init__( - self, *, source_id: Optional[str] = None, hostnames: Optional[list[str]] = None, **kwargs: Any - ) -> None: - """ - :keyword source_id: The link to the API Management service workspace. - :paramtype source_id: str - :keyword hostnames: The hostnames of the data-plane gateway to which requests can be sent. - :paramtype hostnames: list[str] - """ - super().__init__(**kwargs) - self.etag: Optional[str] = None - self.provisioning_state: Optional[str] = None - self.source_id = source_id - self.default_hostname: Optional[str] = None - self.hostnames = hostnames - - -class ApiManagementGatewayListResult(_serialization.Model): - """The response of the List API Management gateway operation. - - All required parameters must be populated in order to send to server. - - :ivar value: Result of the List API Management gateway operation. Required. - :vartype value: list[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list - of API Management services. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ApiManagementGatewayResource]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: list["_models.ApiManagementGatewayResource"], next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: Result of the List API Management gateway operation. Required. - :paramtype value: list[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :keyword next_link: Link to the next set of results. Not empty if Value contains incomplete - list of API Management services. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ApiManagementGatewayProperties(ApiManagementGatewayBaseProperties): - """Properties of an API Management gateway resource description. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: The current provisioning state of the API Management gateway which - can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API Management gateway, which is - targeted by the long running operation started on the gateway. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management gateway.The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype created_at_utc: ~datetime.datetime - :ivar frontend: Information regarding how the gateway should be exposed. - :vartype frontend: ~azure.mgmt.apimanagement.models.FrontendConfiguration - :ivar backend: Information regarding how the gateway should integrate with backend systems. - :vartype backend: ~azure.mgmt.apimanagement.models.BackendConfiguration - :ivar configuration_api: Information regarding the Configuration API of the API Management - gateway. This is only applicable for API gateway with Standard SKU. - :vartype configuration_api: ~azure.mgmt.apimanagement.models.GatewayConfigurationApi - :ivar virtual_network_type: The type of VPN in which API Management gateway needs to be - configured in. Known values are: "None", "External", and "Internal". - :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - """ - - -class ApimResource(_serialization.Model): - """The Resource definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource is set to Microsoft.ApiManagement. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, - } - - def __init__(self, *, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - self.tags = tags - - -class ApiManagementGatewayResource(ApimResource): - """A single API Management gateway resource in List or Get response. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource is set to Microsoft.ApiManagement. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar sku: SKU properties of the API Management gateway. Required. - :vartype sku: ~azure.mgmt.apimanagement.models.ApiManagementGatewaySkuProperties - :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData - :ivar location: Resource location. Required. - :vartype location: str - :ivar etag: ETag of the resource. - :vartype etag: str - :ivar provisioning_state: The current provisioning state of the API Management gateway which - can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API Management gateway, which is - targeted by the long running operation started on the gateway. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management gateway.The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype created_at_utc: ~datetime.datetime - :ivar frontend: Information regarding how the gateway should be exposed. - :vartype frontend: ~azure.mgmt.apimanagement.models.FrontendConfiguration - :ivar backend: Information regarding how the gateway should integrate with backend systems. - :vartype backend: ~azure.mgmt.apimanagement.models.BackendConfiguration - :ivar configuration_api: Information regarding the Configuration API of the API Management - gateway. This is only applicable for API gateway with Standard SKU. - :vartype configuration_api: ~azure.mgmt.apimanagement.models.GatewayConfigurationApi - :ivar virtual_network_type: The type of VPN in which API Management gateway needs to be - configured in. Known values are: "None", "External", and "Internal". - :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "sku": {"required": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "etag": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "target_provisioning_state": {"readonly": True}, - "created_at_utc": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, - "sku": {"key": "sku", "type": "ApiManagementGatewaySkuProperties"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "location": {"key": "location", "type": "str"}, - "etag": {"key": "etag", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "target_provisioning_state": {"key": "properties.targetProvisioningState", "type": "str"}, - "created_at_utc": {"key": "properties.createdAtUtc", "type": "iso-8601"}, - "frontend": {"key": "properties.frontend", "type": "FrontendConfiguration"}, - "backend": {"key": "properties.backend", "type": "BackendConfiguration"}, - "configuration_api": {"key": "properties.configurationApi", "type": "GatewayConfigurationApi"}, - "virtual_network_type": {"key": "properties.virtualNetworkType", "type": "str"}, - } - - def __init__( - self, - *, - sku: "_models.ApiManagementGatewaySkuProperties", - location: str, - tags: Optional[dict[str, str]] = None, - frontend: Optional["_models.FrontendConfiguration"] = None, - backend: Optional["_models.BackendConfiguration"] = None, - configuration_api: Optional["_models.GatewayConfigurationApi"] = None, - virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: SKU properties of the API Management gateway. Required. - :paramtype sku: ~azure.mgmt.apimanagement.models.ApiManagementGatewaySkuProperties - :keyword location: Resource location. Required. - :paramtype location: str - :keyword frontend: Information regarding how the gateway should be exposed. - :paramtype frontend: ~azure.mgmt.apimanagement.models.FrontendConfiguration - :keyword backend: Information regarding how the gateway should integrate with backend systems. - :paramtype backend: ~azure.mgmt.apimanagement.models.BackendConfiguration - :keyword configuration_api: Information regarding the Configuration API of the API Management - gateway. This is only applicable for API gateway with Standard SKU. - :paramtype configuration_api: ~azure.mgmt.apimanagement.models.GatewayConfigurationApi - :keyword virtual_network_type: The type of VPN in which API Management gateway needs to be - configured in. Known values are: "None", "External", and "Internal". - :paramtype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - """ - super().__init__(tags=tags, **kwargs) - self.sku = sku - self.system_data: Optional["_models.SystemData"] = None - self.location = location - self.etag: Optional[str] = None - self.provisioning_state: Optional[str] = None - self.target_provisioning_state: Optional[str] = None - self.created_at_utc: Optional[datetime.datetime] = None - self.frontend = frontend - self.backend = backend - self.configuration_api = configuration_api - self.virtual_network_type = virtual_network_type - - -class ApiManagementGatewaySkuProperties(_serialization.Model): - """API Management gateway resource SKU properties. - - All required parameters must be populated in order to send to server. - - :ivar name: Name of the Sku. Required. Known values are: "Standard", - "WorkspaceGatewayStandard", and "WorkspaceGatewayPremium". - :vartype name: str or ~azure.mgmt.apimanagement.models.ApiGatewaySkuType - :ivar capacity: Capacity of the SKU (number of deployed units of the SKU). - :vartype capacity: int - """ - - _validation = { - "name": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "capacity": {"key": "capacity", "type": "int"}, - } - - def __init__( - self, *, name: Union[str, "_models.ApiGatewaySkuType"], capacity: Optional[int] = None, **kwargs: Any - ) -> None: - """ - :keyword name: Name of the Sku. Required. Known values are: "Standard", - "WorkspaceGatewayStandard", and "WorkspaceGatewayPremium". - :paramtype name: str or ~azure.mgmt.apimanagement.models.ApiGatewaySkuType - :keyword capacity: Capacity of the SKU (number of deployed units of the SKU). - :paramtype capacity: int - """ - super().__init__(**kwargs) - self.name = name - self.capacity = capacity - - -class ApiManagementGatewaySkuPropertiesForPatch(_serialization.Model): # pylint: disable=name-too-long - """API Management gateway resource SKU properties for PATCH operations given nothing should be - required. - - :ivar name: Name of the Sku. Known values are: "Standard", "WorkspaceGatewayStandard", and - "WorkspaceGatewayPremium". - :vartype name: str or ~azure.mgmt.apimanagement.models.ApiGatewaySkuType - :ivar capacity: Capacity of the SKU (number of deployed units of the SKU). - :vartype capacity: int - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "capacity": {"key": "capacity", "type": "int"}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "_models.ApiGatewaySkuType"]] = None, - capacity: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Name of the Sku. Known values are: "Standard", "WorkspaceGatewayStandard", and - "WorkspaceGatewayPremium". - :paramtype name: str or ~azure.mgmt.apimanagement.models.ApiGatewaySkuType - :keyword capacity: Capacity of the SKU (number of deployed units of the SKU). - :paramtype capacity: int - """ - super().__init__(**kwargs) - self.name = name - self.capacity = capacity - - -class ApiManagementGatewayUpdateParameters(ApimResource): - """Parameter supplied to Update API Management gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource is set to Microsoft.ApiManagement. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar sku: SKU properties of the API Management gateway. - :vartype sku: ~azure.mgmt.apimanagement.models.ApiManagementGatewaySkuPropertiesForPatch - :ivar etag: ETag of the resource. - :vartype etag: str - :ivar provisioning_state: The current provisioning state of the API Management gateway which - can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API Management gateway, which is - targeted by the long running operation started on the gateway. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management gateway.The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype created_at_utc: ~datetime.datetime - :ivar frontend: Information regarding how the gateway should be exposed. - :vartype frontend: ~azure.mgmt.apimanagement.models.FrontendConfiguration - :ivar backend: Information regarding how the gateway should integrate with backend systems. - :vartype backend: ~azure.mgmt.apimanagement.models.BackendConfiguration - :ivar configuration_api: Information regarding the Configuration API of the API Management - gateway. This is only applicable for API gateway with Standard SKU. - :vartype configuration_api: ~azure.mgmt.apimanagement.models.GatewayConfigurationApi - :ivar virtual_network_type: The type of VPN in which API Management gateway needs to be - configured in. Known values are: "None", "External", and "Internal". - :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "etag": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "target_provisioning_state": {"readonly": True}, - "created_at_utc": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, - "sku": {"key": "sku", "type": "ApiManagementGatewaySkuPropertiesForPatch"}, - "etag": {"key": "etag", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "target_provisioning_state": {"key": "properties.targetProvisioningState", "type": "str"}, - "created_at_utc": {"key": "properties.createdAtUtc", "type": "iso-8601"}, - "frontend": {"key": "properties.frontend", "type": "FrontendConfiguration"}, - "backend": {"key": "properties.backend", "type": "BackendConfiguration"}, - "configuration_api": {"key": "properties.configurationApi", "type": "GatewayConfigurationApi"}, - "virtual_network_type": {"key": "properties.virtualNetworkType", "type": "str"}, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - sku: Optional["_models.ApiManagementGatewaySkuPropertiesForPatch"] = None, - frontend: Optional["_models.FrontendConfiguration"] = None, - backend: Optional["_models.BackendConfiguration"] = None, - configuration_api: Optional["_models.GatewayConfigurationApi"] = None, - virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: SKU properties of the API Management gateway. - :paramtype sku: ~azure.mgmt.apimanagement.models.ApiManagementGatewaySkuPropertiesForPatch - :keyword frontend: Information regarding how the gateway should be exposed. - :paramtype frontend: ~azure.mgmt.apimanagement.models.FrontendConfiguration - :keyword backend: Information regarding how the gateway should integrate with backend systems. - :paramtype backend: ~azure.mgmt.apimanagement.models.BackendConfiguration - :keyword configuration_api: Information regarding the Configuration API of the API Management - gateway. This is only applicable for API gateway with Standard SKU. - :paramtype configuration_api: ~azure.mgmt.apimanagement.models.GatewayConfigurationApi - :keyword virtual_network_type: The type of VPN in which API Management gateway needs to be - configured in. Known values are: "None", "External", and "Internal". - :paramtype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - """ - super().__init__(tags=tags, **kwargs) - self.sku = sku - self.etag: Optional[str] = None - self.provisioning_state: Optional[str] = None - self.target_provisioning_state: Optional[str] = None - self.created_at_utc: Optional[datetime.datetime] = None - self.frontend = frontend - self.backend = backend - self.configuration_api = configuration_api - self.virtual_network_type = virtual_network_type - - -class ApiManagementGatewayUpdateProperties(ApiManagementGatewayBaseProperties): - """Properties of an API Management gateway resource description. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: The current provisioning state of the API Management gateway which - can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API Management gateway, which is - targeted by the long running operation started on the gateway. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management gateway.The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype created_at_utc: ~datetime.datetime - :ivar frontend: Information regarding how the gateway should be exposed. - :vartype frontend: ~azure.mgmt.apimanagement.models.FrontendConfiguration - :ivar backend: Information regarding how the gateway should integrate with backend systems. - :vartype backend: ~azure.mgmt.apimanagement.models.BackendConfiguration - :ivar configuration_api: Information regarding the Configuration API of the API Management - gateway. This is only applicable for API gateway with Standard SKU. - :vartype configuration_api: ~azure.mgmt.apimanagement.models.GatewayConfigurationApi - :ivar virtual_network_type: The type of VPN in which API Management gateway needs to be - configured in. Known values are: "None", "External", and "Internal". - :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - """ - - -class ApiManagementServiceApplyNetworkConfigurationParameters(_serialization.Model): # pylint: disable=name-too-long - """Parameter supplied to the Apply Network configuration operation. - - :ivar location: Location of the Api Management service to update for a multi-region service. - For a service deployed in a single region, this parameter is not required. - :vartype location: str - """ - - _attribute_map = { - "location": {"key": "location", "type": "str"}, - } - - def __init__(self, *, location: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword location: Location of the Api Management service to update for a multi-region service. - For a service deployed in a single region, this parameter is not required. - :paramtype location: str - """ - super().__init__(**kwargs) - self.location = location - - -class ApiManagementServiceBackupRestoreParameters(_serialization.Model): # pylint: disable=name-too-long - """Parameters supplied to the Backup/Restore of an API Management service operation. - - All required parameters must be populated in order to send to server. - - :ivar storage_account: The name of the Azure storage account (used to place/retrieve the - backup). Required. - :vartype storage_account: str - :ivar container_name: The name of the blob container (used to place/retrieve the backup). - Required. - :vartype container_name: str - :ivar backup_name: The name of the backup file to create/retrieve. Required. - :vartype backup_name: str - :ivar access_type: The type of access to be used for the storage account. Known values are: - "AccessKey", "SystemAssignedManagedIdentity", and "UserAssignedManagedIdentity". - :vartype access_type: str or ~azure.mgmt.apimanagement.models.AccessType - :ivar access_key: Storage account access key. Required only if ``accessType`` is set to - ``AccessKey``. - :vartype access_key: str - :ivar client_id: The Client ID of user assigned managed identity. Required only if - ``accessType`` is set to ``UserAssignedManagedIdentity``. - :vartype client_id: str - """ - - _validation = { - "storage_account": {"required": True}, - "container_name": {"required": True}, - "backup_name": {"required": True}, - } - - _attribute_map = { - "storage_account": {"key": "storageAccount", "type": "str"}, - "container_name": {"key": "containerName", "type": "str"}, - "backup_name": {"key": "backupName", "type": "str"}, - "access_type": {"key": "accessType", "type": "str"}, - "access_key": {"key": "accessKey", "type": "str"}, - "client_id": {"key": "clientId", "type": "str"}, - } - - def __init__( - self, - *, - storage_account: str, - container_name: str, - backup_name: str, - access_type: Union[str, "_models.AccessType"] = "AccessKey", - access_key: Optional[str] = None, - client_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword storage_account: The name of the Azure storage account (used to place/retrieve the - backup). Required. - :paramtype storage_account: str - :keyword container_name: The name of the blob container (used to place/retrieve the backup). - Required. - :paramtype container_name: str - :keyword backup_name: The name of the backup file to create/retrieve. Required. - :paramtype backup_name: str - :keyword access_type: The type of access to be used for the storage account. Known values are: - "AccessKey", "SystemAssignedManagedIdentity", and "UserAssignedManagedIdentity". - :paramtype access_type: str or ~azure.mgmt.apimanagement.models.AccessType - :keyword access_key: Storage account access key. Required only if ``accessType`` is set to - ``AccessKey``. - :paramtype access_key: str - :keyword client_id: The Client ID of user assigned managed identity. Required only if - ``accessType`` is set to ``UserAssignedManagedIdentity``. - :paramtype client_id: str - """ - super().__init__(**kwargs) - self.storage_account = storage_account - self.container_name = container_name - self.backup_name = backup_name - self.access_type = access_type - self.access_key = access_key - self.client_id = client_id - - -class ApiManagementServiceBaseProperties(_serialization.Model): - """Base Properties of an API Management service resource description. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar notification_sender_email: Email address from which the notification will be sent. - :vartype notification_sender_email: str - :ivar provisioning_state: The current provisioning state of the API Management service which - can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API Management service, which is - targeted by the long running operation started on the service. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management service.The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype created_at_utc: ~datetime.datetime - :ivar gateway_url: Gateway URL of the API Management service. - :vartype gateway_url: str - :ivar gateway_regional_url: Gateway URL of the API Management service in the Default Region. - :vartype gateway_regional_url: str - :ivar portal_url: Publisher portal endpoint Url of the API Management service. - :vartype portal_url: str - :ivar management_api_url: Management API endpoint URL of the API Management service. - :vartype management_api_url: str - :ivar scm_url: SCM endpoint URL of the API Management service. - :vartype scm_url: str - :ivar developer_portal_url: DEveloper Portal endpoint URL of the API Management service. - :vartype developer_portal_url: str - :ivar hostname_configurations: Custom hostname configuration of the API Management service. - :vartype hostname_configurations: list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management - service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management - service in Primary region which is deployed in an Internal Virtual Network. Available only for - Basic, Standard, Premium and Isolated SKU. - :vartype private_ip_addresses: list[str] - :ivar public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with - Virtual Network deployed service in the region. Supported only for Developer and Premium SKU - being deployed in Virtual Network. - :vartype public_ip_address_id: str - :ivar public_network_access: Whether or not public endpoint access is allowed for this API - Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If - 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. - Known values are: "Enabled" and "Disabled". - :vartype public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess - :ivar configuration_api: Configuration API configuration of the API Management service. - :vartype configuration_api: ~azure.mgmt.apimanagement.models.ConfigurationApi - :ivar virtual_network_configuration: Virtual network configuration of the API Management - service. - :vartype virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :ivar additional_locations: Additional datacenter locations of the API Management service. - :vartype additional_locations: list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :ivar custom_properties: Custom properties of the API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the - cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to - disable just TLS 1.1.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to - disable TLS 1.0 on an API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used - to disable just TLS 1.1 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used - to disable TLS 1.0 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable - HTTP2 protocol on an API Management service.
Not specifying any of these properties on - PATCH operation will reset omitted properties' values to their defaults. For all the settings - except Http2 the default value is ``True`` if the service was created on or before April 1, - 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can - disable any of the following ciphers by using settings - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, - TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. - For example, - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ - ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be - disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. - :vartype custom_properties: dict[str, str] - :ivar certificates: List of Certificates that need to be installed in the API Management - service. Max supported certificates that can be installed is 10. - :vartype certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :ivar enable_client_certificate: Property only meant to be used for Consumption SKU Service. - This enforces a client certificate to be presented on each request to the gateway. This also - enables the ability to authenticate the certificate in the policy on the gateway. - :vartype enable_client_certificate: bool - :ivar nat_gateway_state: Property can be used to enable NAT Gateway for this API Management - service. Known values are: "Enabled" and "Disabled". - :vartype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState - :ivar outbound_public_ip_addresses: Outbound public IPV4 address prefixes associated with NAT - Gateway deployed service. Available only for Premium SKU on stv2 platform. - :vartype outbound_public_ip_addresses: list[str] - :ivar disable_gateway: Property only valid for an Api Management service deployed in multiple - locations. This can be used to disable the gateway in master region. - :vartype disable_gateway: bool - :ivar virtual_network_type: The type of VPN in which API Management service needs to be - configured in. None (Default Value) means the API Management service is not part of any Virtual - Network, External means the API Management deployment is set up inside a Virtual Network having - an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside - a Virtual Network having an Intranet Facing Endpoint only. Known values are: "None", - "External", and "Internal". - :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - :ivar api_version_constraint: Control Plane Apis version constraint for the API Management - service. - :vartype api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint - :ivar restore: Undelete Api Management Service if it was previously soft-deleted. If this flag - is specified and set to True all other properties will be ignored. - :vartype restore: bool - :ivar private_endpoint_connections: List of Private Endpoint Connections of this service. - :vartype private_endpoint_connections: - list[~azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper] - :ivar platform_version: Compute Platform Version running the service in this location. Known - values are: "undetermined", "stv1", "stv2", "mtv1", and "stv2.1". - :vartype platform_version: str or ~azure.mgmt.apimanagement.models.PlatformVersion - :ivar legacy_portal_status: Status of legacy portal in the API Management service. Known values - are: "Enabled" and "Disabled". - :vartype legacy_portal_status: str or ~azure.mgmt.apimanagement.models.LegacyPortalStatus - :ivar developer_portal_status: Status of developer portal in this API Management service. Known - values are: "Enabled" and "Disabled". - :vartype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus - :ivar release_channel: Release Channel of this API Management service. Known values are: - "Preview", "Default", and "Stable". - :vartype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel - :ivar zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If - this flag is set to True, will return a APIM service with Zone redundant or fail the request if - any underneath component cannot be zone redundant. - :vartype zone_redundant: bool - """ - - _validation = { - "notification_sender_email": {"max_length": 100}, - "provisioning_state": {"readonly": True}, - "target_provisioning_state": {"readonly": True}, - "created_at_utc": {"readonly": True}, - "gateway_url": {"readonly": True}, - "gateway_regional_url": {"readonly": True}, - "portal_url": {"readonly": True}, - "management_api_url": {"readonly": True}, - "scm_url": {"readonly": True}, - "developer_portal_url": {"readonly": True}, - "public_ip_addresses": {"readonly": True}, - "private_ip_addresses": {"readonly": True}, - "outbound_public_ip_addresses": {"readonly": True}, - "platform_version": {"readonly": True}, - } - - _attribute_map = { - "notification_sender_email": {"key": "notificationSenderEmail", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "target_provisioning_state": {"key": "targetProvisioningState", "type": "str"}, - "created_at_utc": {"key": "createdAtUtc", "type": "iso-8601"}, - "gateway_url": {"key": "gatewayUrl", "type": "str"}, - "gateway_regional_url": {"key": "gatewayRegionalUrl", "type": "str"}, - "portal_url": {"key": "portalUrl", "type": "str"}, - "management_api_url": {"key": "managementApiUrl", "type": "str"}, - "scm_url": {"key": "scmUrl", "type": "str"}, - "developer_portal_url": {"key": "developerPortalUrl", "type": "str"}, - "hostname_configurations": {"key": "hostnameConfigurations", "type": "[HostnameConfiguration]"}, - "public_ip_addresses": {"key": "publicIPAddresses", "type": "[str]"}, - "private_ip_addresses": {"key": "privateIPAddresses", "type": "[str]"}, - "public_ip_address_id": {"key": "publicIpAddressId", "type": "str"}, - "public_network_access": {"key": "publicNetworkAccess", "type": "str"}, - "configuration_api": {"key": "configurationApi", "type": "ConfigurationApi"}, - "virtual_network_configuration": {"key": "virtualNetworkConfiguration", "type": "VirtualNetworkConfiguration"}, - "additional_locations": {"key": "additionalLocations", "type": "[AdditionalLocation]"}, - "custom_properties": {"key": "customProperties", "type": "{str}"}, - "certificates": {"key": "certificates", "type": "[CertificateConfiguration]"}, - "enable_client_certificate": {"key": "enableClientCertificate", "type": "bool"}, - "nat_gateway_state": {"key": "natGatewayState", "type": "str"}, - "outbound_public_ip_addresses": {"key": "outboundPublicIPAddresses", "type": "[str]"}, - "disable_gateway": {"key": "disableGateway", "type": "bool"}, - "virtual_network_type": {"key": "virtualNetworkType", "type": "str"}, - "api_version_constraint": {"key": "apiVersionConstraint", "type": "ApiVersionConstraint"}, - "restore": {"key": "restore", "type": "bool"}, - "private_endpoint_connections": { - "key": "privateEndpointConnections", - "type": "[RemotePrivateEndpointConnectionWrapper]", - }, - "platform_version": {"key": "platformVersion", "type": "str"}, - "legacy_portal_status": {"key": "legacyPortalStatus", "type": "str"}, - "developer_portal_status": {"key": "developerPortalStatus", "type": "str"}, - "release_channel": {"key": "releaseChannel", "type": "str"}, - "zone_redundant": {"key": "zoneRedundant", "type": "bool"}, - } - - def __init__( # pylint: disable=too-many-locals - self, - *, - notification_sender_email: Optional[str] = None, - hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = None, - public_ip_address_id: Optional[str] = None, - public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - configuration_api: Optional["_models.ConfigurationApi"] = None, - virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, - additional_locations: Optional[list["_models.AdditionalLocation"]] = None, - custom_properties: Optional[dict[str, str]] = None, - certificates: Optional[list["_models.CertificateConfiguration"]] = None, - enable_client_certificate: bool = False, - nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, - disable_gateway: bool = False, - virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, - api_version_constraint: Optional["_models.ApiVersionConstraint"] = None, - restore: bool = False, - private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = None, - legacy_portal_status: Union[str, "_models.LegacyPortalStatus"] = "Enabled", - developer_portal_status: Union[str, "_models.DeveloperPortalStatus"] = "Enabled", - release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = None, - zone_redundant: bool = False, - **kwargs: Any - ) -> None: - """ - :keyword notification_sender_email: Email address from which the notification will be sent. - :paramtype notification_sender_email: str - :keyword hostname_configurations: Custom hostname configuration of the API Management service. - :paramtype hostname_configurations: - list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :keyword public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with - Virtual Network deployed service in the region. Supported only for Developer and Premium SKU - being deployed in Virtual Network. - :paramtype public_ip_address_id: str - :keyword public_network_access: Whether or not public endpoint access is allowed for this API - Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If - 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. - Known values are: "Enabled" and "Disabled". - :paramtype public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess - :keyword configuration_api: Configuration API configuration of the API Management service. - :paramtype configuration_api: ~azure.mgmt.apimanagement.models.ConfigurationApi - :keyword virtual_network_configuration: Virtual network configuration of the API Management - service. - :paramtype virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :keyword additional_locations: Additional datacenter locations of the API Management service. - :paramtype additional_locations: list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :keyword custom_properties: Custom properties of the API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the - cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to - disable just TLS 1.1.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to - disable TLS 1.0 on an API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used - to disable just TLS 1.1 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used - to disable TLS 1.0 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable - HTTP2 protocol on an API Management service.
Not specifying any of these properties on - PATCH operation will reset omitted properties' values to their defaults. For all the settings - except Http2 the default value is ``True`` if the service was created on or before April 1, - 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can - disable any of the following ciphers by using settings - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, - TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. - For example, - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ - ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be - disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. - :paramtype custom_properties: dict[str, str] - :keyword certificates: List of Certificates that need to be installed in the API Management - service. Max supported certificates that can be installed is 10. - :paramtype certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :keyword enable_client_certificate: Property only meant to be used for Consumption SKU Service. - This enforces a client certificate to be presented on each request to the gateway. This also - enables the ability to authenticate the certificate in the policy on the gateway. - :paramtype enable_client_certificate: bool - :keyword nat_gateway_state: Property can be used to enable NAT Gateway for this API Management - service. Known values are: "Enabled" and "Disabled". - :paramtype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState - :keyword disable_gateway: Property only valid for an Api Management service deployed in - multiple locations. This can be used to disable the gateway in master region. - :paramtype disable_gateway: bool - :keyword virtual_network_type: The type of VPN in which API Management service needs to be - configured in. None (Default Value) means the API Management service is not part of any Virtual - Network, External means the API Management deployment is set up inside a Virtual Network having - an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside - a Virtual Network having an Intranet Facing Endpoint only. Known values are: "None", - "External", and "Internal". - :paramtype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - :keyword api_version_constraint: Control Plane Apis version constraint for the API Management - service. - :paramtype api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint - :keyword restore: Undelete Api Management Service if it was previously soft-deleted. If this - flag is specified and set to True all other properties will be ignored. - :paramtype restore: bool - :keyword private_endpoint_connections: List of Private Endpoint Connections of this service. - :paramtype private_endpoint_connections: - list[~azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper] - :keyword legacy_portal_status: Status of legacy portal in the API Management service. Known - values are: "Enabled" and "Disabled". - :paramtype legacy_portal_status: str or ~azure.mgmt.apimanagement.models.LegacyPortalStatus - :keyword developer_portal_status: Status of developer portal in this API Management service. - Known values are: "Enabled" and "Disabled". - :paramtype developer_portal_status: str or - ~azure.mgmt.apimanagement.models.DeveloperPortalStatus - :keyword release_channel: Release Channel of this API Management service. Known values are: - "Preview", "Default", and "Stable". - :paramtype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel - :keyword zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If - this flag is set to True, will return a APIM service with Zone redundant or fail the request if - any underneath component cannot be zone redundant. - :paramtype zone_redundant: bool - """ - super().__init__(**kwargs) - self.notification_sender_email = notification_sender_email - self.provisioning_state: Optional[str] = None - self.target_provisioning_state: Optional[str] = None - self.created_at_utc: Optional[datetime.datetime] = None - self.gateway_url: Optional[str] = None - self.gateway_regional_url: Optional[str] = None - self.portal_url: Optional[str] = None - self.management_api_url: Optional[str] = None - self.scm_url: Optional[str] = None - self.developer_portal_url: Optional[str] = None - self.hostname_configurations = hostname_configurations - self.public_ip_addresses: Optional[list[str]] = None - self.private_ip_addresses: Optional[list[str]] = None - self.public_ip_address_id = public_ip_address_id - self.public_network_access = public_network_access - self.configuration_api = configuration_api - self.virtual_network_configuration = virtual_network_configuration - self.additional_locations = additional_locations - self.custom_properties = custom_properties - self.certificates = certificates - self.enable_client_certificate = enable_client_certificate - self.nat_gateway_state = nat_gateway_state - self.outbound_public_ip_addresses: Optional[list[str]] = None - self.disable_gateway = disable_gateway - self.virtual_network_type = virtual_network_type - self.api_version_constraint = api_version_constraint - self.restore = restore - self.private_endpoint_connections = private_endpoint_connections - self.platform_version: Optional[Union[str, "_models.PlatformVersion"]] = None - self.legacy_portal_status = legacy_portal_status - self.developer_portal_status = developer_portal_status - self.release_channel = release_channel - self.zone_redundant = zone_redundant - - -class ApiManagementServiceCheckNameAvailabilityParameters(_serialization.Model): # pylint: disable=name-too-long - """Parameters supplied to the CheckNameAvailability operation. - - All required parameters must be populated in order to send to server. - - :ivar name: The name to check for availability. Required. - :vartype name: str - """ - - _validation = { - "name": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - } - - def __init__(self, *, name: str, **kwargs: Any) -> None: - """ - :keyword name: The name to check for availability. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.name = name - - -class ApiManagementServiceGetDomainOwnershipIdentifierResult(_serialization.Model): # pylint: disable=name-too-long - """Response of the GetDomainOwnershipIdentifier operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar domain_ownership_identifier: The domain ownership identifier value. - :vartype domain_ownership_identifier: str - """ - - _validation = { - "domain_ownership_identifier": {"readonly": True}, - } - - _attribute_map = { - "domain_ownership_identifier": {"key": "domainOwnershipIdentifier", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.domain_ownership_identifier: Optional[str] = None - - -class ApiManagementServiceGetSsoTokenResult(_serialization.Model): - """The response of the GetSsoToken operation. - - :ivar redirect_uri: Redirect URL to the Publisher Portal containing the SSO token. - :vartype redirect_uri: str - """ - - _attribute_map = { - "redirect_uri": {"key": "redirectUri", "type": "str"}, - } - - def __init__(self, *, redirect_uri: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword redirect_uri: Redirect URL to the Publisher Portal containing the SSO token. - :paramtype redirect_uri: str - """ - super().__init__(**kwargs) - self.redirect_uri = redirect_uri - - -class ApiManagementServiceIdentity(_serialization.Model): - """Identity properties of the Api Management service resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar type: The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' - includes both an implicitly created identity and a set of user assigned identities. The type - 'None' will remove any identities from the service. Required. Known values are: - "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", and "None". - :vartype type: str or ~azure.mgmt.apimanagement.models.ApimIdentityType - :ivar principal_id: The principal id of the identity. - :vartype principal_id: str - :ivar tenant_id: The client tenant id of the identity. - :vartype tenant_id: str - :ivar user_assigned_identities: The list of user identities associated with the resource. The - user identity dictionary key references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :vartype user_assigned_identities: dict[str, - ~azure.mgmt.apimanagement.models.UserIdentityProperties] - """ - - _validation = { - "type": {"required": True}, - "principal_id": {"readonly": True}, - "tenant_id": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "principal_id": {"key": "principalId", "type": "str"}, - "tenant_id": {"key": "tenantId", "type": "str"}, - "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{UserIdentityProperties}"}, - } - - def __init__( - self, - *, - type: Union[str, "_models.ApimIdentityType"], - user_assigned_identities: Optional[dict[str, "_models.UserIdentityProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The type of identity used for the resource. The type 'SystemAssigned, - UserAssigned' includes both an implicitly created identity and a set of user assigned - identities. The type 'None' will remove any identities from the service. Required. Known values - are: "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", and "None". - :paramtype type: str or ~azure.mgmt.apimanagement.models.ApimIdentityType - :keyword user_assigned_identities: The list of user identities associated with the resource. - The user identity dictionary key references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :paramtype user_assigned_identities: dict[str, - ~azure.mgmt.apimanagement.models.UserIdentityProperties] - """ - super().__init__(**kwargs) - self.type = type - self.principal_id: Optional[str] = None - self.tenant_id: Optional[str] = None - self.user_assigned_identities = user_assigned_identities - - -class ApiManagementServiceListResult(_serialization.Model): - """The response of the List API Management services operation. - - All required parameters must be populated in order to send to server. - - :ivar value: Result of the List API Management services operation. Required. - :vartype value: list[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list - of API Management services. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ApiManagementServiceResource]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: list["_models.ApiManagementServiceResource"], next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: Result of the List API Management services operation. Required. - :paramtype value: list[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :keyword next_link: Link to the next set of results. Not empty if Value contains incomplete - list of API Management services. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ApiManagementServiceNameAvailabilityResult(_serialization.Model): # pylint: disable=name-too-long - """Response of the CheckNameAvailability operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name_available: True if the name is available and can be used to create a new API - Management service; otherwise false. - :vartype name_available: bool - :ivar message: If reason == invalid, provide the user with the reason why the given name is - invalid, and provide the resource naming requirements so that the user can select a valid name. - If reason == AlreadyExists, explain that :code:`` is already in use, and direct - them to select a different name. - :vartype message: str - :ivar reason: Invalid indicates the name provided does not match the resource provider’s naming - requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the - name is already in use and is therefore unavailable. Known values are: "Valid", "Invalid", and - "AlreadyExists". - :vartype reason: str or ~azure.mgmt.apimanagement.models.NameAvailabilityReason - """ - - _validation = { - "name_available": {"readonly": True}, - "message": {"readonly": True}, - } - - _attribute_map = { - "name_available": {"key": "nameAvailable", "type": "bool"}, - "message": {"key": "message", "type": "str"}, - "reason": {"key": "reason", "type": "str"}, - } - - def __init__(self, *, reason: Optional[Union[str, "_models.NameAvailabilityReason"]] = None, **kwargs: Any) -> None: - """ - :keyword reason: Invalid indicates the name provided does not match the resource provider’s - naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates - that the name is already in use and is therefore unavailable. Known values are: "Valid", - "Invalid", and "AlreadyExists". - :paramtype reason: str or ~azure.mgmt.apimanagement.models.NameAvailabilityReason - """ - super().__init__(**kwargs) - self.name_available: Optional[bool] = None - self.message: Optional[str] = None - self.reason = reason - - -class ApiManagementServiceProperties(ApiManagementServiceBaseProperties): - """Properties of an API Management service resource description. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar notification_sender_email: Email address from which the notification will be sent. - :vartype notification_sender_email: str - :ivar provisioning_state: The current provisioning state of the API Management service which - can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API Management service, which is - targeted by the long running operation started on the service. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management service.The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype created_at_utc: ~datetime.datetime - :ivar gateway_url: Gateway URL of the API Management service. - :vartype gateway_url: str - :ivar gateway_regional_url: Gateway URL of the API Management service in the Default Region. - :vartype gateway_regional_url: str - :ivar portal_url: Publisher portal endpoint Url of the API Management service. - :vartype portal_url: str - :ivar management_api_url: Management API endpoint URL of the API Management service. - :vartype management_api_url: str - :ivar scm_url: SCM endpoint URL of the API Management service. - :vartype scm_url: str - :ivar developer_portal_url: DEveloper Portal endpoint URL of the API Management service. - :vartype developer_portal_url: str - :ivar hostname_configurations: Custom hostname configuration of the API Management service. - :vartype hostname_configurations: list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management - service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management - service in Primary region which is deployed in an Internal Virtual Network. Available only for - Basic, Standard, Premium and Isolated SKU. - :vartype private_ip_addresses: list[str] - :ivar public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with - Virtual Network deployed service in the region. Supported only for Developer and Premium SKU - being deployed in Virtual Network. - :vartype public_ip_address_id: str - :ivar public_network_access: Whether or not public endpoint access is allowed for this API - Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If - 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. - Known values are: "Enabled" and "Disabled". - :vartype public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess - :ivar configuration_api: Configuration API configuration of the API Management service. - :vartype configuration_api: ~azure.mgmt.apimanagement.models.ConfigurationApi - :ivar virtual_network_configuration: Virtual network configuration of the API Management - service. - :vartype virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :ivar additional_locations: Additional datacenter locations of the API Management service. - :vartype additional_locations: list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :ivar custom_properties: Custom properties of the API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the - cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to - disable just TLS 1.1.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to - disable TLS 1.0 on an API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used - to disable just TLS 1.1 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used - to disable TLS 1.0 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable - HTTP2 protocol on an API Management service.
Not specifying any of these properties on - PATCH operation will reset omitted properties' values to their defaults. For all the settings - except Http2 the default value is ``True`` if the service was created on or before April 1, - 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can - disable any of the following ciphers by using settings - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, - TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. - For example, - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ - ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be - disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. - :vartype custom_properties: dict[str, str] - :ivar certificates: List of Certificates that need to be installed in the API Management - service. Max supported certificates that can be installed is 10. - :vartype certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :ivar enable_client_certificate: Property only meant to be used for Consumption SKU Service. - This enforces a client certificate to be presented on each request to the gateway. This also - enables the ability to authenticate the certificate in the policy on the gateway. - :vartype enable_client_certificate: bool - :ivar nat_gateway_state: Property can be used to enable NAT Gateway for this API Management - service. Known values are: "Enabled" and "Disabled". - :vartype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState - :ivar outbound_public_ip_addresses: Outbound public IPV4 address prefixes associated with NAT - Gateway deployed service. Available only for Premium SKU on stv2 platform. - :vartype outbound_public_ip_addresses: list[str] - :ivar disable_gateway: Property only valid for an Api Management service deployed in multiple - locations. This can be used to disable the gateway in master region. - :vartype disable_gateway: bool - :ivar virtual_network_type: The type of VPN in which API Management service needs to be - configured in. None (Default Value) means the API Management service is not part of any Virtual - Network, External means the API Management deployment is set up inside a Virtual Network having - an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside - a Virtual Network having an Intranet Facing Endpoint only. Known values are: "None", - "External", and "Internal". - :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - :ivar api_version_constraint: Control Plane Apis version constraint for the API Management - service. - :vartype api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint - :ivar restore: Undelete Api Management Service if it was previously soft-deleted. If this flag - is specified and set to True all other properties will be ignored. - :vartype restore: bool - :ivar private_endpoint_connections: List of Private Endpoint Connections of this service. - :vartype private_endpoint_connections: - list[~azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper] - :ivar platform_version: Compute Platform Version running the service in this location. Known - values are: "undetermined", "stv1", "stv2", "mtv1", and "stv2.1". - :vartype platform_version: str or ~azure.mgmt.apimanagement.models.PlatformVersion - :ivar legacy_portal_status: Status of legacy portal in the API Management service. Known values - are: "Enabled" and "Disabled". - :vartype legacy_portal_status: str or ~azure.mgmt.apimanagement.models.LegacyPortalStatus - :ivar developer_portal_status: Status of developer portal in this API Management service. Known - values are: "Enabled" and "Disabled". - :vartype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus - :ivar release_channel: Release Channel of this API Management service. Known values are: - "Preview", "Default", and "Stable". - :vartype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel - :ivar zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If - this flag is set to True, will return a APIM service with Zone redundant or fail the request if - any underneath component cannot be zone redundant. - :vartype zone_redundant: bool - :ivar publisher_email: Publisher email. Required. - :vartype publisher_email: str - :ivar publisher_name: Publisher name. Required. - :vartype publisher_name: str - """ - - _validation = { - "notification_sender_email": {"max_length": 100}, - "provisioning_state": {"readonly": True}, - "target_provisioning_state": {"readonly": True}, - "created_at_utc": {"readonly": True}, - "gateway_url": {"readonly": True}, - "gateway_regional_url": {"readonly": True}, - "portal_url": {"readonly": True}, - "management_api_url": {"readonly": True}, - "scm_url": {"readonly": True}, - "developer_portal_url": {"readonly": True}, - "public_ip_addresses": {"readonly": True}, - "private_ip_addresses": {"readonly": True}, - "outbound_public_ip_addresses": {"readonly": True}, - "platform_version": {"readonly": True}, - "publisher_email": {"required": True, "max_length": 100}, - "publisher_name": {"required": True, "max_length": 100}, - } - - _attribute_map = { - "notification_sender_email": {"key": "notificationSenderEmail", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "target_provisioning_state": {"key": "targetProvisioningState", "type": "str"}, - "created_at_utc": {"key": "createdAtUtc", "type": "iso-8601"}, - "gateway_url": {"key": "gatewayUrl", "type": "str"}, - "gateway_regional_url": {"key": "gatewayRegionalUrl", "type": "str"}, - "portal_url": {"key": "portalUrl", "type": "str"}, - "management_api_url": {"key": "managementApiUrl", "type": "str"}, - "scm_url": {"key": "scmUrl", "type": "str"}, - "developer_portal_url": {"key": "developerPortalUrl", "type": "str"}, - "hostname_configurations": {"key": "hostnameConfigurations", "type": "[HostnameConfiguration]"}, - "public_ip_addresses": {"key": "publicIPAddresses", "type": "[str]"}, - "private_ip_addresses": {"key": "privateIPAddresses", "type": "[str]"}, - "public_ip_address_id": {"key": "publicIpAddressId", "type": "str"}, - "public_network_access": {"key": "publicNetworkAccess", "type": "str"}, - "configuration_api": {"key": "configurationApi", "type": "ConfigurationApi"}, - "virtual_network_configuration": {"key": "virtualNetworkConfiguration", "type": "VirtualNetworkConfiguration"}, - "additional_locations": {"key": "additionalLocations", "type": "[AdditionalLocation]"}, - "custom_properties": {"key": "customProperties", "type": "{str}"}, - "certificates": {"key": "certificates", "type": "[CertificateConfiguration]"}, - "enable_client_certificate": {"key": "enableClientCertificate", "type": "bool"}, - "nat_gateway_state": {"key": "natGatewayState", "type": "str"}, - "outbound_public_ip_addresses": {"key": "outboundPublicIPAddresses", "type": "[str]"}, - "disable_gateway": {"key": "disableGateway", "type": "bool"}, - "virtual_network_type": {"key": "virtualNetworkType", "type": "str"}, - "api_version_constraint": {"key": "apiVersionConstraint", "type": "ApiVersionConstraint"}, - "restore": {"key": "restore", "type": "bool"}, - "private_endpoint_connections": { - "key": "privateEndpointConnections", - "type": "[RemotePrivateEndpointConnectionWrapper]", - }, - "platform_version": {"key": "platformVersion", "type": "str"}, - "legacy_portal_status": {"key": "legacyPortalStatus", "type": "str"}, - "developer_portal_status": {"key": "developerPortalStatus", "type": "str"}, - "release_channel": {"key": "releaseChannel", "type": "str"}, - "zone_redundant": {"key": "zoneRedundant", "type": "bool"}, - "publisher_email": {"key": "publisherEmail", "type": "str"}, - "publisher_name": {"key": "publisherName", "type": "str"}, - } - - def __init__( # pylint: disable=too-many-locals - self, - *, - publisher_email: str, - publisher_name: str, - notification_sender_email: Optional[str] = None, - hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = None, - public_ip_address_id: Optional[str] = None, - public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - configuration_api: Optional["_models.ConfigurationApi"] = None, - virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, - additional_locations: Optional[list["_models.AdditionalLocation"]] = None, - custom_properties: Optional[dict[str, str]] = None, - certificates: Optional[list["_models.CertificateConfiguration"]] = None, - enable_client_certificate: bool = False, - nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, - disable_gateway: bool = False, - virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, - api_version_constraint: Optional["_models.ApiVersionConstraint"] = None, - restore: bool = False, - private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = None, - legacy_portal_status: Union[str, "_models.LegacyPortalStatus"] = "Enabled", - developer_portal_status: Union[str, "_models.DeveloperPortalStatus"] = "Enabled", - release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = None, - zone_redundant: bool = False, - **kwargs: Any - ) -> None: - """ - :keyword notification_sender_email: Email address from which the notification will be sent. - :paramtype notification_sender_email: str - :keyword hostname_configurations: Custom hostname configuration of the API Management service. - :paramtype hostname_configurations: - list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :keyword public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with - Virtual Network deployed service in the region. Supported only for Developer and Premium SKU - being deployed in Virtual Network. - :paramtype public_ip_address_id: str - :keyword public_network_access: Whether or not public endpoint access is allowed for this API - Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If - 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. - Known values are: "Enabled" and "Disabled". - :paramtype public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess - :keyword configuration_api: Configuration API configuration of the API Management service. - :paramtype configuration_api: ~azure.mgmt.apimanagement.models.ConfigurationApi - :keyword virtual_network_configuration: Virtual network configuration of the API Management - service. - :paramtype virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :keyword additional_locations: Additional datacenter locations of the API Management service. - :paramtype additional_locations: list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :keyword custom_properties: Custom properties of the API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the - cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to - disable just TLS 1.1.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to - disable TLS 1.0 on an API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used - to disable just TLS 1.1 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used - to disable TLS 1.0 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable - HTTP2 protocol on an API Management service.
Not specifying any of these properties on - PATCH operation will reset omitted properties' values to their defaults. For all the settings - except Http2 the default value is ``True`` if the service was created on or before April 1, - 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can - disable any of the following ciphers by using settings - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, - TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. - For example, - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ - ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be - disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. - :paramtype custom_properties: dict[str, str] - :keyword certificates: List of Certificates that need to be installed in the API Management - service. Max supported certificates that can be installed is 10. - :paramtype certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :keyword enable_client_certificate: Property only meant to be used for Consumption SKU Service. - This enforces a client certificate to be presented on each request to the gateway. This also - enables the ability to authenticate the certificate in the policy on the gateway. - :paramtype enable_client_certificate: bool - :keyword nat_gateway_state: Property can be used to enable NAT Gateway for this API Management - service. Known values are: "Enabled" and "Disabled". - :paramtype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState - :keyword disable_gateway: Property only valid for an Api Management service deployed in - multiple locations. This can be used to disable the gateway in master region. - :paramtype disable_gateway: bool - :keyword virtual_network_type: The type of VPN in which API Management service needs to be - configured in. None (Default Value) means the API Management service is not part of any Virtual - Network, External means the API Management deployment is set up inside a Virtual Network having - an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside - a Virtual Network having an Intranet Facing Endpoint only. Known values are: "None", - "External", and "Internal". - :paramtype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - :keyword api_version_constraint: Control Plane Apis version constraint for the API Management - service. - :paramtype api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint - :keyword restore: Undelete Api Management Service if it was previously soft-deleted. If this - flag is specified and set to True all other properties will be ignored. - :paramtype restore: bool - :keyword private_endpoint_connections: List of Private Endpoint Connections of this service. - :paramtype private_endpoint_connections: - list[~azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper] - :keyword legacy_portal_status: Status of legacy portal in the API Management service. Known - values are: "Enabled" and "Disabled". - :paramtype legacy_portal_status: str or ~azure.mgmt.apimanagement.models.LegacyPortalStatus - :keyword developer_portal_status: Status of developer portal in this API Management service. - Known values are: "Enabled" and "Disabled". - :paramtype developer_portal_status: str or - ~azure.mgmt.apimanagement.models.DeveloperPortalStatus - :keyword release_channel: Release Channel of this API Management service. Known values are: - "Preview", "Default", and "Stable". - :paramtype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel - :keyword zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If - this flag is set to True, will return a APIM service with Zone redundant or fail the request if - any underneath component cannot be zone redundant. - :paramtype zone_redundant: bool - :keyword publisher_email: Publisher email. Required. - :paramtype publisher_email: str - :keyword publisher_name: Publisher name. Required. - :paramtype publisher_name: str - """ - super().__init__( - notification_sender_email=notification_sender_email, - hostname_configurations=hostname_configurations, - public_ip_address_id=public_ip_address_id, - public_network_access=public_network_access, - configuration_api=configuration_api, - virtual_network_configuration=virtual_network_configuration, - additional_locations=additional_locations, - custom_properties=custom_properties, - certificates=certificates, - enable_client_certificate=enable_client_certificate, - nat_gateway_state=nat_gateway_state, - disable_gateway=disable_gateway, - virtual_network_type=virtual_network_type, - api_version_constraint=api_version_constraint, - restore=restore, - private_endpoint_connections=private_endpoint_connections, - legacy_portal_status=legacy_portal_status, - developer_portal_status=developer_portal_status, - release_channel=release_channel, - zone_redundant=zone_redundant, - **kwargs - ) - self.publisher_email = publisher_email - self.publisher_name = publisher_name - - -class ApiManagementServiceResource(ApimResource): - """A single API Management service resource in List or Get response. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource is set to Microsoft.ApiManagement. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar sku: SKU properties of the API Management service. Required. - :vartype sku: ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties - :ivar identity: Managed service identity of the Api Management service. - :vartype identity: ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity - :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData - :ivar location: Resource location. Required. - :vartype location: str - :ivar etag: ETag of the resource. - :vartype etag: str - :ivar zones: A list of availability zones denoting where the resource needs to come from. - :vartype zones: list[str] - :ivar notification_sender_email: Email address from which the notification will be sent. - :vartype notification_sender_email: str - :ivar provisioning_state: The current provisioning state of the API Management service which - can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API Management service, which is - targeted by the long running operation started on the service. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management service.The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype created_at_utc: ~datetime.datetime - :ivar gateway_url: Gateway URL of the API Management service. - :vartype gateway_url: str - :ivar gateway_regional_url: Gateway URL of the API Management service in the Default Region. - :vartype gateway_regional_url: str - :ivar portal_url: Publisher portal endpoint Url of the API Management service. - :vartype portal_url: str - :ivar management_api_url: Management API endpoint URL of the API Management service. - :vartype management_api_url: str - :ivar scm_url: SCM endpoint URL of the API Management service. - :vartype scm_url: str - :ivar developer_portal_url: DEveloper Portal endpoint URL of the API Management service. - :vartype developer_portal_url: str - :ivar hostname_configurations: Custom hostname configuration of the API Management service. - :vartype hostname_configurations: list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management - service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management - service in Primary region which is deployed in an Internal Virtual Network. Available only for - Basic, Standard, Premium and Isolated SKU. - :vartype private_ip_addresses: list[str] - :ivar public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with - Virtual Network deployed service in the region. Supported only for Developer and Premium SKU - being deployed in Virtual Network. - :vartype public_ip_address_id: str - :ivar public_network_access: Whether or not public endpoint access is allowed for this API - Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If - 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. - Known values are: "Enabled" and "Disabled". - :vartype public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess - :ivar configuration_api: Configuration API configuration of the API Management service. - :vartype configuration_api: ~azure.mgmt.apimanagement.models.ConfigurationApi - :ivar virtual_network_configuration: Virtual network configuration of the API Management - service. - :vartype virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :ivar additional_locations: Additional datacenter locations of the API Management service. - :vartype additional_locations: list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :ivar custom_properties: Custom properties of the API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the - cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to - disable just TLS 1.1.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to - disable TLS 1.0 on an API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used - to disable just TLS 1.1 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used - to disable TLS 1.0 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable - HTTP2 protocol on an API Management service.
Not specifying any of these properties on - PATCH operation will reset omitted properties' values to their defaults. For all the settings - except Http2 the default value is ``True`` if the service was created on or before April 1, - 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can - disable any of the following ciphers by using settings - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, - TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. - For example, - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ - ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be - disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. - :vartype custom_properties: dict[str, str] - :ivar certificates: List of Certificates that need to be installed in the API Management - service. Max supported certificates that can be installed is 10. - :vartype certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :ivar enable_client_certificate: Property only meant to be used for Consumption SKU Service. - This enforces a client certificate to be presented on each request to the gateway. This also - enables the ability to authenticate the certificate in the policy on the gateway. - :vartype enable_client_certificate: bool - :ivar nat_gateway_state: Property can be used to enable NAT Gateway for this API Management - service. Known values are: "Enabled" and "Disabled". - :vartype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState - :ivar outbound_public_ip_addresses: Outbound public IPV4 address prefixes associated with NAT - Gateway deployed service. Available only for Premium SKU on stv2 platform. - :vartype outbound_public_ip_addresses: list[str] - :ivar disable_gateway: Property only valid for an Api Management service deployed in multiple - locations. This can be used to disable the gateway in master region. - :vartype disable_gateway: bool - :ivar virtual_network_type: The type of VPN in which API Management service needs to be - configured in. None (Default Value) means the API Management service is not part of any Virtual - Network, External means the API Management deployment is set up inside a Virtual Network having - an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside - a Virtual Network having an Intranet Facing Endpoint only. Known values are: "None", - "External", and "Internal". - :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - :ivar api_version_constraint: Control Plane Apis version constraint for the API Management - service. - :vartype api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint - :ivar restore: Undelete Api Management Service if it was previously soft-deleted. If this flag - is specified and set to True all other properties will be ignored. - :vartype restore: bool - :ivar private_endpoint_connections: List of Private Endpoint Connections of this service. - :vartype private_endpoint_connections: - list[~azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper] - :ivar platform_version: Compute Platform Version running the service in this location. Known - values are: "undetermined", "stv1", "stv2", "mtv1", and "stv2.1". - :vartype platform_version: str or ~azure.mgmt.apimanagement.models.PlatformVersion - :ivar legacy_portal_status: Status of legacy portal in the API Management service. Known values - are: "Enabled" and "Disabled". - :vartype legacy_portal_status: str or ~azure.mgmt.apimanagement.models.LegacyPortalStatus - :ivar developer_portal_status: Status of developer portal in this API Management service. Known - values are: "Enabled" and "Disabled". - :vartype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus - :ivar release_channel: Release Channel of this API Management service. Known values are: - "Preview", "Default", and "Stable". - :vartype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel - :ivar zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If - this flag is set to True, will return a APIM service with Zone redundant or fail the request if - any underneath component cannot be zone redundant. - :vartype zone_redundant: bool - :ivar publisher_email: Publisher email. Required. - :vartype publisher_email: str - :ivar publisher_name: Publisher name. Required. - :vartype publisher_name: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "sku": {"required": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "etag": {"readonly": True}, - "notification_sender_email": {"max_length": 100}, - "provisioning_state": {"readonly": True}, - "target_provisioning_state": {"readonly": True}, - "created_at_utc": {"readonly": True}, - "gateway_url": {"readonly": True}, - "gateway_regional_url": {"readonly": True}, - "portal_url": {"readonly": True}, - "management_api_url": {"readonly": True}, - "scm_url": {"readonly": True}, - "developer_portal_url": {"readonly": True}, - "public_ip_addresses": {"readonly": True}, - "private_ip_addresses": {"readonly": True}, - "outbound_public_ip_addresses": {"readonly": True}, - "platform_version": {"readonly": True}, - "publisher_email": {"required": True, "max_length": 100}, - "publisher_name": {"required": True, "max_length": 100}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, - "sku": {"key": "sku", "type": "ApiManagementServiceSkuProperties"}, - "identity": {"key": "identity", "type": "ApiManagementServiceIdentity"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "location": {"key": "location", "type": "str"}, - "etag": {"key": "etag", "type": "str"}, - "zones": {"key": "zones", "type": "[str]"}, - "notification_sender_email": {"key": "properties.notificationSenderEmail", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "target_provisioning_state": {"key": "properties.targetProvisioningState", "type": "str"}, - "created_at_utc": {"key": "properties.createdAtUtc", "type": "iso-8601"}, - "gateway_url": {"key": "properties.gatewayUrl", "type": "str"}, - "gateway_regional_url": {"key": "properties.gatewayRegionalUrl", "type": "str"}, - "portal_url": {"key": "properties.portalUrl", "type": "str"}, - "management_api_url": {"key": "properties.managementApiUrl", "type": "str"}, - "scm_url": {"key": "properties.scmUrl", "type": "str"}, - "developer_portal_url": {"key": "properties.developerPortalUrl", "type": "str"}, - "hostname_configurations": {"key": "properties.hostnameConfigurations", "type": "[HostnameConfiguration]"}, - "public_ip_addresses": {"key": "properties.publicIPAddresses", "type": "[str]"}, - "private_ip_addresses": {"key": "properties.privateIPAddresses", "type": "[str]"}, - "public_ip_address_id": {"key": "properties.publicIpAddressId", "type": "str"}, - "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, - "configuration_api": {"key": "properties.configurationApi", "type": "ConfigurationApi"}, - "virtual_network_configuration": { - "key": "properties.virtualNetworkConfiguration", - "type": "VirtualNetworkConfiguration", - }, - "additional_locations": {"key": "properties.additionalLocations", "type": "[AdditionalLocation]"}, - "custom_properties": {"key": "properties.customProperties", "type": "{str}"}, - "certificates": {"key": "properties.certificates", "type": "[CertificateConfiguration]"}, - "enable_client_certificate": {"key": "properties.enableClientCertificate", "type": "bool"}, - "nat_gateway_state": {"key": "properties.natGatewayState", "type": "str"}, - "outbound_public_ip_addresses": {"key": "properties.outboundPublicIPAddresses", "type": "[str]"}, - "disable_gateway": {"key": "properties.disableGateway", "type": "bool"}, - "virtual_network_type": {"key": "properties.virtualNetworkType", "type": "str"}, - "api_version_constraint": {"key": "properties.apiVersionConstraint", "type": "ApiVersionConstraint"}, - "restore": {"key": "properties.restore", "type": "bool"}, - "private_endpoint_connections": { - "key": "properties.privateEndpointConnections", - "type": "[RemotePrivateEndpointConnectionWrapper]", - }, - "platform_version": {"key": "properties.platformVersion", "type": "str"}, - "legacy_portal_status": {"key": "properties.legacyPortalStatus", "type": "str"}, - "developer_portal_status": {"key": "properties.developerPortalStatus", "type": "str"}, - "release_channel": {"key": "properties.releaseChannel", "type": "str"}, - "zone_redundant": {"key": "properties.zoneRedundant", "type": "bool"}, - "publisher_email": {"key": "properties.publisherEmail", "type": "str"}, - "publisher_name": {"key": "properties.publisherName", "type": "str"}, - } - - def __init__( # pylint: disable=too-many-locals - self, - *, - sku: "_models.ApiManagementServiceSkuProperties", - location: str, - publisher_email: str, - publisher_name: str, - tags: Optional[dict[str, str]] = None, - identity: Optional["_models.ApiManagementServiceIdentity"] = None, - zones: Optional[list[str]] = None, - notification_sender_email: Optional[str] = None, - hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = None, - public_ip_address_id: Optional[str] = None, - public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - configuration_api: Optional["_models.ConfigurationApi"] = None, - virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, - additional_locations: Optional[list["_models.AdditionalLocation"]] = None, - custom_properties: Optional[dict[str, str]] = None, - certificates: Optional[list["_models.CertificateConfiguration"]] = None, - enable_client_certificate: bool = False, - nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, - disable_gateway: bool = False, - virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, - api_version_constraint: Optional["_models.ApiVersionConstraint"] = None, - restore: bool = False, - private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = None, - legacy_portal_status: Union[str, "_models.LegacyPortalStatus"] = "Enabled", - developer_portal_status: Union[str, "_models.DeveloperPortalStatus"] = "Enabled", - release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = None, - zone_redundant: bool = False, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: SKU properties of the API Management service. Required. - :paramtype sku: ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties - :keyword identity: Managed service identity of the Api Management service. - :paramtype identity: ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity - :keyword location: Resource location. Required. - :paramtype location: str - :keyword zones: A list of availability zones denoting where the resource needs to come from. - :paramtype zones: list[str] - :keyword notification_sender_email: Email address from which the notification will be sent. - :paramtype notification_sender_email: str - :keyword hostname_configurations: Custom hostname configuration of the API Management service. - :paramtype hostname_configurations: - list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :keyword public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with - Virtual Network deployed service in the region. Supported only for Developer and Premium SKU - being deployed in Virtual Network. - :paramtype public_ip_address_id: str - :keyword public_network_access: Whether or not public endpoint access is allowed for this API - Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If - 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. - Known values are: "Enabled" and "Disabled". - :paramtype public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess - :keyword configuration_api: Configuration API configuration of the API Management service. - :paramtype configuration_api: ~azure.mgmt.apimanagement.models.ConfigurationApi - :keyword virtual_network_configuration: Virtual network configuration of the API Management - service. - :paramtype virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :keyword additional_locations: Additional datacenter locations of the API Management service. - :paramtype additional_locations: list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :keyword custom_properties: Custom properties of the API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the - cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to - disable just TLS 1.1.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to - disable TLS 1.0 on an API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used - to disable just TLS 1.1 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used - to disable TLS 1.0 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable - HTTP2 protocol on an API Management service.
Not specifying any of these properties on - PATCH operation will reset omitted properties' values to their defaults. For all the settings - except Http2 the default value is ``True`` if the service was created on or before April 1, - 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can - disable any of the following ciphers by using settings - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, - TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. - For example, - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ - ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be - disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. - :paramtype custom_properties: dict[str, str] - :keyword certificates: List of Certificates that need to be installed in the API Management - service. Max supported certificates that can be installed is 10. - :paramtype certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :keyword enable_client_certificate: Property only meant to be used for Consumption SKU Service. - This enforces a client certificate to be presented on each request to the gateway. This also - enables the ability to authenticate the certificate in the policy on the gateway. - :paramtype enable_client_certificate: bool - :keyword nat_gateway_state: Property can be used to enable NAT Gateway for this API Management - service. Known values are: "Enabled" and "Disabled". - :paramtype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState - :keyword disable_gateway: Property only valid for an Api Management service deployed in - multiple locations. This can be used to disable the gateway in master region. - :paramtype disable_gateway: bool - :keyword virtual_network_type: The type of VPN in which API Management service needs to be - configured in. None (Default Value) means the API Management service is not part of any Virtual - Network, External means the API Management deployment is set up inside a Virtual Network having - an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside - a Virtual Network having an Intranet Facing Endpoint only. Known values are: "None", - "External", and "Internal". - :paramtype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - :keyword api_version_constraint: Control Plane Apis version constraint for the API Management - service. - :paramtype api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint - :keyword restore: Undelete Api Management Service if it was previously soft-deleted. If this - flag is specified and set to True all other properties will be ignored. - :paramtype restore: bool - :keyword private_endpoint_connections: List of Private Endpoint Connections of this service. - :paramtype private_endpoint_connections: - list[~azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper] - :keyword legacy_portal_status: Status of legacy portal in the API Management service. Known - values are: "Enabled" and "Disabled". - :paramtype legacy_portal_status: str or ~azure.mgmt.apimanagement.models.LegacyPortalStatus - :keyword developer_portal_status: Status of developer portal in this API Management service. - Known values are: "Enabled" and "Disabled". - :paramtype developer_portal_status: str or - ~azure.mgmt.apimanagement.models.DeveloperPortalStatus - :keyword release_channel: Release Channel of this API Management service. Known values are: - "Preview", "Default", and "Stable". - :paramtype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel - :keyword zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If - this flag is set to True, will return a APIM service with Zone redundant or fail the request if - any underneath component cannot be zone redundant. - :paramtype zone_redundant: bool - :keyword publisher_email: Publisher email. Required. - :paramtype publisher_email: str - :keyword publisher_name: Publisher name. Required. - :paramtype publisher_name: str - """ - super().__init__(tags=tags, **kwargs) - self.sku = sku - self.identity = identity - self.system_data: Optional["_models.SystemData"] = None - self.location = location - self.etag: Optional[str] = None - self.zones = zones - self.notification_sender_email = notification_sender_email - self.provisioning_state: Optional[str] = None - self.target_provisioning_state: Optional[str] = None - self.created_at_utc: Optional[datetime.datetime] = None - self.gateway_url: Optional[str] = None - self.gateway_regional_url: Optional[str] = None - self.portal_url: Optional[str] = None - self.management_api_url: Optional[str] = None - self.scm_url: Optional[str] = None - self.developer_portal_url: Optional[str] = None - self.hostname_configurations = hostname_configurations - self.public_ip_addresses: Optional[list[str]] = None - self.private_ip_addresses: Optional[list[str]] = None - self.public_ip_address_id = public_ip_address_id - self.public_network_access = public_network_access - self.configuration_api = configuration_api - self.virtual_network_configuration = virtual_network_configuration - self.additional_locations = additional_locations - self.custom_properties = custom_properties - self.certificates = certificates - self.enable_client_certificate = enable_client_certificate - self.nat_gateway_state = nat_gateway_state - self.outbound_public_ip_addresses: Optional[list[str]] = None - self.disable_gateway = disable_gateway - self.virtual_network_type = virtual_network_type - self.api_version_constraint = api_version_constraint - self.restore = restore - self.private_endpoint_connections = private_endpoint_connections - self.platform_version: Optional[Union[str, "_models.PlatformVersion"]] = None - self.legacy_portal_status = legacy_portal_status - self.developer_portal_status = developer_portal_status - self.release_channel = release_channel - self.zone_redundant = zone_redundant - self.publisher_email = publisher_email - self.publisher_name = publisher_name - - -class ApiManagementServiceSkuProperties(_serialization.Model): - """API Management service resource SKU properties. - - All required parameters must be populated in order to send to server. - - :ivar name: Name of the Sku. Required. Known values are: "Developer", "Standard", "Premium", - "Basic", "Consumption", "Isolated", "BasicV2", "StandardV2", and "PremiumV2". - :vartype name: str or ~azure.mgmt.apimanagement.models.SkuType - :ivar capacity: Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU - capacity must be specified as 0. Required. - :vartype capacity: int - """ - - _validation = { - "name": {"required": True}, - "capacity": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "capacity": {"key": "capacity", "type": "int"}, - } - - def __init__(self, *, name: Union[str, "_models.SkuType"], capacity: int, **kwargs: Any) -> None: - """ - :keyword name: Name of the Sku. Required. Known values are: "Developer", "Standard", "Premium", - "Basic", "Consumption", "Isolated", "BasicV2", "StandardV2", and "PremiumV2". - :paramtype name: str or ~azure.mgmt.apimanagement.models.SkuType - :keyword capacity: Capacity of the SKU (number of deployed units of the SKU). For Consumption - SKU capacity must be specified as 0. Required. - :paramtype capacity: int - """ - super().__init__(**kwargs) - self.name = name - self.capacity = capacity - - -class ApiManagementServiceUpdateParameters(ApimResource): - """Parameter supplied to Update Api Management Service. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource is set to Microsoft.ApiManagement. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar sku: SKU properties of the API Management service. - :vartype sku: ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties - :ivar identity: Managed service identity of the Api Management service. - :vartype identity: ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity - :ivar etag: ETag of the resource. - :vartype etag: str - :ivar zones: A list of availability zones denoting where the resource needs to come from. - :vartype zones: list[str] - :ivar notification_sender_email: Email address from which the notification will be sent. - :vartype notification_sender_email: str - :ivar provisioning_state: The current provisioning state of the API Management service which - can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API Management service, which is - targeted by the long running operation started on the service. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management service.The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype created_at_utc: ~datetime.datetime - :ivar gateway_url: Gateway URL of the API Management service. - :vartype gateway_url: str - :ivar gateway_regional_url: Gateway URL of the API Management service in the Default Region. - :vartype gateway_regional_url: str - :ivar portal_url: Publisher portal endpoint Url of the API Management service. - :vartype portal_url: str - :ivar management_api_url: Management API endpoint URL of the API Management service. - :vartype management_api_url: str - :ivar scm_url: SCM endpoint URL of the API Management service. - :vartype scm_url: str - :ivar developer_portal_url: DEveloper Portal endpoint URL of the API Management service. - :vartype developer_portal_url: str - :ivar hostname_configurations: Custom hostname configuration of the API Management service. - :vartype hostname_configurations: list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management - service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management - service in Primary region which is deployed in an Internal Virtual Network. Available only for - Basic, Standard, Premium and Isolated SKU. - :vartype private_ip_addresses: list[str] - :ivar public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with - Virtual Network deployed service in the region. Supported only for Developer and Premium SKU - being deployed in Virtual Network. - :vartype public_ip_address_id: str - :ivar public_network_access: Whether or not public endpoint access is allowed for this API - Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If - 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. - Known values are: "Enabled" and "Disabled". - :vartype public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess - :ivar configuration_api: Configuration API configuration of the API Management service. - :vartype configuration_api: ~azure.mgmt.apimanagement.models.ConfigurationApi - :ivar virtual_network_configuration: Virtual network configuration of the API Management - service. - :vartype virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :ivar additional_locations: Additional datacenter locations of the API Management service. - :vartype additional_locations: list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :ivar custom_properties: Custom properties of the API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the - cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to - disable just TLS 1.1.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to - disable TLS 1.0 on an API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used - to disable just TLS 1.1 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used - to disable TLS 1.0 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable - HTTP2 protocol on an API Management service.
Not specifying any of these properties on - PATCH operation will reset omitted properties' values to their defaults. For all the settings - except Http2 the default value is ``True`` if the service was created on or before April 1, - 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can - disable any of the following ciphers by using settings - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, - TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. - For example, - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ - ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be - disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. - :vartype custom_properties: dict[str, str] - :ivar certificates: List of Certificates that need to be installed in the API Management - service. Max supported certificates that can be installed is 10. - :vartype certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :ivar enable_client_certificate: Property only meant to be used for Consumption SKU Service. - This enforces a client certificate to be presented on each request to the gateway. This also - enables the ability to authenticate the certificate in the policy on the gateway. - :vartype enable_client_certificate: bool - :ivar nat_gateway_state: Property can be used to enable NAT Gateway for this API Management - service. Known values are: "Enabled" and "Disabled". - :vartype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState - :ivar outbound_public_ip_addresses: Outbound public IPV4 address prefixes associated with NAT - Gateway deployed service. Available only for Premium SKU on stv2 platform. - :vartype outbound_public_ip_addresses: list[str] - :ivar disable_gateway: Property only valid for an Api Management service deployed in multiple - locations. This can be used to disable the gateway in master region. - :vartype disable_gateway: bool - :ivar virtual_network_type: The type of VPN in which API Management service needs to be - configured in. None (Default Value) means the API Management service is not part of any Virtual - Network, External means the API Management deployment is set up inside a Virtual Network having - an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside - a Virtual Network having an Intranet Facing Endpoint only. Known values are: "None", - "External", and "Internal". - :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - :ivar api_version_constraint: Control Plane Apis version constraint for the API Management - service. - :vartype api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint - :ivar restore: Undelete Api Management Service if it was previously soft-deleted. If this flag - is specified and set to True all other properties will be ignored. - :vartype restore: bool - :ivar private_endpoint_connections: List of Private Endpoint Connections of this service. - :vartype private_endpoint_connections: - list[~azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper] - :ivar platform_version: Compute Platform Version running the service in this location. Known - values are: "undetermined", "stv1", "stv2", "mtv1", and "stv2.1". - :vartype platform_version: str or ~azure.mgmt.apimanagement.models.PlatformVersion - :ivar legacy_portal_status: Status of legacy portal in the API Management service. Known values - are: "Enabled" and "Disabled". - :vartype legacy_portal_status: str or ~azure.mgmt.apimanagement.models.LegacyPortalStatus - :ivar developer_portal_status: Status of developer portal in this API Management service. Known - values are: "Enabled" and "Disabled". - :vartype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus - :ivar release_channel: Release Channel of this API Management service. Known values are: - "Preview", "Default", and "Stable". - :vartype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel - :ivar zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If - this flag is set to True, will return a APIM service with Zone redundant or fail the request if - any underneath component cannot be zone redundant. - :vartype zone_redundant: bool - :ivar publisher_email: Publisher email. - :vartype publisher_email: str - :ivar publisher_name: Publisher name. - :vartype publisher_name: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "etag": {"readonly": True}, - "notification_sender_email": {"max_length": 100}, - "provisioning_state": {"readonly": True}, - "target_provisioning_state": {"readonly": True}, - "created_at_utc": {"readonly": True}, - "gateway_url": {"readonly": True}, - "gateway_regional_url": {"readonly": True}, - "portal_url": {"readonly": True}, - "management_api_url": {"readonly": True}, - "scm_url": {"readonly": True}, - "developer_portal_url": {"readonly": True}, - "public_ip_addresses": {"readonly": True}, - "private_ip_addresses": {"readonly": True}, - "outbound_public_ip_addresses": {"readonly": True}, - "platform_version": {"readonly": True}, - "publisher_email": {"max_length": 100}, - "publisher_name": {"max_length": 100}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, - "sku": {"key": "sku", "type": "ApiManagementServiceSkuProperties"}, - "identity": {"key": "identity", "type": "ApiManagementServiceIdentity"}, - "etag": {"key": "etag", "type": "str"}, - "zones": {"key": "zones", "type": "[str]"}, - "notification_sender_email": {"key": "properties.notificationSenderEmail", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "target_provisioning_state": {"key": "properties.targetProvisioningState", "type": "str"}, - "created_at_utc": {"key": "properties.createdAtUtc", "type": "iso-8601"}, - "gateway_url": {"key": "properties.gatewayUrl", "type": "str"}, - "gateway_regional_url": {"key": "properties.gatewayRegionalUrl", "type": "str"}, - "portal_url": {"key": "properties.portalUrl", "type": "str"}, - "management_api_url": {"key": "properties.managementApiUrl", "type": "str"}, - "scm_url": {"key": "properties.scmUrl", "type": "str"}, - "developer_portal_url": {"key": "properties.developerPortalUrl", "type": "str"}, - "hostname_configurations": {"key": "properties.hostnameConfigurations", "type": "[HostnameConfiguration]"}, - "public_ip_addresses": {"key": "properties.publicIPAddresses", "type": "[str]"}, - "private_ip_addresses": {"key": "properties.privateIPAddresses", "type": "[str]"}, - "public_ip_address_id": {"key": "properties.publicIpAddressId", "type": "str"}, - "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, - "configuration_api": {"key": "properties.configurationApi", "type": "ConfigurationApi"}, - "virtual_network_configuration": { - "key": "properties.virtualNetworkConfiguration", - "type": "VirtualNetworkConfiguration", - }, - "additional_locations": {"key": "properties.additionalLocations", "type": "[AdditionalLocation]"}, - "custom_properties": {"key": "properties.customProperties", "type": "{str}"}, - "certificates": {"key": "properties.certificates", "type": "[CertificateConfiguration]"}, - "enable_client_certificate": {"key": "properties.enableClientCertificate", "type": "bool"}, - "nat_gateway_state": {"key": "properties.natGatewayState", "type": "str"}, - "outbound_public_ip_addresses": {"key": "properties.outboundPublicIPAddresses", "type": "[str]"}, - "disable_gateway": {"key": "properties.disableGateway", "type": "bool"}, - "virtual_network_type": {"key": "properties.virtualNetworkType", "type": "str"}, - "api_version_constraint": {"key": "properties.apiVersionConstraint", "type": "ApiVersionConstraint"}, - "restore": {"key": "properties.restore", "type": "bool"}, - "private_endpoint_connections": { - "key": "properties.privateEndpointConnections", - "type": "[RemotePrivateEndpointConnectionWrapper]", - }, - "platform_version": {"key": "properties.platformVersion", "type": "str"}, - "legacy_portal_status": {"key": "properties.legacyPortalStatus", "type": "str"}, - "developer_portal_status": {"key": "properties.developerPortalStatus", "type": "str"}, - "release_channel": {"key": "properties.releaseChannel", "type": "str"}, - "zone_redundant": {"key": "properties.zoneRedundant", "type": "bool"}, - "publisher_email": {"key": "properties.publisherEmail", "type": "str"}, - "publisher_name": {"key": "properties.publisherName", "type": "str"}, - } - - def __init__( # pylint: disable=too-many-locals - self, - *, - tags: Optional[dict[str, str]] = None, - sku: Optional["_models.ApiManagementServiceSkuProperties"] = None, - identity: Optional["_models.ApiManagementServiceIdentity"] = None, - zones: Optional[list[str]] = None, - notification_sender_email: Optional[str] = None, - hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = None, - public_ip_address_id: Optional[str] = None, - public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - configuration_api: Optional["_models.ConfigurationApi"] = None, - virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, - additional_locations: Optional[list["_models.AdditionalLocation"]] = None, - custom_properties: Optional[dict[str, str]] = None, - certificates: Optional[list["_models.CertificateConfiguration"]] = None, - enable_client_certificate: bool = False, - nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, - disable_gateway: bool = False, - virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, - api_version_constraint: Optional["_models.ApiVersionConstraint"] = None, - restore: bool = False, - private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = None, - legacy_portal_status: Union[str, "_models.LegacyPortalStatus"] = "Enabled", - developer_portal_status: Union[str, "_models.DeveloperPortalStatus"] = "Enabled", - release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = None, - zone_redundant: bool = False, - publisher_email: Optional[str] = None, - publisher_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: SKU properties of the API Management service. - :paramtype sku: ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties - :keyword identity: Managed service identity of the Api Management service. - :paramtype identity: ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity - :keyword zones: A list of availability zones denoting where the resource needs to come from. - :paramtype zones: list[str] - :keyword notification_sender_email: Email address from which the notification will be sent. - :paramtype notification_sender_email: str - :keyword hostname_configurations: Custom hostname configuration of the API Management service. - :paramtype hostname_configurations: - list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :keyword public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with - Virtual Network deployed service in the region. Supported only for Developer and Premium SKU - being deployed in Virtual Network. - :paramtype public_ip_address_id: str - :keyword public_network_access: Whether or not public endpoint access is allowed for this API - Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If - 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. - Known values are: "Enabled" and "Disabled". - :paramtype public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess - :keyword configuration_api: Configuration API configuration of the API Management service. - :paramtype configuration_api: ~azure.mgmt.apimanagement.models.ConfigurationApi - :keyword virtual_network_configuration: Virtual network configuration of the API Management - service. - :paramtype virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :keyword additional_locations: Additional datacenter locations of the API Management service. - :paramtype additional_locations: list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :keyword custom_properties: Custom properties of the API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the - cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to - disable just TLS 1.1.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to - disable TLS 1.0 on an API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used - to disable just TLS 1.1 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used - to disable TLS 1.0 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable - HTTP2 protocol on an API Management service.
Not specifying any of these properties on - PATCH operation will reset omitted properties' values to their defaults. For all the settings - except Http2 the default value is ``True`` if the service was created on or before April 1, - 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can - disable any of the following ciphers by using settings - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, - TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. - For example, - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ - ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be - disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. - :paramtype custom_properties: dict[str, str] - :keyword certificates: List of Certificates that need to be installed in the API Management - service. Max supported certificates that can be installed is 10. - :paramtype certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :keyword enable_client_certificate: Property only meant to be used for Consumption SKU Service. - This enforces a client certificate to be presented on each request to the gateway. This also - enables the ability to authenticate the certificate in the policy on the gateway. - :paramtype enable_client_certificate: bool - :keyword nat_gateway_state: Property can be used to enable NAT Gateway for this API Management - service. Known values are: "Enabled" and "Disabled". - :paramtype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState - :keyword disable_gateway: Property only valid for an Api Management service deployed in - multiple locations. This can be used to disable the gateway in master region. - :paramtype disable_gateway: bool - :keyword virtual_network_type: The type of VPN in which API Management service needs to be - configured in. None (Default Value) means the API Management service is not part of any Virtual - Network, External means the API Management deployment is set up inside a Virtual Network having - an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside - a Virtual Network having an Intranet Facing Endpoint only. Known values are: "None", - "External", and "Internal". - :paramtype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - :keyword api_version_constraint: Control Plane Apis version constraint for the API Management - service. - :paramtype api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint - :keyword restore: Undelete Api Management Service if it was previously soft-deleted. If this - flag is specified and set to True all other properties will be ignored. - :paramtype restore: bool - :keyword private_endpoint_connections: List of Private Endpoint Connections of this service. - :paramtype private_endpoint_connections: - list[~azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper] - :keyword legacy_portal_status: Status of legacy portal in the API Management service. Known - values are: "Enabled" and "Disabled". - :paramtype legacy_portal_status: str or ~azure.mgmt.apimanagement.models.LegacyPortalStatus - :keyword developer_portal_status: Status of developer portal in this API Management service. - Known values are: "Enabled" and "Disabled". - :paramtype developer_portal_status: str or - ~azure.mgmt.apimanagement.models.DeveloperPortalStatus - :keyword release_channel: Release Channel of this API Management service. Known values are: - "Preview", "Default", and "Stable". - :paramtype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel - :keyword zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If - this flag is set to True, will return a APIM service with Zone redundant or fail the request if - any underneath component cannot be zone redundant. - :paramtype zone_redundant: bool - :keyword publisher_email: Publisher email. - :paramtype publisher_email: str - :keyword publisher_name: Publisher name. - :paramtype publisher_name: str - """ - super().__init__(tags=tags, **kwargs) - self.sku = sku - self.identity = identity - self.etag: Optional[str] = None - self.zones = zones - self.notification_sender_email = notification_sender_email - self.provisioning_state: Optional[str] = None - self.target_provisioning_state: Optional[str] = None - self.created_at_utc: Optional[datetime.datetime] = None - self.gateway_url: Optional[str] = None - self.gateway_regional_url: Optional[str] = None - self.portal_url: Optional[str] = None - self.management_api_url: Optional[str] = None - self.scm_url: Optional[str] = None - self.developer_portal_url: Optional[str] = None - self.hostname_configurations = hostname_configurations - self.public_ip_addresses: Optional[list[str]] = None - self.private_ip_addresses: Optional[list[str]] = None - self.public_ip_address_id = public_ip_address_id - self.public_network_access = public_network_access - self.configuration_api = configuration_api - self.virtual_network_configuration = virtual_network_configuration - self.additional_locations = additional_locations - self.custom_properties = custom_properties - self.certificates = certificates - self.enable_client_certificate = enable_client_certificate - self.nat_gateway_state = nat_gateway_state - self.outbound_public_ip_addresses: Optional[list[str]] = None - self.disable_gateway = disable_gateway - self.virtual_network_type = virtual_network_type - self.api_version_constraint = api_version_constraint - self.restore = restore - self.private_endpoint_connections = private_endpoint_connections - self.platform_version: Optional[Union[str, "_models.PlatformVersion"]] = None - self.legacy_portal_status = legacy_portal_status - self.developer_portal_status = developer_portal_status - self.release_channel = release_channel - self.zone_redundant = zone_redundant - self.publisher_email = publisher_email - self.publisher_name = publisher_name - - -class ApiManagementServiceUpdateProperties(ApiManagementServiceBaseProperties): - """Properties of an API Management service resource description. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar notification_sender_email: Email address from which the notification will be sent. - :vartype notification_sender_email: str - :ivar provisioning_state: The current provisioning state of the API Management service which - can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API Management service, which is - targeted by the long running operation started on the service. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management service.The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype created_at_utc: ~datetime.datetime - :ivar gateway_url: Gateway URL of the API Management service. - :vartype gateway_url: str - :ivar gateway_regional_url: Gateway URL of the API Management service in the Default Region. - :vartype gateway_regional_url: str - :ivar portal_url: Publisher portal endpoint Url of the API Management service. - :vartype portal_url: str - :ivar management_api_url: Management API endpoint URL of the API Management service. - :vartype management_api_url: str - :ivar scm_url: SCM endpoint URL of the API Management service. - :vartype scm_url: str - :ivar developer_portal_url: DEveloper Portal endpoint URL of the API Management service. - :vartype developer_portal_url: str - :ivar hostname_configurations: Custom hostname configuration of the API Management service. - :vartype hostname_configurations: list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the API Management - service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of the API Management - service in Primary region which is deployed in an Internal Virtual Network. Available only for - Basic, Standard, Premium and Isolated SKU. - :vartype private_ip_addresses: list[str] - :ivar public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with - Virtual Network deployed service in the region. Supported only for Developer and Premium SKU - being deployed in Virtual Network. - :vartype public_ip_address_id: str - :ivar public_network_access: Whether or not public endpoint access is allowed for this API - Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If - 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. - Known values are: "Enabled" and "Disabled". - :vartype public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess - :ivar configuration_api: Configuration API configuration of the API Management service. - :vartype configuration_api: ~azure.mgmt.apimanagement.models.ConfigurationApi - :ivar virtual_network_configuration: Virtual network configuration of the API Management - service. - :vartype virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :ivar additional_locations: Additional datacenter locations of the API Management service. - :vartype additional_locations: list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :ivar custom_properties: Custom properties of the API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the - cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to - disable just TLS 1.1.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to - disable TLS 1.0 on an API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used - to disable just TLS 1.1 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used - to disable TLS 1.0 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable - HTTP2 protocol on an API Management service.
Not specifying any of these properties on - PATCH operation will reset omitted properties' values to their defaults. For all the settings - except Http2 the default value is ``True`` if the service was created on or before April 1, - 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can - disable any of the following ciphers by using settings - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, - TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. - For example, - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ - ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be - disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. - :vartype custom_properties: dict[str, str] - :ivar certificates: List of Certificates that need to be installed in the API Management - service. Max supported certificates that can be installed is 10. - :vartype certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :ivar enable_client_certificate: Property only meant to be used for Consumption SKU Service. - This enforces a client certificate to be presented on each request to the gateway. This also - enables the ability to authenticate the certificate in the policy on the gateway. - :vartype enable_client_certificate: bool - :ivar nat_gateway_state: Property can be used to enable NAT Gateway for this API Management - service. Known values are: "Enabled" and "Disabled". - :vartype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState - :ivar outbound_public_ip_addresses: Outbound public IPV4 address prefixes associated with NAT - Gateway deployed service. Available only for Premium SKU on stv2 platform. - :vartype outbound_public_ip_addresses: list[str] - :ivar disable_gateway: Property only valid for an Api Management service deployed in multiple - locations. This can be used to disable the gateway in master region. - :vartype disable_gateway: bool - :ivar virtual_network_type: The type of VPN in which API Management service needs to be - configured in. None (Default Value) means the API Management service is not part of any Virtual - Network, External means the API Management deployment is set up inside a Virtual Network having - an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside - a Virtual Network having an Intranet Facing Endpoint only. Known values are: "None", - "External", and "Internal". - :vartype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - :ivar api_version_constraint: Control Plane Apis version constraint for the API Management - service. - :vartype api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint - :ivar restore: Undelete Api Management Service if it was previously soft-deleted. If this flag - is specified and set to True all other properties will be ignored. - :vartype restore: bool - :ivar private_endpoint_connections: List of Private Endpoint Connections of this service. - :vartype private_endpoint_connections: - list[~azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper] - :ivar platform_version: Compute Platform Version running the service in this location. Known - values are: "undetermined", "stv1", "stv2", "mtv1", and "stv2.1". - :vartype platform_version: str or ~azure.mgmt.apimanagement.models.PlatformVersion - :ivar legacy_portal_status: Status of legacy portal in the API Management service. Known values - are: "Enabled" and "Disabled". - :vartype legacy_portal_status: str or ~azure.mgmt.apimanagement.models.LegacyPortalStatus - :ivar developer_portal_status: Status of developer portal in this API Management service. Known - values are: "Enabled" and "Disabled". - :vartype developer_portal_status: str or ~azure.mgmt.apimanagement.models.DeveloperPortalStatus - :ivar release_channel: Release Channel of this API Management service. Known values are: - "Preview", "Default", and "Stable". - :vartype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel - :ivar zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If - this flag is set to True, will return a APIM service with Zone redundant or fail the request if - any underneath component cannot be zone redundant. - :vartype zone_redundant: bool - :ivar publisher_email: Publisher email. - :vartype publisher_email: str - :ivar publisher_name: Publisher name. - :vartype publisher_name: str - """ - - _validation = { - "notification_sender_email": {"max_length": 100}, - "provisioning_state": {"readonly": True}, - "target_provisioning_state": {"readonly": True}, - "created_at_utc": {"readonly": True}, - "gateway_url": {"readonly": True}, - "gateway_regional_url": {"readonly": True}, - "portal_url": {"readonly": True}, - "management_api_url": {"readonly": True}, - "scm_url": {"readonly": True}, - "developer_portal_url": {"readonly": True}, - "public_ip_addresses": {"readonly": True}, - "private_ip_addresses": {"readonly": True}, - "outbound_public_ip_addresses": {"readonly": True}, - "platform_version": {"readonly": True}, - "publisher_email": {"max_length": 100}, - "publisher_name": {"max_length": 100}, - } - - _attribute_map = { - "notification_sender_email": {"key": "notificationSenderEmail", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "target_provisioning_state": {"key": "targetProvisioningState", "type": "str"}, - "created_at_utc": {"key": "createdAtUtc", "type": "iso-8601"}, - "gateway_url": {"key": "gatewayUrl", "type": "str"}, - "gateway_regional_url": {"key": "gatewayRegionalUrl", "type": "str"}, - "portal_url": {"key": "portalUrl", "type": "str"}, - "management_api_url": {"key": "managementApiUrl", "type": "str"}, - "scm_url": {"key": "scmUrl", "type": "str"}, - "developer_portal_url": {"key": "developerPortalUrl", "type": "str"}, - "hostname_configurations": {"key": "hostnameConfigurations", "type": "[HostnameConfiguration]"}, - "public_ip_addresses": {"key": "publicIPAddresses", "type": "[str]"}, - "private_ip_addresses": {"key": "privateIPAddresses", "type": "[str]"}, - "public_ip_address_id": {"key": "publicIpAddressId", "type": "str"}, - "public_network_access": {"key": "publicNetworkAccess", "type": "str"}, - "configuration_api": {"key": "configurationApi", "type": "ConfigurationApi"}, - "virtual_network_configuration": {"key": "virtualNetworkConfiguration", "type": "VirtualNetworkConfiguration"}, - "additional_locations": {"key": "additionalLocations", "type": "[AdditionalLocation]"}, - "custom_properties": {"key": "customProperties", "type": "{str}"}, - "certificates": {"key": "certificates", "type": "[CertificateConfiguration]"}, - "enable_client_certificate": {"key": "enableClientCertificate", "type": "bool"}, - "nat_gateway_state": {"key": "natGatewayState", "type": "str"}, - "outbound_public_ip_addresses": {"key": "outboundPublicIPAddresses", "type": "[str]"}, - "disable_gateway": {"key": "disableGateway", "type": "bool"}, - "virtual_network_type": {"key": "virtualNetworkType", "type": "str"}, - "api_version_constraint": {"key": "apiVersionConstraint", "type": "ApiVersionConstraint"}, - "restore": {"key": "restore", "type": "bool"}, - "private_endpoint_connections": { - "key": "privateEndpointConnections", - "type": "[RemotePrivateEndpointConnectionWrapper]", - }, - "platform_version": {"key": "platformVersion", "type": "str"}, - "legacy_portal_status": {"key": "legacyPortalStatus", "type": "str"}, - "developer_portal_status": {"key": "developerPortalStatus", "type": "str"}, - "release_channel": {"key": "releaseChannel", "type": "str"}, - "zone_redundant": {"key": "zoneRedundant", "type": "bool"}, - "publisher_email": {"key": "publisherEmail", "type": "str"}, - "publisher_name": {"key": "publisherName", "type": "str"}, - } - - def __init__( # pylint: disable=too-many-locals - self, - *, - notification_sender_email: Optional[str] = None, - hostname_configurations: Optional[list["_models.HostnameConfiguration"]] = None, - public_ip_address_id: Optional[str] = None, - public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - configuration_api: Optional["_models.ConfigurationApi"] = None, - virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, - additional_locations: Optional[list["_models.AdditionalLocation"]] = None, - custom_properties: Optional[dict[str, str]] = None, - certificates: Optional[list["_models.CertificateConfiguration"]] = None, - enable_client_certificate: bool = False, - nat_gateway_state: Optional[Union[str, "_models.NatGatewayState"]] = None, - disable_gateway: bool = False, - virtual_network_type: Optional[Union[str, "_models.VirtualNetworkType"]] = None, - api_version_constraint: Optional["_models.ApiVersionConstraint"] = None, - restore: bool = False, - private_endpoint_connections: Optional[list["_models.RemotePrivateEndpointConnectionWrapper"]] = None, - legacy_portal_status: Union[str, "_models.LegacyPortalStatus"] = "Enabled", - developer_portal_status: Union[str, "_models.DeveloperPortalStatus"] = "Enabled", - release_channel: Optional[Union[str, "_models.ReleaseChannel"]] = None, - zone_redundant: bool = False, - publisher_email: Optional[str] = None, - publisher_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword notification_sender_email: Email address from which the notification will be sent. - :paramtype notification_sender_email: str - :keyword hostname_configurations: Custom hostname configuration of the API Management service. - :paramtype hostname_configurations: - list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :keyword public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with - Virtual Network deployed service in the region. Supported only for Developer and Premium SKU - being deployed in Virtual Network. - :paramtype public_ip_address_id: str - :keyword public_network_access: Whether or not public endpoint access is allowed for this API - Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If - 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. - Known values are: "Enabled" and "Disabled". - :paramtype public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess - :keyword configuration_api: Configuration API configuration of the API Management service. - :paramtype configuration_api: ~azure.mgmt.apimanagement.models.ConfigurationApi - :keyword virtual_network_configuration: Virtual network configuration of the API Management - service. - :paramtype virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :keyword additional_locations: Additional datacenter locations of the API Management service. - :paramtype additional_locations: list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :keyword custom_properties: Custom properties of the API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`` will disable the - cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`` can be used to - disable just TLS 1.1.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`` can be used to - disable TLS 1.0 on an API Management service.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`` can be used - to disable just TLS 1.1 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`` can be used - to disable TLS 1.0 for communications with backends.
Setting - ``Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`` can be used to enable - HTTP2 protocol on an API Management service.
Not specifying any of these properties on - PATCH operation will reset omitted properties' values to their defaults. For all the settings - except Http2 the default value is ``True`` if the service was created on or before April 1, - 2018 and ``False`` otherwise. Http2 setting's default value is ``False``.

You can - disable any of the following ciphers by using settings - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, - TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. - For example, - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:\\ - ``false``. The default value is ``true`` for them.
Note: The following ciphers can't be - disabled since they are required by internal platform components: - TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. - :paramtype custom_properties: dict[str, str] - :keyword certificates: List of Certificates that need to be installed in the API Management - service. Max supported certificates that can be installed is 10. - :paramtype certificates: list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :keyword enable_client_certificate: Property only meant to be used for Consumption SKU Service. - This enforces a client certificate to be presented on each request to the gateway. This also - enables the ability to authenticate the certificate in the policy on the gateway. - :paramtype enable_client_certificate: bool - :keyword nat_gateway_state: Property can be used to enable NAT Gateway for this API Management - service. Known values are: "Enabled" and "Disabled". - :paramtype nat_gateway_state: str or ~azure.mgmt.apimanagement.models.NatGatewayState - :keyword disable_gateway: Property only valid for an Api Management service deployed in - multiple locations. This can be used to disable the gateway in master region. - :paramtype disable_gateway: bool - :keyword virtual_network_type: The type of VPN in which API Management service needs to be - configured in. None (Default Value) means the API Management service is not part of any Virtual - Network, External means the API Management deployment is set up inside a Virtual Network having - an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside - a Virtual Network having an Intranet Facing Endpoint only. Known values are: "None", - "External", and "Internal". - :paramtype virtual_network_type: str or ~azure.mgmt.apimanagement.models.VirtualNetworkType - :keyword api_version_constraint: Control Plane Apis version constraint for the API Management - service. - :paramtype api_version_constraint: ~azure.mgmt.apimanagement.models.ApiVersionConstraint - :keyword restore: Undelete Api Management Service if it was previously soft-deleted. If this - flag is specified and set to True all other properties will be ignored. - :paramtype restore: bool - :keyword private_endpoint_connections: List of Private Endpoint Connections of this service. - :paramtype private_endpoint_connections: - list[~azure.mgmt.apimanagement.models.RemotePrivateEndpointConnectionWrapper] - :keyword legacy_portal_status: Status of legacy portal in the API Management service. Known - values are: "Enabled" and "Disabled". - :paramtype legacy_portal_status: str or ~azure.mgmt.apimanagement.models.LegacyPortalStatus - :keyword developer_portal_status: Status of developer portal in this API Management service. - Known values are: "Enabled" and "Disabled". - :paramtype developer_portal_status: str or - ~azure.mgmt.apimanagement.models.DeveloperPortalStatus - :keyword release_channel: Release Channel of this API Management service. Known values are: - "Preview", "Default", and "Stable". - :paramtype release_channel: str or ~azure.mgmt.apimanagement.models.ReleaseChannel - :keyword zone_redundant: Zone Redundant Requirement when creating StandardV2 and PremiumV2. If - this flag is set to True, will return a APIM service with Zone redundant or fail the request if - any underneath component cannot be zone redundant. - :paramtype zone_redundant: bool - :keyword publisher_email: Publisher email. - :paramtype publisher_email: str - :keyword publisher_name: Publisher name. - :paramtype publisher_name: str - """ - super().__init__( - notification_sender_email=notification_sender_email, - hostname_configurations=hostname_configurations, - public_ip_address_id=public_ip_address_id, - public_network_access=public_network_access, - configuration_api=configuration_api, - virtual_network_configuration=virtual_network_configuration, - additional_locations=additional_locations, - custom_properties=custom_properties, - certificates=certificates, - enable_client_certificate=enable_client_certificate, - nat_gateway_state=nat_gateway_state, - disable_gateway=disable_gateway, - virtual_network_type=virtual_network_type, - api_version_constraint=api_version_constraint, - restore=restore, - private_endpoint_connections=private_endpoint_connections, - legacy_portal_status=legacy_portal_status, - developer_portal_status=developer_portal_status, - release_channel=release_channel, - zone_redundant=zone_redundant, - **kwargs - ) - self.publisher_email = publisher_email - self.publisher_name = publisher_name - - -class ApiManagementSku(_serialization.Model): - """Describes an available ApiManagement SKU. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar name: The name of SKU. - :vartype name: str - :ivar tier: Specifies the tier of virtual machines in a scale set.\\ :code:`
`\\ - :code:`
` Possible Values:\\ :code:`
`\\ :code:`
` **Standard**\\ :code:`
`\\ :code:`
` **Basic**. - :vartype tier: str - :ivar size: The Size of the SKU. - :vartype size: str - :ivar family: The Family of this particular SKU. - :vartype family: str - :ivar kind: The Kind of resources that are supported in this SKU. - :vartype kind: str - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: ~azure.mgmt.apimanagement.models.ApiManagementSkuCapacity - :ivar locations: The set of locations that the SKU is available. - :vartype locations: list[str] - :ivar location_info: A list of locations and availability zones in those locations where the - SKU is available. - :vartype location_info: list[~azure.mgmt.apimanagement.models.ApiManagementSkuLocationInfo] - :ivar api_versions: The api versions that support this SKU. - :vartype api_versions: list[str] - :ivar costs: Metadata for retrieving price info. - :vartype costs: list[~azure.mgmt.apimanagement.models.ApiManagementSkuCosts] - :ivar capabilities: A name value pair to describe the capability. - :vartype capabilities: list[~azure.mgmt.apimanagement.models.ApiManagementSkuCapabilities] - :ivar restrictions: The restrictions because of which SKU cannot be used. This is empty if - there are no restrictions. - :vartype restrictions: list[~azure.mgmt.apimanagement.models.ApiManagementSkuRestrictions] - """ - - _validation = { - "resource_type": {"readonly": True}, - "name": {"readonly": True}, - "tier": {"readonly": True}, - "size": {"readonly": True}, - "family": {"readonly": True}, - "kind": {"readonly": True}, - "capacity": {"readonly": True}, - "locations": {"readonly": True}, - "location_info": {"readonly": True}, - "api_versions": {"readonly": True}, - "costs": {"readonly": True}, - "capabilities": {"readonly": True}, - "restrictions": {"readonly": True}, - } - - _attribute_map = { - "resource_type": {"key": "resourceType", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "tier": {"key": "tier", "type": "str"}, - "size": {"key": "size", "type": "str"}, - "family": {"key": "family", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "capacity": {"key": "capacity", "type": "ApiManagementSkuCapacity"}, - "locations": {"key": "locations", "type": "[str]"}, - "location_info": {"key": "locationInfo", "type": "[ApiManagementSkuLocationInfo]"}, - "api_versions": {"key": "apiVersions", "type": "[str]"}, - "costs": {"key": "costs", "type": "[ApiManagementSkuCosts]"}, - "capabilities": {"key": "capabilities", "type": "[ApiManagementSkuCapabilities]"}, - "restrictions": {"key": "restrictions", "type": "[ApiManagementSkuRestrictions]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.resource_type: Optional[str] = None - self.name: Optional[str] = None - self.tier: Optional[str] = None - self.size: Optional[str] = None - self.family: Optional[str] = None - self.kind: Optional[str] = None - self.capacity: Optional["_models.ApiManagementSkuCapacity"] = None - self.locations: Optional[list[str]] = None - self.location_info: Optional[list["_models.ApiManagementSkuLocationInfo"]] = None - self.api_versions: Optional[list[str]] = None - self.costs: Optional[list["_models.ApiManagementSkuCosts"]] = None - self.capabilities: Optional[list["_models.ApiManagementSkuCapabilities"]] = None - self.restrictions: Optional[list["_models.ApiManagementSkuRestrictions"]] = None - - -class ApiManagementSkuCapabilities(_serialization.Model): - """Describes The SKU capabilities object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: An invariant to describe the feature. - :vartype name: str - :ivar value: An invariant if the feature is measured by quantity. - :vartype value: str - """ - - _validation = { - "name": {"readonly": True}, - "value": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.name: Optional[str] = None - self.value: Optional[str] = None - - -class ApiManagementSkuCapacity(_serialization.Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: int - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: int - :ivar default: The default capacity. - :vartype default: int - :ivar scale_type: The scale type applicable to the sku. Known values are: "Automatic", - "Manual", and "None". - :vartype scale_type: str or ~azure.mgmt.apimanagement.models.ApiManagementSkuCapacityScaleType - """ - - _validation = { - "minimum": {"readonly": True}, - "maximum": {"readonly": True}, - "default": {"readonly": True}, - "scale_type": {"readonly": True}, - } - - _attribute_map = { - "minimum": {"key": "minimum", "type": "int"}, - "maximum": {"key": "maximum", "type": "int"}, - "default": {"key": "default", "type": "int"}, - "scale_type": {"key": "scaleType", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.minimum: Optional[int] = None - self.maximum: Optional[int] = None - self.default: Optional[int] = None - self.scale_type: Optional[Union[str, "_models.ApiManagementSkuCapacityScaleType"]] = None - - -class ApiManagementSkuCosts(_serialization.Model): - """Describes metadata for retrieving price info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar meter_id: Used for querying price from commerce. - :vartype meter_id: str - :ivar quantity: The multiplier is needed to extend the base metered cost. - :vartype quantity: int - :ivar extended_unit: An invariant to show the extended unit. - :vartype extended_unit: str - """ - - _validation = { - "meter_id": {"readonly": True}, - "quantity": {"readonly": True}, - "extended_unit": {"readonly": True}, - } - - _attribute_map = { - "meter_id": {"key": "meterID", "type": "str"}, - "quantity": {"key": "quantity", "type": "int"}, - "extended_unit": {"key": "extendedUnit", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.meter_id: Optional[str] = None - self.quantity: Optional[int] = None - self.extended_unit: Optional[str] = None - - -class ApiManagementSkuLocationInfo(_serialization.Model): - """ApiManagementSkuLocationInfo. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar location: Location of the SKU. - :vartype location: str - :ivar zones: List of availability zones where the SKU is supported. - :vartype zones: list[str] - :ivar zone_details: Details of capabilities available to a SKU in specific zones. - :vartype zone_details: list[~azure.mgmt.apimanagement.models.ApiManagementSkuZoneDetails] - """ - - _validation = { - "location": {"readonly": True}, - "zones": {"readonly": True}, - "zone_details": {"readonly": True}, - } - - _attribute_map = { - "location": {"key": "location", "type": "str"}, - "zones": {"key": "zones", "type": "[str]"}, - "zone_details": {"key": "zoneDetails", "type": "[ApiManagementSkuZoneDetails]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.location: Optional[str] = None - self.zones: Optional[list[str]] = None - self.zone_details: Optional[list["_models.ApiManagementSkuZoneDetails"]] = None - - -class ApiManagementSkuRestrictionInfo(_serialization.Model): - """ApiManagementSkuRestrictionInfo. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar locations: Locations where the SKU is restricted. - :vartype locations: list[str] - :ivar zones: List of availability zones where the SKU is restricted. - :vartype zones: list[str] - """ - - _validation = { - "locations": {"readonly": True}, - "zones": {"readonly": True}, - } - - _attribute_map = { - "locations": {"key": "locations", "type": "[str]"}, - "zones": {"key": "zones", "type": "[str]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.locations: Optional[list[str]] = None - self.zones: Optional[list[str]] = None - - -class ApiManagementSkuRestrictions(_serialization.Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of restrictions. Known values are: "Location" and "Zone". - :vartype type: str or ~azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionsType - :ivar values: The value of restrictions. If the restriction type is set to location. This would - be different locations where the SKU is restricted. - :vartype values: list[str] - :ivar restriction_info: The information about the restriction where the SKU cannot be used. - :vartype restriction_info: ~azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionInfo - :ivar reason_code: The reason for restriction. Known values are: "QuotaId" and - "NotAvailableForSubscription". - :vartype reason_code: str or - ~azure.mgmt.apimanagement.models.ApiManagementSkuRestrictionsReasonCode - """ - - _validation = { - "type": {"readonly": True}, - "values": {"readonly": True}, - "restriction_info": {"readonly": True}, - "reason_code": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "values": {"key": "values", "type": "[str]"}, - "restriction_info": {"key": "restrictionInfo", "type": "ApiManagementSkuRestrictionInfo"}, - "reason_code": {"key": "reasonCode", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[Union[str, "_models.ApiManagementSkuRestrictionsType"]] = None - self.values: Optional[list[str]] = None - self.restriction_info: Optional["_models.ApiManagementSkuRestrictionInfo"] = None - self.reason_code: Optional[Union[str, "_models.ApiManagementSkuRestrictionsReasonCode"]] = None - - -class ApiManagementSkusResult(_serialization.Model): - """The List Resource Skus operation response. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar value: The list of skus available for the subscription. Required. - :vartype value: list[~azure.mgmt.apimanagement.models.ApiManagementSku] - :ivar next_link: The URI to fetch the next page of Resource Skus. Call ListNext() with this URI - to fetch the next page of Resource Skus. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ApiManagementSku]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: list["_models.ApiManagementSku"], **kwargs: Any) -> None: - """ - :keyword value: The list of skus available for the subscription. Required. - :paramtype value: list[~azure.mgmt.apimanagement.models.ApiManagementSku] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class ApiManagementSkuZoneDetails(_serialization.Model): - """Describes The zonal capabilities of a SKU. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The set of zones that the SKU is available in with the specified capabilities. - :vartype name: list[str] - :ivar capabilities: A list of capabilities that are available for the SKU in the specified list - of zones. - :vartype capabilities: list[~azure.mgmt.apimanagement.models.ApiManagementSkuCapabilities] - """ - - _validation = { - "name": {"readonly": True}, - "capabilities": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "[str]"}, - "capabilities": {"key": "capabilities", "type": "[ApiManagementSkuCapabilities]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.name: Optional[list[str]] = None - self.capabilities: Optional[list["_models.ApiManagementSkuCapabilities"]] = None - - -class ApiManagementWorkspaceLinksListResult(_serialization.Model): - """The response of the List API Management WorkspaceLink operation. - - All required parameters must be populated in order to send to server. - - :ivar value: Result of the List API Management WorkspaceLinks operation. Required. - :vartype value: list[~azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksResource] - :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list - of API Management services. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ApiManagementWorkspaceLinksResource]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: list["_models.ApiManagementWorkspaceLinksResource"], - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Result of the List API Management WorkspaceLinks operation. Required. - :paramtype value: list[~azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksResource] - :keyword next_link: Link to the next set of results. Not empty if Value contains incomplete - list of API Management services. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class WorkspaceLinksBaseProperties(_serialization.Model): - """WorkspaceLinksBaseProperties. - - :ivar workspace_id: The link to the API Management service workspace. - :vartype workspace_id: str - :ivar gateways: The array of linked gateways. - :vartype gateways: list[~azure.mgmt.apimanagement.models.WorkspaceLinksGateway] - """ - - _attribute_map = { - "workspace_id": {"key": "workspaceId", "type": "str"}, - "gateways": {"key": "gateways", "type": "[WorkspaceLinksGateway]"}, - } - - def __init__( - self, - *, - workspace_id: Optional[str] = None, - gateways: Optional[list["_models.WorkspaceLinksGateway"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword workspace_id: The link to the API Management service workspace. - :paramtype workspace_id: str - :keyword gateways: The array of linked gateways. - :paramtype gateways: list[~azure.mgmt.apimanagement.models.WorkspaceLinksGateway] - """ - super().__init__(**kwargs) - self.workspace_id = workspace_id - self.gateways = gateways - - -class ApiManagementWorkspaceLinksProperties(WorkspaceLinksBaseProperties): - """Properties of an API Management workspaceLinks resource. - - :ivar workspace_id: The link to the API Management service workspace. - :vartype workspace_id: str - :ivar gateways: The array of linked gateways. - :vartype gateways: list[~azure.mgmt.apimanagement.models.WorkspaceLinksGateway] - """ - - -class ApiManagementWorkspaceLinksResource(ProxyResource): - """A single API Management WorkspaceLinks in List or Get response. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar etag: ETag of the resource. - :vartype etag: str - :ivar workspace_id: The link to the API Management service workspace. - :vartype workspace_id: str - :ivar gateways: The array of linked gateways. - :vartype gateways: list[~azure.mgmt.apimanagement.models.WorkspaceLinksGateway] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "etag": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "etag": {"key": "etag", "type": "str"}, - "workspace_id": {"key": "properties.workspaceId", "type": "str"}, - "gateways": {"key": "properties.gateways", "type": "[WorkspaceLinksGateway]"}, - } - - def __init__( - self, - *, - workspace_id: Optional[str] = None, - gateways: Optional[list["_models.WorkspaceLinksGateway"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword workspace_id: The link to the API Management service workspace. - :paramtype workspace_id: str - :keyword gateways: The array of linked gateways. - :paramtype gateways: list[~azure.mgmt.apimanagement.models.WorkspaceLinksGateway] - """ - super().__init__(**kwargs) - self.etag: Optional[str] = None - self.workspace_id = workspace_id - self.gateways = gateways - - -class ApiReleaseCollection(_serialization.Model): - """Paged ApiRelease list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.ApiReleaseContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ApiReleaseContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword count: Total record count number across all pages. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.ApiReleaseContract"]] = None - self.count = count - self.next_link: Optional[str] = None - - -class ApiReleaseContract(ProxyResource): - """ApiRelease details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar api_id: Identifier of the API the release belongs to. - :vartype api_id: str - :ivar created_date_time: The time the API was released. The date conforms to the following - format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - :vartype created_date_time: ~datetime.datetime - :ivar updated_date_time: The time the API release was updated. - :vartype updated_date_time: ~datetime.datetime - :ivar notes: Release Notes. - :vartype notes: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "created_date_time": {"readonly": True}, - "updated_date_time": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "api_id": {"key": "properties.apiId", "type": "str"}, - "created_date_time": {"key": "properties.createdDateTime", "type": "iso-8601"}, - "updated_date_time": {"key": "properties.updatedDateTime", "type": "iso-8601"}, - "notes": {"key": "properties.notes", "type": "str"}, - } - - def __init__(self, *, api_id: Optional[str] = None, notes: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword api_id: Identifier of the API the release belongs to. - :paramtype api_id: str - :keyword notes: Release Notes. - :paramtype notes: str - """ - super().__init__(**kwargs) - self.api_id = api_id - self.created_date_time: Optional[datetime.datetime] = None - self.updated_date_time: Optional[datetime.datetime] = None - self.notes = notes - - -class ApiRevisionCollection(_serialization.Model): - """Paged API Revision list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.ApiRevisionContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ApiRevisionContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword count: Total record count number across all pages. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.ApiRevisionContract"]] = None - self.count = count - self.next_link: Optional[str] = None - - -class ApiRevisionContract(_serialization.Model): - """Summary of revision metadata. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar api_id: Identifier of the API Revision. - :vartype api_id: str - :ivar api_revision: Revision number of API. - :vartype api_revision: str - :ivar created_date_time: The time the API Revision was created. The date conforms to the - following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - :vartype created_date_time: ~datetime.datetime - :ivar updated_date_time: The time the API Revision were updated. The date conforms to the - following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - :vartype updated_date_time: ~datetime.datetime - :ivar description: Description of the API Revision. - :vartype description: str - :ivar private_url: Gateway URL for accessing the non-current API Revision. - :vartype private_url: str - :ivar is_online: Indicates if API revision is the current api revision. - :vartype is_online: bool - :ivar is_current: Indicates if API revision is accessible via the gateway. - :vartype is_current: bool - """ - - _validation = { - "api_id": {"readonly": True}, - "api_revision": {"readonly": True, "max_length": 100, "min_length": 1}, - "created_date_time": {"readonly": True}, - "updated_date_time": {"readonly": True}, - "description": {"readonly": True, "max_length": 256}, - "private_url": {"readonly": True}, - "is_online": {"readonly": True}, - "is_current": {"readonly": True}, - } - - _attribute_map = { - "api_id": {"key": "apiId", "type": "str"}, - "api_revision": {"key": "apiRevision", "type": "str"}, - "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, - "updated_date_time": {"key": "updatedDateTime", "type": "iso-8601"}, - "description": {"key": "description", "type": "str"}, - "private_url": {"key": "privateUrl", "type": "str"}, - "is_online": {"key": "isOnline", "type": "bool"}, - "is_current": {"key": "isCurrent", "type": "bool"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.api_id: Optional[str] = None - self.api_revision: Optional[str] = None - self.created_date_time: Optional[datetime.datetime] = None - self.updated_date_time: Optional[datetime.datetime] = None - self.description: Optional[str] = None - self.private_url: Optional[str] = None - self.is_online: Optional[bool] = None - self.is_current: Optional[bool] = None - - -class ApiRevisionInfoContract(_serialization.Model): - """Object used to create an API Revision or Version based on an existing API Revision. - - :ivar source_api_id: Resource identifier of API to be used to create the revision from. - :vartype source_api_id: str - :ivar api_version_name: Version identifier for the new API Version. - :vartype api_version_name: str - :ivar api_revision_description: Description of new API Revision. - :vartype api_revision_description: str - :ivar api_version_set: Version set details. - :vartype api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - """ - - _validation = { - "api_version_name": {"max_length": 100}, - "api_revision_description": {"max_length": 256}, - } - - _attribute_map = { - "source_api_id": {"key": "sourceApiId", "type": "str"}, - "api_version_name": {"key": "apiVersionName", "type": "str"}, - "api_revision_description": {"key": "apiRevisionDescription", "type": "str"}, - "api_version_set": {"key": "apiVersionSet", "type": "ApiVersionSetContractDetails"}, - } - - def __init__( - self, - *, - source_api_id: Optional[str] = None, - api_version_name: Optional[str] = None, - api_revision_description: Optional[str] = None, - api_version_set: Optional["_models.ApiVersionSetContractDetails"] = None, - **kwargs: Any - ) -> None: - """ - :keyword source_api_id: Resource identifier of API to be used to create the revision from. - :paramtype source_api_id: str - :keyword api_version_name: Version identifier for the new API Version. - :paramtype api_version_name: str - :keyword api_revision_description: Description of new API Revision. - :paramtype api_revision_description: str - :keyword api_version_set: Version set details. - :paramtype api_version_set: ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - """ - super().__init__(**kwargs) - self.source_api_id = source_api_id - self.api_version_name = api_version_name - self.api_revision_description = api_revision_description - self.api_version_set = api_version_set - - -class ApiTagResourceContractProperties(ApiEntityBaseContract): - """API contract properties for the Tag Resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar description: Description of the API. May include HTML formatting tags. - :vartype description: str - :ivar authentication_settings: Collection of authentication settings included into this API. - :vartype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :ivar subscription_key_parameter_names: Protocols over which API is made available. - :vartype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :ivar api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", "odata", - and "grpc". - :vartype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :ivar api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :vartype api_revision: str - :ivar api_version: Indicates the version identifier of the API if the API is versioned. - :vartype api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :ivar api_revision_description: Description of the API Revision. - :vartype api_revision_description: str - :ivar api_version_description: Description of the API Version. - :vartype api_version_description: str - :ivar api_version_set_id: A resource identifier for the related ApiVersionSet. - :vartype api_version_set_id: str - :ivar subscription_required: Specifies whether an API or Product subscription is required for - accessing the API. - :vartype subscription_required: bool - :ivar terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format of - a URL. - :vartype terms_of_service_url: str - :ivar contact: Contact information for the API. - :vartype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :ivar license: License information for the API. - :vartype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :ivar id: API identifier in the form /apis/{apiId}. - :vartype id: str - :ivar name: API name. - :vartype name: str - :ivar service_url: Absolute URL of the backend service implementing this API. - :vartype service_url: str - :ivar path: Relative URL uniquely identifying this API and all of its resource paths within the - API Management service instance. It is appended to the API endpoint base URL specified during - the service instance creation to form a public URL for this API. - :vartype path: str - :ivar protocols: Describes on which protocols the operations in this API can be invoked. - :vartype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - """ - - _validation = { - "api_revision": {"max_length": 100, "min_length": 1}, - "api_version": {"max_length": 100}, - "is_online": {"readonly": True}, - "api_revision_description": {"max_length": 256}, - "api_version_description": {"max_length": 256}, - "name": {"max_length": 300, "min_length": 1}, - "service_url": {"max_length": 2000, "min_length": 1}, - "path": {"max_length": 400}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "authentication_settings": {"key": "authenticationSettings", "type": "AuthenticationSettingsContract"}, - "subscription_key_parameter_names": { - "key": "subscriptionKeyParameterNames", - "type": "SubscriptionKeyParameterNamesContract", - }, - "api_type": {"key": "type", "type": "str"}, - "api_revision": {"key": "apiRevision", "type": "str"}, - "api_version": {"key": "apiVersion", "type": "str"}, - "is_current": {"key": "isCurrent", "type": "bool"}, - "is_online": {"key": "isOnline", "type": "bool"}, - "api_revision_description": {"key": "apiRevisionDescription", "type": "str"}, - "api_version_description": {"key": "apiVersionDescription", "type": "str"}, - "api_version_set_id": {"key": "apiVersionSetId", "type": "str"}, - "subscription_required": {"key": "subscriptionRequired", "type": "bool"}, - "terms_of_service_url": {"key": "termsOfServiceUrl", "type": "str"}, - "contact": {"key": "contact", "type": "ApiContactInformation"}, - "license": {"key": "license", "type": "ApiLicenseInformation"}, - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "service_url": {"key": "serviceUrl", "type": "str"}, - "path": {"key": "path", "type": "str"}, - "protocols": {"key": "protocols", "type": "[str]"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - authentication_settings: Optional["_models.AuthenticationSettingsContract"] = None, - subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = None, - api_type: Optional[Union[str, "_models.ApiType"]] = None, - api_revision: Optional[str] = None, - api_version: Optional[str] = None, - is_current: Optional[bool] = None, - api_revision_description: Optional[str] = None, - api_version_description: Optional[str] = None, - api_version_set_id: Optional[str] = None, - subscription_required: Optional[bool] = None, - terms_of_service_url: Optional[str] = None, - contact: Optional["_models.ApiContactInformation"] = None, - license: Optional["_models.ApiLicenseInformation"] = None, - id: Optional[str] = None, # pylint: disable=redefined-builtin - name: Optional[str] = None, - service_url: Optional[str] = None, - path: Optional[str] = None, - protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the API. May include HTML formatting tags. - :paramtype description: str - :keyword authentication_settings: Collection of authentication settings included into this API. - :paramtype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :keyword subscription_key_parameter_names: Protocols over which API is made available. - :paramtype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :keyword api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", - "odata", and "grpc". - :paramtype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :keyword api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :paramtype api_revision: str - :keyword api_version: Indicates the version identifier of the API if the API is versioned. - :paramtype api_version: str - :keyword is_current: Indicates if API revision is current api revision. - :paramtype is_current: bool - :keyword api_revision_description: Description of the API Revision. - :paramtype api_revision_description: str - :keyword api_version_description: Description of the API Version. - :paramtype api_version_description: str - :keyword api_version_set_id: A resource identifier for the related ApiVersionSet. - :paramtype api_version_set_id: str - :keyword subscription_required: Specifies whether an API or Product subscription is required - for accessing the API. - :paramtype subscription_required: bool - :keyword terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format - of a URL. - :paramtype terms_of_service_url: str - :keyword contact: Contact information for the API. - :paramtype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :keyword license: License information for the API. - :paramtype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :keyword id: API identifier in the form /apis/{apiId}. - :paramtype id: str - :keyword name: API name. - :paramtype name: str - :keyword service_url: Absolute URL of the backend service implementing this API. - :paramtype service_url: str - :keyword path: Relative URL uniquely identifying this API and all of its resource paths within - the API Management service instance. It is appended to the API endpoint base URL specified - during the service instance creation to form a public URL for this API. - :paramtype path: str - :keyword protocols: Describes on which protocols the operations in this API can be invoked. - :paramtype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - """ - super().__init__( - description=description, - authentication_settings=authentication_settings, - subscription_key_parameter_names=subscription_key_parameter_names, - api_type=api_type, - api_revision=api_revision, - api_version=api_version, - is_current=is_current, - api_revision_description=api_revision_description, - api_version_description=api_version_description, - api_version_set_id=api_version_set_id, - subscription_required=subscription_required, - terms_of_service_url=terms_of_service_url, - contact=contact, - license=license, - **kwargs - ) - self.id = id - self.name = name - self.service_url = service_url - self.path = path - self.protocols = protocols - - -class ApiUpdateContract(_serialization.Model): - """API update contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar description: Description of the API. May include HTML formatting tags. - :vartype description: str - :ivar authentication_settings: Collection of authentication settings included into this API. - :vartype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :ivar subscription_key_parameter_names: Protocols over which API is made available. - :vartype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :ivar api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", "odata", - and "grpc". - :vartype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :ivar api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :vartype api_revision: str - :ivar api_version: Indicates the version identifier of the API if the API is versioned. - :vartype api_version: str - :ivar is_current: Indicates if API revision is current api revision. - :vartype is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :ivar api_revision_description: Description of the API Revision. - :vartype api_revision_description: str - :ivar api_version_description: Description of the API Version. - :vartype api_version_description: str - :ivar api_version_set_id: A resource identifier for the related ApiVersionSet. - :vartype api_version_set_id: str - :ivar subscription_required: Specifies whether an API or Product subscription is required for - accessing the API. - :vartype subscription_required: bool - :ivar terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format of - a URL. - :vartype terms_of_service_url: str - :ivar contact: Contact information for the API. - :vartype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :ivar license: License information for the API. - :vartype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :ivar display_name: API name. - :vartype display_name: str - :ivar service_url: Absolute URL of the backend service implementing this API. - :vartype service_url: str - :ivar path: Relative URL uniquely identifying this API and all of its resource paths within the - API Management service instance. It is appended to the API endpoint base URL specified during - the service instance creation to form a public URL for this API. - :vartype path: str - :ivar protocols: Describes on which protocols the operations in this API can be invoked. - :vartype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - """ - - _validation = { - "api_revision": {"max_length": 100, "min_length": 1}, - "api_version": {"max_length": 100}, - "is_online": {"readonly": True}, - "api_revision_description": {"max_length": 256}, - "api_version_description": {"max_length": 256}, - "display_name": {"max_length": 300, "min_length": 1}, - "service_url": {"max_length": 2000, "min_length": 1}, - "path": {"max_length": 400}, - } - - _attribute_map = { - "description": {"key": "properties.description", "type": "str"}, - "authentication_settings": { - "key": "properties.authenticationSettings", - "type": "AuthenticationSettingsContract", - }, - "subscription_key_parameter_names": { - "key": "properties.subscriptionKeyParameterNames", - "type": "SubscriptionKeyParameterNamesContract", - }, - "api_type": {"key": "properties.type", "type": "str"}, - "api_revision": {"key": "properties.apiRevision", "type": "str"}, - "api_version": {"key": "properties.apiVersion", "type": "str"}, - "is_current": {"key": "properties.isCurrent", "type": "bool"}, - "is_online": {"key": "properties.isOnline", "type": "bool"}, - "api_revision_description": {"key": "properties.apiRevisionDescription", "type": "str"}, - "api_version_description": {"key": "properties.apiVersionDescription", "type": "str"}, - "api_version_set_id": {"key": "properties.apiVersionSetId", "type": "str"}, - "subscription_required": {"key": "properties.subscriptionRequired", "type": "bool"}, - "terms_of_service_url": {"key": "properties.termsOfServiceUrl", "type": "str"}, - "contact": {"key": "properties.contact", "type": "ApiContactInformation"}, - "license": {"key": "properties.license", "type": "ApiLicenseInformation"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "service_url": {"key": "properties.serviceUrl", "type": "str"}, - "path": {"key": "properties.path", "type": "str"}, - "protocols": {"key": "properties.protocols", "type": "[str]"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - authentication_settings: Optional["_models.AuthenticationSettingsContract"] = None, - subscription_key_parameter_names: Optional["_models.SubscriptionKeyParameterNamesContract"] = None, - api_type: Optional[Union[str, "_models.ApiType"]] = None, - api_revision: Optional[str] = None, - api_version: Optional[str] = None, - is_current: Optional[bool] = None, - api_revision_description: Optional[str] = None, - api_version_description: Optional[str] = None, - api_version_set_id: Optional[str] = None, - subscription_required: Optional[bool] = None, - terms_of_service_url: Optional[str] = None, - contact: Optional["_models.ApiContactInformation"] = None, - license: Optional["_models.ApiLicenseInformation"] = None, - display_name: Optional[str] = None, - service_url: Optional[str] = None, - path: Optional[str] = None, - protocols: Optional[list[Union[str, "_models.Protocol"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the API. May include HTML formatting tags. - :paramtype description: str - :keyword authentication_settings: Collection of authentication settings included into this API. - :paramtype authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :keyword subscription_key_parameter_names: Protocols over which API is made available. - :paramtype subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :keyword api_type: Type of API. Known values are: "http", "soap", "websocket", "graphql", - "odata", and "grpc". - :paramtype api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :keyword api_revision: Describes the revision of the API. If no value is provided, default - revision 1 is created. - :paramtype api_revision: str - :keyword api_version: Indicates the version identifier of the API if the API is versioned. - :paramtype api_version: str - :keyword is_current: Indicates if API revision is current api revision. - :paramtype is_current: bool - :keyword api_revision_description: Description of the API Revision. - :paramtype api_revision_description: str - :keyword api_version_description: Description of the API Version. - :paramtype api_version_description: str - :keyword api_version_set_id: A resource identifier for the related ApiVersionSet. - :paramtype api_version_set_id: str - :keyword subscription_required: Specifies whether an API or Product subscription is required - for accessing the API. - :paramtype subscription_required: bool - :keyword terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format - of a URL. - :paramtype terms_of_service_url: str - :keyword contact: Contact information for the API. - :paramtype contact: ~azure.mgmt.apimanagement.models.ApiContactInformation - :keyword license: License information for the API. - :paramtype license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation - :keyword display_name: API name. - :paramtype display_name: str - :keyword service_url: Absolute URL of the backend service implementing this API. - :paramtype service_url: str - :keyword path: Relative URL uniquely identifying this API and all of its resource paths within - the API Management service instance. It is appended to the API endpoint base URL specified - during the service instance creation to form a public URL for this API. - :paramtype path: str - :keyword protocols: Describes on which protocols the operations in this API can be invoked. - :paramtype protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - """ - super().__init__(**kwargs) - self.description = description - self.authentication_settings = authentication_settings - self.subscription_key_parameter_names = subscription_key_parameter_names - self.api_type = api_type - self.api_revision = api_revision - self.api_version = api_version - self.is_current = is_current - self.is_online: Optional[bool] = None - self.api_revision_description = api_revision_description - self.api_version_description = api_version_description - self.api_version_set_id = api_version_set_id - self.subscription_required = subscription_required - self.terms_of_service_url = terms_of_service_url - self.contact = contact - self.license = license - self.display_name = display_name - self.service_url = service_url - self.path = path - self.protocols = protocols - - -class ApiVersionConstraint(_serialization.Model): - """Control Plane Apis version constraint for the API Management service. - - :ivar min_api_version: Limit control plane API calls to API Management service with version - equal to or newer than this value. - :vartype min_api_version: str - """ - - _attribute_map = { - "min_api_version": {"key": "minApiVersion", "type": "str"}, - } - - def __init__(self, *, min_api_version: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword min_api_version: Limit control plane API calls to API Management service with version - equal to or newer than this value. - :paramtype min_api_version: str - """ - super().__init__(**kwargs) - self.min_api_version = min_api_version - - -class ApiVersionSetCollection(_serialization.Model): - """Paged API Version Set list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.ApiVersionSetContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ApiVersionSetContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.ApiVersionSetContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.ApiVersionSetContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class ApiVersionSetContract(ProxyResource): - """API Version Set Contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar description: Description of API Version Set. - :vartype description: str - :ivar version_query_name: Name of query parameter that indicates the API Version if - versioningScheme is set to ``query``. - :vartype version_query_name: str - :ivar version_header_name: Name of HTTP header parameter that indicates the API Version if - versioningScheme is set to ``header``. - :vartype version_header_name: str - :ivar display_name: Name of API Version Set. - :vartype display_name: str - :ivar versioning_scheme: An value that determines where the API Version identifier will be - located in a HTTP request. Known values are: "Segment", "Query", and "Header". - :vartype versioning_scheme: str or ~azure.mgmt.apimanagement.models.VersioningScheme - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "version_query_name": {"max_length": 100, "min_length": 1}, - "version_header_name": {"max_length": 100, "min_length": 1}, - "display_name": {"max_length": 100, "min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "version_query_name": {"key": "properties.versionQueryName", "type": "str"}, - "version_header_name": {"key": "properties.versionHeaderName", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "versioning_scheme": {"key": "properties.versioningScheme", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - version_query_name: Optional[str] = None, - version_header_name: Optional[str] = None, - display_name: Optional[str] = None, - versioning_scheme: Optional[Union[str, "_models.VersioningScheme"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of API Version Set. - :paramtype description: str - :keyword version_query_name: Name of query parameter that indicates the API Version if - versioningScheme is set to ``query``. - :paramtype version_query_name: str - :keyword version_header_name: Name of HTTP header parameter that indicates the API Version if - versioningScheme is set to ``header``. - :paramtype version_header_name: str - :keyword display_name: Name of API Version Set. - :paramtype display_name: str - :keyword versioning_scheme: An value that determines where the API Version identifier will be - located in a HTTP request. Known values are: "Segment", "Query", and "Header". - :paramtype versioning_scheme: str or ~azure.mgmt.apimanagement.models.VersioningScheme - """ - super().__init__(**kwargs) - self.description = description - self.version_query_name = version_query_name - self.version_header_name = version_header_name - self.display_name = display_name - self.versioning_scheme = versioning_scheme - - -class ApiVersionSetContractDetails(_serialization.Model): - """An API Version Set contains the common configuration for a set of API Versions relating. - - :ivar id: Identifier for existing API Version Set. Omit this value to create a new Version Set. - :vartype id: str - :ivar name: The display Name of the API Version Set. - :vartype name: str - :ivar description: Description of API Version Set. - :vartype description: str - :ivar versioning_scheme: An value that determines where the API Version identifier will be - located in a HTTP request. Known values are: "Segment", "Query", and "Header". - :vartype versioning_scheme: str or ~azure.mgmt.apimanagement.models.VersioningScheme - :ivar version_query_name: Name of query parameter that indicates the API Version if - versioningScheme is set to ``query``. - :vartype version_query_name: str - :ivar version_header_name: Name of HTTP header parameter that indicates the API Version if - versioningScheme is set to ``header``. - :vartype version_header_name: str - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "versioning_scheme": {"key": "versioningScheme", "type": "str"}, - "version_query_name": {"key": "versionQueryName", "type": "str"}, - "version_header_name": {"key": "versionHeaderName", "type": "str"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - name: Optional[str] = None, - description: Optional[str] = None, - versioning_scheme: Optional[Union[str, "_models.VersioningScheme"]] = None, - version_query_name: Optional[str] = None, - version_header_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: Identifier for existing API Version Set. Omit this value to create a new Version - Set. - :paramtype id: str - :keyword name: The display Name of the API Version Set. - :paramtype name: str - :keyword description: Description of API Version Set. - :paramtype description: str - :keyword versioning_scheme: An value that determines where the API Version identifier will be - located in a HTTP request. Known values are: "Segment", "Query", and "Header". - :paramtype versioning_scheme: str or ~azure.mgmt.apimanagement.models.VersioningScheme - :keyword version_query_name: Name of query parameter that indicates the API Version if - versioningScheme is set to ``query``. - :paramtype version_query_name: str - :keyword version_header_name: Name of HTTP header parameter that indicates the API Version if - versioningScheme is set to ``header``. - :paramtype version_header_name: str - """ - super().__init__(**kwargs) - self.id = id - self.name = name - self.description = description - self.versioning_scheme = versioning_scheme - self.version_query_name = version_query_name - self.version_header_name = version_header_name - - -class ApiVersionSetEntityBase(_serialization.Model): - """API Version set base parameters. - - :ivar description: Description of API Version Set. - :vartype description: str - :ivar version_query_name: Name of query parameter that indicates the API Version if - versioningScheme is set to ``query``. - :vartype version_query_name: str - :ivar version_header_name: Name of HTTP header parameter that indicates the API Version if - versioningScheme is set to ``header``. - :vartype version_header_name: str - """ - - _validation = { - "version_query_name": {"max_length": 100, "min_length": 1}, - "version_header_name": {"max_length": 100, "min_length": 1}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "version_query_name": {"key": "versionQueryName", "type": "str"}, - "version_header_name": {"key": "versionHeaderName", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - version_query_name: Optional[str] = None, - version_header_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of API Version Set. - :paramtype description: str - :keyword version_query_name: Name of query parameter that indicates the API Version if - versioningScheme is set to ``query``. - :paramtype version_query_name: str - :keyword version_header_name: Name of HTTP header parameter that indicates the API Version if - versioningScheme is set to ``header``. - :paramtype version_header_name: str - """ - super().__init__(**kwargs) - self.description = description - self.version_query_name = version_query_name - self.version_header_name = version_header_name - - -class ApiVersionSetContractProperties(ApiVersionSetEntityBase): - """Properties of an API Version Set. - - All required parameters must be populated in order to send to server. - - :ivar description: Description of API Version Set. - :vartype description: str - :ivar version_query_name: Name of query parameter that indicates the API Version if - versioningScheme is set to ``query``. - :vartype version_query_name: str - :ivar version_header_name: Name of HTTP header parameter that indicates the API Version if - versioningScheme is set to ``header``. - :vartype version_header_name: str - :ivar display_name: Name of API Version Set. Required. - :vartype display_name: str - :ivar versioning_scheme: An value that determines where the API Version identifier will be - located in a HTTP request. Required. Known values are: "Segment", "Query", and "Header". - :vartype versioning_scheme: str or ~azure.mgmt.apimanagement.models.VersioningScheme - """ - - _validation = { - "version_query_name": {"max_length": 100, "min_length": 1}, - "version_header_name": {"max_length": 100, "min_length": 1}, - "display_name": {"required": True, "max_length": 100, "min_length": 1}, - "versioning_scheme": {"required": True}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "version_query_name": {"key": "versionQueryName", "type": "str"}, - "version_header_name": {"key": "versionHeaderName", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "versioning_scheme": {"key": "versioningScheme", "type": "str"}, - } - - def __init__( - self, - *, - display_name: str, - versioning_scheme: Union[str, "_models.VersioningScheme"], - description: Optional[str] = None, - version_query_name: Optional[str] = None, - version_header_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of API Version Set. - :paramtype description: str - :keyword version_query_name: Name of query parameter that indicates the API Version if - versioningScheme is set to ``query``. - :paramtype version_query_name: str - :keyword version_header_name: Name of HTTP header parameter that indicates the API Version if - versioningScheme is set to ``header``. - :paramtype version_header_name: str - :keyword display_name: Name of API Version Set. Required. - :paramtype display_name: str - :keyword versioning_scheme: An value that determines where the API Version identifier will be - located in a HTTP request. Required. Known values are: "Segment", "Query", and "Header". - :paramtype versioning_scheme: str or ~azure.mgmt.apimanagement.models.VersioningScheme - """ - super().__init__( - description=description, - version_query_name=version_query_name, - version_header_name=version_header_name, - **kwargs - ) - self.display_name = display_name - self.versioning_scheme = versioning_scheme - - -class ApiVersionSetUpdateParameters(_serialization.Model): - """Parameters to update or create an API Version Set Contract. - - :ivar description: Description of API Version Set. - :vartype description: str - :ivar version_query_name: Name of query parameter that indicates the API Version if - versioningScheme is set to ``query``. - :vartype version_query_name: str - :ivar version_header_name: Name of HTTP header parameter that indicates the API Version if - versioningScheme is set to ``header``. - :vartype version_header_name: str - :ivar display_name: Name of API Version Set. - :vartype display_name: str - :ivar versioning_scheme: An value that determines where the API Version identifier will be - located in a HTTP request. Known values are: "Segment", "Query", and "Header". - :vartype versioning_scheme: str or ~azure.mgmt.apimanagement.models.VersioningScheme - """ - - _validation = { - "version_query_name": {"max_length": 100, "min_length": 1}, - "version_header_name": {"max_length": 100, "min_length": 1}, - "display_name": {"max_length": 100, "min_length": 1}, - } - - _attribute_map = { - "description": {"key": "properties.description", "type": "str"}, - "version_query_name": {"key": "properties.versionQueryName", "type": "str"}, - "version_header_name": {"key": "properties.versionHeaderName", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "versioning_scheme": {"key": "properties.versioningScheme", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - version_query_name: Optional[str] = None, - version_header_name: Optional[str] = None, - display_name: Optional[str] = None, - versioning_scheme: Optional[Union[str, "_models.VersioningScheme"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of API Version Set. - :paramtype description: str - :keyword version_query_name: Name of query parameter that indicates the API Version if - versioningScheme is set to ``query``. - :paramtype version_query_name: str - :keyword version_header_name: Name of HTTP header parameter that indicates the API Version if - versioningScheme is set to ``header``. - :paramtype version_header_name: str - :keyword display_name: Name of API Version Set. - :paramtype display_name: str - :keyword versioning_scheme: An value that determines where the API Version identifier will be - located in a HTTP request. Known values are: "Segment", "Query", and "Header". - :paramtype versioning_scheme: str or ~azure.mgmt.apimanagement.models.VersioningScheme - """ - super().__init__(**kwargs) - self.description = description - self.version_query_name = version_query_name - self.version_header_name = version_header_name - self.display_name = display_name - self.versioning_scheme = versioning_scheme - - -class ApiVersionSetUpdateParametersProperties(ApiVersionSetEntityBase): - """Properties used to create or update an API Version Set. - - :ivar description: Description of API Version Set. - :vartype description: str - :ivar version_query_name: Name of query parameter that indicates the API Version if - versioningScheme is set to ``query``. - :vartype version_query_name: str - :ivar version_header_name: Name of HTTP header parameter that indicates the API Version if - versioningScheme is set to ``header``. - :vartype version_header_name: str - :ivar display_name: Name of API Version Set. - :vartype display_name: str - :ivar versioning_scheme: An value that determines where the API Version identifier will be - located in a HTTP request. Known values are: "Segment", "Query", and "Header". - :vartype versioning_scheme: str or ~azure.mgmt.apimanagement.models.VersioningScheme - """ - - _validation = { - "version_query_name": {"max_length": 100, "min_length": 1}, - "version_header_name": {"max_length": 100, "min_length": 1}, - "display_name": {"max_length": 100, "min_length": 1}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "version_query_name": {"key": "versionQueryName", "type": "str"}, - "version_header_name": {"key": "versionHeaderName", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "versioning_scheme": {"key": "versioningScheme", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - version_query_name: Optional[str] = None, - version_header_name: Optional[str] = None, - display_name: Optional[str] = None, - versioning_scheme: Optional[Union[str, "_models.VersioningScheme"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of API Version Set. - :paramtype description: str - :keyword version_query_name: Name of query parameter that indicates the API Version if - versioningScheme is set to ``query``. - :paramtype version_query_name: str - :keyword version_header_name: Name of HTTP header parameter that indicates the API Version if - versioningScheme is set to ``header``. - :paramtype version_header_name: str - :keyword display_name: Name of API Version Set. - :paramtype display_name: str - :keyword versioning_scheme: An value that determines where the API Version identifier will be - located in a HTTP request. Known values are: "Segment", "Query", and "Header". - :paramtype versioning_scheme: str or ~azure.mgmt.apimanagement.models.VersioningScheme - """ - super().__init__( - description=description, - version_query_name=version_query_name, - version_header_name=version_header_name, - **kwargs - ) - self.display_name = display_name - self.versioning_scheme = versioning_scheme - - -class ArmIdWrapper(_serialization.Model): - """A wrapper for an ARM resource id. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: - :vartype id: str - """ - - _validation = { - "id": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id: Optional[str] = None - - -class AssociationContract(ProxyResource): - """Association entity details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar provisioning_state: Provisioning state. Default value is "created". - :vartype provisioning_state: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__(self, *, provisioning_state: Optional[Literal["created"]] = None, **kwargs: Any) -> None: - """ - :keyword provisioning_state: Provisioning state. Default value is "created". - :paramtype provisioning_state: str - """ - super().__init__(**kwargs) - self.provisioning_state = provisioning_state - - -class AuthenticationSettingsContract(_serialization.Model): - """API Authentication Settings. - - :ivar o_auth2: OAuth2 Authentication settings. - :vartype o_auth2: ~azure.mgmt.apimanagement.models.OAuth2AuthenticationSettingsContract - :ivar openid: OpenID Connect Authentication Settings. - :vartype openid: ~azure.mgmt.apimanagement.models.OpenIdAuthenticationSettingsContract - :ivar o_auth2_authentication_settings: Collection of OAuth2 authentication settings included - into this API. - :vartype o_auth2_authentication_settings: - list[~azure.mgmt.apimanagement.models.OAuth2AuthenticationSettingsContract] - :ivar openid_authentication_settings: Collection of Open ID Connect authentication settings - included into this API. - :vartype openid_authentication_settings: - list[~azure.mgmt.apimanagement.models.OpenIdAuthenticationSettingsContract] - """ - - _attribute_map = { - "o_auth2": {"key": "oAuth2", "type": "OAuth2AuthenticationSettingsContract"}, - "openid": {"key": "openid", "type": "OpenIdAuthenticationSettingsContract"}, - "o_auth2_authentication_settings": { - "key": "oAuth2AuthenticationSettings", - "type": "[OAuth2AuthenticationSettingsContract]", - }, - "openid_authentication_settings": { - "key": "openidAuthenticationSettings", - "type": "[OpenIdAuthenticationSettingsContract]", - }, - } - - def __init__( - self, - *, - o_auth2: Optional["_models.OAuth2AuthenticationSettingsContract"] = None, - openid: Optional["_models.OpenIdAuthenticationSettingsContract"] = None, - o_auth2_authentication_settings: Optional[list["_models.OAuth2AuthenticationSettingsContract"]] = None, - openid_authentication_settings: Optional[list["_models.OpenIdAuthenticationSettingsContract"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword o_auth2: OAuth2 Authentication settings. - :paramtype o_auth2: ~azure.mgmt.apimanagement.models.OAuth2AuthenticationSettingsContract - :keyword openid: OpenID Connect Authentication Settings. - :paramtype openid: ~azure.mgmt.apimanagement.models.OpenIdAuthenticationSettingsContract - :keyword o_auth2_authentication_settings: Collection of OAuth2 authentication settings included - into this API. - :paramtype o_auth2_authentication_settings: - list[~azure.mgmt.apimanagement.models.OAuth2AuthenticationSettingsContract] - :keyword openid_authentication_settings: Collection of Open ID Connect authentication settings - included into this API. - :paramtype openid_authentication_settings: - list[~azure.mgmt.apimanagement.models.OpenIdAuthenticationSettingsContract] - """ - super().__init__(**kwargs) - self.o_auth2 = o_auth2 - self.openid = openid - self.o_auth2_authentication_settings = o_auth2_authentication_settings - self.openid_authentication_settings = openid_authentication_settings - - -class AuthorizationAccessPolicyCollection(_serialization.Model): - """Paged Authorization Access Policy list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[AuthorizationAccessPolicyContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.AuthorizationAccessPolicyContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class AuthorizationAccessPolicyContract(ProxyResource): - """Authorization access policy contract. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar app_ids: The allowed Azure Active Directory Application IDs. - :vartype app_ids: list[str] - :ivar tenant_id: The Tenant Id. - :vartype tenant_id: str - :ivar object_id: The Object Id. - :vartype object_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "app_ids": {"key": "properties.appIds", "type": "[str]"}, - "tenant_id": {"key": "properties.tenantId", "type": "str"}, - "object_id": {"key": "properties.objectId", "type": "str"}, - } - - def __init__( - self, - *, - app_ids: Optional[list[str]] = None, - tenant_id: Optional[str] = None, - object_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword app_ids: The allowed Azure Active Directory Application IDs. - :paramtype app_ids: list[str] - :keyword tenant_id: The Tenant Id. - :paramtype tenant_id: str - :keyword object_id: The Object Id. - :paramtype object_id: str - """ - super().__init__(**kwargs) - self.app_ids = app_ids - self.tenant_id = tenant_id - self.object_id = object_id - - -class AuthorizationCollection(_serialization.Model): - """Paged Authorization list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.AuthorizationContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[AuthorizationContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.AuthorizationContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.AuthorizationContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class AuthorizationConfirmConsentCodeRequestContract(_serialization.Model): # pylint: disable=name-too-long - """Authorization confirm consent code request contract. - - :ivar consent_code: The consent code from the authorization server after authorizing and - consenting. - :vartype consent_code: str - """ - - _attribute_map = { - "consent_code": {"key": "consentCode", "type": "str"}, - } - - def __init__(self, *, consent_code: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword consent_code: The consent code from the authorization server after authorizing and - consenting. - :paramtype consent_code: str - """ - super().__init__(**kwargs) - self.consent_code = consent_code - - -class AuthorizationContract(ProxyResource): - """Authorization contract. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar authorization_type: Authorization type options. "OAuth2" - :vartype authorization_type: str or ~azure.mgmt.apimanagement.models.AuthorizationType - :ivar o_auth2_grant_type: OAuth2 grant type options. Known values are: "AuthorizationCode" and - "ClientCredentials". - :vartype o_auth2_grant_type: str or ~azure.mgmt.apimanagement.models.OAuth2GrantType - :ivar parameters: Authorization parameters. - :vartype parameters: dict[str, str] - :ivar error: Authorization error details. - :vartype error: ~azure.mgmt.apimanagement.models.AuthorizationError - :ivar status: Status of the Authorization. - :vartype status: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "authorization_type": {"key": "properties.authorizationType", "type": "str"}, - "o_auth2_grant_type": {"key": "properties.oauth2grantType", "type": "str"}, - "parameters": {"key": "properties.parameters", "type": "{str}"}, - "error": {"key": "properties.error", "type": "AuthorizationError"}, - "status": {"key": "properties.status", "type": "str"}, - } - - def __init__( - self, - *, - authorization_type: Optional[Union[str, "_models.AuthorizationType"]] = None, - o_auth2_grant_type: Optional[Union[str, "_models.OAuth2GrantType"]] = None, - parameters: Optional[dict[str, str]] = None, - error: Optional["_models.AuthorizationError"] = None, - status: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword authorization_type: Authorization type options. "OAuth2" - :paramtype authorization_type: str or ~azure.mgmt.apimanagement.models.AuthorizationType - :keyword o_auth2_grant_type: OAuth2 grant type options. Known values are: "AuthorizationCode" - and "ClientCredentials". - :paramtype o_auth2_grant_type: str or ~azure.mgmt.apimanagement.models.OAuth2GrantType - :keyword parameters: Authorization parameters. - :paramtype parameters: dict[str, str] - :keyword error: Authorization error details. - :paramtype error: ~azure.mgmt.apimanagement.models.AuthorizationError - :keyword status: Status of the Authorization. - :paramtype status: str - """ - super().__init__(**kwargs) - self.authorization_type = authorization_type - self.o_auth2_grant_type = o_auth2_grant_type - self.parameters = parameters - self.error = error - self.status = status - - -class AuthorizationError(_serialization.Model): - """Authorization error details. - - :ivar code: Error code. - :vartype code: str - :ivar message: Error message. - :vartype message: str - """ - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "message": {"key": "message", "type": "str"}, - } - - def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword code: Error code. - :paramtype code: str - :keyword message: Error message. - :paramtype message: str - """ - super().__init__(**kwargs) - self.code = code - self.message = message - - -class AuthorizationLoginRequestContract(_serialization.Model): - """Authorization login request contract. - - :ivar post_login_redirect_url: The redirect URL after login has completed. - :vartype post_login_redirect_url: str - """ - - _attribute_map = { - "post_login_redirect_url": {"key": "postLoginRedirectUrl", "type": "str"}, - } - - def __init__(self, *, post_login_redirect_url: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword post_login_redirect_url: The redirect URL after login has completed. - :paramtype post_login_redirect_url: str - """ - super().__init__(**kwargs) - self.post_login_redirect_url = post_login_redirect_url - - -class AuthorizationLoginResponseContract(_serialization.Model): - """Authorization login response contract. - - :ivar login_link: The login link. - :vartype login_link: str - """ - - _attribute_map = { - "login_link": {"key": "loginLink", "type": "str"}, - } - - def __init__(self, *, login_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword login_link: The login link. - :paramtype login_link: str - """ - super().__init__(**kwargs) - self.login_link = login_link - - -class AuthorizationProviderCollection(_serialization.Model): - """Paged Authorization Provider list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.AuthorizationProviderContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[AuthorizationProviderContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.AuthorizationProviderContract"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.AuthorizationProviderContract] - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class AuthorizationProviderContract(ProxyResource): - """Authorization Provider contract. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar display_name: Authorization Provider name. Must be 1 to 300 characters long. - :vartype display_name: str - :ivar identity_provider: Identity provider name. Must be 1 to 300 characters long. - :vartype identity_provider: str - :ivar oauth2: OAuth2 settings. - :vartype oauth2: ~azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2Settings - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "display_name": {"max_length": 300, "min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "identity_provider": {"key": "properties.identityProvider", "type": "str"}, - "oauth2": {"key": "properties.oauth2", "type": "AuthorizationProviderOAuth2Settings"}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - identity_provider: Optional[str] = None, - oauth2: Optional["_models.AuthorizationProviderOAuth2Settings"] = None, - **kwargs: Any - ) -> None: - """ - :keyword display_name: Authorization Provider name. Must be 1 to 300 characters long. - :paramtype display_name: str - :keyword identity_provider: Identity provider name. Must be 1 to 300 characters long. - :paramtype identity_provider: str - :keyword oauth2: OAuth2 settings. - :paramtype oauth2: ~azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2Settings - """ - super().__init__(**kwargs) - self.display_name = display_name - self.identity_provider = identity_provider - self.oauth2 = oauth2 - - -class AuthorizationProviderKeyVaultCreateProperties(_serialization.Model): # pylint: disable=name-too-long - """Authorization Provider KeyVault create contract properties. - - :ivar secret_identifier: Key vault secret identifier for client secret. When provided, client - secret will be retrieved from the provided key vault secret. - :vartype secret_identifier: str - """ - - _attribute_map = { - "secret_identifier": {"key": "secretIdentifier", "type": "str"}, - } - - def __init__(self, *, secret_identifier: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword secret_identifier: Key vault secret identifier for client secret. When provided, - client secret will be retrieved from the provided key vault secret. - :paramtype secret_identifier: str - """ - super().__init__(**kwargs) - self.secret_identifier = secret_identifier - - -class AuthorizationProviderKeyVaultContract(AuthorizationProviderKeyVaultCreateProperties): - """Authorization Provider KeyVault contract properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar secret_identifier: Key vault secret identifier for client secret. When provided, client - secret will be retrieved from the provided key vault secret. - :vartype secret_identifier: str - :ivar updated: When the secret was last updated in key vault. - :vartype updated: ~datetime.datetime - :ivar last_status: Last time sync and refresh of secret from key vault. - :vartype last_status: - ~azure.mgmt.apimanagement.models.KeyVaultLastAccessStatusContractProperties - """ - - _validation = { - "updated": {"readonly": True}, - "last_status": {"readonly": True}, - } - - _attribute_map = { - "secret_identifier": {"key": "secretIdentifier", "type": "str"}, - "updated": {"key": "updated", "type": "iso-8601"}, - "last_status": {"key": "lastStatus", "type": "KeyVaultLastAccessStatusContractProperties"}, - } - - def __init__(self, *, secret_identifier: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword secret_identifier: Key vault secret identifier for client secret. When provided, - client secret will be retrieved from the provided key vault secret. - :paramtype secret_identifier: str - """ - super().__init__(secret_identifier=secret_identifier, **kwargs) - self.updated: Optional[datetime.datetime] = None - self.last_status: Optional["_models.KeyVaultLastAccessStatusContractProperties"] = None - - -class AuthorizationProviderOAuth2GrantTypes(_serialization.Model): - """Authorization Provider oauth2 grant types settings. - - :ivar authorization_code: OAuth2 authorization code grant parameters. - :vartype authorization_code: dict[str, str] - :ivar client_credentials: OAuth2 client credential grant parameters. - :vartype client_credentials: dict[str, str] - """ - - _attribute_map = { - "authorization_code": {"key": "authorizationCode", "type": "{str}"}, - "client_credentials": {"key": "clientCredentials", "type": "{str}"}, - } - - def __init__( - self, - *, - authorization_code: Optional[dict[str, str]] = None, - client_credentials: Optional[dict[str, str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword authorization_code: OAuth2 authorization code grant parameters. - :paramtype authorization_code: dict[str, str] - :keyword client_credentials: OAuth2 client credential grant parameters. - :paramtype client_credentials: dict[str, str] - """ - super().__init__(**kwargs) - self.authorization_code = authorization_code - self.client_credentials = client_credentials - - -class AuthorizationProviderOAuth2Settings(_serialization.Model): - """OAuth2 settings details. - - :ivar redirect_url: Redirect URL to be set in the OAuth application. - :vartype redirect_url: str - :ivar grant_types: OAuth2 settings. - :vartype grant_types: ~azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2GrantTypes - :ivar key_vault: Key Vault reference for client secret storage. - :vartype key_vault: ~azure.mgmt.apimanagement.models.AuthorizationProviderKeyVaultContract - """ - - _attribute_map = { - "redirect_url": {"key": "redirectUrl", "type": "str"}, - "grant_types": {"key": "grantTypes", "type": "AuthorizationProviderOAuth2GrantTypes"}, - "key_vault": {"key": "keyVault", "type": "AuthorizationProviderKeyVaultContract"}, - } - - def __init__( - self, - *, - redirect_url: Optional[str] = None, - grant_types: Optional["_models.AuthorizationProviderOAuth2GrantTypes"] = None, - key_vault: Optional["_models.AuthorizationProviderKeyVaultContract"] = None, - **kwargs: Any - ) -> None: - """ - :keyword redirect_url: Redirect URL to be set in the OAuth application. - :paramtype redirect_url: str - :keyword grant_types: OAuth2 settings. - :paramtype grant_types: ~azure.mgmt.apimanagement.models.AuthorizationProviderOAuth2GrantTypes - :keyword key_vault: Key Vault reference for client secret storage. - :paramtype key_vault: ~azure.mgmt.apimanagement.models.AuthorizationProviderKeyVaultContract - """ - super().__init__(**kwargs) - self.redirect_url = redirect_url - self.grant_types = grant_types - self.key_vault = key_vault - - -class AuthorizationServerCollection(_serialization.Model): - """Paged OAuth2 Authorization Servers list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.AuthorizationServerContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[AuthorizationServerContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.AuthorizationServerContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.AuthorizationServerContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class AuthorizationServerContract(ProxyResource): - """External OAuth authorization server settings. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar description: Description of the authorization server. Can contain HTML formatting tags. - :vartype description: str - :ivar authorization_methods: HTTP verbs supported by the authorization endpoint. GET must be - always present. POST is optional. - :vartype authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :ivar client_authentication_method: Method of authentication supported by the token endpoint of - this authorization server. Possible values are Basic and/or Body. When Body is specified, - client credentials and other parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :vartype client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :ivar token_body_parameters: Additional parameters required by the token endpoint of this - authorization server represented as an array of JSON objects with name and value string - properties, i.e. {"name" : "name value", "value": "a value"}. - :vartype token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :ivar token_endpoint: OAuth token endpoint. Contains absolute URI to entity being referenced. - :vartype token_endpoint: str - :ivar support_state: If true, authorization server will include state parameter from the - authorization request to its response. Client may use state parameter to raise protocol - security. - :vartype support_state: bool - :ivar default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing - space-delimited values. - :vartype default_scope: str - :ivar bearer_token_sending_methods: Specifies the mechanism by which access token is passed to - the API. - :vartype bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :ivar resource_owner_username: Can be optionally specified when resource owner password grant - type is supported by this authorization server. Default resource owner username. - :vartype resource_owner_username: str - :ivar resource_owner_password: Can be optionally specified when resource owner password grant - type is supported by this authorization server. Default resource owner password. - :vartype resource_owner_password: str - :ivar display_name: User-friendly authorization server name. - :vartype display_name: str - :ivar use_in_test_console: If true, the authorization server may be used in the developer - portal test console. True by default if no value is provided. - :vartype use_in_test_console: bool - :ivar use_in_api_documentation: If true, the authorization server will be used in the API - documentation in the developer portal. False by default if no value is provided. - :vartype use_in_api_documentation: bool - :ivar client_registration_endpoint: Optional reference to a page where client or app - registration for this authorization server is performed. Contains absolute URL to entity being - referenced. - :vartype client_registration_endpoint: str - :ivar authorization_endpoint: OAuth authorization endpoint. See - http://tools.ietf.org/html/rfc6749#section-3.2. - :vartype authorization_endpoint: str - :ivar grant_types: Form of an authorization grant, which the client uses to request the access - token. - :vartype grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] - :ivar client_id: Client or app id registered with this authorization server. - :vartype client_id: str - :ivar client_secret: Client or app secret registered with this authorization server. This - property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the - value. - :vartype client_secret: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "display_name": {"max_length": 50, "min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "authorization_methods": {"key": "properties.authorizationMethods", "type": "[str]"}, - "client_authentication_method": {"key": "properties.clientAuthenticationMethod", "type": "[str]"}, - "token_body_parameters": {"key": "properties.tokenBodyParameters", "type": "[TokenBodyParameterContract]"}, - "token_endpoint": {"key": "properties.tokenEndpoint", "type": "str"}, - "support_state": {"key": "properties.supportState", "type": "bool"}, - "default_scope": {"key": "properties.defaultScope", "type": "str"}, - "bearer_token_sending_methods": {"key": "properties.bearerTokenSendingMethods", "type": "[str]"}, - "resource_owner_username": {"key": "properties.resourceOwnerUsername", "type": "str"}, - "resource_owner_password": {"key": "properties.resourceOwnerPassword", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "use_in_test_console": {"key": "properties.useInTestConsole", "type": "bool"}, - "use_in_api_documentation": {"key": "properties.useInApiDocumentation", "type": "bool"}, - "client_registration_endpoint": {"key": "properties.clientRegistrationEndpoint", "type": "str"}, - "authorization_endpoint": {"key": "properties.authorizationEndpoint", "type": "str"}, - "grant_types": {"key": "properties.grantTypes", "type": "[str]"}, - "client_id": {"key": "properties.clientId", "type": "str"}, - "client_secret": {"key": "properties.clientSecret", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = None, - client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = None, - token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = None, - token_endpoint: Optional[str] = None, - support_state: Optional[bool] = None, - default_scope: Optional[str] = None, - bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = None, - resource_owner_username: Optional[str] = None, - resource_owner_password: Optional[str] = None, - display_name: Optional[str] = None, - use_in_test_console: Optional[bool] = None, - use_in_api_documentation: Optional[bool] = None, - client_registration_endpoint: Optional[str] = None, - authorization_endpoint: Optional[str] = None, - grant_types: Optional[list[Union[str, "_models.GrantType"]]] = None, - client_id: Optional[str] = None, - client_secret: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the authorization server. Can contain HTML formatting - tags. - :paramtype description: str - :keyword authorization_methods: HTTP verbs supported by the authorization endpoint. GET must be - always present. POST is optional. - :paramtype authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :keyword client_authentication_method: Method of authentication supported by the token endpoint - of this authorization server. Possible values are Basic and/or Body. When Body is specified, - client credentials and other parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :paramtype client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :keyword token_body_parameters: Additional parameters required by the token endpoint of this - authorization server represented as an array of JSON objects with name and value string - properties, i.e. {"name" : "name value", "value": "a value"}. - :paramtype token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :keyword token_endpoint: OAuth token endpoint. Contains absolute URI to entity being - referenced. - :paramtype token_endpoint: str - :keyword support_state: If true, authorization server will include state parameter from the - authorization request to its response. Client may use state parameter to raise protocol - security. - :paramtype support_state: bool - :keyword default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing - space-delimited values. - :paramtype default_scope: str - :keyword bearer_token_sending_methods: Specifies the mechanism by which access token is passed - to the API. - :paramtype bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :keyword resource_owner_username: Can be optionally specified when resource owner password - grant type is supported by this authorization server. Default resource owner username. - :paramtype resource_owner_username: str - :keyword resource_owner_password: Can be optionally specified when resource owner password - grant type is supported by this authorization server. Default resource owner password. - :paramtype resource_owner_password: str - :keyword display_name: User-friendly authorization server name. - :paramtype display_name: str - :keyword use_in_test_console: If true, the authorization server may be used in the developer - portal test console. True by default if no value is provided. - :paramtype use_in_test_console: bool - :keyword use_in_api_documentation: If true, the authorization server will be used in the API - documentation in the developer portal. False by default if no value is provided. - :paramtype use_in_api_documentation: bool - :keyword client_registration_endpoint: Optional reference to a page where client or app - registration for this authorization server is performed. Contains absolute URL to entity being - referenced. - :paramtype client_registration_endpoint: str - :keyword authorization_endpoint: OAuth authorization endpoint. See - http://tools.ietf.org/html/rfc6749#section-3.2. - :paramtype authorization_endpoint: str - :keyword grant_types: Form of an authorization grant, which the client uses to request the - access token. - :paramtype grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] - :keyword client_id: Client or app id registered with this authorization server. - :paramtype client_id: str - :keyword client_secret: Client or app secret registered with this authorization server. This - property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the - value. - :paramtype client_secret: str - """ - super().__init__(**kwargs) - self.description = description - self.authorization_methods = authorization_methods - self.client_authentication_method = client_authentication_method - self.token_body_parameters = token_body_parameters - self.token_endpoint = token_endpoint - self.support_state = support_state - self.default_scope = default_scope - self.bearer_token_sending_methods = bearer_token_sending_methods - self.resource_owner_username = resource_owner_username - self.resource_owner_password = resource_owner_password - self.display_name = display_name - self.use_in_test_console = use_in_test_console - self.use_in_api_documentation = use_in_api_documentation - self.client_registration_endpoint = client_registration_endpoint - self.authorization_endpoint = authorization_endpoint - self.grant_types = grant_types - self.client_id = client_id - self.client_secret = client_secret - - -class AuthorizationServerContractBaseProperties(_serialization.Model): # pylint: disable=name-too-long - """External OAuth authorization server Update settings contract. - - :ivar description: Description of the authorization server. Can contain HTML formatting tags. - :vartype description: str - :ivar authorization_methods: HTTP verbs supported by the authorization endpoint. GET must be - always present. POST is optional. - :vartype authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :ivar client_authentication_method: Method of authentication supported by the token endpoint of - this authorization server. Possible values are Basic and/or Body. When Body is specified, - client credentials and other parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :vartype client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :ivar token_body_parameters: Additional parameters required by the token endpoint of this - authorization server represented as an array of JSON objects with name and value string - properties, i.e. {"name" : "name value", "value": "a value"}. - :vartype token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :ivar token_endpoint: OAuth token endpoint. Contains absolute URI to entity being referenced. - :vartype token_endpoint: str - :ivar support_state: If true, authorization server will include state parameter from the - authorization request to its response. Client may use state parameter to raise protocol - security. - :vartype support_state: bool - :ivar default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing - space-delimited values. - :vartype default_scope: str - :ivar bearer_token_sending_methods: Specifies the mechanism by which access token is passed to - the API. - :vartype bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :ivar resource_owner_username: Can be optionally specified when resource owner password grant - type is supported by this authorization server. Default resource owner username. - :vartype resource_owner_username: str - :ivar resource_owner_password: Can be optionally specified when resource owner password grant - type is supported by this authorization server. Default resource owner password. - :vartype resource_owner_password: str - """ - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "authorization_methods": {"key": "authorizationMethods", "type": "[str]"}, - "client_authentication_method": {"key": "clientAuthenticationMethod", "type": "[str]"}, - "token_body_parameters": {"key": "tokenBodyParameters", "type": "[TokenBodyParameterContract]"}, - "token_endpoint": {"key": "tokenEndpoint", "type": "str"}, - "support_state": {"key": "supportState", "type": "bool"}, - "default_scope": {"key": "defaultScope", "type": "str"}, - "bearer_token_sending_methods": {"key": "bearerTokenSendingMethods", "type": "[str]"}, - "resource_owner_username": {"key": "resourceOwnerUsername", "type": "str"}, - "resource_owner_password": {"key": "resourceOwnerPassword", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = None, - client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = None, - token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = None, - token_endpoint: Optional[str] = None, - support_state: Optional[bool] = None, - default_scope: Optional[str] = None, - bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = None, - resource_owner_username: Optional[str] = None, - resource_owner_password: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the authorization server. Can contain HTML formatting - tags. - :paramtype description: str - :keyword authorization_methods: HTTP verbs supported by the authorization endpoint. GET must be - always present. POST is optional. - :paramtype authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :keyword client_authentication_method: Method of authentication supported by the token endpoint - of this authorization server. Possible values are Basic and/or Body. When Body is specified, - client credentials and other parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :paramtype client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :keyword token_body_parameters: Additional parameters required by the token endpoint of this - authorization server represented as an array of JSON objects with name and value string - properties, i.e. {"name" : "name value", "value": "a value"}. - :paramtype token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :keyword token_endpoint: OAuth token endpoint. Contains absolute URI to entity being - referenced. - :paramtype token_endpoint: str - :keyword support_state: If true, authorization server will include state parameter from the - authorization request to its response. Client may use state parameter to raise protocol - security. - :paramtype support_state: bool - :keyword default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing - space-delimited values. - :paramtype default_scope: str - :keyword bearer_token_sending_methods: Specifies the mechanism by which access token is passed - to the API. - :paramtype bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :keyword resource_owner_username: Can be optionally specified when resource owner password - grant type is supported by this authorization server. Default resource owner username. - :paramtype resource_owner_username: str - :keyword resource_owner_password: Can be optionally specified when resource owner password - grant type is supported by this authorization server. Default resource owner password. - :paramtype resource_owner_password: str - """ - super().__init__(**kwargs) - self.description = description - self.authorization_methods = authorization_methods - self.client_authentication_method = client_authentication_method - self.token_body_parameters = token_body_parameters - self.token_endpoint = token_endpoint - self.support_state = support_state - self.default_scope = default_scope - self.bearer_token_sending_methods = bearer_token_sending_methods - self.resource_owner_username = resource_owner_username - self.resource_owner_password = resource_owner_password - - -class AuthorizationServerContractProperties(AuthorizationServerContractBaseProperties): - """External OAuth authorization server settings Properties. - - All required parameters must be populated in order to send to server. - - :ivar description: Description of the authorization server. Can contain HTML formatting tags. - :vartype description: str - :ivar authorization_methods: HTTP verbs supported by the authorization endpoint. GET must be - always present. POST is optional. - :vartype authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :ivar client_authentication_method: Method of authentication supported by the token endpoint of - this authorization server. Possible values are Basic and/or Body. When Body is specified, - client credentials and other parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :vartype client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :ivar token_body_parameters: Additional parameters required by the token endpoint of this - authorization server represented as an array of JSON objects with name and value string - properties, i.e. {"name" : "name value", "value": "a value"}. - :vartype token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :ivar token_endpoint: OAuth token endpoint. Contains absolute URI to entity being referenced. - :vartype token_endpoint: str - :ivar support_state: If true, authorization server will include state parameter from the - authorization request to its response. Client may use state parameter to raise protocol - security. - :vartype support_state: bool - :ivar default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing - space-delimited values. - :vartype default_scope: str - :ivar bearer_token_sending_methods: Specifies the mechanism by which access token is passed to - the API. - :vartype bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :ivar resource_owner_username: Can be optionally specified when resource owner password grant - type is supported by this authorization server. Default resource owner username. - :vartype resource_owner_username: str - :ivar resource_owner_password: Can be optionally specified when resource owner password grant - type is supported by this authorization server. Default resource owner password. - :vartype resource_owner_password: str - :ivar display_name: User-friendly authorization server name. Required. - :vartype display_name: str - :ivar use_in_test_console: If true, the authorization server may be used in the developer - portal test console. True by default if no value is provided. - :vartype use_in_test_console: bool - :ivar use_in_api_documentation: If true, the authorization server will be used in the API - documentation in the developer portal. False by default if no value is provided. - :vartype use_in_api_documentation: bool - :ivar client_registration_endpoint: Optional reference to a page where client or app - registration for this authorization server is performed. Contains absolute URL to entity being - referenced. Required. - :vartype client_registration_endpoint: str - :ivar authorization_endpoint: OAuth authorization endpoint. See - http://tools.ietf.org/html/rfc6749#section-3.2. Required. - :vartype authorization_endpoint: str - :ivar grant_types: Form of an authorization grant, which the client uses to request the access - token. Required. - :vartype grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] - :ivar client_id: Client or app id registered with this authorization server. Required. - :vartype client_id: str - :ivar client_secret: Client or app secret registered with this authorization server. This - property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the - value. - :vartype client_secret: str - """ - - _validation = { - "display_name": {"required": True, "max_length": 50, "min_length": 1}, - "client_registration_endpoint": {"required": True}, - "authorization_endpoint": {"required": True}, - "grant_types": {"required": True}, - "client_id": {"required": True}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "authorization_methods": {"key": "authorizationMethods", "type": "[str]"}, - "client_authentication_method": {"key": "clientAuthenticationMethod", "type": "[str]"}, - "token_body_parameters": {"key": "tokenBodyParameters", "type": "[TokenBodyParameterContract]"}, - "token_endpoint": {"key": "tokenEndpoint", "type": "str"}, - "support_state": {"key": "supportState", "type": "bool"}, - "default_scope": {"key": "defaultScope", "type": "str"}, - "bearer_token_sending_methods": {"key": "bearerTokenSendingMethods", "type": "[str]"}, - "resource_owner_username": {"key": "resourceOwnerUsername", "type": "str"}, - "resource_owner_password": {"key": "resourceOwnerPassword", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "use_in_test_console": {"key": "useInTestConsole", "type": "bool"}, - "use_in_api_documentation": {"key": "useInApiDocumentation", "type": "bool"}, - "client_registration_endpoint": {"key": "clientRegistrationEndpoint", "type": "str"}, - "authorization_endpoint": {"key": "authorizationEndpoint", "type": "str"}, - "grant_types": {"key": "grantTypes", "type": "[str]"}, - "client_id": {"key": "clientId", "type": "str"}, - "client_secret": {"key": "clientSecret", "type": "str"}, - } - - def __init__( - self, - *, - display_name: str, - client_registration_endpoint: str, - authorization_endpoint: str, - grant_types: list[Union[str, "_models.GrantType"]], - client_id: str, - description: Optional[str] = None, - authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = None, - client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = None, - token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = None, - token_endpoint: Optional[str] = None, - support_state: Optional[bool] = None, - default_scope: Optional[str] = None, - bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = None, - resource_owner_username: Optional[str] = None, - resource_owner_password: Optional[str] = None, - use_in_test_console: Optional[bool] = None, - use_in_api_documentation: Optional[bool] = None, - client_secret: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the authorization server. Can contain HTML formatting - tags. - :paramtype description: str - :keyword authorization_methods: HTTP verbs supported by the authorization endpoint. GET must be - always present. POST is optional. - :paramtype authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :keyword client_authentication_method: Method of authentication supported by the token endpoint - of this authorization server. Possible values are Basic and/or Body. When Body is specified, - client credentials and other parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :paramtype client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :keyword token_body_parameters: Additional parameters required by the token endpoint of this - authorization server represented as an array of JSON objects with name and value string - properties, i.e. {"name" : "name value", "value": "a value"}. - :paramtype token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :keyword token_endpoint: OAuth token endpoint. Contains absolute URI to entity being - referenced. - :paramtype token_endpoint: str - :keyword support_state: If true, authorization server will include state parameter from the - authorization request to its response. Client may use state parameter to raise protocol - security. - :paramtype support_state: bool - :keyword default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing - space-delimited values. - :paramtype default_scope: str - :keyword bearer_token_sending_methods: Specifies the mechanism by which access token is passed - to the API. - :paramtype bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :keyword resource_owner_username: Can be optionally specified when resource owner password - grant type is supported by this authorization server. Default resource owner username. - :paramtype resource_owner_username: str - :keyword resource_owner_password: Can be optionally specified when resource owner password - grant type is supported by this authorization server. Default resource owner password. - :paramtype resource_owner_password: str - :keyword display_name: User-friendly authorization server name. Required. - :paramtype display_name: str - :keyword use_in_test_console: If true, the authorization server may be used in the developer - portal test console. True by default if no value is provided. - :paramtype use_in_test_console: bool - :keyword use_in_api_documentation: If true, the authorization server will be used in the API - documentation in the developer portal. False by default if no value is provided. - :paramtype use_in_api_documentation: bool - :keyword client_registration_endpoint: Optional reference to a page where client or app - registration for this authorization server is performed. Contains absolute URL to entity being - referenced. Required. - :paramtype client_registration_endpoint: str - :keyword authorization_endpoint: OAuth authorization endpoint. See - http://tools.ietf.org/html/rfc6749#section-3.2. Required. - :paramtype authorization_endpoint: str - :keyword grant_types: Form of an authorization grant, which the client uses to request the - access token. Required. - :paramtype grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] - :keyword client_id: Client or app id registered with this authorization server. Required. - :paramtype client_id: str - :keyword client_secret: Client or app secret registered with this authorization server. This - property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the - value. - :paramtype client_secret: str - """ - super().__init__( - description=description, - authorization_methods=authorization_methods, - client_authentication_method=client_authentication_method, - token_body_parameters=token_body_parameters, - token_endpoint=token_endpoint, - support_state=support_state, - default_scope=default_scope, - bearer_token_sending_methods=bearer_token_sending_methods, - resource_owner_username=resource_owner_username, - resource_owner_password=resource_owner_password, - **kwargs - ) - self.display_name = display_name - self.use_in_test_console = use_in_test_console - self.use_in_api_documentation = use_in_api_documentation - self.client_registration_endpoint = client_registration_endpoint - self.authorization_endpoint = authorization_endpoint - self.grant_types = grant_types - self.client_id = client_id - self.client_secret = client_secret - - -class AuthorizationServerSecretsContract(_serialization.Model): - """OAuth Server Secrets Contract. - - :ivar client_secret: oAuth Authorization Server Secrets. - :vartype client_secret: str - :ivar resource_owner_username: Can be optionally specified when resource owner password grant - type is supported by this authorization server. Default resource owner username. - :vartype resource_owner_username: str - :ivar resource_owner_password: Can be optionally specified when resource owner password grant - type is supported by this authorization server. Default resource owner password. - :vartype resource_owner_password: str - """ - - _attribute_map = { - "client_secret": {"key": "clientSecret", "type": "str"}, - "resource_owner_username": {"key": "resourceOwnerUsername", "type": "str"}, - "resource_owner_password": {"key": "resourceOwnerPassword", "type": "str"}, - } - - def __init__( - self, - *, - client_secret: Optional[str] = None, - resource_owner_username: Optional[str] = None, - resource_owner_password: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword client_secret: oAuth Authorization Server Secrets. - :paramtype client_secret: str - :keyword resource_owner_username: Can be optionally specified when resource owner password - grant type is supported by this authorization server. Default resource owner username. - :paramtype resource_owner_username: str - :keyword resource_owner_password: Can be optionally specified when resource owner password - grant type is supported by this authorization server. Default resource owner password. - :paramtype resource_owner_password: str - """ - super().__init__(**kwargs) - self.client_secret = client_secret - self.resource_owner_username = resource_owner_username - self.resource_owner_password = resource_owner_password - - -class AuthorizationServerUpdateContract(ProxyResource): - """External OAuth authorization server settings. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar description: Description of the authorization server. Can contain HTML formatting tags. - :vartype description: str - :ivar authorization_methods: HTTP verbs supported by the authorization endpoint. GET must be - always present. POST is optional. - :vartype authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :ivar client_authentication_method: Method of authentication supported by the token endpoint of - this authorization server. Possible values are Basic and/or Body. When Body is specified, - client credentials and other parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :vartype client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :ivar token_body_parameters: Additional parameters required by the token endpoint of this - authorization server represented as an array of JSON objects with name and value string - properties, i.e. {"name" : "name value", "value": "a value"}. - :vartype token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :ivar token_endpoint: OAuth token endpoint. Contains absolute URI to entity being referenced. - :vartype token_endpoint: str - :ivar support_state: If true, authorization server will include state parameter from the - authorization request to its response. Client may use state parameter to raise protocol - security. - :vartype support_state: bool - :ivar default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing - space-delimited values. - :vartype default_scope: str - :ivar bearer_token_sending_methods: Specifies the mechanism by which access token is passed to - the API. - :vartype bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :ivar resource_owner_username: Can be optionally specified when resource owner password grant - type is supported by this authorization server. Default resource owner username. - :vartype resource_owner_username: str - :ivar resource_owner_password: Can be optionally specified when resource owner password grant - type is supported by this authorization server. Default resource owner password. - :vartype resource_owner_password: str - :ivar display_name: User-friendly authorization server name. - :vartype display_name: str - :ivar use_in_test_console: If true, the authorization server may be used in the developer - portal test console. True by default if no value is provided. - :vartype use_in_test_console: bool - :ivar use_in_api_documentation: If true, the authorization server will be used in the API - documentation in the developer portal. False by default if no value is provided. - :vartype use_in_api_documentation: bool - :ivar client_registration_endpoint: Optional reference to a page where client or app - registration for this authorization server is performed. Contains absolute URL to entity being - referenced. - :vartype client_registration_endpoint: str - :ivar authorization_endpoint: OAuth authorization endpoint. See - http://tools.ietf.org/html/rfc6749#section-3.2. - :vartype authorization_endpoint: str - :ivar grant_types: Form of an authorization grant, which the client uses to request the access - token. - :vartype grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] - :ivar client_id: Client or app id registered with this authorization server. - :vartype client_id: str - :ivar client_secret: Client or app secret registered with this authorization server. This - property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the - value. - :vartype client_secret: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "display_name": {"max_length": 50, "min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "authorization_methods": {"key": "properties.authorizationMethods", "type": "[str]"}, - "client_authentication_method": {"key": "properties.clientAuthenticationMethod", "type": "[str]"}, - "token_body_parameters": {"key": "properties.tokenBodyParameters", "type": "[TokenBodyParameterContract]"}, - "token_endpoint": {"key": "properties.tokenEndpoint", "type": "str"}, - "support_state": {"key": "properties.supportState", "type": "bool"}, - "default_scope": {"key": "properties.defaultScope", "type": "str"}, - "bearer_token_sending_methods": {"key": "properties.bearerTokenSendingMethods", "type": "[str]"}, - "resource_owner_username": {"key": "properties.resourceOwnerUsername", "type": "str"}, - "resource_owner_password": {"key": "properties.resourceOwnerPassword", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "use_in_test_console": {"key": "properties.useInTestConsole", "type": "bool"}, - "use_in_api_documentation": {"key": "properties.useInApiDocumentation", "type": "bool"}, - "client_registration_endpoint": {"key": "properties.clientRegistrationEndpoint", "type": "str"}, - "authorization_endpoint": {"key": "properties.authorizationEndpoint", "type": "str"}, - "grant_types": {"key": "properties.grantTypes", "type": "[str]"}, - "client_id": {"key": "properties.clientId", "type": "str"}, - "client_secret": {"key": "properties.clientSecret", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = None, - client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = None, - token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = None, - token_endpoint: Optional[str] = None, - support_state: Optional[bool] = None, - default_scope: Optional[str] = None, - bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = None, - resource_owner_username: Optional[str] = None, - resource_owner_password: Optional[str] = None, - display_name: Optional[str] = None, - use_in_test_console: Optional[bool] = None, - use_in_api_documentation: Optional[bool] = None, - client_registration_endpoint: Optional[str] = None, - authorization_endpoint: Optional[str] = None, - grant_types: Optional[list[Union[str, "_models.GrantType"]]] = None, - client_id: Optional[str] = None, - client_secret: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the authorization server. Can contain HTML formatting - tags. - :paramtype description: str - :keyword authorization_methods: HTTP verbs supported by the authorization endpoint. GET must be - always present. POST is optional. - :paramtype authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :keyword client_authentication_method: Method of authentication supported by the token endpoint - of this authorization server. Possible values are Basic and/or Body. When Body is specified, - client credentials and other parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :paramtype client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :keyword token_body_parameters: Additional parameters required by the token endpoint of this - authorization server represented as an array of JSON objects with name and value string - properties, i.e. {"name" : "name value", "value": "a value"}. - :paramtype token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :keyword token_endpoint: OAuth token endpoint. Contains absolute URI to entity being - referenced. - :paramtype token_endpoint: str - :keyword support_state: If true, authorization server will include state parameter from the - authorization request to its response. Client may use state parameter to raise protocol - security. - :paramtype support_state: bool - :keyword default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing - space-delimited values. - :paramtype default_scope: str - :keyword bearer_token_sending_methods: Specifies the mechanism by which access token is passed - to the API. - :paramtype bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :keyword resource_owner_username: Can be optionally specified when resource owner password - grant type is supported by this authorization server. Default resource owner username. - :paramtype resource_owner_username: str - :keyword resource_owner_password: Can be optionally specified when resource owner password - grant type is supported by this authorization server. Default resource owner password. - :paramtype resource_owner_password: str - :keyword display_name: User-friendly authorization server name. - :paramtype display_name: str - :keyword use_in_test_console: If true, the authorization server may be used in the developer - portal test console. True by default if no value is provided. - :paramtype use_in_test_console: bool - :keyword use_in_api_documentation: If true, the authorization server will be used in the API - documentation in the developer portal. False by default if no value is provided. - :paramtype use_in_api_documentation: bool - :keyword client_registration_endpoint: Optional reference to a page where client or app - registration for this authorization server is performed. Contains absolute URL to entity being - referenced. - :paramtype client_registration_endpoint: str - :keyword authorization_endpoint: OAuth authorization endpoint. See - http://tools.ietf.org/html/rfc6749#section-3.2. - :paramtype authorization_endpoint: str - :keyword grant_types: Form of an authorization grant, which the client uses to request the - access token. - :paramtype grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] - :keyword client_id: Client or app id registered with this authorization server. - :paramtype client_id: str - :keyword client_secret: Client or app secret registered with this authorization server. This - property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the - value. - :paramtype client_secret: str - """ - super().__init__(**kwargs) - self.description = description - self.authorization_methods = authorization_methods - self.client_authentication_method = client_authentication_method - self.token_body_parameters = token_body_parameters - self.token_endpoint = token_endpoint - self.support_state = support_state - self.default_scope = default_scope - self.bearer_token_sending_methods = bearer_token_sending_methods - self.resource_owner_username = resource_owner_username - self.resource_owner_password = resource_owner_password - self.display_name = display_name - self.use_in_test_console = use_in_test_console - self.use_in_api_documentation = use_in_api_documentation - self.client_registration_endpoint = client_registration_endpoint - self.authorization_endpoint = authorization_endpoint - self.grant_types = grant_types - self.client_id = client_id - self.client_secret = client_secret - - -class AuthorizationServerUpdateContractProperties( - AuthorizationServerContractBaseProperties -): # pylint: disable=name-too-long - """External OAuth authorization server Update settings contract. - - :ivar description: Description of the authorization server. Can contain HTML formatting tags. - :vartype description: str - :ivar authorization_methods: HTTP verbs supported by the authorization endpoint. GET must be - always present. POST is optional. - :vartype authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :ivar client_authentication_method: Method of authentication supported by the token endpoint of - this authorization server. Possible values are Basic and/or Body. When Body is specified, - client credentials and other parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :vartype client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :ivar token_body_parameters: Additional parameters required by the token endpoint of this - authorization server represented as an array of JSON objects with name and value string - properties, i.e. {"name" : "name value", "value": "a value"}. - :vartype token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :ivar token_endpoint: OAuth token endpoint. Contains absolute URI to entity being referenced. - :vartype token_endpoint: str - :ivar support_state: If true, authorization server will include state parameter from the - authorization request to its response. Client may use state parameter to raise protocol - security. - :vartype support_state: bool - :ivar default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing - space-delimited values. - :vartype default_scope: str - :ivar bearer_token_sending_methods: Specifies the mechanism by which access token is passed to - the API. - :vartype bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :ivar resource_owner_username: Can be optionally specified when resource owner password grant - type is supported by this authorization server. Default resource owner username. - :vartype resource_owner_username: str - :ivar resource_owner_password: Can be optionally specified when resource owner password grant - type is supported by this authorization server. Default resource owner password. - :vartype resource_owner_password: str - :ivar display_name: User-friendly authorization server name. - :vartype display_name: str - :ivar use_in_test_console: If true, the authorization server may be used in the developer - portal test console. True by default if no value is provided. - :vartype use_in_test_console: bool - :ivar use_in_api_documentation: If true, the authorization server will be used in the API - documentation in the developer portal. False by default if no value is provided. - :vartype use_in_api_documentation: bool - :ivar client_registration_endpoint: Optional reference to a page where client or app - registration for this authorization server is performed. Contains absolute URL to entity being - referenced. - :vartype client_registration_endpoint: str - :ivar authorization_endpoint: OAuth authorization endpoint. See - http://tools.ietf.org/html/rfc6749#section-3.2. - :vartype authorization_endpoint: str - :ivar grant_types: Form of an authorization grant, which the client uses to request the access - token. - :vartype grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] - :ivar client_id: Client or app id registered with this authorization server. - :vartype client_id: str - :ivar client_secret: Client or app secret registered with this authorization server. This - property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the - value. - :vartype client_secret: str - """ - - _validation = { - "display_name": {"max_length": 50, "min_length": 1}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "authorization_methods": {"key": "authorizationMethods", "type": "[str]"}, - "client_authentication_method": {"key": "clientAuthenticationMethod", "type": "[str]"}, - "token_body_parameters": {"key": "tokenBodyParameters", "type": "[TokenBodyParameterContract]"}, - "token_endpoint": {"key": "tokenEndpoint", "type": "str"}, - "support_state": {"key": "supportState", "type": "bool"}, - "default_scope": {"key": "defaultScope", "type": "str"}, - "bearer_token_sending_methods": {"key": "bearerTokenSendingMethods", "type": "[str]"}, - "resource_owner_username": {"key": "resourceOwnerUsername", "type": "str"}, - "resource_owner_password": {"key": "resourceOwnerPassword", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "use_in_test_console": {"key": "useInTestConsole", "type": "bool"}, - "use_in_api_documentation": {"key": "useInApiDocumentation", "type": "bool"}, - "client_registration_endpoint": {"key": "clientRegistrationEndpoint", "type": "str"}, - "authorization_endpoint": {"key": "authorizationEndpoint", "type": "str"}, - "grant_types": {"key": "grantTypes", "type": "[str]"}, - "client_id": {"key": "clientId", "type": "str"}, - "client_secret": {"key": "clientSecret", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - authorization_methods: Optional[list[Union[str, "_models.AuthorizationMethod"]]] = None, - client_authentication_method: Optional[list[Union[str, "_models.ClientAuthenticationMethod"]]] = None, - token_body_parameters: Optional[list["_models.TokenBodyParameterContract"]] = None, - token_endpoint: Optional[str] = None, - support_state: Optional[bool] = None, - default_scope: Optional[str] = None, - bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethod"]]] = None, - resource_owner_username: Optional[str] = None, - resource_owner_password: Optional[str] = None, - display_name: Optional[str] = None, - use_in_test_console: Optional[bool] = None, - use_in_api_documentation: Optional[bool] = None, - client_registration_endpoint: Optional[str] = None, - authorization_endpoint: Optional[str] = None, - grant_types: Optional[list[Union[str, "_models.GrantType"]]] = None, - client_id: Optional[str] = None, - client_secret: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the authorization server. Can contain HTML formatting - tags. - :paramtype description: str - :keyword authorization_methods: HTTP verbs supported by the authorization endpoint. GET must be - always present. POST is optional. - :paramtype authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :keyword client_authentication_method: Method of authentication supported by the token endpoint - of this authorization server. Possible values are Basic and/or Body. When Body is specified, - client credentials and other parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :paramtype client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :keyword token_body_parameters: Additional parameters required by the token endpoint of this - authorization server represented as an array of JSON objects with name and value string - properties, i.e. {"name" : "name value", "value": "a value"}. - :paramtype token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :keyword token_endpoint: OAuth token endpoint. Contains absolute URI to entity being - referenced. - :paramtype token_endpoint: str - :keyword support_state: If true, authorization server will include state parameter from the - authorization request to its response. Client may use state parameter to raise protocol - security. - :paramtype support_state: bool - :keyword default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing - space-delimited values. - :paramtype default_scope: str - :keyword bearer_token_sending_methods: Specifies the mechanism by which access token is passed - to the API. - :paramtype bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :keyword resource_owner_username: Can be optionally specified when resource owner password - grant type is supported by this authorization server. Default resource owner username. - :paramtype resource_owner_username: str - :keyword resource_owner_password: Can be optionally specified when resource owner password - grant type is supported by this authorization server. Default resource owner password. - :paramtype resource_owner_password: str - :keyword display_name: User-friendly authorization server name. - :paramtype display_name: str - :keyword use_in_test_console: If true, the authorization server may be used in the developer - portal test console. True by default if no value is provided. - :paramtype use_in_test_console: bool - :keyword use_in_api_documentation: If true, the authorization server will be used in the API - documentation in the developer portal. False by default if no value is provided. - :paramtype use_in_api_documentation: bool - :keyword client_registration_endpoint: Optional reference to a page where client or app - registration for this authorization server is performed. Contains absolute URL to entity being - referenced. - :paramtype client_registration_endpoint: str - :keyword authorization_endpoint: OAuth authorization endpoint. See - http://tools.ietf.org/html/rfc6749#section-3.2. - :paramtype authorization_endpoint: str - :keyword grant_types: Form of an authorization grant, which the client uses to request the - access token. - :paramtype grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] - :keyword client_id: Client or app id registered with this authorization server. - :paramtype client_id: str - :keyword client_secret: Client or app secret registered with this authorization server. This - property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the - value. - :paramtype client_secret: str - """ - super().__init__( - description=description, - authorization_methods=authorization_methods, - client_authentication_method=client_authentication_method, - token_body_parameters=token_body_parameters, - token_endpoint=token_endpoint, - support_state=support_state, - default_scope=default_scope, - bearer_token_sending_methods=bearer_token_sending_methods, - resource_owner_username=resource_owner_username, - resource_owner_password=resource_owner_password, - **kwargs - ) - self.display_name = display_name - self.use_in_test_console = use_in_test_console - self.use_in_api_documentation = use_in_api_documentation - self.client_registration_endpoint = client_registration_endpoint - self.authorization_endpoint = authorization_endpoint - self.grant_types = grant_types - self.client_id = client_id - self.client_secret = client_secret - - -class BackendAuthorizationHeaderCredentials(_serialization.Model): - """Authorization header information. - - All required parameters must be populated in order to send to server. - - :ivar scheme: Authentication Scheme name. Required. - :vartype scheme: str - :ivar parameter: Authentication Parameter value. Required. - :vartype parameter: str - """ - - _validation = { - "scheme": {"required": True, "max_length": 100, "min_length": 1}, - "parameter": {"required": True, "max_length": 300, "min_length": 1}, - } - - _attribute_map = { - "scheme": {"key": "scheme", "type": "str"}, - "parameter": {"key": "parameter", "type": "str"}, - } - - def __init__(self, *, scheme: str, parameter: str, **kwargs: Any) -> None: - """ - :keyword scheme: Authentication Scheme name. Required. - :paramtype scheme: str - :keyword parameter: Authentication Parameter value. Required. - :paramtype parameter: str - """ - super().__init__(**kwargs) - self.scheme = scheme - self.parameter = parameter - - -class BackendBaseParameters(_serialization.Model): - """Backend entity base Parameter set. - - :ivar title: Backend Title. - :vartype title: str - :ivar description: Backend Description. - :vartype description: str - :ivar resource_id: Management Uri of the Resource in External System. This URL can be the Arm - Resource Id of Logic Apps, Function Apps or API Apps. - :vartype resource_id: str - :ivar properties: Backend Properties contract. - :vartype properties: ~azure.mgmt.apimanagement.models.BackendProperties - :ivar credentials: Backend Credentials Contract Properties. - :vartype credentials: ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :ivar proxy: Backend gateway Contract Properties. - :vartype proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :ivar tls: Backend TLS Properties. - :vartype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :ivar circuit_breaker: Backend Circuit Breaker Configuration. - :vartype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker - :ivar azure_region: Azure region in which the backend is deployed. Can be optionally specified - to use features such as carbon-optimized load balancer. - :vartype azure_region: str - :ivar pool: - :vartype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool - :ivar type: Type of the backend. A backend can be either Single or Pool. Known values are: - "Single" and "Pool". - :vartype type: str or ~azure.mgmt.apimanagement.models.BackendType - """ - - _validation = { - "title": {"max_length": 300, "min_length": 1}, - "description": {"max_length": 2000, "min_length": 1}, - "resource_id": {"max_length": 2000, "min_length": 1}, - } - - _attribute_map = { - "title": {"key": "title", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "resource_id": {"key": "resourceId", "type": "str"}, - "properties": {"key": "properties", "type": "BackendProperties"}, - "credentials": {"key": "credentials", "type": "BackendCredentialsContract"}, - "proxy": {"key": "proxy", "type": "BackendProxyContract"}, - "tls": {"key": "tls", "type": "BackendTlsProperties"}, - "circuit_breaker": {"key": "circuitBreaker", "type": "BackendCircuitBreaker"}, - "azure_region": {"key": "azureRegion", "type": "str"}, - "pool": {"key": "pool", "type": "BackendBaseParametersPool"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__( - self, - *, - title: Optional[str] = None, - description: Optional[str] = None, - resource_id: Optional[str] = None, - properties: Optional["_models.BackendProperties"] = None, - credentials: Optional["_models.BackendCredentialsContract"] = None, - proxy: Optional["_models.BackendProxyContract"] = None, - tls: Optional["_models.BackendTlsProperties"] = None, - circuit_breaker: Optional["_models.BackendCircuitBreaker"] = None, - azure_region: Optional[str] = None, - pool: Optional["_models.BackendBaseParametersPool"] = None, - type: Optional[Union[str, "_models.BackendType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword title: Backend Title. - :paramtype title: str - :keyword description: Backend Description. - :paramtype description: str - :keyword resource_id: Management Uri of the Resource in External System. This URL can be the - Arm Resource Id of Logic Apps, Function Apps or API Apps. - :paramtype resource_id: str - :keyword properties: Backend Properties contract. - :paramtype properties: ~azure.mgmt.apimanagement.models.BackendProperties - :keyword credentials: Backend Credentials Contract Properties. - :paramtype credentials: ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :keyword proxy: Backend gateway Contract Properties. - :paramtype proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :keyword tls: Backend TLS Properties. - :paramtype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :keyword circuit_breaker: Backend Circuit Breaker Configuration. - :paramtype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker - :keyword azure_region: Azure region in which the backend is deployed. Can be optionally - specified to use features such as carbon-optimized load balancer. - :paramtype azure_region: str - :keyword pool: - :paramtype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool - :keyword type: Type of the backend. A backend can be either Single or Pool. Known values are: - "Single" and "Pool". - :paramtype type: str or ~azure.mgmt.apimanagement.models.BackendType - """ - super().__init__(**kwargs) - self.title = title - self.description = description - self.resource_id = resource_id - self.properties = properties - self.credentials = credentials - self.proxy = proxy - self.tls = tls - self.circuit_breaker = circuit_breaker - self.azure_region = azure_region - self.pool = pool - self.type = type - - -class BackendPool(_serialization.Model): - """Backend pool information. - - :ivar services: The list of backend entities belonging to a pool. - :vartype services: list[~azure.mgmt.apimanagement.models.BackendPoolItem] - :ivar failure_response: The response to be returned when all the backends in the pool are - inactive. - :vartype failure_response: ~azure.mgmt.apimanagement.models.BackendFailureResponse - :ivar session_affinity: The session stickiness properties of the backend pool. - :vartype session_affinity: ~azure.mgmt.apimanagement.models.BackendSessionAffinity - """ - - _validation = { - "services": {"min_items": 1}, - } - - _attribute_map = { - "services": {"key": "services", "type": "[BackendPoolItem]"}, - "failure_response": {"key": "failureResponse", "type": "BackendFailureResponse"}, - "session_affinity": {"key": "sessionAffinity", "type": "BackendSessionAffinity"}, - } - - def __init__( - self, - *, - services: Optional[list["_models.BackendPoolItem"]] = None, - failure_response: Optional["_models.BackendFailureResponse"] = None, - session_affinity: Optional["_models.BackendSessionAffinity"] = None, - **kwargs: Any - ) -> None: - """ - :keyword services: The list of backend entities belonging to a pool. - :paramtype services: list[~azure.mgmt.apimanagement.models.BackendPoolItem] - :keyword failure_response: The response to be returned when all the backends in the pool are - inactive. - :paramtype failure_response: ~azure.mgmt.apimanagement.models.BackendFailureResponse - :keyword session_affinity: The session stickiness properties of the backend pool. - :paramtype session_affinity: ~azure.mgmt.apimanagement.models.BackendSessionAffinity - """ - super().__init__(**kwargs) - self.services = services - self.failure_response = failure_response - self.session_affinity = session_affinity - - -class BackendBaseParametersPool(BackendPool): - """BackendBaseParametersPool. - - :ivar services: The list of backend entities belonging to a pool. - :vartype services: list[~azure.mgmt.apimanagement.models.BackendPoolItem] - :ivar failure_response: The response to be returned when all the backends in the pool are - inactive. - :vartype failure_response: ~azure.mgmt.apimanagement.models.BackendFailureResponse - :ivar session_affinity: The session stickiness properties of the backend pool. - :vartype session_affinity: ~azure.mgmt.apimanagement.models.BackendSessionAffinity - """ - - -class BackendCircuitBreaker(_serialization.Model): - """The configuration of the backend circuit breaker. - - :ivar rules: The rules for tripping the backend. - :vartype rules: list[~azure.mgmt.apimanagement.models.CircuitBreakerRule] - """ - - _validation = { - "rules": {"max_items": 15, "min_items": 0}, - } - - _attribute_map = { - "rules": {"key": "rules", "type": "[CircuitBreakerRule]"}, - } - - def __init__(self, *, rules: Optional[list["_models.CircuitBreakerRule"]] = None, **kwargs: Any) -> None: - """ - :keyword rules: The rules for tripping the backend. - :paramtype rules: list[~azure.mgmt.apimanagement.models.CircuitBreakerRule] - """ - super().__init__(**kwargs) - self.rules = rules - - -class BackendCollection(_serialization.Model): - """Paged Backend list representation. - - :ivar value: Backend values. - :vartype value: list[~azure.mgmt.apimanagement.models.BackendContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[BackendContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.BackendContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Backend values. - :paramtype value: list[~azure.mgmt.apimanagement.models.BackendContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class BackendConfiguration(_serialization.Model): - """Information regarding how the gateway should integrate with backend systems. - - :ivar subnet: The default hostname of the data-plane gateway to which requests can be sent. - :vartype subnet: ~azure.mgmt.apimanagement.models.BackendSubnetConfiguration - """ - - _attribute_map = { - "subnet": {"key": "subnet", "type": "BackendSubnetConfiguration"}, - } - - def __init__(self, *, subnet: Optional["_models.BackendSubnetConfiguration"] = None, **kwargs: Any) -> None: - """ - :keyword subnet: The default hostname of the data-plane gateway to which requests can be sent. - :paramtype subnet: ~azure.mgmt.apimanagement.models.BackendSubnetConfiguration - """ - super().__init__(**kwargs) - self.subnet = subnet - - -class BackendContract(ProxyResource): - """Backend details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar title: Backend Title. - :vartype title: str - :ivar description: Backend Description. - :vartype description: str - :ivar resource_id: Management Uri of the Resource in External System. This URL can be the Arm - Resource Id of Logic Apps, Function Apps or API Apps. - :vartype resource_id: str - :ivar properties: Backend Properties contract. - :vartype properties: ~azure.mgmt.apimanagement.models.BackendProperties - :ivar credentials: Backend Credentials Contract Properties. - :vartype credentials: ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :ivar proxy: Backend gateway Contract Properties. - :vartype proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :ivar tls: Backend TLS Properties. - :vartype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :ivar circuit_breaker: Backend Circuit Breaker Configuration. - :vartype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker - :ivar azure_region: Azure region in which the backend is deployed. Can be optionally specified - to use features such as carbon-optimized load balancer. - :vartype azure_region: str - :ivar pool: - :vartype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool - :ivar type_properties_type: Type of the backend. A backend can be either Single or Pool. Known - values are: "Single" and "Pool". - :vartype type_properties_type: str or ~azure.mgmt.apimanagement.models.BackendType - :ivar url: Runtime Url of the Backend. Required when backend type is 'Single'. - :vartype url: str - :ivar protocol: Backend communication protocol. Required when backend type is 'Single'. Known - values are: "http" and "soap". - :vartype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "title": {"max_length": 300, "min_length": 1}, - "description": {"max_length": 2000, "min_length": 1}, - "resource_id": {"max_length": 2000, "min_length": 1}, - "url": {"max_length": 2000, "min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "title": {"key": "properties.title", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "resource_id": {"key": "properties.resourceId", "type": "str"}, - "properties": {"key": "properties.properties", "type": "BackendProperties"}, - "credentials": {"key": "properties.credentials", "type": "BackendCredentialsContract"}, - "proxy": {"key": "properties.proxy", "type": "BackendProxyContract"}, - "tls": {"key": "properties.tls", "type": "BackendTlsProperties"}, - "circuit_breaker": {"key": "properties.circuitBreaker", "type": "BackendCircuitBreaker"}, - "azure_region": {"key": "properties.azureRegion", "type": "str"}, - "pool": {"key": "properties.pool", "type": "BackendBaseParametersPool"}, - "type_properties_type": {"key": "properties.type", "type": "str"}, - "url": {"key": "properties.url", "type": "str"}, - "protocol": {"key": "properties.protocol", "type": "str"}, - } - - def __init__( - self, - *, - title: Optional[str] = None, - description: Optional[str] = None, - resource_id: Optional[str] = None, - properties: Optional["_models.BackendProperties"] = None, - credentials: Optional["_models.BackendCredentialsContract"] = None, - proxy: Optional["_models.BackendProxyContract"] = None, - tls: Optional["_models.BackendTlsProperties"] = None, - circuit_breaker: Optional["_models.BackendCircuitBreaker"] = None, - azure_region: Optional[str] = None, - pool: Optional["_models.BackendBaseParametersPool"] = None, - type_properties_type: Optional[Union[str, "_models.BackendType"]] = None, - url: Optional[str] = None, - protocol: Optional[Union[str, "_models.BackendProtocol"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword title: Backend Title. - :paramtype title: str - :keyword description: Backend Description. - :paramtype description: str - :keyword resource_id: Management Uri of the Resource in External System. This URL can be the - Arm Resource Id of Logic Apps, Function Apps or API Apps. - :paramtype resource_id: str - :keyword properties: Backend Properties contract. - :paramtype properties: ~azure.mgmt.apimanagement.models.BackendProperties - :keyword credentials: Backend Credentials Contract Properties. - :paramtype credentials: ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :keyword proxy: Backend gateway Contract Properties. - :paramtype proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :keyword tls: Backend TLS Properties. - :paramtype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :keyword circuit_breaker: Backend Circuit Breaker Configuration. - :paramtype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker - :keyword azure_region: Azure region in which the backend is deployed. Can be optionally - specified to use features such as carbon-optimized load balancer. - :paramtype azure_region: str - :keyword pool: - :paramtype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool - :keyword type_properties_type: Type of the backend. A backend can be either Single or Pool. - Known values are: "Single" and "Pool". - :paramtype type_properties_type: str or ~azure.mgmt.apimanagement.models.BackendType - :keyword url: Runtime Url of the Backend. Required when backend type is 'Single'. - :paramtype url: str - :keyword protocol: Backend communication protocol. Required when backend type is 'Single'. - Known values are: "http" and "soap". - :paramtype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol - """ - super().__init__(**kwargs) - self.title = title - self.description = description - self.resource_id = resource_id - self.properties = properties - self.credentials = credentials - self.proxy = proxy - self.tls = tls - self.circuit_breaker = circuit_breaker - self.azure_region = azure_region - self.pool = pool - self.type_properties_type = type_properties_type - self.url = url - self.protocol = protocol - - -class BackendContractProperties(BackendBaseParameters): - """Parameters supplied to the Create Backend operation. - - :ivar title: Backend Title. - :vartype title: str - :ivar description: Backend Description. - :vartype description: str - :ivar resource_id: Management Uri of the Resource in External System. This URL can be the Arm - Resource Id of Logic Apps, Function Apps or API Apps. - :vartype resource_id: str - :ivar properties: Backend Properties contract. - :vartype properties: ~azure.mgmt.apimanagement.models.BackendProperties - :ivar credentials: Backend Credentials Contract Properties. - :vartype credentials: ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :ivar proxy: Backend gateway Contract Properties. - :vartype proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :ivar tls: Backend TLS Properties. - :vartype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :ivar circuit_breaker: Backend Circuit Breaker Configuration. - :vartype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker - :ivar azure_region: Azure region in which the backend is deployed. Can be optionally specified - to use features such as carbon-optimized load balancer. - :vartype azure_region: str - :ivar pool: - :vartype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool - :ivar type: Type of the backend. A backend can be either Single or Pool. Known values are: - "Single" and "Pool". - :vartype type: str or ~azure.mgmt.apimanagement.models.BackendType - :ivar url: Runtime Url of the Backend. Required when backend type is 'Single'. - :vartype url: str - :ivar protocol: Backend communication protocol. Required when backend type is 'Single'. Known - values are: "http" and "soap". - :vartype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol - """ - - _validation = { - "title": {"max_length": 300, "min_length": 1}, - "description": {"max_length": 2000, "min_length": 1}, - "resource_id": {"max_length": 2000, "min_length": 1}, - "url": {"max_length": 2000, "min_length": 1}, - } - - _attribute_map = { - "title": {"key": "title", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "resource_id": {"key": "resourceId", "type": "str"}, - "properties": {"key": "properties", "type": "BackendProperties"}, - "credentials": {"key": "credentials", "type": "BackendCredentialsContract"}, - "proxy": {"key": "proxy", "type": "BackendProxyContract"}, - "tls": {"key": "tls", "type": "BackendTlsProperties"}, - "circuit_breaker": {"key": "circuitBreaker", "type": "BackendCircuitBreaker"}, - "azure_region": {"key": "azureRegion", "type": "str"}, - "pool": {"key": "pool", "type": "BackendBaseParametersPool"}, - "type": {"key": "type", "type": "str"}, - "url": {"key": "url", "type": "str"}, - "protocol": {"key": "protocol", "type": "str"}, - } - - def __init__( - self, - *, - title: Optional[str] = None, - description: Optional[str] = None, - resource_id: Optional[str] = None, - properties: Optional["_models.BackendProperties"] = None, - credentials: Optional["_models.BackendCredentialsContract"] = None, - proxy: Optional["_models.BackendProxyContract"] = None, - tls: Optional["_models.BackendTlsProperties"] = None, - circuit_breaker: Optional["_models.BackendCircuitBreaker"] = None, - azure_region: Optional[str] = None, - pool: Optional["_models.BackendBaseParametersPool"] = None, - type: Optional[Union[str, "_models.BackendType"]] = None, - url: Optional[str] = None, - protocol: Optional[Union[str, "_models.BackendProtocol"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword title: Backend Title. - :paramtype title: str - :keyword description: Backend Description. - :paramtype description: str - :keyword resource_id: Management Uri of the Resource in External System. This URL can be the - Arm Resource Id of Logic Apps, Function Apps or API Apps. - :paramtype resource_id: str - :keyword properties: Backend Properties contract. - :paramtype properties: ~azure.mgmt.apimanagement.models.BackendProperties - :keyword credentials: Backend Credentials Contract Properties. - :paramtype credentials: ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :keyword proxy: Backend gateway Contract Properties. - :paramtype proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :keyword tls: Backend TLS Properties. - :paramtype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :keyword circuit_breaker: Backend Circuit Breaker Configuration. - :paramtype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker - :keyword azure_region: Azure region in which the backend is deployed. Can be optionally - specified to use features such as carbon-optimized load balancer. - :paramtype azure_region: str - :keyword pool: - :paramtype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool - :keyword type: Type of the backend. A backend can be either Single or Pool. Known values are: - "Single" and "Pool". - :paramtype type: str or ~azure.mgmt.apimanagement.models.BackendType - :keyword url: Runtime Url of the Backend. Required when backend type is 'Single'. - :paramtype url: str - :keyword protocol: Backend communication protocol. Required when backend type is 'Single'. - Known values are: "http" and "soap". - :paramtype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol - """ - super().__init__( - title=title, - description=description, - resource_id=resource_id, - properties=properties, - credentials=credentials, - proxy=proxy, - tls=tls, - circuit_breaker=circuit_breaker, - azure_region=azure_region, - pool=pool, - type=type, - **kwargs - ) - self.url = url - self.protocol = protocol - - -class BackendCredentialsContract(_serialization.Model): - """Details of the Credentials used to connect to Backend. - - :ivar certificate_ids: List of Client Certificate Ids. - :vartype certificate_ids: list[str] - :ivar certificate: List of Client Certificate Thumbprints. Will be ignored if certificatesIds - are provided. - :vartype certificate: list[str] - :ivar query: Query Parameter description. - :vartype query: dict[str, list[str]] - :ivar header: Header Parameter description. - :vartype header: dict[str, list[str]] - :ivar authorization: Authorization header authentication. - :vartype authorization: ~azure.mgmt.apimanagement.models.BackendAuthorizationHeaderCredentials - """ - - _validation = { - "certificate_ids": {"max_items": 32, "min_items": 0}, - "certificate": {"max_items": 32, "min_items": 0}, - } - - _attribute_map = { - "certificate_ids": {"key": "certificateIds", "type": "[str]"}, - "certificate": {"key": "certificate", "type": "[str]"}, - "query": {"key": "query", "type": "{[str]}"}, - "header": {"key": "header", "type": "{[str]}"}, - "authorization": {"key": "authorization", "type": "BackendAuthorizationHeaderCredentials"}, - } - - def __init__( - self, - *, - certificate_ids: Optional[list[str]] = None, - certificate: Optional[list[str]] = None, - query: Optional[dict[str, list[str]]] = None, - header: Optional[dict[str, list[str]]] = None, - authorization: Optional["_models.BackendAuthorizationHeaderCredentials"] = None, - **kwargs: Any - ) -> None: - """ - :keyword certificate_ids: List of Client Certificate Ids. - :paramtype certificate_ids: list[str] - :keyword certificate: List of Client Certificate Thumbprints. Will be ignored if - certificatesIds are provided. - :paramtype certificate: list[str] - :keyword query: Query Parameter description. - :paramtype query: dict[str, list[str]] - :keyword header: Header Parameter description. - :paramtype header: dict[str, list[str]] - :keyword authorization: Authorization header authentication. - :paramtype authorization: - ~azure.mgmt.apimanagement.models.BackendAuthorizationHeaderCredentials - """ - super().__init__(**kwargs) - self.certificate_ids = certificate_ids - self.certificate = certificate - self.query = query - self.header = header - self.authorization = authorization - - -class BackendFailureResponse(_serialization.Model): - """The response to be returned when a backend fails to respond. - - :ivar status_code: The status code of the response. - :vartype status_code: int - """ - - _validation = { - "status_code": {"maximum": 599, "minimum": 100}, - } - - _attribute_map = { - "status_code": {"key": "statusCode", "type": "int"}, - } - - def __init__(self, *, status_code: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword status_code: The status code of the response. - :paramtype status_code: int - """ - super().__init__(**kwargs) - self.status_code = status_code - - -class BackendPoolItem(_serialization.Model): - """Backend pool service information. - - All required parameters must be populated in order to send to server. - - :ivar id: The unique ARM id of the backend entity. The ARM id should refer to an already - existing backend entity. Required. - :vartype id: str - :ivar weight: The weight of the backend entity in the backend pool. Must be between 0 and 100. - It can be also null if the value not specified. - :vartype weight: int - :ivar priority: The priority of the backend entity in the backend pool. Must be between 0 and - 100. It can be also null if the value not specified. - :vartype priority: int - :ivar preferred_carbon_emission: Scope 2 carbon emission preference for the backend. When - specified, the load balancer will optimize traffic flow by routing to regions that have carbon - emission less than or equal to the specified category. However, when all other backends are not - available it will route traffic to these regions anyway. This requires the backend to be - attributed with 'azureRegion' information. Known values are: "VeryLow", "Low", "Medium", - "High", and "VeryHigh". - :vartype preferred_carbon_emission: str or - ~azure.mgmt.apimanagement.models.CarbonEmissionCategory - """ - - _validation = { - "id": {"required": True}, - "weight": {"maximum": 100, "minimum": 0}, - "priority": {"maximum": 100, "minimum": 0}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "weight": {"key": "weight", "type": "int"}, - "priority": {"key": "priority", "type": "int"}, - "preferred_carbon_emission": {"key": "preferredCarbonEmission", "type": "str"}, - } - - def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - weight: Optional[int] = None, - priority: Optional[int] = None, - preferred_carbon_emission: Optional[Union[str, "_models.CarbonEmissionCategory"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: The unique ARM id of the backend entity. The ARM id should refer to an already - existing backend entity. Required. - :paramtype id: str - :keyword weight: The weight of the backend entity in the backend pool. Must be between 0 and - 100. It can be also null if the value not specified. - :paramtype weight: int - :keyword priority: The priority of the backend entity in the backend pool. Must be between 0 - and 100. It can be also null if the value not specified. - :paramtype priority: int - :keyword preferred_carbon_emission: Scope 2 carbon emission preference for the backend. When - specified, the load balancer will optimize traffic flow by routing to regions that have carbon - emission less than or equal to the specified category. However, when all other backends are not - available it will route traffic to these regions anyway. This requires the backend to be - attributed with 'azureRegion' information. Known values are: "VeryLow", "Low", "Medium", - "High", and "VeryHigh". - :paramtype preferred_carbon_emission: str or - ~azure.mgmt.apimanagement.models.CarbonEmissionCategory - """ - super().__init__(**kwargs) - self.id = id - self.weight = weight - self.priority = priority - self.preferred_carbon_emission = preferred_carbon_emission - - -class BackendProperties(_serialization.Model): - """Properties specific to the Backend Type. - - :ivar service_fabric_cluster: Backend Service Fabric Cluster Properties. - :vartype service_fabric_cluster: - ~azure.mgmt.apimanagement.models.BackendServiceFabricClusterProperties - """ - - _attribute_map = { - "service_fabric_cluster": {"key": "serviceFabricCluster", "type": "BackendServiceFabricClusterProperties"}, - } - - def __init__( - self, *, service_fabric_cluster: Optional["_models.BackendServiceFabricClusterProperties"] = None, **kwargs: Any - ) -> None: - """ - :keyword service_fabric_cluster: Backend Service Fabric Cluster Properties. - :paramtype service_fabric_cluster: - ~azure.mgmt.apimanagement.models.BackendServiceFabricClusterProperties - """ - super().__init__(**kwargs) - self.service_fabric_cluster = service_fabric_cluster - - -class BackendProxyContract(_serialization.Model): - """Details of the Backend WebProxy Server to use in the Request to Backend. - - All required parameters must be populated in order to send to server. - - :ivar url: WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri - instance, including all fragments and query strings. Required. - :vartype url: str - :ivar username: Username to connect to the WebProxy server. - :vartype username: str - :ivar password: Password to connect to the WebProxy Server. - :vartype password: str - """ - - _validation = { - "url": {"required": True, "max_length": 2000, "min_length": 1}, - } - - _attribute_map = { - "url": {"key": "url", "type": "str"}, - "username": {"key": "username", "type": "str"}, - "password": {"key": "password", "type": "str"}, - } - - def __init__( - self, *, url: str, username: Optional[str] = None, password: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword url: WebProxy Server AbsoluteUri property which includes the entire URI stored in the - Uri instance, including all fragments and query strings. Required. - :paramtype url: str - :keyword username: Username to connect to the WebProxy server. - :paramtype username: str - :keyword password: Password to connect to the WebProxy Server. - :paramtype password: str - """ - super().__init__(**kwargs) - self.url = url - self.username = username - self.password = password - - -class BackendReconnectContract(ProxyResource): - """Reconnect request parameters. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar after: Duration in ISO8601 format after which reconnect will be initiated. Minimum - duration of the Reconnect is PT2M. - :vartype after: ~datetime.timedelta - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "after": {"key": "properties.after", "type": "duration"}, - } - - def __init__(self, *, after: Optional[datetime.timedelta] = None, **kwargs: Any) -> None: - """ - :keyword after: Duration in ISO8601 format after which reconnect will be initiated. Minimum - duration of the Reconnect is PT2M. - :paramtype after: ~datetime.timedelta - """ - super().__init__(**kwargs) - self.after = after - - -class BackendServiceFabricClusterProperties(_serialization.Model): - """Properties of the Service Fabric Type Backend. - - All required parameters must be populated in order to send to server. - - :ivar client_certificate_id: The client certificate id for the management endpoint. - :vartype client_certificate_id: str - :ivar client_certificatethumbprint: The client certificate thumbprint for the management - endpoint. Will be ignored if certificatesIds are provided. - :vartype client_certificatethumbprint: str - :ivar max_partition_resolution_retries: Maximum number of retries while attempting resolve the - partition. - :vartype max_partition_resolution_retries: int - :ivar management_endpoints: The cluster management endpoint. Required. - :vartype management_endpoints: list[str] - :ivar server_certificate_thumbprints: Thumbprints of certificates cluster management service - uses for tls communication. - :vartype server_certificate_thumbprints: list[str] - :ivar server_x509_names: Server X509 Certificate Names Collection. - :vartype server_x509_names: list[~azure.mgmt.apimanagement.models.X509CertificateName] - """ - - _validation = { - "management_endpoints": {"required": True}, - } - - _attribute_map = { - "client_certificate_id": {"key": "clientCertificateId", "type": "str"}, - "client_certificatethumbprint": {"key": "clientCertificatethumbprint", "type": "str"}, - "max_partition_resolution_retries": {"key": "maxPartitionResolutionRetries", "type": "int"}, - "management_endpoints": {"key": "managementEndpoints", "type": "[str]"}, - "server_certificate_thumbprints": {"key": "serverCertificateThumbprints", "type": "[str]"}, - "server_x509_names": {"key": "serverX509Names", "type": "[X509CertificateName]"}, - } - - def __init__( - self, - *, - management_endpoints: list[str], - client_certificate_id: Optional[str] = None, - client_certificatethumbprint: Optional[str] = None, - max_partition_resolution_retries: Optional[int] = None, - server_certificate_thumbprints: Optional[list[str]] = None, - server_x509_names: Optional[list["_models.X509CertificateName"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword client_certificate_id: The client certificate id for the management endpoint. - :paramtype client_certificate_id: str - :keyword client_certificatethumbprint: The client certificate thumbprint for the management - endpoint. Will be ignored if certificatesIds are provided. - :paramtype client_certificatethumbprint: str - :keyword max_partition_resolution_retries: Maximum number of retries while attempting resolve - the partition. - :paramtype max_partition_resolution_retries: int - :keyword management_endpoints: The cluster management endpoint. Required. - :paramtype management_endpoints: list[str] - :keyword server_certificate_thumbprints: Thumbprints of certificates cluster management service - uses for tls communication. - :paramtype server_certificate_thumbprints: list[str] - :keyword server_x509_names: Server X509 Certificate Names Collection. - :paramtype server_x509_names: list[~azure.mgmt.apimanagement.models.X509CertificateName] - """ - super().__init__(**kwargs) - self.client_certificate_id = client_certificate_id - self.client_certificatethumbprint = client_certificatethumbprint - self.max_partition_resolution_retries = max_partition_resolution_retries - self.management_endpoints = management_endpoints - self.server_certificate_thumbprints = server_certificate_thumbprints - self.server_x509_names = server_x509_names - - -class BackendSessionAffinity(_serialization.Model): - """The session stickiness properties of the backend pool. - - :ivar session_id: The id that identifies the requests belonging to the same session. - :vartype session_id: ~azure.mgmt.apimanagement.models.BackendSessionId - """ - - _attribute_map = { - "session_id": {"key": "sessionId", "type": "BackendSessionId"}, - } - - def __init__(self, *, session_id: Optional["_models.BackendSessionId"] = None, **kwargs: Any) -> None: - """ - :keyword session_id: The id that identifies the requests belonging to the same session. - :paramtype session_id: ~azure.mgmt.apimanagement.models.BackendSessionId - """ - super().__init__(**kwargs) - self.session_id = session_id - - -class BackendSessionId(_serialization.Model): - """The properties of the id that identifies the requests belonging to the same session. - - :ivar source: Source from where the session id is extracted. "cookie" - :vartype source: str or ~azure.mgmt.apimanagement.models.BackendSessionIdSource - :ivar name: Name of the variable that refers to the session id. - :vartype name: str - """ - - _attribute_map = { - "source": {"key": "source", "type": "str"}, - "name": {"key": "name", "type": "str"}, - } - - def __init__( - self, - *, - source: Optional[Union[str, "_models.BackendSessionIdSource"]] = None, - name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword source: Source from where the session id is extracted. "cookie" - :paramtype source: str or ~azure.mgmt.apimanagement.models.BackendSessionIdSource - :keyword name: Name of the variable that refers to the session id. - :paramtype name: str - """ - super().__init__(**kwargs) - self.source = source - self.name = name - - -class BackendSubnetConfiguration(_serialization.Model): - """Information regarding how the subnet to which the gateway should be injected. - - :ivar id: The ARM ID of the subnet in which the backend systems are hosted. - :vartype id: str - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin - """ - :keyword id: The ARM ID of the subnet in which the backend systems are hosted. - :paramtype id: str - """ - super().__init__(**kwargs) - self.id = id - - -class BackendTlsProperties(_serialization.Model): - """Properties controlling TLS Certificate Validation. - - :ivar validate_certificate_chain: Flag indicating whether SSL certificate chain validation - should be done when using self-signed certificates for this backend host. - :vartype validate_certificate_chain: bool - :ivar validate_certificate_name: Flag indicating whether SSL certificate name validation should - be done when using self-signed certificates for this backend host. - :vartype validate_certificate_name: bool - :ivar server_certificate_thumbprints: Thumbprints of certificates used by the backend host for - TLS communication. - :vartype server_certificate_thumbprints: list[str] - :ivar server_x509_names: Server X509 Certificate Names of the Backend Host. - :vartype server_x509_names: list[~azure.mgmt.apimanagement.models.X509CertificateName] - """ - - _attribute_map = { - "validate_certificate_chain": {"key": "validateCertificateChain", "type": "bool"}, - "validate_certificate_name": {"key": "validateCertificateName", "type": "bool"}, - "server_certificate_thumbprints": {"key": "serverCertificateThumbprints", "type": "[str]"}, - "server_x509_names": {"key": "serverX509Names", "type": "[X509CertificateName]"}, - } - - def __init__( - self, - *, - validate_certificate_chain: bool = True, - validate_certificate_name: bool = True, - server_certificate_thumbprints: Optional[list[str]] = None, - server_x509_names: Optional[list["_models.X509CertificateName"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword validate_certificate_chain: Flag indicating whether SSL certificate chain validation - should be done when using self-signed certificates for this backend host. - :paramtype validate_certificate_chain: bool - :keyword validate_certificate_name: Flag indicating whether SSL certificate name validation - should be done when using self-signed certificates for this backend host. - :paramtype validate_certificate_name: bool - :keyword server_certificate_thumbprints: Thumbprints of certificates used by the backend host - for TLS communication. - :paramtype server_certificate_thumbprints: list[str] - :keyword server_x509_names: Server X509 Certificate Names of the Backend Host. - :paramtype server_x509_names: list[~azure.mgmt.apimanagement.models.X509CertificateName] - """ - super().__init__(**kwargs) - self.validate_certificate_chain = validate_certificate_chain - self.validate_certificate_name = validate_certificate_name - self.server_certificate_thumbprints = server_certificate_thumbprints - self.server_x509_names = server_x509_names - - -class BackendUpdateParameterProperties(BackendBaseParameters): - """Parameters supplied to the Update Backend operation. - - :ivar title: Backend Title. - :vartype title: str - :ivar description: Backend Description. - :vartype description: str - :ivar resource_id: Management Uri of the Resource in External System. This URL can be the Arm - Resource Id of Logic Apps, Function Apps or API Apps. - :vartype resource_id: str - :ivar properties: Backend Properties contract. - :vartype properties: ~azure.mgmt.apimanagement.models.BackendProperties - :ivar credentials: Backend Credentials Contract Properties. - :vartype credentials: ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :ivar proxy: Backend gateway Contract Properties. - :vartype proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :ivar tls: Backend TLS Properties. - :vartype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :ivar circuit_breaker: Backend Circuit Breaker Configuration. - :vartype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker - :ivar azure_region: Azure region in which the backend is deployed. Can be optionally specified - to use features such as carbon-optimized load balancer. - :vartype azure_region: str - :ivar pool: - :vartype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool - :ivar type: Type of the backend. A backend can be either Single or Pool. Known values are: - "Single" and "Pool". - :vartype type: str or ~azure.mgmt.apimanagement.models.BackendType - :ivar url: Runtime Url of the Backend. - :vartype url: str - :ivar protocol: Backend communication protocol. Known values are: "http" and "soap". - :vartype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol - """ - - _validation = { - "title": {"max_length": 300, "min_length": 1}, - "description": {"max_length": 2000, "min_length": 1}, - "resource_id": {"max_length": 2000, "min_length": 1}, - "url": {"max_length": 2000, "min_length": 1}, - } - - _attribute_map = { - "title": {"key": "title", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "resource_id": {"key": "resourceId", "type": "str"}, - "properties": {"key": "properties", "type": "BackendProperties"}, - "credentials": {"key": "credentials", "type": "BackendCredentialsContract"}, - "proxy": {"key": "proxy", "type": "BackendProxyContract"}, - "tls": {"key": "tls", "type": "BackendTlsProperties"}, - "circuit_breaker": {"key": "circuitBreaker", "type": "BackendCircuitBreaker"}, - "azure_region": {"key": "azureRegion", "type": "str"}, - "pool": {"key": "pool", "type": "BackendBaseParametersPool"}, - "type": {"key": "type", "type": "str"}, - "url": {"key": "url", "type": "str"}, - "protocol": {"key": "protocol", "type": "str"}, - } - - def __init__( - self, - *, - title: Optional[str] = None, - description: Optional[str] = None, - resource_id: Optional[str] = None, - properties: Optional["_models.BackendProperties"] = None, - credentials: Optional["_models.BackendCredentialsContract"] = None, - proxy: Optional["_models.BackendProxyContract"] = None, - tls: Optional["_models.BackendTlsProperties"] = None, - circuit_breaker: Optional["_models.BackendCircuitBreaker"] = None, - azure_region: Optional[str] = None, - pool: Optional["_models.BackendBaseParametersPool"] = None, - type: Optional[Union[str, "_models.BackendType"]] = None, - url: Optional[str] = None, - protocol: Optional[Union[str, "_models.BackendProtocol"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword title: Backend Title. - :paramtype title: str - :keyword description: Backend Description. - :paramtype description: str - :keyword resource_id: Management Uri of the Resource in External System. This URL can be the - Arm Resource Id of Logic Apps, Function Apps or API Apps. - :paramtype resource_id: str - :keyword properties: Backend Properties contract. - :paramtype properties: ~azure.mgmt.apimanagement.models.BackendProperties - :keyword credentials: Backend Credentials Contract Properties. - :paramtype credentials: ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :keyword proxy: Backend gateway Contract Properties. - :paramtype proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :keyword tls: Backend TLS Properties. - :paramtype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :keyword circuit_breaker: Backend Circuit Breaker Configuration. - :paramtype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker - :keyword azure_region: Azure region in which the backend is deployed. Can be optionally - specified to use features such as carbon-optimized load balancer. - :paramtype azure_region: str - :keyword pool: - :paramtype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool - :keyword type: Type of the backend. A backend can be either Single or Pool. Known values are: - "Single" and "Pool". - :paramtype type: str or ~azure.mgmt.apimanagement.models.BackendType - :keyword url: Runtime Url of the Backend. - :paramtype url: str - :keyword protocol: Backend communication protocol. Known values are: "http" and "soap". - :paramtype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol - """ - super().__init__( - title=title, - description=description, - resource_id=resource_id, - properties=properties, - credentials=credentials, - proxy=proxy, - tls=tls, - circuit_breaker=circuit_breaker, - azure_region=azure_region, - pool=pool, - type=type, - **kwargs - ) - self.url = url - self.protocol = protocol - - -class BackendUpdateParameters(_serialization.Model): - """Backend update parameters. - - :ivar title: Backend Title. - :vartype title: str - :ivar description: Backend Description. - :vartype description: str - :ivar resource_id: Management Uri of the Resource in External System. This URL can be the Arm - Resource Id of Logic Apps, Function Apps or API Apps. - :vartype resource_id: str - :ivar properties: Backend Properties contract. - :vartype properties: ~azure.mgmt.apimanagement.models.BackendProperties - :ivar credentials: Backend Credentials Contract Properties. - :vartype credentials: ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :ivar proxy: Backend gateway Contract Properties. - :vartype proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :ivar tls: Backend TLS Properties. - :vartype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :ivar circuit_breaker: Backend Circuit Breaker Configuration. - :vartype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker - :ivar azure_region: Azure region in which the backend is deployed. Can be optionally specified - to use features such as carbon-optimized load balancer. - :vartype azure_region: str - :ivar pool: - :vartype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool - :ivar type: Type of the backend. A backend can be either Single or Pool. Known values are: - "Single" and "Pool". - :vartype type: str or ~azure.mgmt.apimanagement.models.BackendType - :ivar url: Runtime Url of the Backend. - :vartype url: str - :ivar protocol: Backend communication protocol. Known values are: "http" and "soap". - :vartype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol - """ - - _validation = { - "title": {"max_length": 300, "min_length": 1}, - "description": {"max_length": 2000, "min_length": 1}, - "resource_id": {"max_length": 2000, "min_length": 1}, - "url": {"max_length": 2000, "min_length": 1}, - } - - _attribute_map = { - "title": {"key": "properties.title", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "resource_id": {"key": "properties.resourceId", "type": "str"}, - "properties": {"key": "properties.properties", "type": "BackendProperties"}, - "credentials": {"key": "properties.credentials", "type": "BackendCredentialsContract"}, - "proxy": {"key": "properties.proxy", "type": "BackendProxyContract"}, - "tls": {"key": "properties.tls", "type": "BackendTlsProperties"}, - "circuit_breaker": {"key": "properties.circuitBreaker", "type": "BackendCircuitBreaker"}, - "azure_region": {"key": "properties.azureRegion", "type": "str"}, - "pool": {"key": "properties.pool", "type": "BackendBaseParametersPool"}, - "type": {"key": "properties.type", "type": "str"}, - "url": {"key": "properties.url", "type": "str"}, - "protocol": {"key": "properties.protocol", "type": "str"}, - } - - def __init__( - self, - *, - title: Optional[str] = None, - description: Optional[str] = None, - resource_id: Optional[str] = None, - properties: Optional["_models.BackendProperties"] = None, - credentials: Optional["_models.BackendCredentialsContract"] = None, - proxy: Optional["_models.BackendProxyContract"] = None, - tls: Optional["_models.BackendTlsProperties"] = None, - circuit_breaker: Optional["_models.BackendCircuitBreaker"] = None, - azure_region: Optional[str] = None, - pool: Optional["_models.BackendBaseParametersPool"] = None, - type: Optional[Union[str, "_models.BackendType"]] = None, - url: Optional[str] = None, - protocol: Optional[Union[str, "_models.BackendProtocol"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword title: Backend Title. - :paramtype title: str - :keyword description: Backend Description. - :paramtype description: str - :keyword resource_id: Management Uri of the Resource in External System. This URL can be the - Arm Resource Id of Logic Apps, Function Apps or API Apps. - :paramtype resource_id: str - :keyword properties: Backend Properties contract. - :paramtype properties: ~azure.mgmt.apimanagement.models.BackendProperties - :keyword credentials: Backend Credentials Contract Properties. - :paramtype credentials: ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :keyword proxy: Backend gateway Contract Properties. - :paramtype proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :keyword tls: Backend TLS Properties. - :paramtype tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :keyword circuit_breaker: Backend Circuit Breaker Configuration. - :paramtype circuit_breaker: ~azure.mgmt.apimanagement.models.BackendCircuitBreaker - :keyword azure_region: Azure region in which the backend is deployed. Can be optionally - specified to use features such as carbon-optimized load balancer. - :paramtype azure_region: str - :keyword pool: - :paramtype pool: ~azure.mgmt.apimanagement.models.BackendBaseParametersPool - :keyword type: Type of the backend. A backend can be either Single or Pool. Known values are: - "Single" and "Pool". - :paramtype type: str or ~azure.mgmt.apimanagement.models.BackendType - :keyword url: Runtime Url of the Backend. - :paramtype url: str - :keyword protocol: Backend communication protocol. Known values are: "http" and "soap". - :paramtype protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol - """ - super().__init__(**kwargs) - self.title = title - self.description = description - self.resource_id = resource_id - self.properties = properties - self.credentials = credentials - self.proxy = proxy - self.tls = tls - self.circuit_breaker = circuit_breaker - self.azure_region = azure_region - self.pool = pool - self.type = type - self.url = url - self.protocol = protocol - - -class BodyDiagnosticSettings(_serialization.Model): - """Body logging settings. - - :ivar bytes: Number of request body bytes to log. - :vartype bytes: int - """ - - _validation = { - "bytes": {"maximum": 8192}, - } - - _attribute_map = { - "bytes": {"key": "bytes", "type": "int"}, - } - - def __init__(self, *, bytes: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword bytes: Number of request body bytes to log. - :paramtype bytes: int - """ - super().__init__(**kwargs) - self.bytes = bytes - - -class CacheCollection(_serialization.Model): - """Paged Caches list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.CacheContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[CacheContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.CacheContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.CacheContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class CacheContract(ProxyResource): - """Cache details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar description: Cache description. - :vartype description: str - :ivar connection_string: Runtime connection string to cache. - :vartype connection_string: str - :ivar use_from_location: Location identifier to use cache from (should be either 'default' or - valid Azure region identifier). - :vartype use_from_location: str - :ivar resource_id: Original uri of entity in external system cache points to. - :vartype resource_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "description": {"max_length": 2000}, - "connection_string": {"max_length": 300}, - "use_from_location": {"max_length": 256}, - "resource_id": {"max_length": 2000}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "connection_string": {"key": "properties.connectionString", "type": "str"}, - "use_from_location": {"key": "properties.useFromLocation", "type": "str"}, - "resource_id": {"key": "properties.resourceId", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - connection_string: Optional[str] = None, - use_from_location: Optional[str] = None, - resource_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Cache description. - :paramtype description: str - :keyword connection_string: Runtime connection string to cache. - :paramtype connection_string: str - :keyword use_from_location: Location identifier to use cache from (should be either 'default' - or valid Azure region identifier). - :paramtype use_from_location: str - :keyword resource_id: Original uri of entity in external system cache points to. - :paramtype resource_id: str - """ - super().__init__(**kwargs) - self.description = description - self.connection_string = connection_string - self.use_from_location = use_from_location - self.resource_id = resource_id - - -class CacheUpdateParameters(_serialization.Model): - """Cache update details. - - :ivar description: Cache description. - :vartype description: str - :ivar connection_string: Runtime connection string to cache. - :vartype connection_string: str - :ivar use_from_location: Location identifier to use cache from (should be either 'default' or - valid Azure region identifier). - :vartype use_from_location: str - :ivar resource_id: Original uri of entity in external system cache points to. - :vartype resource_id: str - """ - - _validation = { - "description": {"max_length": 2000}, - "connection_string": {"max_length": 300}, - "use_from_location": {"max_length": 256}, - "resource_id": {"max_length": 2000}, - } - - _attribute_map = { - "description": {"key": "properties.description", "type": "str"}, - "connection_string": {"key": "properties.connectionString", "type": "str"}, - "use_from_location": {"key": "properties.useFromLocation", "type": "str"}, - "resource_id": {"key": "properties.resourceId", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - connection_string: Optional[str] = None, - use_from_location: Optional[str] = None, - resource_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Cache description. - :paramtype description: str - :keyword connection_string: Runtime connection string to cache. - :paramtype connection_string: str - :keyword use_from_location: Location identifier to use cache from (should be either 'default' - or valid Azure region identifier). - :paramtype use_from_location: str - :keyword resource_id: Original uri of entity in external system cache points to. - :paramtype resource_id: str - """ - super().__init__(**kwargs) - self.description = description - self.connection_string = connection_string - self.use_from_location = use_from_location - self.resource_id = resource_id - - -class CertificateCollection(_serialization.Model): - """Paged Certificates list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.CertificateContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[CertificateContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.CertificateContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.CertificateContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class CertificateConfiguration(_serialization.Model): - """Certificate configuration which consist of non-trusted intermediates and root certificates. - - All required parameters must be populated in order to send to server. - - :ivar encoded_certificate: Base64 Encoded certificate. - :vartype encoded_certificate: str - :ivar certificate_password: Certificate Password. - :vartype certificate_password: str - :ivar store_name: The System.Security.Cryptography.x509certificates.StoreName certificate store - location. Only Root and CertificateAuthority are valid locations. Required. Known values are: - "CertificateAuthority" and "Root". - :vartype store_name: str or ~azure.mgmt.apimanagement.models.CertificateConfigurationStoreName - :ivar certificate: Certificate information. - :vartype certificate: ~azure.mgmt.apimanagement.models.CertificateInformation - """ - - _validation = { - "store_name": {"required": True}, - } - - _attribute_map = { - "encoded_certificate": {"key": "encodedCertificate", "type": "str"}, - "certificate_password": {"key": "certificatePassword", "type": "str"}, - "store_name": {"key": "storeName", "type": "str"}, - "certificate": {"key": "certificate", "type": "CertificateInformation"}, - } - - def __init__( - self, - *, - store_name: Union[str, "_models.CertificateConfigurationStoreName"], - encoded_certificate: Optional[str] = None, - certificate_password: Optional[str] = None, - certificate: Optional["_models.CertificateInformation"] = None, - **kwargs: Any - ) -> None: - """ - :keyword encoded_certificate: Base64 Encoded certificate. - :paramtype encoded_certificate: str - :keyword certificate_password: Certificate Password. - :paramtype certificate_password: str - :keyword store_name: The System.Security.Cryptography.x509certificates.StoreName certificate - store location. Only Root and CertificateAuthority are valid locations. Required. Known values - are: "CertificateAuthority" and "Root". - :paramtype store_name: str or - ~azure.mgmt.apimanagement.models.CertificateConfigurationStoreName - :keyword certificate: Certificate information. - :paramtype certificate: ~azure.mgmt.apimanagement.models.CertificateInformation - """ - super().__init__(**kwargs) - self.encoded_certificate = encoded_certificate - self.certificate_password = certificate_password - self.store_name = store_name - self.certificate = certificate - - -class CertificateContract(ProxyResource): - """Certificate details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar subject: Subject attribute of the certificate. - :vartype subject: str - :ivar thumbprint: Thumbprint of the certificate. - :vartype thumbprint: str - :ivar expiration_date: Expiration date of the certificate. The date conforms to the following - format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype expiration_date: ~datetime.datetime - :ivar key_vault: KeyVault location details of the certificate. - :vartype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "subject": {"key": "properties.subject", "type": "str"}, - "thumbprint": {"key": "properties.thumbprint", "type": "str"}, - "expiration_date": {"key": "properties.expirationDate", "type": "iso-8601"}, - "key_vault": {"key": "properties.keyVault", "type": "KeyVaultContractProperties"}, - } - - def __init__( - self, - *, - subject: Optional[str] = None, - thumbprint: Optional[str] = None, - expiration_date: Optional[datetime.datetime] = None, - key_vault: Optional["_models.KeyVaultContractProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword subject: Subject attribute of the certificate. - :paramtype subject: str - :keyword thumbprint: Thumbprint of the certificate. - :paramtype thumbprint: str - :keyword expiration_date: Expiration date of the certificate. The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype expiration_date: ~datetime.datetime - :keyword key_vault: KeyVault location details of the certificate. - :paramtype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractProperties - """ - super().__init__(**kwargs) - self.subject = subject - self.thumbprint = thumbprint - self.expiration_date = expiration_date - self.key_vault = key_vault - - -class CertificateCreateOrUpdateParameters(_serialization.Model): - """Certificate create or update details. - - :ivar data: Base 64 encoded certificate using the application/x-pkcs12 representation. - :vartype data: str - :ivar password: Password for the Certificate. - :vartype password: str - :ivar key_vault: KeyVault location details of the certificate. - :vartype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties - """ - - _attribute_map = { - "data": {"key": "properties.data", "type": "str"}, - "password": {"key": "properties.password", "type": "str"}, - "key_vault": {"key": "properties.keyVault", "type": "KeyVaultContractCreateProperties"}, - } - - def __init__( - self, - *, - data: Optional[str] = None, - password: Optional[str] = None, - key_vault: Optional["_models.KeyVaultContractCreateProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword data: Base 64 encoded certificate using the application/x-pkcs12 representation. - :paramtype data: str - :keyword password: Password for the Certificate. - :paramtype password: str - :keyword key_vault: KeyVault location details of the certificate. - :paramtype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties - """ - super().__init__(**kwargs) - self.data = data - self.password = password - self.key_vault = key_vault - - -class CertificateInformation(_serialization.Model): - """SSL certificate information. - - All required parameters must be populated in order to send to server. - - :ivar expiry: Expiration date of the certificate. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required. - :vartype expiry: ~datetime.datetime - :ivar thumbprint: Thumbprint of the certificate. Required. - :vartype thumbprint: str - :ivar subject: Subject of the certificate. Required. - :vartype subject: str - """ - - _validation = { - "expiry": {"required": True}, - "thumbprint": {"required": True}, - "subject": {"required": True}, - } - - _attribute_map = { - "expiry": {"key": "expiry", "type": "iso-8601"}, - "thumbprint": {"key": "thumbprint", "type": "str"}, - "subject": {"key": "subject", "type": "str"}, - } - - def __init__(self, *, expiry: datetime.datetime, thumbprint: str, subject: str, **kwargs: Any) -> None: - """ - :keyword expiry: Expiration date of the certificate. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required. - :paramtype expiry: ~datetime.datetime - :keyword thumbprint: Thumbprint of the certificate. Required. - :paramtype thumbprint: str - :keyword subject: Subject of the certificate. Required. - :paramtype subject: str - """ - super().__init__(**kwargs) - self.expiry = expiry - self.thumbprint = thumbprint - self.subject = subject - - -class CircuitBreakerFailureCondition(_serialization.Model): - """The trip conditions of the circuit breaker. - - :ivar count: The threshold for opening the circuit. - :vartype count: int - :ivar percentage: The threshold for opening the circuit. - :vartype percentage: int - :ivar interval: The interval during which the failures are counted. - :vartype interval: ~datetime.timedelta - :ivar status_code_ranges: The status code ranges which are considered as failure. - :vartype status_code_ranges: list[~azure.mgmt.apimanagement.models.FailureStatusCodeRange] - :ivar error_reasons: The error reasons which are considered as failure. - :vartype error_reasons: list[str] - """ - - _validation = { - "status_code_ranges": {"max_items": 10, "min_items": 0}, - "error_reasons": {"max_items": 10, "min_items": 0}, - } - - _attribute_map = { - "count": {"key": "count", "type": "int"}, - "percentage": {"key": "percentage", "type": "int"}, - "interval": {"key": "interval", "type": "duration"}, - "status_code_ranges": {"key": "statusCodeRanges", "type": "[FailureStatusCodeRange]"}, - "error_reasons": {"key": "errorReasons", "type": "[str]"}, - } - - def __init__( - self, - *, - count: Optional[int] = None, - percentage: Optional[int] = None, - interval: Optional[datetime.timedelta] = None, - status_code_ranges: Optional[list["_models.FailureStatusCodeRange"]] = None, - error_reasons: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword count: The threshold for opening the circuit. - :paramtype count: int - :keyword percentage: The threshold for opening the circuit. - :paramtype percentage: int - :keyword interval: The interval during which the failures are counted. - :paramtype interval: ~datetime.timedelta - :keyword status_code_ranges: The status code ranges which are considered as failure. - :paramtype status_code_ranges: list[~azure.mgmt.apimanagement.models.FailureStatusCodeRange] - :keyword error_reasons: The error reasons which are considered as failure. - :paramtype error_reasons: list[str] - """ - super().__init__(**kwargs) - self.count = count - self.percentage = percentage - self.interval = interval - self.status_code_ranges = status_code_ranges - self.error_reasons = error_reasons - - -class CircuitBreakerRule(_serialization.Model): - """Rule configuration to trip the backend. - - :ivar name: The rule name. - :vartype name: str - :ivar failure_condition: The conditions for tripping the circuit breaker. - :vartype failure_condition: ~azure.mgmt.apimanagement.models.CircuitBreakerFailureCondition - :ivar trip_duration: The duration for which the circuit will be tripped. - :vartype trip_duration: ~datetime.timedelta - :ivar accept_retry_after: flag to accept Retry-After header from the backend. - :vartype accept_retry_after: bool - :ivar failure_response: The response of the backend when the circuit breaker gets open. - :vartype failure_response: ~azure.mgmt.apimanagement.models.BackendFailureResponse - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "failure_condition": {"key": "failureCondition", "type": "CircuitBreakerFailureCondition"}, - "trip_duration": {"key": "tripDuration", "type": "duration"}, - "accept_retry_after": {"key": "acceptRetryAfter", "type": "bool"}, - "failure_response": {"key": "failureResponse", "type": "BackendFailureResponse"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - failure_condition: Optional["_models.CircuitBreakerFailureCondition"] = None, - trip_duration: Optional[datetime.timedelta] = None, - accept_retry_after: Optional[bool] = None, - failure_response: Optional["_models.BackendFailureResponse"] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: The rule name. - :paramtype name: str - :keyword failure_condition: The conditions for tripping the circuit breaker. - :paramtype failure_condition: ~azure.mgmt.apimanagement.models.CircuitBreakerFailureCondition - :keyword trip_duration: The duration for which the circuit will be tripped. - :paramtype trip_duration: ~datetime.timedelta - :keyword accept_retry_after: flag to accept Retry-After header from the backend. - :paramtype accept_retry_after: bool - :keyword failure_response: The response of the backend when the circuit breaker gets open. - :paramtype failure_response: ~azure.mgmt.apimanagement.models.BackendFailureResponse - """ - super().__init__(**kwargs) - self.name = name - self.failure_condition = failure_condition - self.trip_duration = trip_duration - self.accept_retry_after = accept_retry_after - self.failure_response = failure_response - - -class ClientApplicationCollection(_serialization.Model): - """Paged ClientApplication list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.ClientApplicationContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ClientApplicationContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.ClientApplicationContract"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.ClientApplicationContract] - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ClientApplicationContract(ProxyResource): - """Client application details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar display_name: Client application name. - :vartype display_name: str - :ivar description: Client application description. - :vartype description: str - :ivar owner_id: A resource identifier for the user who owns the application. - :vartype owner_id: str - :ivar entra_application_id: Microsoft EntraID Application ID (Client ID). This is the value - that is used to identify the application when it is requesting access tokens from Microsoft - EntraID. This property is read-only and will be set by the system when the application is - created. - :vartype entra_application_id: str - :ivar entra_tenant_id: Tenant ID is a unique identifier (a GUID) for an organization directory - in Microsoft’s cloud. It’s used to identify tenants across Microsoft services. - :vartype entra_tenant_id: str - :ivar state: Client application state. The value derives the state of an application based on - the statuses of its associated ClientApplicationProductLinks. Known values are: "pending", - "active", "rejected", and "approved". - :vartype state: str or ~azure.mgmt.apimanagement.models.ClientApplicationState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "display_name": {"max_length": 300}, - "description": {"max_length": 1000}, - "entra_application_id": {"readonly": True}, - "entra_tenant_id": {"readonly": True}, - "state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "owner_id": {"key": "properties.ownerId", "type": "str"}, - "entra_application_id": {"key": "properties.entraApplicationId", "type": "str"}, - "entra_tenant_id": {"key": "properties.entraTenantId", "type": "str"}, - "state": {"key": "properties.state", "type": "str"}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - description: Optional[str] = None, - owner_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword display_name: Client application name. - :paramtype display_name: str - :keyword description: Client application description. - :paramtype description: str - :keyword owner_id: A resource identifier for the user who owns the application. - :paramtype owner_id: str - """ - super().__init__(**kwargs) - self.display_name = display_name - self.description = description - self.owner_id = owner_id - self.entra_application_id: Optional[str] = None - self.entra_tenant_id: Optional[str] = None - self.state: Optional[Union[str, "_models.ClientApplicationState"]] = None - - -class ClientApplicationProductLinkCollection(_serialization.Model): - """Paged ClientApplicationProductLinkContract list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ClientApplicationProductLinkContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.ClientApplicationProductLinkContract"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract] - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ClientApplicationProductLinkContract(ProxyResource): - """Specifies Client Application - Product link assignment. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar product_id: The unique resource identifier of the Product. - :vartype product_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "product_id": {"key": "properties.productId", "type": "str"}, - } - - def __init__(self, *, product_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword product_id: The unique resource identifier of the Product. - :paramtype product_id: str - """ - super().__init__(**kwargs) - self.product_id = product_id - - -class ClientApplicationSecretsContract(_serialization.Model): - """Specifies client application secrets needed to authorize applications API calls. - - :ivar entra: Microsoft EntraID client application secrets. - :vartype entra: ~azure.mgmt.apimanagement.models.ClientApplicationSecretsContractEntra - """ - - _attribute_map = { - "entra": {"key": "entra", "type": "ClientApplicationSecretsContractEntra"}, - } - - def __init__( - self, *, entra: Optional["_models.ClientApplicationSecretsContractEntra"] = None, **kwargs: Any - ) -> None: - """ - :keyword entra: Microsoft EntraID client application secrets. - :paramtype entra: ~azure.mgmt.apimanagement.models.ClientApplicationSecretsContractEntra - """ - super().__init__(**kwargs) - self.entra = entra - - -class ClientApplicationSecretsContractEntra(_serialization.Model): - """Microsoft EntraID client application secrets. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar client_secret: EntraID client application secret. - :vartype client_secret: str - :ivar expires_at: EntraID client application secret expiration date. - :vartype expires_at: ~datetime.datetime - """ - - _validation = { - "expires_at": {"readonly": True}, - } - - _attribute_map = { - "client_secret": {"key": "clientSecret", "type": "str"}, - "expires_at": {"key": "expiresAt", "type": "iso-8601"}, - } - - def __init__(self, *, client_secret: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword client_secret: EntraID client application secret. - :paramtype client_secret: str - """ - super().__init__(**kwargs) - self.client_secret = client_secret - self.expires_at: Optional[datetime.datetime] = None - - -class ClientSecretContract(_serialization.Model): - """Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. - - :ivar client_secret: Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. - :vartype client_secret: str - """ - - _attribute_map = { - "client_secret": {"key": "clientSecret", "type": "str"}, - } - - def __init__(self, *, client_secret: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword client_secret: Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. - :paramtype client_secret: str - """ - super().__init__(**kwargs) - self.client_secret = client_secret - - -class ConfigurationApi(_serialization.Model): - """Information regarding the Configuration API of the API Management service. - - :ivar legacy_api: Indication whether or not the legacy Configuration API (v1) should be exposed - on the API Management service. Value is optional but must be 'Enabled' or 'Disabled'. If - 'Disabled', legacy Configuration API (v1) will not be available for self-hosted gateways. - Default value is 'Enabled'. Known values are: "Enabled" and "Disabled". - :vartype legacy_api: str or ~azure.mgmt.apimanagement.models.LegacyApiState - """ - - _attribute_map = { - "legacy_api": {"key": "legacyApi", "type": "str"}, - } - - def __init__(self, *, legacy_api: Union[str, "_models.LegacyApiState"] = "Enabled", **kwargs: Any) -> None: - """ - :keyword legacy_api: Indication whether or not the legacy Configuration API (v1) should be - exposed on the API Management service. Value is optional but must be 'Enabled' or 'Disabled'. - If 'Disabled', legacy Configuration API (v1) will not be available for self-hosted gateways. - Default value is 'Enabled'. Known values are: "Enabled" and "Disabled". - :paramtype legacy_api: str or ~azure.mgmt.apimanagement.models.LegacyApiState - """ - super().__init__(**kwargs) - self.legacy_api = legacy_api - - -class ConnectivityCheckRequest(_serialization.Model): - """A request to perform the connectivity check operation on a API Management service. - - All required parameters must be populated in order to send to server. - - :ivar source: Definitions about the connectivity check origin. Required. - :vartype source: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestSource - :ivar destination: The connectivity check operation destination. Required. - :vartype destination: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestDestination - :ivar preferred_ip_version: The IP version to be used. Only IPv4 is supported for now. "IPv4" - :vartype preferred_ip_version: str or ~azure.mgmt.apimanagement.models.PreferredIPVersion - :ivar protocol: The request's protocol. Specific protocol configuration can be available based - on this selection. The specified destination address must be coherent with this value. Known - values are: "TCP", "HTTP", and "HTTPS". - :vartype protocol: str or ~azure.mgmt.apimanagement.models.ConnectivityCheckProtocol - :ivar protocol_configuration: Protocol-specific configuration. - :vartype protocol_configuration: - ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfiguration - """ - - _validation = { - "source": {"required": True}, - "destination": {"required": True}, - } - - _attribute_map = { - "source": {"key": "source", "type": "ConnectivityCheckRequestSource"}, - "destination": {"key": "destination", "type": "ConnectivityCheckRequestDestination"}, - "preferred_ip_version": {"key": "preferredIPVersion", "type": "str"}, - "protocol": {"key": "protocol", "type": "str"}, - "protocol_configuration": { - "key": "protocolConfiguration", - "type": "ConnectivityCheckRequestProtocolConfiguration", - }, - } - - def __init__( - self, - *, - source: "_models.ConnectivityCheckRequestSource", - destination: "_models.ConnectivityCheckRequestDestination", - preferred_ip_version: Optional[Union[str, "_models.PreferredIPVersion"]] = None, - protocol: Optional[Union[str, "_models.ConnectivityCheckProtocol"]] = None, - protocol_configuration: Optional["_models.ConnectivityCheckRequestProtocolConfiguration"] = None, - **kwargs: Any - ) -> None: - """ - :keyword source: Definitions about the connectivity check origin. Required. - :paramtype source: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestSource - :keyword destination: The connectivity check operation destination. Required. - :paramtype destination: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestDestination - :keyword preferred_ip_version: The IP version to be used. Only IPv4 is supported for now. - "IPv4" - :paramtype preferred_ip_version: str or ~azure.mgmt.apimanagement.models.PreferredIPVersion - :keyword protocol: The request's protocol. Specific protocol configuration can be available - based on this selection. The specified destination address must be coherent with this value. - Known values are: "TCP", "HTTP", and "HTTPS". - :paramtype protocol: str or ~azure.mgmt.apimanagement.models.ConnectivityCheckProtocol - :keyword protocol_configuration: Protocol-specific configuration. - :paramtype protocol_configuration: - ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfiguration - """ - super().__init__(**kwargs) - self.source = source - self.destination = destination - self.preferred_ip_version = preferred_ip_version - self.protocol = protocol - self.protocol_configuration = protocol_configuration - - -class ConnectivityCheckRequestDestination(_serialization.Model): - """The connectivity check operation destination. - - All required parameters must be populated in order to send to server. - - :ivar address: Destination address. Can either be an IP address or a FQDN. Required. - :vartype address: str - :ivar port: Destination port. Required. - :vartype port: int - """ - - _validation = { - "address": {"required": True}, - "port": {"required": True}, - } - - _attribute_map = { - "address": {"key": "address", "type": "str"}, - "port": {"key": "port", "type": "int"}, - } - - def __init__(self, *, address: str, port: int, **kwargs: Any) -> None: - """ - :keyword address: Destination address. Can either be an IP address or a FQDN. Required. - :paramtype address: str - :keyword port: Destination port. Required. - :paramtype port: int - """ - super().__init__(**kwargs) - self.address = address - self.port = port - - -class ConnectivityCheckRequestProtocolConfiguration(_serialization.Model): # pylint: disable=name-too-long - """Protocol-specific configuration. - - :ivar http_configuration: Configuration for HTTP or HTTPS requests. - :vartype http_configuration: - ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration - """ - - _attribute_map = { - "http_configuration": { - "key": "HTTPConfiguration", - "type": "ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration", - }, - } - - def __init__( - self, - *, - http_configuration: Optional["_models.ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration"] = None, - **kwargs: Any - ) -> None: - """ - :keyword http_configuration: Configuration for HTTP or HTTPS requests. - :paramtype http_configuration: - ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration - """ - super().__init__(**kwargs) - self.http_configuration = http_configuration - - -class ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration( - _serialization.Model -): # pylint: disable=name-too-long - """Configuration for HTTP or HTTPS requests. - - :ivar method: The HTTP method to be used. Known values are: "GET" and "POST". - :vartype method: str or ~azure.mgmt.apimanagement.models.Method - :ivar valid_status_codes: List of HTTP status codes considered valid for the request response. - :vartype valid_status_codes: list[int] - :ivar headers: List of headers to be included in the request. - :vartype headers: list[~azure.mgmt.apimanagement.models.HTTPHeader] - """ - - _attribute_map = { - "method": {"key": "method", "type": "str"}, - "valid_status_codes": {"key": "validStatusCodes", "type": "[int]"}, - "headers": {"key": "headers", "type": "[HTTPHeader]"}, - } - - def __init__( - self, - *, - method: Optional[Union[str, "_models.Method"]] = None, - valid_status_codes: Optional[list[int]] = None, - headers: Optional[list["_models.HTTPHeader"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword method: The HTTP method to be used. Known values are: "GET" and "POST". - :paramtype method: str or ~azure.mgmt.apimanagement.models.Method - :keyword valid_status_codes: List of HTTP status codes considered valid for the request - response. - :paramtype valid_status_codes: list[int] - :keyword headers: List of headers to be included in the request. - :paramtype headers: list[~azure.mgmt.apimanagement.models.HTTPHeader] - """ - super().__init__(**kwargs) - self.method = method - self.valid_status_codes = valid_status_codes - self.headers = headers - - -class ConnectivityCheckRequestSource(_serialization.Model): - """Definitions about the connectivity check origin. - - All required parameters must be populated in order to send to server. - - :ivar region: The API Management service region from where to start the connectivity check - operation. Required. - :vartype region: str - :ivar instance: The particular VMSS instance from which to fire the request. - :vartype instance: int - """ - - _validation = { - "region": {"required": True}, - } - - _attribute_map = { - "region": {"key": "region", "type": "str"}, - "instance": {"key": "instance", "type": "int"}, - } - - def __init__(self, *, region: str, instance: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword region: The API Management service region from where to start the connectivity check - operation. Required. - :paramtype region: str - :keyword instance: The particular VMSS instance from which to fire the request. - :paramtype instance: int - """ - super().__init__(**kwargs) - self.region = region - self.instance = instance - - -class ConnectivityCheckResponse(_serialization.Model): - """Information on the connectivity status. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar hops: List of hops between the source and the destination. - :vartype hops: list[~azure.mgmt.apimanagement.models.ConnectivityHop] - :ivar connection_status: The connection status. Known values are: "Unknown", "Connected", - "Disconnected", and "Degraded". - :vartype connection_status: str or ~azure.mgmt.apimanagement.models.ConnectionStatus - :ivar avg_latency_in_ms: Average latency in milliseconds. - :vartype avg_latency_in_ms: int - :ivar min_latency_in_ms: Minimum latency in milliseconds. - :vartype min_latency_in_ms: int - :ivar max_latency_in_ms: Maximum latency in milliseconds. - :vartype max_latency_in_ms: int - :ivar probes_sent: Total number of probes sent. - :vartype probes_sent: int - :ivar probes_failed: Number of failed probes. - :vartype probes_failed: int - """ - - _validation = { - "hops": {"readonly": True}, - "connection_status": {"readonly": True}, - "avg_latency_in_ms": {"readonly": True}, - "min_latency_in_ms": {"readonly": True}, - "max_latency_in_ms": {"readonly": True}, - "probes_sent": {"readonly": True}, - "probes_failed": {"readonly": True}, - } - - _attribute_map = { - "hops": {"key": "hops", "type": "[ConnectivityHop]"}, - "connection_status": {"key": "connectionStatus", "type": "str"}, - "avg_latency_in_ms": {"key": "avgLatencyInMs", "type": "int"}, - "min_latency_in_ms": {"key": "minLatencyInMs", "type": "int"}, - "max_latency_in_ms": {"key": "maxLatencyInMs", "type": "int"}, - "probes_sent": {"key": "probesSent", "type": "int"}, - "probes_failed": {"key": "probesFailed", "type": "int"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.hops: Optional[list["_models.ConnectivityHop"]] = None - self.connection_status: Optional[Union[str, "_models.ConnectionStatus"]] = None - self.avg_latency_in_ms: Optional[int] = None - self.min_latency_in_ms: Optional[int] = None - self.max_latency_in_ms: Optional[int] = None - self.probes_sent: Optional[int] = None - self.probes_failed: Optional[int] = None - - -class ConnectivityHop(_serialization.Model): - """Information about a hop between the source and the destination. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of the hop. - :vartype type: str - :ivar id: The ID of the hop. - :vartype id: str - :ivar address: The IP address of the hop. - :vartype address: str - :ivar resource_id: The ID of the resource corresponding to this hop. - :vartype resource_id: str - :ivar next_hop_ids: List of next hop identifiers. - :vartype next_hop_ids: list[str] - :ivar issues: List of issues. - :vartype issues: list[~azure.mgmt.apimanagement.models.ConnectivityIssue] - """ - - _validation = { - "type": {"readonly": True}, - "id": {"readonly": True}, - "address": {"readonly": True}, - "resource_id": {"readonly": True}, - "next_hop_ids": {"readonly": True}, - "issues": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "id": {"key": "id", "type": "str"}, - "address": {"key": "address", "type": "str"}, - "resource_id": {"key": "resourceId", "type": "str"}, - "next_hop_ids": {"key": "nextHopIds", "type": "[str]"}, - "issues": {"key": "issues", "type": "[ConnectivityIssue]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[str] = None - self.id: Optional[str] = None - self.address: Optional[str] = None - self.resource_id: Optional[str] = None - self.next_hop_ids: Optional[list[str]] = None - self.issues: Optional[list["_models.ConnectivityIssue"]] = None - - -class ConnectivityIssue(_serialization.Model): - """Information about an issue encountered in the process of checking for connectivity. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar origin: The origin of the issue. Known values are: "Local", "Inbound", and "Outbound". - :vartype origin: str or ~azure.mgmt.apimanagement.models.Origin - :ivar severity: The severity of the issue. Known values are: "Error" and "Warning". - :vartype severity: str or ~azure.mgmt.apimanagement.models.Severity - :ivar type: The type of issue. Known values are: "Unknown", "AgentStopped", "GuestFirewall", - "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", "PortThrottled", and - "Platform". - :vartype type: str or ~azure.mgmt.apimanagement.models.IssueType - :ivar context: Provides additional context on the issue. - :vartype context: list[dict[str, str]] - """ - - _validation = { - "origin": {"readonly": True}, - "severity": {"readonly": True}, - "type": {"readonly": True}, - "context": {"readonly": True}, - } - - _attribute_map = { - "origin": {"key": "origin", "type": "str"}, - "severity": {"key": "severity", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "context": {"key": "context", "type": "[{str}]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.origin: Optional[Union[str, "_models.Origin"]] = None - self.severity: Optional[Union[str, "_models.Severity"]] = None - self.type: Optional[Union[str, "_models.IssueType"]] = None - self.context: Optional[list[dict[str, str]]] = None - - -class ConnectivityStatusContract(_serialization.Model): - """Details about connectivity to a resource. - - All required parameters must be populated in order to send to server. - - :ivar name: The hostname of the resource which the service depends on. This can be the - database, storage or any other azure resource on which the service depends upon. Required. - :vartype name: str - :ivar status: Resource Connectivity Status Type identifier. Required. Known values are: - "initializing", "success", and "failure". - :vartype status: str or ~azure.mgmt.apimanagement.models.ConnectivityStatusType - :ivar error: Error details of the connectivity to the resource. - :vartype error: str - :ivar last_updated: The date when the resource connectivity status was last updated. This - status should be updated every 15 minutes. If this status has not been updated, then it means - that the service has lost network connectivity to the resource, from inside the Virtual - Network.The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the - ISO 8601 standard. Required. - :vartype last_updated: ~datetime.datetime - :ivar last_status_change: The date when the resource connectivity status last Changed from - success to failure or vice-versa. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required. - :vartype last_status_change: ~datetime.datetime - :ivar resource_type: Resource Type. Required. - :vartype resource_type: str - :ivar is_optional: Whether this is optional. Required. - :vartype is_optional: bool - """ - - _validation = { - "name": {"required": True, "min_length": 1}, - "status": {"required": True}, - "last_updated": {"required": True}, - "last_status_change": {"required": True}, - "resource_type": {"required": True}, - "is_optional": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "status": {"key": "status", "type": "str"}, - "error": {"key": "error", "type": "str"}, - "last_updated": {"key": "lastUpdated", "type": "iso-8601"}, - "last_status_change": {"key": "lastStatusChange", "type": "iso-8601"}, - "resource_type": {"key": "resourceType", "type": "str"}, - "is_optional": {"key": "isOptional", "type": "bool"}, - } - - def __init__( - self, - *, - name: str, - status: Union[str, "_models.ConnectivityStatusType"], - last_updated: datetime.datetime, - last_status_change: datetime.datetime, - resource_type: str, - is_optional: bool, - error: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: The hostname of the resource which the service depends on. This can be the - database, storage or any other azure resource on which the service depends upon. Required. - :paramtype name: str - :keyword status: Resource Connectivity Status Type identifier. Required. Known values are: - "initializing", "success", and "failure". - :paramtype status: str or ~azure.mgmt.apimanagement.models.ConnectivityStatusType - :keyword error: Error details of the connectivity to the resource. - :paramtype error: str - :keyword last_updated: The date when the resource connectivity status was last updated. This - status should be updated every 15 minutes. If this status has not been updated, then it means - that the service has lost network connectivity to the resource, from inside the Virtual - Network.The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the - ISO 8601 standard. Required. - :paramtype last_updated: ~datetime.datetime - :keyword last_status_change: The date when the resource connectivity status last Changed from - success to failure or vice-versa. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required. - :paramtype last_status_change: ~datetime.datetime - :keyword resource_type: Resource Type. Required. - :paramtype resource_type: str - :keyword is_optional: Whether this is optional. Required. - :paramtype is_optional: bool - """ - super().__init__(**kwargs) - self.name = name - self.status = status - self.error = error - self.last_updated = last_updated - self.last_status_change = last_status_change - self.resource_type = resource_type - self.is_optional = is_optional - - -class ContentItemCollection(_serialization.Model): - """Paged list of content items. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Collection of content items. - :vartype value: list[~azure.mgmt.apimanagement.models.ContentItemContract] - :ivar next_link: Next page link, if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ContentItemContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.ContentItemContract"]] = None - self.next_link: Optional[str] = None - - -class ContentItemContract(ProxyResource): - """Content type contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar properties: Properties of the content item. - :vartype properties: dict[str, any] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "properties": {"key": "properties", "type": "{object}"}, - } - - def __init__(self, *, properties: Optional[dict[str, Any]] = None, **kwargs: Any) -> None: - """ - :keyword properties: Properties of the content item. - :paramtype properties: dict[str, any] - """ - super().__init__(**kwargs) - self.properties = properties - - -class ContentTypeCollection(_serialization.Model): - """Paged list of content types. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Collection of content types. - :vartype value: list[~azure.mgmt.apimanagement.models.ContentTypeContract] - :ivar next_link: Next page link, if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ContentTypeContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.ContentTypeContract"]] = None - self.next_link: Optional[str] = None - - -class ContentTypeContract(ProxyResource): - """Content type contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar id_properties_id: Content type identifier. - :vartype id_properties_id: str - :ivar name_properties_name: Content type name. Must be 1 to 250 characters long. - :vartype name_properties_name: str - :ivar description: Content type description. - :vartype description: str - :ivar schema: Content type schema. - :vartype schema: JSON - :ivar version: Content type version. - :vartype version: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "id_properties_id": {"key": "properties.id", "type": "str"}, - "name_properties_name": {"key": "properties.name", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "schema": {"key": "properties.schema", "type": "object"}, - "version": {"key": "properties.version", "type": "str"}, - } - - def __init__( - self, - *, - id_properties_id: Optional[str] = None, - name_properties_name: Optional[str] = None, - description: Optional[str] = None, - schema: Optional[JSON] = None, - version: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword id_properties_id: Content type identifier. - :paramtype id_properties_id: str - :keyword name_properties_name: Content type name. Must be 1 to 250 characters long. - :paramtype name_properties_name: str - :keyword description: Content type description. - :paramtype description: str - :keyword schema: Content type schema. - :paramtype schema: JSON - :keyword version: Content type version. - :paramtype version: str - """ - super().__init__(**kwargs) - self.id_properties_id = id_properties_id - self.name_properties_name = name_properties_name - self.description = description - self.schema = schema - self.version = version - - -class DataMasking(_serialization.Model): - """DataMasking. - - :ivar query_params: Masking settings for Url query parameters. - :vartype query_params: list[~azure.mgmt.apimanagement.models.DataMaskingEntity] - :ivar headers: Masking settings for headers. - :vartype headers: list[~azure.mgmt.apimanagement.models.DataMaskingEntity] - """ - - _attribute_map = { - "query_params": {"key": "queryParams", "type": "[DataMaskingEntity]"}, - "headers": {"key": "headers", "type": "[DataMaskingEntity]"}, - } - - def __init__( - self, - *, - query_params: Optional[list["_models.DataMaskingEntity"]] = None, - headers: Optional[list["_models.DataMaskingEntity"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword query_params: Masking settings for Url query parameters. - :paramtype query_params: list[~azure.mgmt.apimanagement.models.DataMaskingEntity] - :keyword headers: Masking settings for headers. - :paramtype headers: list[~azure.mgmt.apimanagement.models.DataMaskingEntity] - """ - super().__init__(**kwargs) - self.query_params = query_params - self.headers = headers - - -class DataMaskingEntity(_serialization.Model): - """DataMaskingEntity. - - :ivar value: The name of an entity to mask (e.g. a name of a header or a query parameter). - :vartype value: str - :ivar mode: Data masking mode. Known values are: "Mask" and "Hide". - :vartype mode: str or ~azure.mgmt.apimanagement.models.DataMaskingMode - """ - - _attribute_map = { - "value": {"key": "value", "type": "str"}, - "mode": {"key": "mode", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[str] = None, - mode: Optional[Union[str, "_models.DataMaskingMode"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: The name of an entity to mask (e.g. a name of a header or a query parameter). - :paramtype value: str - :keyword mode: Data masking mode. Known values are: "Mask" and "Hide". - :paramtype mode: str or ~azure.mgmt.apimanagement.models.DataMaskingMode - """ - super().__init__(**kwargs) - self.value = value - self.mode = mode - - -class DeletedServiceContract(ProxyResource): - """Deleted API Management Service information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar location: API Management Service Master Location. - :vartype location: str - :ivar service_id: Fully-qualified API Management Service Resource ID. - :vartype service_id: str - :ivar scheduled_purge_date: UTC Date and Time when the service will be automatically purged. - The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 - standard. - :vartype scheduled_purge_date: ~datetime.datetime - :ivar deletion_date: UTC Timestamp when the service was soft-deleted. The date conforms to the - following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - :vartype deletion_date: ~datetime.datetime - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "location": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "location": {"key": "location", "type": "str"}, - "service_id": {"key": "properties.serviceId", "type": "str"}, - "scheduled_purge_date": {"key": "properties.scheduledPurgeDate", "type": "iso-8601"}, - "deletion_date": {"key": "properties.deletionDate", "type": "iso-8601"}, - } - - def __init__( - self, - *, - service_id: Optional[str] = None, - scheduled_purge_date: Optional[datetime.datetime] = None, - deletion_date: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword service_id: Fully-qualified API Management Service Resource ID. - :paramtype service_id: str - :keyword scheduled_purge_date: UTC Date and Time when the service will be automatically purged. - The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 - standard. - :paramtype scheduled_purge_date: ~datetime.datetime - :keyword deletion_date: UTC Timestamp when the service was soft-deleted. The date conforms to - the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - :paramtype deletion_date: ~datetime.datetime - """ - super().__init__(**kwargs) - self.location: Optional[str] = None - self.service_id = service_id - self.scheduled_purge_date = scheduled_purge_date - self.deletion_date = deletion_date - - -class DeletedServicesCollection(_serialization.Model): - """Paged deleted API Management Services List Representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.DeletedServiceContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[DeletedServiceContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.DeletedServiceContract"]] = None - self.next_link: Optional[str] = None - - -class DeployConfigurationParameters(_serialization.Model): - """Deploy Tenant Configuration Contract. - - :ivar branch: The name of the Git branch from which the configuration is to be deployed to the - configuration database. - :vartype branch: str - :ivar force: The value enforcing deleting subscriptions to products that are deleted in this - update. - :vartype force: bool - """ - - _attribute_map = { - "branch": {"key": "properties.branch", "type": "str"}, - "force": {"key": "properties.force", "type": "bool"}, - } - - def __init__(self, *, branch: Optional[str] = None, force: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword branch: The name of the Git branch from which the configuration is to be deployed to - the configuration database. - :paramtype branch: str - :keyword force: The value enforcing deleting subscriptions to products that are deleted in this - update. - :paramtype force: bool - """ - super().__init__(**kwargs) - self.branch = branch - self.force = force - - -class DiagnosticCollection(_serialization.Model): - """Paged Diagnostic list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.DiagnosticContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[DiagnosticContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.DiagnosticContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.DiagnosticContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class DiagnosticContract(ProxyResource): - """Diagnostic details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar always_log: Specifies for what type of messages sampling settings should not apply. - "allErrors" - :vartype always_log: str or ~azure.mgmt.apimanagement.models.AlwaysLog - :ivar logger_id: Resource Id of a target logger. - :vartype logger_id: str - :ivar sampling: Sampling settings for Diagnostic. - :vartype sampling: ~azure.mgmt.apimanagement.models.SamplingSettings - :ivar frontend: Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. - :vartype frontend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings - :ivar backend: Diagnostic settings for incoming/outgoing HTTP messages to the Backend. - :vartype backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings - :ivar large_language_model: Large Language Models diagnostic settings. - :vartype large_language_model: ~azure.mgmt.apimanagement.models.LLMDiagnosticSettings - :ivar log_client_ip: Log the ClientIP. Default is false. - :vartype log_client_ip: bool - :ivar http_correlation_protocol: Sets correlation protocol to use for Application Insights - diagnostics. Known values are: "None", "Legacy", and "W3C". - :vartype http_correlation_protocol: str or - ~azure.mgmt.apimanagement.models.HttpCorrelationProtocol - :ivar verbosity: The verbosity level applied to traces emitted by trace policies. Known values - are: "verbose", "information", and "error". - :vartype verbosity: str or ~azure.mgmt.apimanagement.models.Verbosity - :ivar operation_name_format: The format of the Operation Name for Application Insights - telemetries. Default is Name. Known values are: "Name" and "Url". - :vartype operation_name_format: str or ~azure.mgmt.apimanagement.models.OperationNameFormat - :ivar metrics: Emit custom metrics via emit-metric policy. Applicable only to Application - Insights diagnostic settings. - :vartype metrics: bool - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "always_log": {"key": "properties.alwaysLog", "type": "str"}, - "logger_id": {"key": "properties.loggerId", "type": "str"}, - "sampling": {"key": "properties.sampling", "type": "SamplingSettings"}, - "frontend": {"key": "properties.frontend", "type": "PipelineDiagnosticSettings"}, - "backend": {"key": "properties.backend", "type": "PipelineDiagnosticSettings"}, - "large_language_model": {"key": "properties.largeLanguageModel", "type": "LLMDiagnosticSettings"}, - "log_client_ip": {"key": "properties.logClientIp", "type": "bool"}, - "http_correlation_protocol": {"key": "properties.httpCorrelationProtocol", "type": "str"}, - "verbosity": {"key": "properties.verbosity", "type": "str"}, - "operation_name_format": {"key": "properties.operationNameFormat", "type": "str"}, - "metrics": {"key": "properties.metrics", "type": "bool"}, - } - - def __init__( - self, - *, - always_log: Optional[Union[str, "_models.AlwaysLog"]] = None, - logger_id: Optional[str] = None, - sampling: Optional["_models.SamplingSettings"] = None, - frontend: Optional["_models.PipelineDiagnosticSettings"] = None, - backend: Optional["_models.PipelineDiagnosticSettings"] = None, - large_language_model: Optional["_models.LLMDiagnosticSettings"] = None, - log_client_ip: Optional[bool] = None, - http_correlation_protocol: Optional[Union[str, "_models.HttpCorrelationProtocol"]] = None, - verbosity: Optional[Union[str, "_models.Verbosity"]] = None, - operation_name_format: Optional[Union[str, "_models.OperationNameFormat"]] = None, - metrics: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword always_log: Specifies for what type of messages sampling settings should not apply. - "allErrors" - :paramtype always_log: str or ~azure.mgmt.apimanagement.models.AlwaysLog - :keyword logger_id: Resource Id of a target logger. - :paramtype logger_id: str - :keyword sampling: Sampling settings for Diagnostic. - :paramtype sampling: ~azure.mgmt.apimanagement.models.SamplingSettings - :keyword frontend: Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. - :paramtype frontend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings - :keyword backend: Diagnostic settings for incoming/outgoing HTTP messages to the Backend. - :paramtype backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings - :keyword large_language_model: Large Language Models diagnostic settings. - :paramtype large_language_model: ~azure.mgmt.apimanagement.models.LLMDiagnosticSettings - :keyword log_client_ip: Log the ClientIP. Default is false. - :paramtype log_client_ip: bool - :keyword http_correlation_protocol: Sets correlation protocol to use for Application Insights - diagnostics. Known values are: "None", "Legacy", and "W3C". - :paramtype http_correlation_protocol: str or - ~azure.mgmt.apimanagement.models.HttpCorrelationProtocol - :keyword verbosity: The verbosity level applied to traces emitted by trace policies. Known - values are: "verbose", "information", and "error". - :paramtype verbosity: str or ~azure.mgmt.apimanagement.models.Verbosity - :keyword operation_name_format: The format of the Operation Name for Application Insights - telemetries. Default is Name. Known values are: "Name" and "Url". - :paramtype operation_name_format: str or ~azure.mgmt.apimanagement.models.OperationNameFormat - :keyword metrics: Emit custom metrics via emit-metric policy. Applicable only to Application - Insights diagnostic settings. - :paramtype metrics: bool - """ - super().__init__(**kwargs) - self.always_log = always_log - self.logger_id = logger_id - self.sampling = sampling - self.frontend = frontend - self.backend = backend - self.large_language_model = large_language_model - self.log_client_ip = log_client_ip - self.http_correlation_protocol = http_correlation_protocol - self.verbosity = verbosity - self.operation_name_format = operation_name_format - self.metrics = metrics - - -class DiagnosticUpdateContract(ProxyResource): - """Diagnostic details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar always_log: Specifies for what type of messages sampling settings should not apply. - "allErrors" - :vartype always_log: str or ~azure.mgmt.apimanagement.models.AlwaysLog - :ivar logger_id: Resource Id of a target logger. - :vartype logger_id: str - :ivar sampling: Sampling settings for Diagnostic. - :vartype sampling: ~azure.mgmt.apimanagement.models.SamplingSettings - :ivar frontend: Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. - :vartype frontend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings - :ivar backend: Diagnostic settings for incoming/outgoing HTTP messages to the Backend. - :vartype backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings - :ivar log_client_ip: Log the ClientIP. Default is false. - :vartype log_client_ip: bool - :ivar http_correlation_protocol: Sets correlation protocol to use for Application Insights - diagnostics. Known values are: "None", "Legacy", and "W3C". - :vartype http_correlation_protocol: str or - ~azure.mgmt.apimanagement.models.HttpCorrelationProtocol - :ivar verbosity: The verbosity level applied to traces emitted by trace policies. Known values - are: "verbose", "information", and "error". - :vartype verbosity: str or ~azure.mgmt.apimanagement.models.Verbosity - :ivar operation_name_format: The format of the Operation Name for Application Insights - telemetries. Default is Name. Known values are: "Name" and "Url". - :vartype operation_name_format: str or ~azure.mgmt.apimanagement.models.OperationNameFormat - :ivar metrics: Emit custom metrics via emit-metric policy. Applicable only to Application - Insights diagnostic settings. - :vartype metrics: bool - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "always_log": {"key": "properties.alwaysLog", "type": "str"}, - "logger_id": {"key": "properties.loggerId", "type": "str"}, - "sampling": {"key": "properties.sampling", "type": "SamplingSettings"}, - "frontend": {"key": "properties.frontend", "type": "PipelineDiagnosticSettings"}, - "backend": {"key": "properties.backend", "type": "PipelineDiagnosticSettings"}, - "log_client_ip": {"key": "properties.logClientIp", "type": "bool"}, - "http_correlation_protocol": {"key": "properties.httpCorrelationProtocol", "type": "str"}, - "verbosity": {"key": "properties.verbosity", "type": "str"}, - "operation_name_format": {"key": "properties.operationNameFormat", "type": "str"}, - "metrics": {"key": "properties.metrics", "type": "bool"}, - } - - def __init__( - self, - *, - always_log: Optional[Union[str, "_models.AlwaysLog"]] = None, - logger_id: Optional[str] = None, - sampling: Optional["_models.SamplingSettings"] = None, - frontend: Optional["_models.PipelineDiagnosticSettings"] = None, - backend: Optional["_models.PipelineDiagnosticSettings"] = None, - log_client_ip: Optional[bool] = None, - http_correlation_protocol: Optional[Union[str, "_models.HttpCorrelationProtocol"]] = None, - verbosity: Optional[Union[str, "_models.Verbosity"]] = None, - operation_name_format: Optional[Union[str, "_models.OperationNameFormat"]] = None, - metrics: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword always_log: Specifies for what type of messages sampling settings should not apply. - "allErrors" - :paramtype always_log: str or ~azure.mgmt.apimanagement.models.AlwaysLog - :keyword logger_id: Resource Id of a target logger. - :paramtype logger_id: str - :keyword sampling: Sampling settings for Diagnostic. - :paramtype sampling: ~azure.mgmt.apimanagement.models.SamplingSettings - :keyword frontend: Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. - :paramtype frontend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings - :keyword backend: Diagnostic settings for incoming/outgoing HTTP messages to the Backend. - :paramtype backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings - :keyword log_client_ip: Log the ClientIP. Default is false. - :paramtype log_client_ip: bool - :keyword http_correlation_protocol: Sets correlation protocol to use for Application Insights - diagnostics. Known values are: "None", "Legacy", and "W3C". - :paramtype http_correlation_protocol: str or - ~azure.mgmt.apimanagement.models.HttpCorrelationProtocol - :keyword verbosity: The verbosity level applied to traces emitted by trace policies. Known - values are: "verbose", "information", and "error". - :paramtype verbosity: str or ~azure.mgmt.apimanagement.models.Verbosity - :keyword operation_name_format: The format of the Operation Name for Application Insights - telemetries. Default is Name. Known values are: "Name" and "Url". - :paramtype operation_name_format: str or ~azure.mgmt.apimanagement.models.OperationNameFormat - :keyword metrics: Emit custom metrics via emit-metric policy. Applicable only to Application - Insights diagnostic settings. - :paramtype metrics: bool - """ - super().__init__(**kwargs) - self.always_log = always_log - self.logger_id = logger_id - self.sampling = sampling - self.frontend = frontend - self.backend = backend - self.log_client_ip = log_client_ip - self.http_correlation_protocol = http_correlation_protocol - self.verbosity = verbosity - self.operation_name_format = operation_name_format - self.metrics = metrics - - -class DocumentationCollection(_serialization.Model): - """Paged Documentation list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.DocumentationContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[DocumentationContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.DocumentationContract"]] = None - self.next_link: Optional[str] = None - - -class DocumentationContract(ProxyResource): - """Markdown documentation details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar title: documentation title. - :vartype title: str - :ivar content: Markdown documentation content. - :vartype content: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "title": {"key": "properties.title", "type": "str"}, - "content": {"key": "properties.content", "type": "str"}, - } - - def __init__(self, *, title: Optional[str] = None, content: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword title: documentation title. - :paramtype title: str - :keyword content: Markdown documentation content. - :paramtype content: str - """ - super().__init__(**kwargs) - self.title = title - self.content = content - - -class DocumentationUpdateContract(_serialization.Model): - """Documentation update contract details. - - :ivar title: documentation title. - :vartype title: str - :ivar content: Markdown documentation content. - :vartype content: str - """ - - _attribute_map = { - "title": {"key": "properties.title", "type": "str"}, - "content": {"key": "properties.content", "type": "str"}, - } - - def __init__(self, *, title: Optional[str] = None, content: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword title: documentation title. - :paramtype title: str - :keyword content: Markdown documentation content. - :paramtype content: str - """ - super().__init__(**kwargs) - self.title = title - self.content = content - - -class EmailTemplateCollection(_serialization.Model): - """Paged email template list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.EmailTemplateContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[EmailTemplateContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.EmailTemplateContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.EmailTemplateContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class EmailTemplateContract(ProxyResource): - """Email Template details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar subject: Subject of the Template. - :vartype subject: str - :ivar body: Email Template Body. This should be a valid XDocument. - :vartype body: str - :ivar title: Title of the Template. - :vartype title: str - :ivar description: Description of the Email Template. - :vartype description: str - :ivar is_default: Whether the template is the default template provided by API Management or - has been edited. - :vartype is_default: bool - :ivar parameters: Email Template Parameter values. - :vartype parameters: - list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "subject": {"max_length": 1000, "min_length": 1}, - "body": {"min_length": 1}, - "is_default": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "subject": {"key": "properties.subject", "type": "str"}, - "body": {"key": "properties.body", "type": "str"}, - "title": {"key": "properties.title", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "is_default": {"key": "properties.isDefault", "type": "bool"}, - "parameters": {"key": "properties.parameters", "type": "[EmailTemplateParametersContractProperties]"}, - } - - def __init__( - self, - *, - subject: Optional[str] = None, - body: Optional[str] = None, - title: Optional[str] = None, - description: Optional[str] = None, - parameters: Optional[list["_models.EmailTemplateParametersContractProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword subject: Subject of the Template. - :paramtype subject: str - :keyword body: Email Template Body. This should be a valid XDocument. - :paramtype body: str - :keyword title: Title of the Template. - :paramtype title: str - :keyword description: Description of the Email Template. - :paramtype description: str - :keyword parameters: Email Template Parameter values. - :paramtype parameters: - list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] - """ - super().__init__(**kwargs) - self.subject = subject - self.body = body - self.title = title - self.description = description - self.is_default: Optional[bool] = None - self.parameters = parameters - - -class EmailTemplateParametersContractProperties(_serialization.Model): # pylint: disable=name-too-long - """Email Template Parameter contract. - - :ivar name: Template parameter name. - :vartype name: str - :ivar title: Template parameter title. - :vartype title: str - :ivar description: Template parameter description. - :vartype description: str - """ - - _validation = { - "name": {"max_length": 256, "min_length": 1, "pattern": r"^[A-Za-z0-9-._]+$"}, - "title": {"max_length": 4096, "min_length": 1}, - "description": {"max_length": 256, "min_length": 1, "pattern": r"^[A-Za-z0-9-._]+$"}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "title": {"key": "title", "type": "str"}, - "description": {"key": "description", "type": "str"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - title: Optional[str] = None, - description: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Template parameter name. - :paramtype name: str - :keyword title: Template parameter title. - :paramtype title: str - :keyword description: Template parameter description. - :paramtype description: str - """ - super().__init__(**kwargs) - self.name = name - self.title = title - self.description = description - - -class EmailTemplateUpdateParameters(_serialization.Model): - """Email Template update Parameters. - - :ivar subject: Subject of the Template. - :vartype subject: str - :ivar title: Title of the Template. - :vartype title: str - :ivar description: Description of the Email Template. - :vartype description: str - :ivar body: Email Template Body. This should be a valid XDocument. - :vartype body: str - :ivar parameters: Email Template Parameter values. - :vartype parameters: - list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] - """ - - _validation = { - "subject": {"max_length": 1000, "min_length": 1}, - "body": {"min_length": 1}, - } - - _attribute_map = { - "subject": {"key": "properties.subject", "type": "str"}, - "title": {"key": "properties.title", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "body": {"key": "properties.body", "type": "str"}, - "parameters": {"key": "properties.parameters", "type": "[EmailTemplateParametersContractProperties]"}, - } - - def __init__( - self, - *, - subject: Optional[str] = None, - title: Optional[str] = None, - description: Optional[str] = None, - body: Optional[str] = None, - parameters: Optional[list["_models.EmailTemplateParametersContractProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword subject: Subject of the Template. - :paramtype subject: str - :keyword title: Title of the Template. - :paramtype title: str - :keyword description: Description of the Email Template. - :paramtype description: str - :keyword body: Email Template Body. This should be a valid XDocument. - :paramtype body: str - :keyword parameters: Email Template Parameter values. - :paramtype parameters: - list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] - """ - super().__init__(**kwargs) - self.subject = subject - self.title = title - self.description = description - self.body = body - self.parameters = parameters - - -class EndpointDependency(_serialization.Model): - """A domain name that a service is reached at. - - :ivar domain_name: The domain name of the dependency. - :vartype domain_name: str - :ivar endpoint_details: The Ports used when connecting to DomainName. - :vartype endpoint_details: list[~azure.mgmt.apimanagement.models.EndpointDetail] - """ - - _attribute_map = { - "domain_name": {"key": "domainName", "type": "str"}, - "endpoint_details": {"key": "endpointDetails", "type": "[EndpointDetail]"}, - } - - def __init__( - self, - *, - domain_name: Optional[str] = None, - endpoint_details: Optional[list["_models.EndpointDetail"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword domain_name: The domain name of the dependency. - :paramtype domain_name: str - :keyword endpoint_details: The Ports used when connecting to DomainName. - :paramtype endpoint_details: list[~azure.mgmt.apimanagement.models.EndpointDetail] - """ - super().__init__(**kwargs) - self.domain_name = domain_name - self.endpoint_details = endpoint_details - - -class EndpointDetail(_serialization.Model): - """Current TCP connectivity information from the Api Management Service to a single endpoint. - - :ivar port: The port an endpoint is connected to. - :vartype port: int - :ivar region: The region of the dependency. - :vartype region: str - """ - - _attribute_map = { - "port": {"key": "port", "type": "int"}, - "region": {"key": "region", "type": "str"}, - } - - def __init__(self, *, port: Optional[int] = None, region: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword port: The port an endpoint is connected to. - :paramtype port: int - :keyword region: The region of the dependency. - :paramtype region: str - """ - super().__init__(**kwargs) - self.port = port - self.region = region - - -class ErrorAdditionalInfo(_serialization.Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: JSON - """ - - _validation = { - "type": {"readonly": True}, - "info": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "info": {"key": "info", "type": "object"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[str] = None - self.info: Optional[JSON] = None - - -class ErrorDetail(_serialization.Model): - """The error detail. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.apimanagement.models.ErrorDetail] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.apimanagement.models.ErrorAdditionalInfo] - """ - - _validation = { - "code": {"readonly": True}, - "message": {"readonly": True}, - "target": {"readonly": True}, - "details": {"readonly": True}, - "additional_info": {"readonly": True}, - } - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "target": {"key": "target", "type": "str"}, - "details": {"key": "details", "type": "[ErrorDetail]"}, - "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.code: Optional[str] = None - self.message: Optional[str] = None - self.target: Optional[str] = None - self.details: Optional[list["_models.ErrorDetail"]] = None - self.additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = None - - -class ErrorFieldContract(_serialization.Model): - """Error Field contract. - - :ivar code: Property level error code. - :vartype code: str - :ivar message: Human-readable representation of property-level error. - :vartype message: str - :ivar target: Property name. - :vartype target: str - """ - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "target": {"key": "target", "type": "str"}, - } - - def __init__( - self, *, code: Optional[str] = None, message: Optional[str] = None, target: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword code: Property level error code. - :paramtype code: str - :keyword message: Human-readable representation of property-level error. - :paramtype message: str - :keyword target: Property name. - :paramtype target: str - """ - super().__init__(**kwargs) - self.code = code - self.message = message - self.target = target - - -class ErrorResponse(_serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed - operations. (This also follows the OData error response format.). - - :ivar error: The error object. - :vartype error: ~azure.mgmt.apimanagement.models.ErrorDetail - """ - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetail"}, - } - - def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: - """ - :keyword error: The error object. - :paramtype error: ~azure.mgmt.apimanagement.models.ErrorDetail - """ - super().__init__(**kwargs) - self.error = error - - -class ErrorResponseBody(_serialization.Model): - """Error Body contract. - - :ivar code: Service-defined error code. This code serves as a sub-status for the HTTP error - code specified in the response. - :vartype code: str - :ivar message: Human-readable representation of the error. - :vartype message: str - :ivar details: The list of invalid fields send in request, in case of validation error. - :vartype details: list[~azure.mgmt.apimanagement.models.ErrorFieldContract] - """ - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "details": {"key": "details", "type": "[ErrorFieldContract]"}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - message: Optional[str] = None, - details: Optional[list["_models.ErrorFieldContract"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword code: Service-defined error code. This code serves as a sub-status for the HTTP error - code specified in the response. - :paramtype code: str - :keyword message: Human-readable representation of the error. - :paramtype message: str - :keyword details: The list of invalid fields send in request, in case of validation error. - :paramtype details: list[~azure.mgmt.apimanagement.models.ErrorFieldContract] - """ - super().__init__(**kwargs) - self.code = code - self.message = message - self.details = details - - -class FailureStatusCodeRange(_serialization.Model): - """The failure http status code range. - - :ivar min: The minimum http status code. - :vartype min: int - :ivar max: The maximum http status code. - :vartype max: int - """ - - _validation = { - "min": {"maximum": 599, "minimum": 200}, - "max": {"maximum": 599, "minimum": 200}, - } - - _attribute_map = { - "min": {"key": "min", "type": "int"}, - "max": {"key": "max", "type": "int"}, - } - - def __init__( - self, - *, - min: Optional[int] = None, # pylint: disable=redefined-builtin - max: Optional[int] = None, # pylint: disable=redefined-builtin - **kwargs: Any - ) -> None: - """ - :keyword min: The minimum http status code. - :paramtype min: int - :keyword max: The maximum http status code. - :paramtype max: int - """ - super().__init__(**kwargs) - self.min = min - self.max = max - - -class FrontendConfiguration(_serialization.Model): - """Information regarding how the gateway should be exposed. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar default_hostname: The default hostname of the data-plane gateway to which requests can be - sent. This is only applicable for API gateway with Standard SKU. - :vartype default_hostname: str - """ - - _validation = { - "default_hostname": {"readonly": True}, - } - - _attribute_map = { - "default_hostname": {"key": "defaultHostname", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.default_hostname: Optional[str] = None - - -class GatewayCertificateAuthorityCollection(_serialization.Model): - """Paged Gateway certificate authority list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[GatewayCertificateAuthorityContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.GatewayCertificateAuthorityContract"]] = None - self.next_link: Optional[str] = None - - -class GatewayCertificateAuthorityContract(ProxyResource): - """Gateway certificate authority details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar is_trusted: Determines whether certificate authority is trusted. - :vartype is_trusted: bool - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "is_trusted": {"key": "properties.isTrusted", "type": "bool"}, - } - - def __init__(self, *, is_trusted: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword is_trusted: Determines whether certificate authority is trusted. - :paramtype is_trusted: bool - """ - super().__init__(**kwargs) - self.is_trusted = is_trusted - - -class GatewayCollection(_serialization.Model): - """Paged Gateway list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.GatewayContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[GatewayContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword count: Total record count number across all pages. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.GatewayContract"]] = None - self.count = count - self.next_link: Optional[str] = None - - -class GatewayConfigurationApi(_serialization.Model): - """Information regarding the Configuration API of the API Management gateway. This is only - applicable for API gateway with Standard SKU. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar hostname: Hostname to which the agent connects to propagate configuration to the cloud. - :vartype hostname: str - """ - - _validation = { - "hostname": {"readonly": True}, - } - - _attribute_map = { - "hostname": {"key": "hostname", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.hostname: Optional[str] = None - - -class GatewayContract(ProxyResource): - """Gateway details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar identity: The managed service identities assigned to this resource. - :vartype identity: ~azure.mgmt.apimanagement.models.ManagedServiceIdentity - :ivar location_data: Gateway location. - :vartype location_data: ~azure.mgmt.apimanagement.models.ResourceLocationDataContract - :ivar description: Gateway description. - :vartype description: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "description": {"max_length": 1000}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, - "location_data": {"key": "properties.locationData", "type": "ResourceLocationDataContract"}, - "description": {"key": "properties.description", "type": "str"}, - } - - def __init__( - self, - *, - identity: Optional["_models.ManagedServiceIdentity"] = None, - location_data: Optional["_models.ResourceLocationDataContract"] = None, - description: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword identity: The managed service identities assigned to this resource. - :paramtype identity: ~azure.mgmt.apimanagement.models.ManagedServiceIdentity - :keyword location_data: Gateway location. - :paramtype location_data: ~azure.mgmt.apimanagement.models.ResourceLocationDataContract - :keyword description: Gateway description. - :paramtype description: str - """ - super().__init__(**kwargs) - self.identity = identity - self.location_data = location_data - self.description = description - - -class GatewayDebugCredentialsContract(_serialization.Model): - """Gateway debug credentials. - - :ivar token: Gateway debug token. - :vartype token: str - """ - - _attribute_map = { - "token": {"key": "token", "type": "str"}, - } - - def __init__(self, *, token: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword token: Gateway debug token. - :paramtype token: str - """ - super().__init__(**kwargs) - self.token = token - - -class GatewayHostnameBindingCertificate(_serialization.Model): - """GatewayHostnameBindingCertificate. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar thumbprint: The thumbprint of the certificate. - :vartype thumbprint: str - :ivar subject: The subject of the certificate. - :vartype subject: str - :ivar expiry: The expiration date of the certificate. - :vartype expiry: ~datetime.datetime - """ - - _validation = { - "thumbprint": {"readonly": True}, - "subject": {"readonly": True}, - "expiry": {"readonly": True}, - } - - _attribute_map = { - "thumbprint": {"key": "thumbprint", "type": "str"}, - "subject": {"key": "subject", "type": "str"}, - "expiry": {"key": "expiry", "type": "iso-8601"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.thumbprint: Optional[str] = None - self.subject: Optional[str] = None - self.expiry: Optional[datetime.datetime] = None - - -class GatewayHostnameBindingKeyVault(_serialization.Model): - """GatewayHostnameBindingKeyVault. - - All required parameters must be populated in order to send to server. - - :ivar secret_id: The current provisioning state of the API Management gateway hostname binding. - Required. - :vartype secret_id: str - :ivar identity_client_id: The default hostname of the data-plane gateway. - :vartype identity_client_id: str - :ivar last_status: The last status of the Key Vault certificate fetch process. - :vartype last_status: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVaultLastStatus - """ - - _validation = { - "secret_id": {"required": True}, - } - - _attribute_map = { - "secret_id": {"key": "secretId", "type": "str"}, - "identity_client_id": {"key": "identityClientId", "type": "str"}, - "last_status": {"key": "lastStatus", "type": "GatewayHostnameBindingKeyVaultLastStatus"}, - } - - def __init__( - self, - *, - secret_id: str, - identity_client_id: Optional[str] = None, - last_status: Optional["_models.GatewayHostnameBindingKeyVaultLastStatus"] = None, - **kwargs: Any - ) -> None: - """ - :keyword secret_id: The current provisioning state of the API Management gateway hostname - binding. Required. - :paramtype secret_id: str - :keyword identity_client_id: The default hostname of the data-plane gateway. - :paramtype identity_client_id: str - :keyword last_status: The last status of the Key Vault certificate fetch process. - :paramtype last_status: - ~azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVaultLastStatus - """ - super().__init__(**kwargs) - self.secret_id = secret_id - self.identity_client_id = identity_client_id - self.last_status = last_status - - -class GatewayHostnameBindingKeyVaultLastStatus(_serialization.Model): - """GatewayHostnameBindingKeyVaultLastStatus. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The last status of the Key Vault certificate fetch process. Known values are: - "Success" and "Failed". - :vartype code: str or ~azure.mgmt.apimanagement.models.KeyVaultFetchCode - :ivar time_stamp_utc: The last time the Key Vault certificate fetch process was attempted. The - date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 - standard. - :vartype time_stamp_utc: ~datetime.datetime - :ivar last_success_time_stamp_utc: The last time the Key Vault certificate fetch process was - successful. Only when the fetch process has succeeded at least once and current state is - failed. The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by - the ISO 8601 standard. - :vartype last_success_time_stamp_utc: ~datetime.datetime - """ - - _validation = { - "code": {"readonly": True}, - "time_stamp_utc": {"readonly": True}, - "last_success_time_stamp_utc": {"readonly": True}, - } - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "time_stamp_utc": {"key": "timeStampUtc", "type": "iso-8601"}, - "last_success_time_stamp_utc": {"key": "lastSuccessTimeStampUtc", "type": "iso-8601"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.code: Optional[Union[str, "_models.KeyVaultFetchCode"]] = None - self.time_stamp_utc: Optional[datetime.datetime] = None - self.last_success_time_stamp_utc: Optional[datetime.datetime] = None - - -class GatewayHostnameBindingListResult(_serialization.Model): - """The response of the List API Management gateway hostname binding operation. - - All required parameters must be populated in order to send to server. - - :ivar value: Result of the List API Management gateway hostname binding operation. Required. - :vartype value: list[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] - :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list - of API Management gateway hostname bindings. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[GatewayHostnameBindingResource]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: list["_models.GatewayHostnameBindingResource"], next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: Result of the List API Management gateway hostname binding operation. Required. - :paramtype value: list[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] - :keyword next_link: Link to the next set of results. Not empty if Value contains incomplete - list of API Management gateway hostname bindings. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class GatewayHostnameBindingResource(ProxyResource): - """A single API Management gateway hostname binding resource in List or Get response. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar etag: ETag of the resource. - :vartype etag: str - :ivar provisioning_state: The current provisioning state of the API Management gateway hostname - binding. - :vartype provisioning_state: str - :ivar hostname: The default hostname of the data-plane gateway. Required. - :vartype hostname: str - :ivar key_vault: The link to the API Management service workspace. Required. - :vartype key_vault: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVault - :ivar certificate: The hostnames of the data-plane gateway to which requests can be sent. - :vartype certificate: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingCertificate - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "etag": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "hostname": {"required": True}, - "key_vault": {"required": True}, - "certificate": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "etag": {"key": "etag", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "hostname": {"key": "properties.hostname", "type": "str"}, - "key_vault": {"key": "properties.keyVault", "type": "GatewayHostnameBindingKeyVault"}, - "certificate": {"key": "properties.certificate", "type": "GatewayHostnameBindingCertificate"}, - } - - def __init__(self, *, hostname: str, key_vault: "_models.GatewayHostnameBindingKeyVault", **kwargs: Any) -> None: - """ - :keyword hostname: The default hostname of the data-plane gateway. Required. - :paramtype hostname: str - :keyword key_vault: The link to the API Management service workspace. Required. - :paramtype key_vault: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingKeyVault - """ - super().__init__(**kwargs) - self.etag: Optional[str] = None - self.provisioning_state: Optional[str] = None - self.hostname = hostname - self.key_vault = key_vault - self.certificate: Optional["_models.GatewayHostnameBindingCertificate"] = None - - -class GatewayHostnameConfigurationCollection(_serialization.Model): - """Paged Gateway hostname configuration list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[GatewayHostnameConfigurationContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.GatewayHostnameConfigurationContract"]] = None - self.next_link: Optional[str] = None - - -class GatewayHostnameConfigurationContract(ProxyResource): - """Gateway hostname configuration details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar hostname: Hostname value. Supports valid domain name, partial or full wildcard. - :vartype hostname: str - :ivar certificate_id: Identifier of Certificate entity that will be used for TLS connection - establishment. - :vartype certificate_id: str - :ivar negotiate_client_certificate: Determines whether gateway requests client certificate. - :vartype negotiate_client_certificate: bool - :ivar tls10_enabled: Specifies if TLS 1.0 is supported. - :vartype tls10_enabled: bool - :ivar tls11_enabled: Specifies if TLS 1.1 is supported. - :vartype tls11_enabled: bool - :ivar http2_enabled: Specifies if HTTP/2.0 is supported. - :vartype http2_enabled: bool - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "hostname": {"key": "properties.hostname", "type": "str"}, - "certificate_id": {"key": "properties.certificateId", "type": "str"}, - "negotiate_client_certificate": {"key": "properties.negotiateClientCertificate", "type": "bool"}, - "tls10_enabled": {"key": "properties.tls10Enabled", "type": "bool"}, - "tls11_enabled": {"key": "properties.tls11Enabled", "type": "bool"}, - "http2_enabled": {"key": "properties.http2Enabled", "type": "bool"}, - } - - def __init__( - self, - *, - hostname: Optional[str] = None, - certificate_id: Optional[str] = None, - negotiate_client_certificate: Optional[bool] = None, - tls10_enabled: Optional[bool] = None, - tls11_enabled: Optional[bool] = None, - http2_enabled: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword hostname: Hostname value. Supports valid domain name, partial or full wildcard. - :paramtype hostname: str - :keyword certificate_id: Identifier of Certificate entity that will be used for TLS connection - establishment. - :paramtype certificate_id: str - :keyword negotiate_client_certificate: Determines whether gateway requests client certificate. - :paramtype negotiate_client_certificate: bool - :keyword tls10_enabled: Specifies if TLS 1.0 is supported. - :paramtype tls10_enabled: bool - :keyword tls11_enabled: Specifies if TLS 1.1 is supported. - :paramtype tls11_enabled: bool - :keyword http2_enabled: Specifies if HTTP/2.0 is supported. - :paramtype http2_enabled: bool - """ - super().__init__(**kwargs) - self.hostname = hostname - self.certificate_id = certificate_id - self.negotiate_client_certificate = negotiate_client_certificate - self.tls10_enabled = tls10_enabled - self.tls11_enabled = tls11_enabled - self.http2_enabled = http2_enabled - - -class GatewayKeyRegenerationRequestContract(_serialization.Model): - """Gateway key regeneration request contract properties. - - All required parameters must be populated in order to send to server. - - :ivar key_type: The Key being regenerated. Required. Known values are: "primary" and - "secondary". - :vartype key_type: str or ~azure.mgmt.apimanagement.models.KeyType - """ - - _validation = { - "key_type": {"required": True}, - } - - _attribute_map = { - "key_type": {"key": "keyType", "type": "str"}, - } - - def __init__(self, *, key_type: Union[str, "_models.KeyType"], **kwargs: Any) -> None: - """ - :keyword key_type: The Key being regenerated. Required. Known values are: "primary" and - "secondary". - :paramtype key_type: str or ~azure.mgmt.apimanagement.models.KeyType - """ - super().__init__(**kwargs) - self.key_type = key_type - - -class GatewayKeysContract(_serialization.Model): - """Gateway authentication keys. - - :ivar primary: Primary gateway key. - :vartype primary: str - :ivar secondary: Secondary gateway key. - :vartype secondary: str - """ - - _attribute_map = { - "primary": {"key": "primary", "type": "str"}, - "secondary": {"key": "secondary", "type": "str"}, - } - - def __init__(self, *, primary: Optional[str] = None, secondary: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword primary: Primary gateway key. - :paramtype primary: str - :keyword secondary: Secondary gateway key. - :paramtype secondary: str - """ - super().__init__(**kwargs) - self.primary = primary - self.secondary = secondary - - -class GatewayListDebugCredentialsContract(_serialization.Model): - """List debug credentials properties. - - All required parameters must be populated in order to send to server. - - :ivar credentials_expire_after: Credentials expiration in ISO8601 format. Maximum duration of - the credentials is PT1H. When property is not specified, them value PT1H is used. - :vartype credentials_expire_after: ~datetime.timedelta - :ivar purposes: Purposes of debug credential. Required. - :vartype purposes: list[str or - ~azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContractPurpose] - :ivar api_id: Full resource Id of an API. Required. - :vartype api_id: str - """ - - _validation = { - "purposes": {"required": True}, - "api_id": {"required": True}, - } - - _attribute_map = { - "credentials_expire_after": {"key": "credentialsExpireAfter", "type": "duration"}, - "purposes": {"key": "purposes", "type": "[str]"}, - "api_id": {"key": "apiId", "type": "str"}, - } - - def __init__( - self, - *, - purposes: list[Union[str, "_models.GatewayListDebugCredentialsContractPurpose"]], - api_id: str, - credentials_expire_after: Optional[datetime.timedelta] = None, - **kwargs: Any - ) -> None: - """ - :keyword credentials_expire_after: Credentials expiration in ISO8601 format. Maximum duration - of the credentials is PT1H. When property is not specified, them value PT1H is used. - :paramtype credentials_expire_after: ~datetime.timedelta - :keyword purposes: Purposes of debug credential. Required. - :paramtype purposes: list[str or - ~azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContractPurpose] - :keyword api_id: Full resource Id of an API. Required. - :paramtype api_id: str - """ - super().__init__(**kwargs) - self.credentials_expire_after = credentials_expire_after - self.purposes = purposes - self.api_id = api_id - - -class GatewayListTraceContract(_serialization.Model): - """List trace properties. - - :ivar trace_id: Trace id. - :vartype trace_id: str - """ - - _attribute_map = { - "trace_id": {"key": "traceId", "type": "str"}, - } - - def __init__(self, *, trace_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword trace_id: Trace id. - :paramtype trace_id: str - """ - super().__init__(**kwargs) - self.trace_id = trace_id - - -class GatewayResourceSkuResult(_serialization.Model): - """Describes an available API Management gateway SKU. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar sku: Specifies API Management gateway SKU. - :vartype sku: ~azure.mgmt.apimanagement.models.GatewaySku - :ivar capacity: Specifies the number of API Management gateway units. - :vartype capacity: ~azure.mgmt.apimanagement.models.GatewaySkuCapacity - """ - - _validation = { - "resource_type": {"readonly": True}, - "sku": {"readonly": True}, - "capacity": {"readonly": True}, - } - - _attribute_map = { - "resource_type": {"key": "resourceType", "type": "str"}, - "sku": {"key": "sku", "type": "GatewaySku"}, - "capacity": {"key": "capacity", "type": "GatewaySkuCapacity"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.resource_type: Optional[str] = None - self.sku: Optional["_models.GatewaySku"] = None - self.capacity: Optional["_models.GatewaySkuCapacity"] = None - - -class GatewayResourceSkuResults(_serialization.Model): - """The API Management gateway SKUs operation response. - - All required parameters must be populated in order to send to server. - - :ivar value: The list of skus available for the gateway. Required. - :vartype value: list[~azure.mgmt.apimanagement.models.GatewayResourceSkuResult] - :ivar next_link: The uri to fetch the next page of API Management gateway Skus. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[GatewayResourceSkuResult]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: list["_models.GatewayResourceSkuResult"], next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of skus available for the gateway. Required. - :paramtype value: list[~azure.mgmt.apimanagement.models.GatewayResourceSkuResult] - :keyword next_link: The uri to fetch the next page of API Management gateway Skus. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class GatewaySku(_serialization.Model): - """Describes an available API Management SKU for gateways. - - :ivar name: Name of the Sku. Known values are: "Standard", "WorkspaceGatewayStandard", and - "WorkspaceGatewayPremium". - :vartype name: str or ~azure.mgmt.apimanagement.models.ApiGatewaySkuType - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - } - - def __init__(self, *, name: Optional[Union[str, "_models.ApiGatewaySkuType"]] = None, **kwargs: Any) -> None: - """ - :keyword name: Name of the Sku. Known values are: "Standard", "WorkspaceGatewayStandard", and - "WorkspaceGatewayPremium". - :paramtype name: str or ~azure.mgmt.apimanagement.models.ApiGatewaySkuType - """ - super().__init__(**kwargs) - self.name = name - - -class GatewaySkuCapacity(_serialization.Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: int - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: int - :ivar default: The default capacity. - :vartype default: int - :ivar scale_type: The scale type applicable to the sku. Known values are: "Automatic", - "Manual", and "None". - :vartype scale_type: str or ~azure.mgmt.apimanagement.models.GatewaySkuCapacityScaleType - """ - - _validation = { - "minimum": {"readonly": True}, - "maximum": {"readonly": True}, - "default": {"readonly": True}, - "scale_type": {"readonly": True}, - } - - _attribute_map = { - "minimum": {"key": "minimum", "type": "int"}, - "maximum": {"key": "maximum", "type": "int"}, - "default": {"key": "default", "type": "int"}, - "scale_type": {"key": "scaleType", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.minimum: Optional[int] = None - self.maximum: Optional[int] = None - self.default: Optional[int] = None - self.scale_type: Optional[Union[str, "_models.GatewaySkuCapacityScaleType"]] = None - - -class GatewayTokenContract(_serialization.Model): - """Gateway access token. - - :ivar value: Shared Access Authentication token value for the Gateway. - :vartype value: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, *, value: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword value: Shared Access Authentication token value for the Gateway. - :paramtype value: str - """ - super().__init__(**kwargs) - self.value = value - - -class GatewayTokenRequestContract(_serialization.Model): - """Gateway token request contract properties. - - All required parameters must be populated in order to send to server. - - :ivar key_type: The Key to be used to generate gateway token. Required. Known values are: - "primary" and "secondary". - :vartype key_type: str or ~azure.mgmt.apimanagement.models.KeyType - :ivar expiry: The Expiry time of the Token. Maximum token expiry time is set to 30 days. The - date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 - standard. Required. - :vartype expiry: ~datetime.datetime - """ - - _validation = { - "key_type": {"required": True}, - "expiry": {"required": True}, - } - - _attribute_map = { - "key_type": {"key": "keyType", "type": "str"}, - "expiry": {"key": "expiry", "type": "iso-8601"}, - } - - def __init__(self, *, key_type: Union[str, "_models.KeyType"], expiry: datetime.datetime, **kwargs: Any) -> None: - """ - :keyword key_type: The Key to be used to generate gateway token. Required. Known values are: - "primary" and "secondary". - :paramtype key_type: str or ~azure.mgmt.apimanagement.models.KeyType - :keyword expiry: The Expiry time of the Token. Maximum token expiry time is set to 30 days. The - date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 - standard. Required. - :paramtype expiry: ~datetime.datetime - """ - super().__init__(**kwargs) - self.key_type = key_type - self.expiry = expiry - - -class GenerateSsoUrlResult(_serialization.Model): - """Generate SSO Url operations response details. - - :ivar value: Redirect Url containing the SSO URL value. - :vartype value: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, *, value: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword value: Redirect Url containing the SSO URL value. - :paramtype value: str - """ - super().__init__(**kwargs) - self.value = value - - -class GlobalSchemaCollection(_serialization.Model): - """The response of the list schema operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Global Schema Contract value. - :vartype value: list[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :ivar count: Total record count number. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[GlobalSchemaContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword count: Total record count number. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.GlobalSchemaContract"]] = None - self.count = count - self.next_link: Optional[str] = None - - -class GlobalSchemaContract(ProxyResource): - """Global Schema Contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar schema_type: Schema Type. Immutable. Known values are: "xml" and "json". - :vartype schema_type: str or ~azure.mgmt.apimanagement.models.SchemaType - :ivar description: Free-form schema entity description. - :vartype description: str - :ivar value: Json-encoded string for non json-based schema. - :vartype value: any - :ivar document: Global Schema document object for json-based schema formats(e.g. json schema). - :vartype document: JSON - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "schema_type": {"key": "properties.schemaType", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "value": {"key": "properties.value", "type": "object"}, - "document": {"key": "properties.document", "type": "object"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - schema_type: Optional[Union[str, "_models.SchemaType"]] = None, - description: Optional[str] = None, - value: Optional[Any] = None, - document: Optional[JSON] = None, - **kwargs: Any - ) -> None: - """ - :keyword schema_type: Schema Type. Immutable. Known values are: "xml" and "json". - :paramtype schema_type: str or ~azure.mgmt.apimanagement.models.SchemaType - :keyword description: Free-form schema entity description. - :paramtype description: str - :keyword value: Json-encoded string for non json-based schema. - :paramtype value: any - :keyword document: Global Schema document object for json-based schema formats(e.g. json - schema). - :paramtype document: JSON - """ - super().__init__(**kwargs) - self.schema_type = schema_type - self.description = description - self.value = value - self.document = document - self.provisioning_state: Optional[str] = None - - -class GroupCollection(_serialization.Model): - """Paged Group list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.GroupContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[GroupContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.GroupContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.GroupContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class GroupContract(ProxyResource): - """Contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar display_name: Group name. - :vartype display_name: str - :ivar description: Group description. Can contain HTML formatting tags. - :vartype description: str - :ivar built_in: true if the group is one of the three system groups (Administrators, - Developers, or Guests); otherwise false. - :vartype built_in: bool - :ivar type_properties_type: Group type. Known values are: "custom", "system", and "external". - :vartype type_properties_type: str or ~azure.mgmt.apimanagement.models.GroupType - :ivar external_id: For external groups, this property contains the id of the group from the - external identity provider, e.g. for Azure Active Directory - ``aad://.onmicrosoft.com/groups/``\\ ; otherwise the value is null. - :vartype external_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "display_name": {"max_length": 300, "min_length": 1}, - "description": {"max_length": 1000}, - "built_in": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "built_in": {"key": "properties.builtIn", "type": "bool"}, - "type_properties_type": {"key": "properties.type", "type": "str"}, - "external_id": {"key": "properties.externalId", "type": "str"}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - description: Optional[str] = None, - type_properties_type: Optional[Union[str, "_models.GroupType"]] = None, - external_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword display_name: Group name. - :paramtype display_name: str - :keyword description: Group description. Can contain HTML formatting tags. - :paramtype description: str - :keyword type_properties_type: Group type. Known values are: "custom", "system", and - "external". - :paramtype type_properties_type: str or ~azure.mgmt.apimanagement.models.GroupType - :keyword external_id: For external groups, this property contains the id of the group from the - external identity provider, e.g. for Azure Active Directory - ``aad://.onmicrosoft.com/groups/``\\ ; otherwise the value is null. - :paramtype external_id: str - """ - super().__init__(**kwargs) - self.display_name = display_name - self.description = description - self.built_in: Optional[bool] = None - self.type_properties_type = type_properties_type - self.external_id = external_id - - -class GroupContractProperties(_serialization.Model): - """Group contract Properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar display_name: Group name. Required. - :vartype display_name: str - :ivar description: Group description. Can contain HTML formatting tags. - :vartype description: str - :ivar built_in: true if the group is one of the three system groups (Administrators, - Developers, or Guests); otherwise false. - :vartype built_in: bool - :ivar type: Group type. Known values are: "custom", "system", and "external". - :vartype type: str or ~azure.mgmt.apimanagement.models.GroupType - :ivar external_id: For external groups, this property contains the id of the group from the - external identity provider, e.g. for Azure Active Directory - ``aad://.onmicrosoft.com/groups/``\\ ; otherwise the value is null. - :vartype external_id: str - """ - - _validation = { - "display_name": {"required": True, "max_length": 300, "min_length": 1}, - "description": {"max_length": 1000}, - "built_in": {"readonly": True}, - } - - _attribute_map = { - "display_name": {"key": "displayName", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "built_in": {"key": "builtIn", "type": "bool"}, - "type": {"key": "type", "type": "str"}, - "external_id": {"key": "externalId", "type": "str"}, - } - - def __init__( - self, - *, - display_name: str, - description: Optional[str] = None, - type: Optional[Union[str, "_models.GroupType"]] = None, - external_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword display_name: Group name. Required. - :paramtype display_name: str - :keyword description: Group description. Can contain HTML formatting tags. - :paramtype description: str - :keyword type: Group type. Known values are: "custom", "system", and "external". - :paramtype type: str or ~azure.mgmt.apimanagement.models.GroupType - :keyword external_id: For external groups, this property contains the id of the group from the - external identity provider, e.g. for Azure Active Directory - ``aad://.onmicrosoft.com/groups/``\\ ; otherwise the value is null. - :paramtype external_id: str - """ - super().__init__(**kwargs) - self.display_name = display_name - self.description = description - self.built_in: Optional[bool] = None - self.type = type - self.external_id = external_id - - -class GroupCreateParameters(_serialization.Model): - """Parameters supplied to the Create Group operation. - - :ivar display_name: Group name. - :vartype display_name: str - :ivar description: Group description. - :vartype description: str - :ivar type: Group type. Known values are: "custom", "system", and "external". - :vartype type: str or ~azure.mgmt.apimanagement.models.GroupType - :ivar external_id: Identifier of the external groups, this property contains the id of the - group from the external identity provider, e.g. for Azure Active Directory - ``aad://.onmicrosoft.com/groups/``\\ ; otherwise the value is null. - :vartype external_id: str - """ - - _validation = { - "display_name": {"max_length": 300, "min_length": 1}, - } - - _attribute_map = { - "display_name": {"key": "properties.displayName", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "type": {"key": "properties.type", "type": "str"}, - "external_id": {"key": "properties.externalId", "type": "str"}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - description: Optional[str] = None, - type: Optional[Union[str, "_models.GroupType"]] = None, - external_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword display_name: Group name. - :paramtype display_name: str - :keyword description: Group description. - :paramtype description: str - :keyword type: Group type. Known values are: "custom", "system", and "external". - :paramtype type: str or ~azure.mgmt.apimanagement.models.GroupType - :keyword external_id: Identifier of the external groups, this property contains the id of the - group from the external identity provider, e.g. for Azure Active Directory - ``aad://.onmicrosoft.com/groups/``\\ ; otherwise the value is null. - :paramtype external_id: str - """ - super().__init__(**kwargs) - self.display_name = display_name - self.description = description - self.type = type - self.external_id = external_id - - -class GroupUpdateParameters(_serialization.Model): - """Parameters supplied to the Update Group operation. - - :ivar display_name: Group name. - :vartype display_name: str - :ivar description: Group description. - :vartype description: str - :ivar type: Group type. Known values are: "custom", "system", and "external". - :vartype type: str or ~azure.mgmt.apimanagement.models.GroupType - :ivar external_id: Identifier of the external groups, this property contains the id of the - group from the external identity provider, e.g. for Azure Active Directory - ``aad://.onmicrosoft.com/groups/``\\ ; otherwise the value is null. - :vartype external_id: str - """ - - _validation = { - "display_name": {"max_length": 300, "min_length": 1}, - } - - _attribute_map = { - "display_name": {"key": "properties.displayName", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "type": {"key": "properties.type", "type": "str"}, - "external_id": {"key": "properties.externalId", "type": "str"}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - description: Optional[str] = None, - type: Optional[Union[str, "_models.GroupType"]] = None, - external_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword display_name: Group name. - :paramtype display_name: str - :keyword description: Group description. - :paramtype description: str - :keyword type: Group type. Known values are: "custom", "system", and "external". - :paramtype type: str or ~azure.mgmt.apimanagement.models.GroupType - :keyword external_id: Identifier of the external groups, this property contains the id of the - group from the external identity provider, e.g. for Azure Active Directory - ``aad://.onmicrosoft.com/groups/``\\ ; otherwise the value is null. - :paramtype external_id: str - """ - super().__init__(**kwargs) - self.display_name = display_name - self.description = description - self.type = type - self.external_id = external_id - - -class HostnameConfiguration(_serialization.Model): - """Custom hostname configuration. - - All required parameters must be populated in order to send to server. - - :ivar type: Hostname type. Required. Known values are: "Proxy", "Portal", "Management", "Scm", - "DeveloperPortal", and "ConfigurationApi". - :vartype type: str or ~azure.mgmt.apimanagement.models.HostnameType - :ivar host_name: Hostname to configure on the Api Management service. Required. - :vartype host_name: str - :ivar key_vault_id: Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url - containing version is provided, auto-update of ssl certificate will not work. This requires Api - Management service to be configured with aka.ms/apimmsi. The secret should be of type - *application/x-pkcs12*. - :vartype key_vault_id: str - :ivar identity_client_id: System or User Assigned Managed identity clientId as generated by - Azure AD, which has GET access to the keyVault containing the SSL certificate. - :vartype identity_client_id: str - :ivar encoded_certificate: Base64 Encoded certificate. - :vartype encoded_certificate: str - :ivar certificate_password: Certificate Password. - :vartype certificate_password: str - :ivar default_ssl_binding: Specify true to setup the certificate associated with this Hostname - as the Default SSL Certificate. If a client does not send the SNI header, then this will be the - certificate that will be challenged. The property is useful if a service has multiple custom - hostname enabled and it needs to decide on the default ssl certificate. The setting only - applied to gateway Hostname Type. - :vartype default_ssl_binding: bool - :ivar negotiate_client_certificate: Specify true to always negotiate client certificate on the - hostname. Default Value is false. - :vartype negotiate_client_certificate: bool - :ivar certificate: Certificate information. - :vartype certificate: ~azure.mgmt.apimanagement.models.CertificateInformation - :ivar certificate_source: Certificate Source. Known values are: "Managed", "KeyVault", - "Custom", and "BuiltIn". - :vartype certificate_source: str or ~azure.mgmt.apimanagement.models.CertificateSource - :ivar certificate_status: Certificate Status. Known values are: "Completed", "Failed", and - "InProgress". - :vartype certificate_status: str or ~azure.mgmt.apimanagement.models.CertificateStatus - """ - - _validation = { - "type": {"required": True}, - "host_name": {"required": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "host_name": {"key": "hostName", "type": "str"}, - "key_vault_id": {"key": "keyVaultId", "type": "str"}, - "identity_client_id": {"key": "identityClientId", "type": "str"}, - "encoded_certificate": {"key": "encodedCertificate", "type": "str"}, - "certificate_password": {"key": "certificatePassword", "type": "str"}, - "default_ssl_binding": {"key": "defaultSslBinding", "type": "bool"}, - "negotiate_client_certificate": {"key": "negotiateClientCertificate", "type": "bool"}, - "certificate": {"key": "certificate", "type": "CertificateInformation"}, - "certificate_source": {"key": "certificateSource", "type": "str"}, - "certificate_status": {"key": "certificateStatus", "type": "str"}, - } - - def __init__( - self, - *, - type: Union[str, "_models.HostnameType"], - host_name: str, - key_vault_id: Optional[str] = None, - identity_client_id: Optional[str] = None, - encoded_certificate: Optional[str] = None, - certificate_password: Optional[str] = None, - default_ssl_binding: bool = False, - negotiate_client_certificate: bool = False, - certificate: Optional["_models.CertificateInformation"] = None, - certificate_source: Optional[Union[str, "_models.CertificateSource"]] = None, - certificate_status: Optional[Union[str, "_models.CertificateStatus"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: Hostname type. Required. Known values are: "Proxy", "Portal", "Management", - "Scm", "DeveloperPortal", and "ConfigurationApi". - :paramtype type: str or ~azure.mgmt.apimanagement.models.HostnameType - :keyword host_name: Hostname to configure on the Api Management service. Required. - :paramtype host_name: str - :keyword key_vault_id: Url to the KeyVault Secret containing the Ssl Certificate. If absolute - Url containing version is provided, auto-update of ssl certificate will not work. This requires - Api Management service to be configured with aka.ms/apimmsi. The secret should be of type - *application/x-pkcs12*. - :paramtype key_vault_id: str - :keyword identity_client_id: System or User Assigned Managed identity clientId as generated by - Azure AD, which has GET access to the keyVault containing the SSL certificate. - :paramtype identity_client_id: str - :keyword encoded_certificate: Base64 Encoded certificate. - :paramtype encoded_certificate: str - :keyword certificate_password: Certificate Password. - :paramtype certificate_password: str - :keyword default_ssl_binding: Specify true to setup the certificate associated with this - Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this - will be the certificate that will be challenged. The property is useful if a service has - multiple custom hostname enabled and it needs to decide on the default ssl certificate. The - setting only applied to gateway Hostname Type. - :paramtype default_ssl_binding: bool - :keyword negotiate_client_certificate: Specify true to always negotiate client certificate on - the hostname. Default Value is false. - :paramtype negotiate_client_certificate: bool - :keyword certificate: Certificate information. - :paramtype certificate: ~azure.mgmt.apimanagement.models.CertificateInformation - :keyword certificate_source: Certificate Source. Known values are: "Managed", "KeyVault", - "Custom", and "BuiltIn". - :paramtype certificate_source: str or ~azure.mgmt.apimanagement.models.CertificateSource - :keyword certificate_status: Certificate Status. Known values are: "Completed", "Failed", and - "InProgress". - :paramtype certificate_status: str or ~azure.mgmt.apimanagement.models.CertificateStatus - """ - super().__init__(**kwargs) - self.type = type - self.host_name = host_name - self.key_vault_id = key_vault_id - self.identity_client_id = identity_client_id - self.encoded_certificate = encoded_certificate - self.certificate_password = certificate_password - self.default_ssl_binding = default_ssl_binding - self.negotiate_client_certificate = negotiate_client_certificate - self.certificate = certificate - self.certificate_source = certificate_source - self.certificate_status = certificate_status - - -class HTTPHeader(_serialization.Model): - """HTTP header and it's value. - - All required parameters must be populated in order to send to server. - - :ivar name: Header name. Required. - :vartype name: str - :ivar value: Header value. Required. - :vartype value: str - """ - - _validation = { - "name": {"required": True}, - "value": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, *, name: str, value: str, **kwargs: Any) -> None: - """ - :keyword name: Header name. Required. - :paramtype name: str - :keyword value: Header value. Required. - :paramtype value: str - """ - super().__init__(**kwargs) - self.name = name - self.value = value - - -class HttpMessageDiagnostic(_serialization.Model): - """Http message diagnostic settings. - - :ivar headers: Array of HTTP Headers to log. - :vartype headers: list[str] - :ivar body: Body logging settings. - :vartype body: ~azure.mgmt.apimanagement.models.BodyDiagnosticSettings - :ivar data_masking: Data masking settings. - :vartype data_masking: ~azure.mgmt.apimanagement.models.DataMasking - """ - - _attribute_map = { - "headers": {"key": "headers", "type": "[str]"}, - "body": {"key": "body", "type": "BodyDiagnosticSettings"}, - "data_masking": {"key": "dataMasking", "type": "DataMasking"}, - } - - def __init__( - self, - *, - headers: Optional[list[str]] = None, - body: Optional["_models.BodyDiagnosticSettings"] = None, - data_masking: Optional["_models.DataMasking"] = None, - **kwargs: Any - ) -> None: - """ - :keyword headers: Array of HTTP Headers to log. - :paramtype headers: list[str] - :keyword body: Body logging settings. - :paramtype body: ~azure.mgmt.apimanagement.models.BodyDiagnosticSettings - :keyword data_masking: Data masking settings. - :paramtype data_masking: ~azure.mgmt.apimanagement.models.DataMasking - """ - super().__init__(**kwargs) - self.headers = headers - self.body = body - self.data_masking = data_masking - - -class IdentityProviderBaseParameters(_serialization.Model): - """Identity Provider Base Parameter Properties. - - :ivar type: Identity Provider Type identifier. Known values are: "facebook", "google", - "microsoft", "twitter", "aad", and "aadB2C". - :vartype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :ivar signin_tenant: The TenantId to use instead of Common when logging into Active Directory. - :vartype signin_tenant: str - :ivar allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. - :vartype allowed_tenants: list[str] - :ivar authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :vartype authority: str - :ivar signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signup_policy_name: str - :ivar signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signin_policy_name: str - :ivar profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :vartype profile_editing_policy_name: str - :ivar password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C Identity - Provider. - :vartype password_reset_policy_name: str - :ivar client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :vartype client_library: str - """ - - _validation = { - "allowed_tenants": {"max_items": 32, "min_items": 0}, - "signup_policy_name": {"min_length": 1}, - "signin_policy_name": {"min_length": 1}, - "profile_editing_policy_name": {"min_length": 1}, - "password_reset_policy_name": {"min_length": 1}, - "client_library": {"max_length": 16}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "signin_tenant": {"key": "signinTenant", "type": "str"}, - "allowed_tenants": {"key": "allowedTenants", "type": "[str]"}, - "authority": {"key": "authority", "type": "str"}, - "signup_policy_name": {"key": "signupPolicyName", "type": "str"}, - "signin_policy_name": {"key": "signinPolicyName", "type": "str"}, - "profile_editing_policy_name": {"key": "profileEditingPolicyName", "type": "str"}, - "password_reset_policy_name": {"key": "passwordResetPolicyName", "type": "str"}, - "client_library": {"key": "clientLibrary", "type": "str"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.IdentityProviderType"]] = None, - signin_tenant: Optional[str] = None, - allowed_tenants: Optional[list[str]] = None, - authority: Optional[str] = None, - signup_policy_name: Optional[str] = None, - signin_policy_name: Optional[str] = None, - profile_editing_policy_name: Optional[str] = None, - password_reset_policy_name: Optional[str] = None, - client_library: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: Identity Provider Type identifier. Known values are: "facebook", "google", - "microsoft", "twitter", "aad", and "aadB2C". - :paramtype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :keyword signin_tenant: The TenantId to use instead of Common when logging into Active - Directory. - :paramtype signin_tenant: str - :keyword allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory - login. - :paramtype allowed_tenants: list[str] - :keyword authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :paramtype authority: str - :keyword signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signup_policy_name: str - :keyword signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signin_policy_name: str - :keyword profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype profile_editing_policy_name: str - :keyword password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype password_reset_policy_name: str - :keyword client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :paramtype client_library: str - """ - super().__init__(**kwargs) - self.type = type - self.signin_tenant = signin_tenant - self.allowed_tenants = allowed_tenants - self.authority = authority - self.signup_policy_name = signup_policy_name - self.signin_policy_name = signin_policy_name - self.profile_editing_policy_name = profile_editing_policy_name - self.password_reset_policy_name = password_reset_policy_name - self.client_library = client_library - - -class IdentityProviderContract(ProxyResource): - """Identity Provider details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar type_properties_type: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". - :vartype type_properties_type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :ivar signin_tenant: The TenantId to use instead of Common when logging into Active Directory. - :vartype signin_tenant: str - :ivar allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. - :vartype allowed_tenants: list[str] - :ivar authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :vartype authority: str - :ivar signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signup_policy_name: str - :ivar signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signin_policy_name: str - :ivar profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :vartype profile_editing_policy_name: str - :ivar password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C Identity - Provider. - :vartype password_reset_policy_name: str - :ivar client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :vartype client_library: str - :ivar client_id: Client Id of the Application in the external Identity Provider. It is App ID - for Facebook login, Client ID for Google login, App ID for Microsoft. - :vartype client_id: str - :ivar client_secret: Client secret of the Application in external Identity Provider, used to - authenticate login request. For example, it is App Secret for Facebook login, API Key for - Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! - Use '/listSecrets' POST request to get the value. - :vartype client_secret: str - :ivar certificate_id: Certificate full resource ID used in external Identity Provider. - :vartype certificate_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "allowed_tenants": {"max_items": 32, "min_items": 0}, - "signup_policy_name": {"min_length": 1}, - "signin_policy_name": {"min_length": 1}, - "profile_editing_policy_name": {"min_length": 1}, - "password_reset_policy_name": {"min_length": 1}, - "client_library": {"max_length": 16}, - "client_id": {"min_length": 1}, - "client_secret": {"min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "type_properties_type": {"key": "properties.type", "type": "str"}, - "signin_tenant": {"key": "properties.signinTenant", "type": "str"}, - "allowed_tenants": {"key": "properties.allowedTenants", "type": "[str]"}, - "authority": {"key": "properties.authority", "type": "str"}, - "signup_policy_name": {"key": "properties.signupPolicyName", "type": "str"}, - "signin_policy_name": {"key": "properties.signinPolicyName", "type": "str"}, - "profile_editing_policy_name": {"key": "properties.profileEditingPolicyName", "type": "str"}, - "password_reset_policy_name": {"key": "properties.passwordResetPolicyName", "type": "str"}, - "client_library": {"key": "properties.clientLibrary", "type": "str"}, - "client_id": {"key": "properties.clientId", "type": "str"}, - "client_secret": {"key": "properties.clientSecret", "type": "str"}, - "certificate_id": {"key": "properties.certificateId", "type": "str"}, - } - - def __init__( - self, - *, - type_properties_type: Optional[Union[str, "_models.IdentityProviderType"]] = None, - signin_tenant: Optional[str] = None, - allowed_tenants: Optional[list[str]] = None, - authority: Optional[str] = None, - signup_policy_name: Optional[str] = None, - signin_policy_name: Optional[str] = None, - profile_editing_policy_name: Optional[str] = None, - password_reset_policy_name: Optional[str] = None, - client_library: Optional[str] = None, - client_id: Optional[str] = None, - client_secret: Optional[str] = None, - certificate_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type_properties_type: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". - :paramtype type_properties_type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :keyword signin_tenant: The TenantId to use instead of Common when logging into Active - Directory. - :paramtype signin_tenant: str - :keyword allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory - login. - :paramtype allowed_tenants: list[str] - :keyword authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :paramtype authority: str - :keyword signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signup_policy_name: str - :keyword signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signin_policy_name: str - :keyword profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype profile_editing_policy_name: str - :keyword password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype password_reset_policy_name: str - :keyword client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :paramtype client_library: str - :keyword client_id: Client Id of the Application in the external Identity Provider. It is App - ID for Facebook login, Client ID for Google login, App ID for Microsoft. - :paramtype client_id: str - :keyword client_secret: Client secret of the Application in external Identity Provider, used to - authenticate login request. For example, it is App Secret for Facebook login, API Key for - Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! - Use '/listSecrets' POST request to get the value. - :paramtype client_secret: str - :keyword certificate_id: Certificate full resource ID used in external Identity Provider. - :paramtype certificate_id: str - """ - super().__init__(**kwargs) - self.type_properties_type = type_properties_type - self.signin_tenant = signin_tenant - self.allowed_tenants = allowed_tenants - self.authority = authority - self.signup_policy_name = signup_policy_name - self.signin_policy_name = signin_policy_name - self.profile_editing_policy_name = profile_editing_policy_name - self.password_reset_policy_name = password_reset_policy_name - self.client_library = client_library - self.client_id = client_id - self.client_secret = client_secret - self.certificate_id = certificate_id - - -class IdentityProviderContractProperties(IdentityProviderBaseParameters): - """The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active - Directory which can be used to enable access to the API Management service developer portal for - all users. - - All required parameters must be populated in order to send to server. - - :ivar type: Identity Provider Type identifier. Known values are: "facebook", "google", - "microsoft", "twitter", "aad", and "aadB2C". - :vartype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :ivar signin_tenant: The TenantId to use instead of Common when logging into Active Directory. - :vartype signin_tenant: str - :ivar allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. - :vartype allowed_tenants: list[str] - :ivar authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :vartype authority: str - :ivar signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signup_policy_name: str - :ivar signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signin_policy_name: str - :ivar profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :vartype profile_editing_policy_name: str - :ivar password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C Identity - Provider. - :vartype password_reset_policy_name: str - :ivar client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :vartype client_library: str - :ivar client_id: Client Id of the Application in the external Identity Provider. It is App ID - for Facebook login, Client ID for Google login, App ID for Microsoft. Required. - :vartype client_id: str - :ivar client_secret: Client secret of the Application in external Identity Provider, used to - authenticate login request. For example, it is App Secret for Facebook login, API Key for - Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! - Use '/listSecrets' POST request to get the value. - :vartype client_secret: str - :ivar certificate_id: Certificate full resource ID used in external Identity Provider. - :vartype certificate_id: str - """ - - _validation = { - "allowed_tenants": {"max_items": 32, "min_items": 0}, - "signup_policy_name": {"min_length": 1}, - "signin_policy_name": {"min_length": 1}, - "profile_editing_policy_name": {"min_length": 1}, - "password_reset_policy_name": {"min_length": 1}, - "client_library": {"max_length": 16}, - "client_id": {"required": True, "min_length": 1}, - "client_secret": {"min_length": 1}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "signin_tenant": {"key": "signinTenant", "type": "str"}, - "allowed_tenants": {"key": "allowedTenants", "type": "[str]"}, - "authority": {"key": "authority", "type": "str"}, - "signup_policy_name": {"key": "signupPolicyName", "type": "str"}, - "signin_policy_name": {"key": "signinPolicyName", "type": "str"}, - "profile_editing_policy_name": {"key": "profileEditingPolicyName", "type": "str"}, - "password_reset_policy_name": {"key": "passwordResetPolicyName", "type": "str"}, - "client_library": {"key": "clientLibrary", "type": "str"}, - "client_id": {"key": "clientId", "type": "str"}, - "client_secret": {"key": "clientSecret", "type": "str"}, - "certificate_id": {"key": "certificateId", "type": "str"}, - } - - def __init__( - self, - *, - client_id: str, - type: Optional[Union[str, "_models.IdentityProviderType"]] = None, - signin_tenant: Optional[str] = None, - allowed_tenants: Optional[list[str]] = None, - authority: Optional[str] = None, - signup_policy_name: Optional[str] = None, - signin_policy_name: Optional[str] = None, - profile_editing_policy_name: Optional[str] = None, - password_reset_policy_name: Optional[str] = None, - client_library: Optional[str] = None, - client_secret: Optional[str] = None, - certificate_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: Identity Provider Type identifier. Known values are: "facebook", "google", - "microsoft", "twitter", "aad", and "aadB2C". - :paramtype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :keyword signin_tenant: The TenantId to use instead of Common when logging into Active - Directory. - :paramtype signin_tenant: str - :keyword allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory - login. - :paramtype allowed_tenants: list[str] - :keyword authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :paramtype authority: str - :keyword signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signup_policy_name: str - :keyword signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signin_policy_name: str - :keyword profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype profile_editing_policy_name: str - :keyword password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype password_reset_policy_name: str - :keyword client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :paramtype client_library: str - :keyword client_id: Client Id of the Application in the external Identity Provider. It is App - ID for Facebook login, Client ID for Google login, App ID for Microsoft. Required. - :paramtype client_id: str - :keyword client_secret: Client secret of the Application in external Identity Provider, used to - authenticate login request. For example, it is App Secret for Facebook login, API Key for - Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! - Use '/listSecrets' POST request to get the value. - :paramtype client_secret: str - :keyword certificate_id: Certificate full resource ID used in external Identity Provider. - :paramtype certificate_id: str - """ - super().__init__( - type=type, - signin_tenant=signin_tenant, - allowed_tenants=allowed_tenants, - authority=authority, - signup_policy_name=signup_policy_name, - signin_policy_name=signin_policy_name, - profile_editing_policy_name=profile_editing_policy_name, - password_reset_policy_name=password_reset_policy_name, - client_library=client_library, - **kwargs - ) - self.client_id = client_id - self.client_secret = client_secret - self.certificate_id = certificate_id - - -class IdentityProviderCreateContract(ProxyResource): - """Identity Provider details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar type_properties_type: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". - :vartype type_properties_type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :ivar signin_tenant: The TenantId to use instead of Common when logging into Active Directory. - :vartype signin_tenant: str - :ivar allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. - :vartype allowed_tenants: list[str] - :ivar authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :vartype authority: str - :ivar signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signup_policy_name: str - :ivar signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signin_policy_name: str - :ivar profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :vartype profile_editing_policy_name: str - :ivar password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C Identity - Provider. - :vartype password_reset_policy_name: str - :ivar client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :vartype client_library: str - :ivar client_id: Client Id of the Application in the external Identity Provider. It is App ID - for Facebook login, Client ID for Google login, App ID for Microsoft. - :vartype client_id: str - :ivar client_secret: Client secret of the Application in external Identity Provider, used to - authenticate login request. For example, it is App Secret for Facebook login, API Key for - Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! - Use '/listSecrets' POST request to get the value. - :vartype client_secret: str - :ivar certificate_id: Certificate full resource ID used in external Identity Provider. - :vartype certificate_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "allowed_tenants": {"max_items": 32, "min_items": 0}, - "signup_policy_name": {"min_length": 1}, - "signin_policy_name": {"min_length": 1}, - "profile_editing_policy_name": {"min_length": 1}, - "password_reset_policy_name": {"min_length": 1}, - "client_library": {"max_length": 16}, - "client_id": {"min_length": 1}, - "client_secret": {"min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "type_properties_type": {"key": "properties.type", "type": "str"}, - "signin_tenant": {"key": "properties.signinTenant", "type": "str"}, - "allowed_tenants": {"key": "properties.allowedTenants", "type": "[str]"}, - "authority": {"key": "properties.authority", "type": "str"}, - "signup_policy_name": {"key": "properties.signupPolicyName", "type": "str"}, - "signin_policy_name": {"key": "properties.signinPolicyName", "type": "str"}, - "profile_editing_policy_name": {"key": "properties.profileEditingPolicyName", "type": "str"}, - "password_reset_policy_name": {"key": "properties.passwordResetPolicyName", "type": "str"}, - "client_library": {"key": "properties.clientLibrary", "type": "str"}, - "client_id": {"key": "properties.clientId", "type": "str"}, - "client_secret": {"key": "properties.clientSecret", "type": "str"}, - "certificate_id": {"key": "properties.certificateId", "type": "str"}, - } - - def __init__( - self, - *, - type_properties_type: Optional[Union[str, "_models.IdentityProviderType"]] = None, - signin_tenant: Optional[str] = None, - allowed_tenants: Optional[list[str]] = None, - authority: Optional[str] = None, - signup_policy_name: Optional[str] = None, - signin_policy_name: Optional[str] = None, - profile_editing_policy_name: Optional[str] = None, - password_reset_policy_name: Optional[str] = None, - client_library: Optional[str] = None, - client_id: Optional[str] = None, - client_secret: Optional[str] = None, - certificate_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type_properties_type: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". - :paramtype type_properties_type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :keyword signin_tenant: The TenantId to use instead of Common when logging into Active - Directory. - :paramtype signin_tenant: str - :keyword allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory - login. - :paramtype allowed_tenants: list[str] - :keyword authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :paramtype authority: str - :keyword signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signup_policy_name: str - :keyword signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signin_policy_name: str - :keyword profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype profile_editing_policy_name: str - :keyword password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype password_reset_policy_name: str - :keyword client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :paramtype client_library: str - :keyword client_id: Client Id of the Application in the external Identity Provider. It is App - ID for Facebook login, Client ID for Google login, App ID for Microsoft. - :paramtype client_id: str - :keyword client_secret: Client secret of the Application in external Identity Provider, used to - authenticate login request. For example, it is App Secret for Facebook login, API Key for - Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! - Use '/listSecrets' POST request to get the value. - :paramtype client_secret: str - :keyword certificate_id: Certificate full resource ID used in external Identity Provider. - :paramtype certificate_id: str - """ - super().__init__(**kwargs) - self.type_properties_type = type_properties_type - self.signin_tenant = signin_tenant - self.allowed_tenants = allowed_tenants - self.authority = authority - self.signup_policy_name = signup_policy_name - self.signin_policy_name = signin_policy_name - self.profile_editing_policy_name = profile_editing_policy_name - self.password_reset_policy_name = password_reset_policy_name - self.client_library = client_library - self.client_id = client_id - self.client_secret = client_secret - self.certificate_id = certificate_id - - -class IdentityProviderCreateContractProperties(IdentityProviderBaseParameters): - """The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active - Directory which can be used to enable access to the API Management service developer portal for - all users. - - All required parameters must be populated in order to send to server. - - :ivar type: Identity Provider Type identifier. Known values are: "facebook", "google", - "microsoft", "twitter", "aad", and "aadB2C". - :vartype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :ivar signin_tenant: The TenantId to use instead of Common when logging into Active Directory. - :vartype signin_tenant: str - :ivar allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. - :vartype allowed_tenants: list[str] - :ivar authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :vartype authority: str - :ivar signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signup_policy_name: str - :ivar signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signin_policy_name: str - :ivar profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :vartype profile_editing_policy_name: str - :ivar password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C Identity - Provider. - :vartype password_reset_policy_name: str - :ivar client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :vartype client_library: str - :ivar client_id: Client Id of the Application in the external Identity Provider. It is App ID - for Facebook login, Client ID for Google login, App ID for Microsoft. Required. - :vartype client_id: str - :ivar client_secret: Client secret of the Application in external Identity Provider, used to - authenticate login request. For example, it is App Secret for Facebook login, API Key for - Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! - Use '/listSecrets' POST request to get the value. Required. - :vartype client_secret: str - :ivar certificate_id: Certificate full resource ID used in external Identity Provider. - :vartype certificate_id: str - """ - - _validation = { - "allowed_tenants": {"max_items": 32, "min_items": 0}, - "signup_policy_name": {"min_length": 1}, - "signin_policy_name": {"min_length": 1}, - "profile_editing_policy_name": {"min_length": 1}, - "password_reset_policy_name": {"min_length": 1}, - "client_library": {"max_length": 16}, - "client_id": {"required": True, "min_length": 1}, - "client_secret": {"required": True, "min_length": 1}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "signin_tenant": {"key": "signinTenant", "type": "str"}, - "allowed_tenants": {"key": "allowedTenants", "type": "[str]"}, - "authority": {"key": "authority", "type": "str"}, - "signup_policy_name": {"key": "signupPolicyName", "type": "str"}, - "signin_policy_name": {"key": "signinPolicyName", "type": "str"}, - "profile_editing_policy_name": {"key": "profileEditingPolicyName", "type": "str"}, - "password_reset_policy_name": {"key": "passwordResetPolicyName", "type": "str"}, - "client_library": {"key": "clientLibrary", "type": "str"}, - "client_id": {"key": "clientId", "type": "str"}, - "client_secret": {"key": "clientSecret", "type": "str"}, - "certificate_id": {"key": "certificateId", "type": "str"}, - } - - def __init__( - self, - *, - client_id: str, - client_secret: str, - type: Optional[Union[str, "_models.IdentityProviderType"]] = None, - signin_tenant: Optional[str] = None, - allowed_tenants: Optional[list[str]] = None, - authority: Optional[str] = None, - signup_policy_name: Optional[str] = None, - signin_policy_name: Optional[str] = None, - profile_editing_policy_name: Optional[str] = None, - password_reset_policy_name: Optional[str] = None, - client_library: Optional[str] = None, - certificate_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: Identity Provider Type identifier. Known values are: "facebook", "google", - "microsoft", "twitter", "aad", and "aadB2C". - :paramtype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :keyword signin_tenant: The TenantId to use instead of Common when logging into Active - Directory. - :paramtype signin_tenant: str - :keyword allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory - login. - :paramtype allowed_tenants: list[str] - :keyword authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :paramtype authority: str - :keyword signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signup_policy_name: str - :keyword signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signin_policy_name: str - :keyword profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype profile_editing_policy_name: str - :keyword password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype password_reset_policy_name: str - :keyword client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :paramtype client_library: str - :keyword client_id: Client Id of the Application in the external Identity Provider. It is App - ID for Facebook login, Client ID for Google login, App ID for Microsoft. Required. - :paramtype client_id: str - :keyword client_secret: Client secret of the Application in external Identity Provider, used to - authenticate login request. For example, it is App Secret for Facebook login, API Key for - Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! - Use '/listSecrets' POST request to get the value. Required. - :paramtype client_secret: str - :keyword certificate_id: Certificate full resource ID used in external Identity Provider. - :paramtype certificate_id: str - """ - super().__init__( - type=type, - signin_tenant=signin_tenant, - allowed_tenants=allowed_tenants, - authority=authority, - signup_policy_name=signup_policy_name, - signin_policy_name=signin_policy_name, - profile_editing_policy_name=profile_editing_policy_name, - password_reset_policy_name=password_reset_policy_name, - client_library=client_library, - **kwargs - ) - self.client_id = client_id - self.client_secret = client_secret - self.certificate_id = certificate_id - - -class IdentityProviderList(_serialization.Model): - """List of all the Identity Providers configured on the service instance. - - :ivar value: Identity Provider configuration values. - :vartype value: list[~azure.mgmt.apimanagement.models.IdentityProviderContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[IdentityProviderContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.IdentityProviderContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Identity Provider configuration values. - :paramtype value: list[~azure.mgmt.apimanagement.models.IdentityProviderContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class IdentityProviderUpdateParameters(_serialization.Model): - """Parameters supplied to update Identity Provider. - - :ivar type: Identity Provider Type identifier. Known values are: "facebook", "google", - "microsoft", "twitter", "aad", and "aadB2C". - :vartype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :ivar signin_tenant: The TenantId to use instead of Common when logging into Active Directory. - :vartype signin_tenant: str - :ivar allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. - :vartype allowed_tenants: list[str] - :ivar authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :vartype authority: str - :ivar signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signup_policy_name: str - :ivar signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signin_policy_name: str - :ivar profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :vartype profile_editing_policy_name: str - :ivar password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C Identity - Provider. - :vartype password_reset_policy_name: str - :ivar client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :vartype client_library: str - :ivar client_id: Client Id of the Application in the external Identity Provider. It is App ID - for Facebook login, Client ID for Google login, App ID for Microsoft. - :vartype client_id: str - :ivar client_secret: Client secret of the Application in external Identity Provider, used to - authenticate login request. For example, it is App Secret for Facebook login, API Key for - Google login, Public Key for Microsoft. - :vartype client_secret: str - :ivar certificate_id: Certificate full resource ID used in external Identity Provider. - :vartype certificate_id: str - """ - - _validation = { - "allowed_tenants": {"max_items": 32, "min_items": 0}, - "signup_policy_name": {"min_length": 1}, - "signin_policy_name": {"min_length": 1}, - "profile_editing_policy_name": {"min_length": 1}, - "password_reset_policy_name": {"min_length": 1}, - "client_library": {"max_length": 16}, - "client_id": {"min_length": 1}, - "client_secret": {"min_length": 1}, - } - - _attribute_map = { - "type": {"key": "properties.type", "type": "str"}, - "signin_tenant": {"key": "properties.signinTenant", "type": "str"}, - "allowed_tenants": {"key": "properties.allowedTenants", "type": "[str]"}, - "authority": {"key": "properties.authority", "type": "str"}, - "signup_policy_name": {"key": "properties.signupPolicyName", "type": "str"}, - "signin_policy_name": {"key": "properties.signinPolicyName", "type": "str"}, - "profile_editing_policy_name": {"key": "properties.profileEditingPolicyName", "type": "str"}, - "password_reset_policy_name": {"key": "properties.passwordResetPolicyName", "type": "str"}, - "client_library": {"key": "properties.clientLibrary", "type": "str"}, - "client_id": {"key": "properties.clientId", "type": "str"}, - "client_secret": {"key": "properties.clientSecret", "type": "str"}, - "certificate_id": {"key": "properties.certificateId", "type": "str"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.IdentityProviderType"]] = None, - signin_tenant: Optional[str] = None, - allowed_tenants: Optional[list[str]] = None, - authority: Optional[str] = None, - signup_policy_name: Optional[str] = None, - signin_policy_name: Optional[str] = None, - profile_editing_policy_name: Optional[str] = None, - password_reset_policy_name: Optional[str] = None, - client_library: Optional[str] = None, - client_id: Optional[str] = None, - client_secret: Optional[str] = None, - certificate_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: Identity Provider Type identifier. Known values are: "facebook", "google", - "microsoft", "twitter", "aad", and "aadB2C". - :paramtype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :keyword signin_tenant: The TenantId to use instead of Common when logging into Active - Directory. - :paramtype signin_tenant: str - :keyword allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory - login. - :paramtype allowed_tenants: list[str] - :keyword authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :paramtype authority: str - :keyword signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signup_policy_name: str - :keyword signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signin_policy_name: str - :keyword profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype profile_editing_policy_name: str - :keyword password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype password_reset_policy_name: str - :keyword client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :paramtype client_library: str - :keyword client_id: Client Id of the Application in the external Identity Provider. It is App - ID for Facebook login, Client ID for Google login, App ID for Microsoft. - :paramtype client_id: str - :keyword client_secret: Client secret of the Application in external Identity Provider, used to - authenticate login request. For example, it is App Secret for Facebook login, API Key for - Google login, Public Key for Microsoft. - :paramtype client_secret: str - :keyword certificate_id: Certificate full resource ID used in external Identity Provider. - :paramtype certificate_id: str - """ - super().__init__(**kwargs) - self.type = type - self.signin_tenant = signin_tenant - self.allowed_tenants = allowed_tenants - self.authority = authority - self.signup_policy_name = signup_policy_name - self.signin_policy_name = signin_policy_name - self.profile_editing_policy_name = profile_editing_policy_name - self.password_reset_policy_name = password_reset_policy_name - self.client_library = client_library - self.client_id = client_id - self.client_secret = client_secret - self.certificate_id = certificate_id - - -class IdentityProviderUpdateProperties(IdentityProviderBaseParameters): - """Parameters supplied to the Update Identity Provider operation. - - :ivar type: Identity Provider Type identifier. Known values are: "facebook", "google", - "microsoft", "twitter", "aad", and "aadB2C". - :vartype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :ivar signin_tenant: The TenantId to use instead of Common when logging into Active Directory. - :vartype signin_tenant: str - :ivar allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory login. - :vartype allowed_tenants: list[str] - :ivar authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :vartype authority: str - :ivar signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signup_policy_name: str - :ivar signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :vartype signin_policy_name: str - :ivar profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :vartype profile_editing_policy_name: str - :ivar password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C Identity - Provider. - :vartype password_reset_policy_name: str - :ivar client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :vartype client_library: str - :ivar client_id: Client Id of the Application in the external Identity Provider. It is App ID - for Facebook login, Client ID for Google login, App ID for Microsoft. - :vartype client_id: str - :ivar client_secret: Client secret of the Application in external Identity Provider, used to - authenticate login request. For example, it is App Secret for Facebook login, API Key for - Google login, Public Key for Microsoft. - :vartype client_secret: str - :ivar certificate_id: Certificate full resource ID used in external Identity Provider. - :vartype certificate_id: str - """ - - _validation = { - "allowed_tenants": {"max_items": 32, "min_items": 0}, - "signup_policy_name": {"min_length": 1}, - "signin_policy_name": {"min_length": 1}, - "profile_editing_policy_name": {"min_length": 1}, - "password_reset_policy_name": {"min_length": 1}, - "client_library": {"max_length": 16}, - "client_id": {"min_length": 1}, - "client_secret": {"min_length": 1}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "signin_tenant": {"key": "signinTenant", "type": "str"}, - "allowed_tenants": {"key": "allowedTenants", "type": "[str]"}, - "authority": {"key": "authority", "type": "str"}, - "signup_policy_name": {"key": "signupPolicyName", "type": "str"}, - "signin_policy_name": {"key": "signinPolicyName", "type": "str"}, - "profile_editing_policy_name": {"key": "profileEditingPolicyName", "type": "str"}, - "password_reset_policy_name": {"key": "passwordResetPolicyName", "type": "str"}, - "client_library": {"key": "clientLibrary", "type": "str"}, - "client_id": {"key": "clientId", "type": "str"}, - "client_secret": {"key": "clientSecret", "type": "str"}, - "certificate_id": {"key": "certificateId", "type": "str"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.IdentityProviderType"]] = None, - signin_tenant: Optional[str] = None, - allowed_tenants: Optional[list[str]] = None, - authority: Optional[str] = None, - signup_policy_name: Optional[str] = None, - signin_policy_name: Optional[str] = None, - profile_editing_policy_name: Optional[str] = None, - password_reset_policy_name: Optional[str] = None, - client_library: Optional[str] = None, - client_id: Optional[str] = None, - client_secret: Optional[str] = None, - certificate_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: Identity Provider Type identifier. Known values are: "facebook", "google", - "microsoft", "twitter", "aad", and "aadB2C". - :paramtype type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :keyword signin_tenant: The TenantId to use instead of Common when logging into Active - Directory. - :paramtype signin_tenant: str - :keyword allowed_tenants: List of Allowed Tenants when configuring Azure Active Directory - login. - :paramtype allowed_tenants: list[str] - :keyword authority: OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - :paramtype authority: str - :keyword signup_policy_name: Signup Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signup_policy_name: str - :keyword signin_policy_name: Signin Policy Name. Only applies to AAD B2C Identity Provider. - :paramtype signin_policy_name: str - :keyword profile_editing_policy_name: Profile Editing Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype profile_editing_policy_name: str - :keyword password_reset_policy_name: Password Reset Policy Name. Only applies to AAD B2C - Identity Provider. - :paramtype password_reset_policy_name: str - :keyword client_library: The client library to be used in the developer portal. Only applies to - AAD and AAD B2C Identity Provider. - :paramtype client_library: str - :keyword client_id: Client Id of the Application in the external Identity Provider. It is App - ID for Facebook login, Client ID for Google login, App ID for Microsoft. - :paramtype client_id: str - :keyword client_secret: Client secret of the Application in external Identity Provider, used to - authenticate login request. For example, it is App Secret for Facebook login, API Key for - Google login, Public Key for Microsoft. - :paramtype client_secret: str - :keyword certificate_id: Certificate full resource ID used in external Identity Provider. - :paramtype certificate_id: str - """ - super().__init__( - type=type, - signin_tenant=signin_tenant, - allowed_tenants=allowed_tenants, - authority=authority, - signup_policy_name=signup_policy_name, - signin_policy_name=signin_policy_name, - profile_editing_policy_name=profile_editing_policy_name, - password_reset_policy_name=password_reset_policy_name, - client_library=client_library, - **kwargs - ) - self.client_id = client_id - self.client_secret = client_secret - self.certificate_id = certificate_id - - -class IssueAttachmentCollection(_serialization.Model): - """Paged Issue Attachment list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Issue Attachment values. - :vartype value: list[~azure.mgmt.apimanagement.models.IssueAttachmentContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[IssueAttachmentContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword count: Total record count number across all pages. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.IssueAttachmentContract"]] = None - self.count = count - self.next_link: Optional[str] = None - - -class IssueAttachmentContract(ProxyResource): - """Issue Attachment Contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar title: Filename by which the binary data will be saved. - :vartype title: str - :ivar content_format: Either 'link' if content is provided via an HTTP link or the MIME type of - the Base64-encoded binary data provided in the 'content' property. - :vartype content_format: str - :ivar content: An HTTP link or Base64-encoded binary data. - :vartype content: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "title": {"key": "properties.title", "type": "str"}, - "content_format": {"key": "properties.contentFormat", "type": "str"}, - "content": {"key": "properties.content", "type": "str"}, - } - - def __init__( - self, - *, - title: Optional[str] = None, - content_format: Optional[str] = None, - content: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword title: Filename by which the binary data will be saved. - :paramtype title: str - :keyword content_format: Either 'link' if content is provided via an HTTP link or the MIME type - of the Base64-encoded binary data provided in the 'content' property. - :paramtype content_format: str - :keyword content: An HTTP link or Base64-encoded binary data. - :paramtype content: str - """ - super().__init__(**kwargs) - self.title = title - self.content_format = content_format - self.content = content - - -class IssueCollection(_serialization.Model): - """Paged Issue list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Issue values. - :vartype value: list[~azure.mgmt.apimanagement.models.IssueContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[IssueContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword count: Total record count number across all pages. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.IssueContract"]] = None - self.count = count - self.next_link: Optional[str] = None - - -class IssueCommentCollection(_serialization.Model): - """Paged Issue Comment list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Issue Comment values. - :vartype value: list[~azure.mgmt.apimanagement.models.IssueCommentContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[IssueCommentContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword count: Total record count number across all pages. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.IssueCommentContract"]] = None - self.count = count - self.next_link: Optional[str] = None - - -class IssueCommentContract(ProxyResource): - """Issue Comment Contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar text: Comment text. - :vartype text: str - :ivar created_date: Date and time when the comment was created. - :vartype created_date: ~datetime.datetime - :ivar user_id: A resource identifier for the user who left the comment. - :vartype user_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "text": {"key": "properties.text", "type": "str"}, - "created_date": {"key": "properties.createdDate", "type": "iso-8601"}, - "user_id": {"key": "properties.userId", "type": "str"}, - } - - def __init__( - self, - *, - text: Optional[str] = None, - created_date: Optional[datetime.datetime] = None, - user_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword text: Comment text. - :paramtype text: str - :keyword created_date: Date and time when the comment was created. - :paramtype created_date: ~datetime.datetime - :keyword user_id: A resource identifier for the user who left the comment. - :paramtype user_id: str - """ - super().__init__(**kwargs) - self.text = text - self.created_date = created_date - self.user_id = user_id - - -class IssueContract(ProxyResource): - """Issue Contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar created_date: Date and time when the issue was created. - :vartype created_date: ~datetime.datetime - :ivar state: Status of the issue. Known values are: "proposed", "open", "removed", "resolved", - and "closed". - :vartype state: str or ~azure.mgmt.apimanagement.models.State - :ivar api_id: A resource identifier for the API the issue was created for. - :vartype api_id: str - :ivar title: The issue title. - :vartype title: str - :ivar description: Text describing the issue. - :vartype description: str - :ivar user_id: A resource identifier for the user created the issue. - :vartype user_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "created_date": {"key": "properties.createdDate", "type": "iso-8601"}, - "state": {"key": "properties.state", "type": "str"}, - "api_id": {"key": "properties.apiId", "type": "str"}, - "title": {"key": "properties.title", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "user_id": {"key": "properties.userId", "type": "str"}, - } - - def __init__( - self, - *, - created_date: Optional[datetime.datetime] = None, - state: Optional[Union[str, "_models.State"]] = None, - api_id: Optional[str] = None, - title: Optional[str] = None, - description: Optional[str] = None, - user_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword created_date: Date and time when the issue was created. - :paramtype created_date: ~datetime.datetime - :keyword state: Status of the issue. Known values are: "proposed", "open", "removed", - "resolved", and "closed". - :paramtype state: str or ~azure.mgmt.apimanagement.models.State - :keyword api_id: A resource identifier for the API the issue was created for. - :paramtype api_id: str - :keyword title: The issue title. - :paramtype title: str - :keyword description: Text describing the issue. - :paramtype description: str - :keyword user_id: A resource identifier for the user created the issue. - :paramtype user_id: str - """ - super().__init__(**kwargs) - self.created_date = created_date - self.state = state - self.api_id = api_id - self.title = title - self.description = description - self.user_id = user_id - - -class IssueContractBaseProperties(_serialization.Model): - """Issue contract Base Properties. - - :ivar created_date: Date and time when the issue was created. - :vartype created_date: ~datetime.datetime - :ivar state: Status of the issue. Known values are: "proposed", "open", "removed", "resolved", - and "closed". - :vartype state: str or ~azure.mgmt.apimanagement.models.State - :ivar api_id: A resource identifier for the API the issue was created for. - :vartype api_id: str - """ - - _attribute_map = { - "created_date": {"key": "createdDate", "type": "iso-8601"}, - "state": {"key": "state", "type": "str"}, - "api_id": {"key": "apiId", "type": "str"}, - } - - def __init__( - self, - *, - created_date: Optional[datetime.datetime] = None, - state: Optional[Union[str, "_models.State"]] = None, - api_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword created_date: Date and time when the issue was created. - :paramtype created_date: ~datetime.datetime - :keyword state: Status of the issue. Known values are: "proposed", "open", "removed", - "resolved", and "closed". - :paramtype state: str or ~azure.mgmt.apimanagement.models.State - :keyword api_id: A resource identifier for the API the issue was created for. - :paramtype api_id: str - """ - super().__init__(**kwargs) - self.created_date = created_date - self.state = state - self.api_id = api_id - - -class IssueContractProperties(IssueContractBaseProperties): - """Issue contract Properties. - - All required parameters must be populated in order to send to server. - - :ivar created_date: Date and time when the issue was created. - :vartype created_date: ~datetime.datetime - :ivar state: Status of the issue. Known values are: "proposed", "open", "removed", "resolved", - and "closed". - :vartype state: str or ~azure.mgmt.apimanagement.models.State - :ivar api_id: A resource identifier for the API the issue was created for. - :vartype api_id: str - :ivar title: The issue title. Required. - :vartype title: str - :ivar description: Text describing the issue. Required. - :vartype description: str - :ivar user_id: A resource identifier for the user created the issue. Required. - :vartype user_id: str - """ - - _validation = { - "title": {"required": True}, - "description": {"required": True}, - "user_id": {"required": True}, - } - - _attribute_map = { - "created_date": {"key": "createdDate", "type": "iso-8601"}, - "state": {"key": "state", "type": "str"}, - "api_id": {"key": "apiId", "type": "str"}, - "title": {"key": "title", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "user_id": {"key": "userId", "type": "str"}, - } - - def __init__( - self, - *, - title: str, - description: str, - user_id: str, - created_date: Optional[datetime.datetime] = None, - state: Optional[Union[str, "_models.State"]] = None, - api_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword created_date: Date and time when the issue was created. - :paramtype created_date: ~datetime.datetime - :keyword state: Status of the issue. Known values are: "proposed", "open", "removed", - "resolved", and "closed". - :paramtype state: str or ~azure.mgmt.apimanagement.models.State - :keyword api_id: A resource identifier for the API the issue was created for. - :paramtype api_id: str - :keyword title: The issue title. Required. - :paramtype title: str - :keyword description: Text describing the issue. Required. - :paramtype description: str - :keyword user_id: A resource identifier for the user created the issue. Required. - :paramtype user_id: str - """ - super().__init__(created_date=created_date, state=state, api_id=api_id, **kwargs) - self.title = title - self.description = description - self.user_id = user_id - - -class IssueUpdateContract(_serialization.Model): - """Issue update Parameters. - - :ivar created_date: Date and time when the issue was created. - :vartype created_date: ~datetime.datetime - :ivar state: Status of the issue. Known values are: "proposed", "open", "removed", "resolved", - and "closed". - :vartype state: str or ~azure.mgmt.apimanagement.models.State - :ivar api_id: A resource identifier for the API the issue was created for. - :vartype api_id: str - :ivar title: The issue title. - :vartype title: str - :ivar description: Text describing the issue. - :vartype description: str - :ivar user_id: A resource identifier for the user created the issue. - :vartype user_id: str - """ - - _attribute_map = { - "created_date": {"key": "properties.createdDate", "type": "iso-8601"}, - "state": {"key": "properties.state", "type": "str"}, - "api_id": {"key": "properties.apiId", "type": "str"}, - "title": {"key": "properties.title", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "user_id": {"key": "properties.userId", "type": "str"}, - } - - def __init__( - self, - *, - created_date: Optional[datetime.datetime] = None, - state: Optional[Union[str, "_models.State"]] = None, - api_id: Optional[str] = None, - title: Optional[str] = None, - description: Optional[str] = None, - user_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword created_date: Date and time when the issue was created. - :paramtype created_date: ~datetime.datetime - :keyword state: Status of the issue. Known values are: "proposed", "open", "removed", - "resolved", and "closed". - :paramtype state: str or ~azure.mgmt.apimanagement.models.State - :keyword api_id: A resource identifier for the API the issue was created for. - :paramtype api_id: str - :keyword title: The issue title. - :paramtype title: str - :keyword description: Text describing the issue. - :paramtype description: str - :keyword user_id: A resource identifier for the user created the issue. - :paramtype user_id: str - """ - super().__init__(**kwargs) - self.created_date = created_date - self.state = state - self.api_id = api_id - self.title = title - self.description = description - self.user_id = user_id - - -class IssueUpdateContractProperties(IssueContractBaseProperties): - """Issue contract Update Properties. - - :ivar created_date: Date and time when the issue was created. - :vartype created_date: ~datetime.datetime - :ivar state: Status of the issue. Known values are: "proposed", "open", "removed", "resolved", - and "closed". - :vartype state: str or ~azure.mgmt.apimanagement.models.State - :ivar api_id: A resource identifier for the API the issue was created for. - :vartype api_id: str - :ivar title: The issue title. - :vartype title: str - :ivar description: Text describing the issue. - :vartype description: str - :ivar user_id: A resource identifier for the user created the issue. - :vartype user_id: str - """ - - _attribute_map = { - "created_date": {"key": "createdDate", "type": "iso-8601"}, - "state": {"key": "state", "type": "str"}, - "api_id": {"key": "apiId", "type": "str"}, - "title": {"key": "title", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "user_id": {"key": "userId", "type": "str"}, - } - - def __init__( - self, - *, - created_date: Optional[datetime.datetime] = None, - state: Optional[Union[str, "_models.State"]] = None, - api_id: Optional[str] = None, - title: Optional[str] = None, - description: Optional[str] = None, - user_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword created_date: Date and time when the issue was created. - :paramtype created_date: ~datetime.datetime - :keyword state: Status of the issue. Known values are: "proposed", "open", "removed", - "resolved", and "closed". - :paramtype state: str or ~azure.mgmt.apimanagement.models.State - :keyword api_id: A resource identifier for the API the issue was created for. - :paramtype api_id: str - :keyword title: The issue title. - :paramtype title: str - :keyword description: Text describing the issue. - :paramtype description: str - :keyword user_id: A resource identifier for the user created the issue. - :paramtype user_id: str - """ - super().__init__(created_date=created_date, state=state, api_id=api_id, **kwargs) - self.title = title - self.description = description - self.user_id = user_id - - -class KeyVaultContractCreateProperties(_serialization.Model): - """Create keyVault contract details. - - :ivar secret_identifier: Key vault secret identifier for fetching secret. Providing a versioned - secret will prevent auto-refresh. This requires API Management service to be configured with - aka.ms/apimmsi. - :vartype secret_identifier: str - :ivar identity_client_id: Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity - , which will be used to access key vault secret. - :vartype identity_client_id: str - """ - - _attribute_map = { - "secret_identifier": {"key": "secretIdentifier", "type": "str"}, - "identity_client_id": {"key": "identityClientId", "type": "str"}, - } - - def __init__( - self, *, secret_identifier: Optional[str] = None, identity_client_id: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword secret_identifier: Key vault secret identifier for fetching secret. Providing a - versioned secret will prevent auto-refresh. This requires API Management service to be - configured with aka.ms/apimmsi. - :paramtype secret_identifier: str - :keyword identity_client_id: Null for SystemAssignedIdentity or Client Id for - UserAssignedIdentity , which will be used to access key vault secret. - :paramtype identity_client_id: str - """ - super().__init__(**kwargs) - self.secret_identifier = secret_identifier - self.identity_client_id = identity_client_id - - -class KeyVaultContractProperties(KeyVaultContractCreateProperties): - """KeyVault contract details. - - :ivar secret_identifier: Key vault secret identifier for fetching secret. Providing a versioned - secret will prevent auto-refresh. This requires API Management service to be configured with - aka.ms/apimmsi. - :vartype secret_identifier: str - :ivar identity_client_id: Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity - , which will be used to access key vault secret. - :vartype identity_client_id: str - :ivar last_status: Last time sync and refresh status of secret from key vault. - :vartype last_status: - ~azure.mgmt.apimanagement.models.KeyVaultLastAccessStatusContractProperties - """ - - _attribute_map = { - "secret_identifier": {"key": "secretIdentifier", "type": "str"}, - "identity_client_id": {"key": "identityClientId", "type": "str"}, - "last_status": {"key": "lastStatus", "type": "KeyVaultLastAccessStatusContractProperties"}, - } - - def __init__( - self, - *, - secret_identifier: Optional[str] = None, - identity_client_id: Optional[str] = None, - last_status: Optional["_models.KeyVaultLastAccessStatusContractProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword secret_identifier: Key vault secret identifier for fetching secret. Providing a - versioned secret will prevent auto-refresh. This requires API Management service to be - configured with aka.ms/apimmsi. - :paramtype secret_identifier: str - :keyword identity_client_id: Null for SystemAssignedIdentity or Client Id for - UserAssignedIdentity , which will be used to access key vault secret. - :paramtype identity_client_id: str - :keyword last_status: Last time sync and refresh status of secret from key vault. - :paramtype last_status: - ~azure.mgmt.apimanagement.models.KeyVaultLastAccessStatusContractProperties - """ - super().__init__(secret_identifier=secret_identifier, identity_client_id=identity_client_id, **kwargs) - self.last_status = last_status - - -class KeyVaultLastAccessStatusContractProperties(_serialization.Model): # pylint: disable=name-too-long - """Issue contract Update Properties. - - :ivar code: Last status code for sync and refresh of secret from key vault. - :vartype code: str - :ivar message: Details of the error else empty. - :vartype message: str - :ivar time_stamp_utc: Last time secret was accessed. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype time_stamp_utc: ~datetime.datetime - """ - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "time_stamp_utc": {"key": "timeStampUtc", "type": "iso-8601"}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - message: Optional[str] = None, - time_stamp_utc: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword code: Last status code for sync and refresh of secret from key vault. - :paramtype code: str - :keyword message: Details of the error else empty. - :paramtype message: str - :keyword time_stamp_utc: Last time secret was accessed. The date conforms to the following - format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype time_stamp_utc: ~datetime.datetime - """ - super().__init__(**kwargs) - self.code = code - self.message = message - self.time_stamp_utc = time_stamp_utc - - -class LLMDiagnosticSettings(_serialization.Model): - """Diagnostic settings for Large Language Models. - - :ivar logs: Specifies whether default diagnostic should be enabled for Large Language Models or - not. Known values are: "enabled" and "disabled". - :vartype logs: str or ~azure.mgmt.apimanagement.models.LlmDiagnosticSettings - :ivar requests: Diagnostic settings for Large Language Models requests. - :vartype requests: ~azure.mgmt.apimanagement.models.LLMMessageDiagnosticSettings - :ivar responses: Diagnostic settings for Large Language Models responses. - :vartype responses: ~azure.mgmt.apimanagement.models.LLMMessageDiagnosticSettings - """ - - _attribute_map = { - "logs": {"key": "logs", "type": "str"}, - "requests": {"key": "requests", "type": "LLMMessageDiagnosticSettings"}, - "responses": {"key": "responses", "type": "LLMMessageDiagnosticSettings"}, - } - - def __init__( - self, - *, - logs: Optional[Union[str, "_models.LlmDiagnosticSettings"]] = None, - requests: Optional["_models.LLMMessageDiagnosticSettings"] = None, - responses: Optional["_models.LLMMessageDiagnosticSettings"] = None, - **kwargs: Any - ) -> None: - """ - :keyword logs: Specifies whether default diagnostic should be enabled for Large Language Models - or not. Known values are: "enabled" and "disabled". - :paramtype logs: str or ~azure.mgmt.apimanagement.models.LlmDiagnosticSettings - :keyword requests: Diagnostic settings for Large Language Models requests. - :paramtype requests: ~azure.mgmt.apimanagement.models.LLMMessageDiagnosticSettings - :keyword responses: Diagnostic settings for Large Language Models responses. - :paramtype responses: ~azure.mgmt.apimanagement.models.LLMMessageDiagnosticSettings - """ - super().__init__(**kwargs) - self.logs = logs - self.requests = requests - self.responses = responses - - -class LLMMessageDiagnosticSettings(_serialization.Model): - """Diagnostic settings for Large Language Models Messages. - - :ivar messages: Specifies which message should be logged. Currently there is only 'all' option. - "all" - :vartype messages: str or ~azure.mgmt.apimanagement.models.LlmMessageLogTypes - :ivar max_size_in_bytes: Maximum size of message to logs in bytes. The default size is 32KB. - :vartype max_size_in_bytes: int - """ - - _validation = { - "max_size_in_bytes": {"maximum": 262144, "minimum": 1}, - } - - _attribute_map = { - "messages": {"key": "messages", "type": "str"}, - "max_size_in_bytes": {"key": "maxSizeInBytes", "type": "int"}, - } - - def __init__( - self, - *, - messages: Optional[Union[str, "_models.LlmMessageLogTypes"]] = None, - max_size_in_bytes: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword messages: Specifies which message should be logged. Currently there is only 'all' - option. "all" - :paramtype messages: str or ~azure.mgmt.apimanagement.models.LlmMessageLogTypes - :keyword max_size_in_bytes: Maximum size of message to logs in bytes. The default size is 32KB. - :paramtype max_size_in_bytes: int - """ - super().__init__(**kwargs) - self.messages = messages - self.max_size_in_bytes = max_size_in_bytes - - -class LoggerCollection(_serialization.Model): - """Paged Logger list representation. - - :ivar value: Logger values. - :vartype value: list[~azure.mgmt.apimanagement.models.LoggerContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[LoggerContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.LoggerContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Logger values. - :paramtype value: list[~azure.mgmt.apimanagement.models.LoggerContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class LoggerContract(ProxyResource): - """Logger details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar logger_type: Logger type. Known values are: "azureEventHub", "applicationInsights", and - "azureMonitor". - :vartype logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType - :ivar description: Logger description. - :vartype description: str - :ivar credentials: The name and SendRule connection string of the event hub for azureEventHub - logger. Instrumentation key for applicationInsights logger. - :vartype credentials: dict[str, str] - :ivar is_buffered: Whether records are buffered in the logger before publishing. Default is - assumed to be true. - :vartype is_buffered: bool - :ivar resource_id: Azure Resource Id of a log target (either Azure Event Hub resource or Azure - Application Insights resource). - :vartype resource_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "description": {"max_length": 256}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "logger_type": {"key": "properties.loggerType", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "credentials": {"key": "properties.credentials", "type": "{str}"}, - "is_buffered": {"key": "properties.isBuffered", "type": "bool"}, - "resource_id": {"key": "properties.resourceId", "type": "str"}, - } - - def __init__( - self, - *, - logger_type: Optional[Union[str, "_models.LoggerType"]] = None, - description: Optional[str] = None, - credentials: Optional[dict[str, str]] = None, - is_buffered: Optional[bool] = None, - resource_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword logger_type: Logger type. Known values are: "azureEventHub", "applicationInsights", - and "azureMonitor". - :paramtype logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType - :keyword description: Logger description. - :paramtype description: str - :keyword credentials: The name and SendRule connection string of the event hub for - azureEventHub logger. Instrumentation key for applicationInsights logger. - :paramtype credentials: dict[str, str] - :keyword is_buffered: Whether records are buffered in the logger before publishing. Default is - assumed to be true. - :paramtype is_buffered: bool - :keyword resource_id: Azure Resource Id of a log target (either Azure Event Hub resource or - Azure Application Insights resource). - :paramtype resource_id: str - """ - super().__init__(**kwargs) - self.logger_type = logger_type - self.description = description - self.credentials = credentials - self.is_buffered = is_buffered - self.resource_id = resource_id - - -class LoggerUpdateContract(_serialization.Model): - """Logger update contract. - - :ivar logger_type: Logger type. Known values are: "azureEventHub", "applicationInsights", and - "azureMonitor". - :vartype logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType - :ivar description: Logger description. - :vartype description: str - :ivar credentials: Logger credentials. - :vartype credentials: dict[str, str] - :ivar is_buffered: Whether records are buffered in the logger before publishing. Default is - assumed to be true. - :vartype is_buffered: bool - """ - - _attribute_map = { - "logger_type": {"key": "properties.loggerType", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "credentials": {"key": "properties.credentials", "type": "{str}"}, - "is_buffered": {"key": "properties.isBuffered", "type": "bool"}, - } - - def __init__( - self, - *, - logger_type: Optional[Union[str, "_models.LoggerType"]] = None, - description: Optional[str] = None, - credentials: Optional[dict[str, str]] = None, - is_buffered: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword logger_type: Logger type. Known values are: "azureEventHub", "applicationInsights", - and "azureMonitor". - :paramtype logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType - :keyword description: Logger description. - :paramtype description: str - :keyword credentials: Logger credentials. - :paramtype credentials: dict[str, str] - :keyword is_buffered: Whether records are buffered in the logger before publishing. Default is - assumed to be true. - :paramtype is_buffered: bool - """ - super().__init__(**kwargs) - self.logger_type = logger_type - self.description = description - self.credentials = credentials - self.is_buffered = is_buffered - - -class ManagedServiceIdentity(_serialization.Model): - """Managed service identity (system assigned and/or user assigned identities). - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar principal_id: The service principal ID of the system assigned identity. This property - will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be - provided for a system assigned identity. - :vartype tenant_id: str - :ivar type: Type of managed service identity (where both SystemAssigned and UserAssigned types - are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and - "SystemAssigned,UserAssigned". - :vartype type: str or ~azure.mgmt.apimanagement.models.ManagedServiceIdentityType - :ivar user_assigned_identities: The set of user assigned identities associated with the - resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - The dictionary values can be empty objects ({}) in requests. - :vartype user_assigned_identities: dict[str, - ~azure.mgmt.apimanagement.models.UserAssignedIdentity] - """ - - _validation = { - "principal_id": {"readonly": True}, - "tenant_id": {"readonly": True}, - "type": {"required": True}, - } - - _attribute_map = { - "principal_id": {"key": "principalId", "type": "str"}, - "tenant_id": {"key": "tenantId", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{UserAssignedIdentity}"}, - } - - def __init__( - self, - *, - type: Union[str, "_models.ManagedServiceIdentityType"], - user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: Type of managed service identity (where both SystemAssigned and UserAssigned - types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and - "SystemAssigned,UserAssigned". - :paramtype type: str or ~azure.mgmt.apimanagement.models.ManagedServiceIdentityType - :keyword user_assigned_identities: The set of user assigned identities associated with the - resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - The dictionary values can be empty objects ({}) in requests. - :paramtype user_assigned_identities: dict[str, - ~azure.mgmt.apimanagement.models.UserAssignedIdentity] - """ - super().__init__(**kwargs) - self.principal_id: Optional[str] = None - self.tenant_id: Optional[str] = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class MigrateToStv2Contract(_serialization.Model): - """Describes an available API Management SKU. - - :ivar mode: Mode of Migration to stv2. Default is PreserveIp. Known values are: "PreserveIp" - and "NewIP". - :vartype mode: str or ~azure.mgmt.apimanagement.models.MigrateToStv2Mode - """ - - _attribute_map = { - "mode": {"key": "mode", "type": "str"}, - } - - def __init__(self, *, mode: Optional[Union[str, "_models.MigrateToStv2Mode"]] = None, **kwargs: Any) -> None: - """ - :keyword mode: Mode of Migration to stv2. Default is PreserveIp. Known values are: "PreserveIp" - and "NewIP". - :paramtype mode: str or ~azure.mgmt.apimanagement.models.MigrateToStv2Mode - """ - super().__init__(**kwargs) - self.mode = mode - - -class NamedValueCollection(_serialization.Model): - """Paged NamedValue list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.NamedValueContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NamedValueContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.NamedValueContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.NamedValueContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class NamedValueContract(ProxyResource): - """NamedValue details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar tags: Optional tags that when provided can be used to filter the NamedValue list. - :vartype tags: list[str] - :ivar secret: Determines whether the value is a secret and should be encrypted or not. Default - value is false. - :vartype secret: bool - :ivar display_name: Unique name of NamedValue. It may contain only letters, digits, period, - dash, and underscore characters. - :vartype display_name: str - :ivar value: Value of the NamedValue. Can contain policy expressions. It may not be empty or - consist only of whitespace. This property will not be filled on 'GET' operations! Use - '/listSecrets' POST request to get the value. - :vartype value: str - :ivar key_vault: KeyVault location details of the namedValue. - :vartype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractProperties - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "tags": {"max_items": 32, "min_items": 0}, - "display_name": {"max_length": 256, "min_length": 1, "pattern": r"^[A-Za-z0-9-._]+$"}, - "value": {"max_length": 4096}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "tags": {"key": "properties.tags", "type": "[str]"}, - "secret": {"key": "properties.secret", "type": "bool"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "value": {"key": "properties.value", "type": "str"}, - "key_vault": {"key": "properties.keyVault", "type": "KeyVaultContractProperties"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - tags: Optional[list[str]] = None, - secret: Optional[bool] = None, - display_name: Optional[str] = None, - value: Optional[str] = None, - key_vault: Optional["_models.KeyVaultContractProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Optional tags that when provided can be used to filter the NamedValue list. - :paramtype tags: list[str] - :keyword secret: Determines whether the value is a secret and should be encrypted or not. - Default value is false. - :paramtype secret: bool - :keyword display_name: Unique name of NamedValue. It may contain only letters, digits, period, - dash, and underscore characters. - :paramtype display_name: str - :keyword value: Value of the NamedValue. Can contain policy expressions. It may not be empty or - consist only of whitespace. This property will not be filled on 'GET' operations! Use - '/listSecrets' POST request to get the value. - :paramtype value: str - :keyword key_vault: KeyVault location details of the namedValue. - :paramtype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractProperties - """ - super().__init__(**kwargs) - self.tags = tags - self.secret = secret - self.display_name = display_name - self.value = value - self.key_vault = key_vault - self.provisioning_state: Optional[str] = None - - -class NamedValueEntityBaseParameters(_serialization.Model): - """NamedValue Entity Base Parameters set. - - :ivar tags: Optional tags that when provided can be used to filter the NamedValue list. - :vartype tags: list[str] - :ivar secret: Determines whether the value is a secret and should be encrypted or not. Default - value is false. - :vartype secret: bool - """ - - _validation = { - "tags": {"max_items": 32, "min_items": 0}, - } - - _attribute_map = { - "tags": {"key": "tags", "type": "[str]"}, - "secret": {"key": "secret", "type": "bool"}, - } - - def __init__(self, *, tags: Optional[list[str]] = None, secret: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword tags: Optional tags that when provided can be used to filter the NamedValue list. - :paramtype tags: list[str] - :keyword secret: Determines whether the value is a secret and should be encrypted or not. - Default value is false. - :paramtype secret: bool - """ - super().__init__(**kwargs) - self.tags = tags - self.secret = secret - - -class NamedValueContractProperties(NamedValueEntityBaseParameters): - """NamedValue Contract properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar tags: Optional tags that when provided can be used to filter the NamedValue list. - :vartype tags: list[str] - :ivar secret: Determines whether the value is a secret and should be encrypted or not. Default - value is false. - :vartype secret: bool - :ivar display_name: Unique name of NamedValue. It may contain only letters, digits, period, - dash, and underscore characters. Required. - :vartype display_name: str - :ivar value: Value of the NamedValue. Can contain policy expressions. It may not be empty or - consist only of whitespace. This property will not be filled on 'GET' operations! Use - '/listSecrets' POST request to get the value. - :vartype value: str - :ivar key_vault: KeyVault location details of the namedValue. - :vartype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractProperties - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - "tags": {"max_items": 32, "min_items": 0}, - "display_name": {"required": True, "max_length": 256, "min_length": 1, "pattern": r"^[A-Za-z0-9-._]+$"}, - "value": {"max_length": 4096}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "tags": {"key": "tags", "type": "[str]"}, - "secret": {"key": "secret", "type": "bool"}, - "display_name": {"key": "displayName", "type": "str"}, - "value": {"key": "value", "type": "str"}, - "key_vault": {"key": "keyVault", "type": "KeyVaultContractProperties"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - display_name: str, - tags: Optional[list[str]] = None, - secret: Optional[bool] = None, - value: Optional[str] = None, - key_vault: Optional["_models.KeyVaultContractProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Optional tags that when provided can be used to filter the NamedValue list. - :paramtype tags: list[str] - :keyword secret: Determines whether the value is a secret and should be encrypted or not. - Default value is false. - :paramtype secret: bool - :keyword display_name: Unique name of NamedValue. It may contain only letters, digits, period, - dash, and underscore characters. Required. - :paramtype display_name: str - :keyword value: Value of the NamedValue. Can contain policy expressions. It may not be empty or - consist only of whitespace. This property will not be filled on 'GET' operations! Use - '/listSecrets' POST request to get the value. - :paramtype value: str - :keyword key_vault: KeyVault location details of the namedValue. - :paramtype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractProperties - """ - super().__init__(tags=tags, secret=secret, **kwargs) - self.display_name = display_name - self.value = value - self.key_vault = key_vault - self.provisioning_state: Optional[str] = None - - -class NamedValueCreateContract(ProxyResource): - """NamedValue details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar tags: Optional tags that when provided can be used to filter the NamedValue list. - :vartype tags: list[str] - :ivar secret: Determines whether the value is a secret and should be encrypted or not. Default - value is false. - :vartype secret: bool - :ivar display_name: Unique name of NamedValue. It may contain only letters, digits, period, - dash, and underscore characters. - :vartype display_name: str - :ivar value: Value of the NamedValue. Can contain policy expressions. It may not be empty or - consist only of whitespace. This property will not be filled on 'GET' operations! Use - '/listSecrets' POST request to get the value. - :vartype value: str - :ivar key_vault: KeyVault location details of the namedValue. - :vartype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "tags": {"max_items": 32, "min_items": 0}, - "display_name": {"max_length": 256, "min_length": 1, "pattern": r"^[A-Za-z0-9-._]+$"}, - "value": {"max_length": 4096}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "tags": {"key": "properties.tags", "type": "[str]"}, - "secret": {"key": "properties.secret", "type": "bool"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "value": {"key": "properties.value", "type": "str"}, - "key_vault": {"key": "properties.keyVault", "type": "KeyVaultContractCreateProperties"}, - } - - def __init__( - self, - *, - tags: Optional[list[str]] = None, - secret: Optional[bool] = None, - display_name: Optional[str] = None, - value: Optional[str] = None, - key_vault: Optional["_models.KeyVaultContractCreateProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Optional tags that when provided can be used to filter the NamedValue list. - :paramtype tags: list[str] - :keyword secret: Determines whether the value is a secret and should be encrypted or not. - Default value is false. - :paramtype secret: bool - :keyword display_name: Unique name of NamedValue. It may contain only letters, digits, period, - dash, and underscore characters. - :paramtype display_name: str - :keyword value: Value of the NamedValue. Can contain policy expressions. It may not be empty or - consist only of whitespace. This property will not be filled on 'GET' operations! Use - '/listSecrets' POST request to get the value. - :paramtype value: str - :keyword key_vault: KeyVault location details of the namedValue. - :paramtype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties - """ - super().__init__(**kwargs) - self.tags = tags - self.secret = secret - self.display_name = display_name - self.value = value - self.key_vault = key_vault - - -class NamedValueCreateContractProperties(NamedValueEntityBaseParameters): - """NamedValue Contract properties. - - All required parameters must be populated in order to send to server. - - :ivar tags: Optional tags that when provided can be used to filter the NamedValue list. - :vartype tags: list[str] - :ivar secret: Determines whether the value is a secret and should be encrypted or not. Default - value is false. - :vartype secret: bool - :ivar display_name: Unique name of NamedValue. It may contain only letters, digits, period, - dash, and underscore characters. Required. - :vartype display_name: str - :ivar value: Value of the NamedValue. Can contain policy expressions. It may not be empty or - consist only of whitespace. This property will not be filled on 'GET' operations! Use - '/listSecrets' POST request to get the value. - :vartype value: str - :ivar key_vault: KeyVault location details of the namedValue. - :vartype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties - """ - - _validation = { - "tags": {"max_items": 32, "min_items": 0}, - "display_name": {"required": True, "max_length": 256, "min_length": 1, "pattern": r"^[A-Za-z0-9-._]+$"}, - "value": {"max_length": 4096}, - } - - _attribute_map = { - "tags": {"key": "tags", "type": "[str]"}, - "secret": {"key": "secret", "type": "bool"}, - "display_name": {"key": "displayName", "type": "str"}, - "value": {"key": "value", "type": "str"}, - "key_vault": {"key": "keyVault", "type": "KeyVaultContractCreateProperties"}, - } - - def __init__( - self, - *, - display_name: str, - tags: Optional[list[str]] = None, - secret: Optional[bool] = None, - value: Optional[str] = None, - key_vault: Optional["_models.KeyVaultContractCreateProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Optional tags that when provided can be used to filter the NamedValue list. - :paramtype tags: list[str] - :keyword secret: Determines whether the value is a secret and should be encrypted or not. - Default value is false. - :paramtype secret: bool - :keyword display_name: Unique name of NamedValue. It may contain only letters, digits, period, - dash, and underscore characters. Required. - :paramtype display_name: str - :keyword value: Value of the NamedValue. Can contain policy expressions. It may not be empty or - consist only of whitespace. This property will not be filled on 'GET' operations! Use - '/listSecrets' POST request to get the value. - :paramtype value: str - :keyword key_vault: KeyVault location details of the namedValue. - :paramtype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties - """ - super().__init__(tags=tags, secret=secret, **kwargs) - self.display_name = display_name - self.value = value - self.key_vault = key_vault - - -class NamedValueSecretContract(_serialization.Model): - """Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. - - :ivar value: This is secret value of the NamedValue entity. - :vartype value: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, *, value: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword value: This is secret value of the NamedValue entity. - :paramtype value: str - """ - super().__init__(**kwargs) - self.value = value - - -class NamedValueUpdateParameterProperties(NamedValueEntityBaseParameters): - """NamedValue Contract properties. - - :ivar tags: Optional tags that when provided can be used to filter the NamedValue list. - :vartype tags: list[str] - :ivar secret: Determines whether the value is a secret and should be encrypted or not. Default - value is false. - :vartype secret: bool - :ivar display_name: Unique name of NamedValue. It may contain only letters, digits, period, - dash, and underscore characters. - :vartype display_name: str - :ivar value: Value of the NamedValue. Can contain policy expressions. It may not be empty or - consist only of whitespace. - :vartype value: str - :ivar key_vault: KeyVault location details of the namedValue. - :vartype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties - """ - - _validation = { - "tags": {"max_items": 32, "min_items": 0}, - "display_name": {"max_length": 256, "min_length": 1, "pattern": r"^[A-Za-z0-9-._]+$"}, - "value": {"max_length": 4096, "min_length": 1}, - } - - _attribute_map = { - "tags": {"key": "tags", "type": "[str]"}, - "secret": {"key": "secret", "type": "bool"}, - "display_name": {"key": "displayName", "type": "str"}, - "value": {"key": "value", "type": "str"}, - "key_vault": {"key": "keyVault", "type": "KeyVaultContractCreateProperties"}, - } - - def __init__( - self, - *, - tags: Optional[list[str]] = None, - secret: Optional[bool] = None, - display_name: Optional[str] = None, - value: Optional[str] = None, - key_vault: Optional["_models.KeyVaultContractCreateProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Optional tags that when provided can be used to filter the NamedValue list. - :paramtype tags: list[str] - :keyword secret: Determines whether the value is a secret and should be encrypted or not. - Default value is false. - :paramtype secret: bool - :keyword display_name: Unique name of NamedValue. It may contain only letters, digits, period, - dash, and underscore characters. - :paramtype display_name: str - :keyword value: Value of the NamedValue. Can contain policy expressions. It may not be empty or - consist only of whitespace. - :paramtype value: str - :keyword key_vault: KeyVault location details of the namedValue. - :paramtype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties - """ - super().__init__(tags=tags, secret=secret, **kwargs) - self.display_name = display_name - self.value = value - self.key_vault = key_vault - - -class NamedValueUpdateParameters(_serialization.Model): - """NamedValue update Parameters. - - :ivar tags: Optional tags that when provided can be used to filter the NamedValue list. - :vartype tags: list[str] - :ivar secret: Determines whether the value is a secret and should be encrypted or not. Default - value is false. - :vartype secret: bool - :ivar display_name: Unique name of NamedValue. It may contain only letters, digits, period, - dash, and underscore characters. - :vartype display_name: str - :ivar value: Value of the NamedValue. Can contain policy expressions. It may not be empty or - consist only of whitespace. - :vartype value: str - :ivar key_vault: KeyVault location details of the namedValue. - :vartype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties - """ - - _validation = { - "tags": {"max_items": 32, "min_items": 0}, - "display_name": {"max_length": 256, "min_length": 1, "pattern": r"^[A-Za-z0-9-._]+$"}, - "value": {"max_length": 4096, "min_length": 1}, - } - - _attribute_map = { - "tags": {"key": "properties.tags", "type": "[str]"}, - "secret": {"key": "properties.secret", "type": "bool"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "value": {"key": "properties.value", "type": "str"}, - "key_vault": {"key": "properties.keyVault", "type": "KeyVaultContractCreateProperties"}, - } - - def __init__( - self, - *, - tags: Optional[list[str]] = None, - secret: Optional[bool] = None, - display_name: Optional[str] = None, - value: Optional[str] = None, - key_vault: Optional["_models.KeyVaultContractCreateProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Optional tags that when provided can be used to filter the NamedValue list. - :paramtype tags: list[str] - :keyword secret: Determines whether the value is a secret and should be encrypted or not. - Default value is false. - :paramtype secret: bool - :keyword display_name: Unique name of NamedValue. It may contain only letters, digits, period, - dash, and underscore characters. - :paramtype display_name: str - :keyword value: Value of the NamedValue. Can contain policy expressions. It may not be empty or - consist only of whitespace. - :paramtype value: str - :keyword key_vault: KeyVault location details of the namedValue. - :paramtype key_vault: ~azure.mgmt.apimanagement.models.KeyVaultContractCreateProperties - """ - super().__init__(**kwargs) - self.tags = tags - self.secret = secret - self.display_name = display_name - self.value = value - self.key_vault = key_vault - - -class NetworkStatusContract(_serialization.Model): - """Network Status details. - - All required parameters must be populated in order to send to server. - - :ivar dns_servers: Gets the list of DNS servers IPV4 addresses. Required. - :vartype dns_servers: list[str] - :ivar connectivity_status: Gets the list of Connectivity Status to the Resources on which the - service depends upon. Required. - :vartype connectivity_status: list[~azure.mgmt.apimanagement.models.ConnectivityStatusContract] - """ - - _validation = { - "dns_servers": {"required": True}, - "connectivity_status": {"required": True}, - } - - _attribute_map = { - "dns_servers": {"key": "dnsServers", "type": "[str]"}, - "connectivity_status": {"key": "connectivityStatus", "type": "[ConnectivityStatusContract]"}, - } - - def __init__( - self, *, dns_servers: list[str], connectivity_status: list["_models.ConnectivityStatusContract"], **kwargs: Any - ) -> None: - """ - :keyword dns_servers: Gets the list of DNS servers IPV4 addresses. Required. - :paramtype dns_servers: list[str] - :keyword connectivity_status: Gets the list of Connectivity Status to the Resources on which - the service depends upon. Required. - :paramtype connectivity_status: - list[~azure.mgmt.apimanagement.models.ConnectivityStatusContract] - """ - super().__init__(**kwargs) - self.dns_servers = dns_servers - self.connectivity_status = connectivity_status - - -class NetworkStatusContractByLocation(_serialization.Model): - """Network Status in the Location. - - :ivar location: Location of service. - :vartype location: str - :ivar network_status: Network status in Location. - :vartype network_status: ~azure.mgmt.apimanagement.models.NetworkStatusContract - """ - - _validation = { - "location": {"min_length": 1}, - } - - _attribute_map = { - "location": {"key": "location", "type": "str"}, - "network_status": {"key": "networkStatus", "type": "NetworkStatusContract"}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - network_status: Optional["_models.NetworkStatusContract"] = None, - **kwargs: Any - ) -> None: - """ - :keyword location: Location of service. - :paramtype location: str - :keyword network_status: Network status in Location. - :paramtype network_status: ~azure.mgmt.apimanagement.models.NetworkStatusContract - """ - super().__init__(**kwargs) - self.location = location - self.network_status = network_status - - -class NotificationCollection(_serialization.Model): - """Paged Notification list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.NotificationContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NotificationContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.NotificationContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.NotificationContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class NotificationContract(ProxyResource): - """Notification details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar title: Title of the Notification. - :vartype title: str - :ivar description: Description of the Notification. - :vartype description: str - :ivar recipients: Recipient Parameter values. - :vartype recipients: ~azure.mgmt.apimanagement.models.RecipientsContractProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "title": {"max_length": 1000, "min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "title": {"key": "properties.title", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "recipients": {"key": "properties.recipients", "type": "RecipientsContractProperties"}, - } - - def __init__( - self, - *, - title: Optional[str] = None, - description: Optional[str] = None, - recipients: Optional["_models.RecipientsContractProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword title: Title of the Notification. - :paramtype title: str - :keyword description: Description of the Notification. - :paramtype description: str - :keyword recipients: Recipient Parameter values. - :paramtype recipients: ~azure.mgmt.apimanagement.models.RecipientsContractProperties - """ - super().__init__(**kwargs) - self.title = title - self.description = description - self.recipients = recipients - - -class OAuth2AuthenticationSettingsContract(_serialization.Model): - """API OAuth2 Authentication settings details. - - :ivar authorization_server_id: OAuth authorization server identifier. - :vartype authorization_server_id: str - :ivar scope: operations scope. - :vartype scope: str - """ - - _attribute_map = { - "authorization_server_id": {"key": "authorizationServerId", "type": "str"}, - "scope": {"key": "scope", "type": "str"}, - } - - def __init__( - self, *, authorization_server_id: Optional[str] = None, scope: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword authorization_server_id: OAuth authorization server identifier. - :paramtype authorization_server_id: str - :keyword scope: operations scope. - :paramtype scope: str - """ - super().__init__(**kwargs) - self.authorization_server_id = authorization_server_id - self.scope = scope - - -class OpenIdAuthenticationSettingsContract(_serialization.Model): - """API OAuth2 Authentication settings details. - - :ivar openid_provider_id: OAuth authorization server identifier. - :vartype openid_provider_id: str - :ivar bearer_token_sending_methods: How to send token to the server. - :vartype bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethods] - """ - - _attribute_map = { - "openid_provider_id": {"key": "openidProviderId", "type": "str"}, - "bearer_token_sending_methods": {"key": "bearerTokenSendingMethods", "type": "[str]"}, - } - - def __init__( - self, - *, - openid_provider_id: Optional[str] = None, - bearer_token_sending_methods: Optional[list[Union[str, "_models.BearerTokenSendingMethods"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword openid_provider_id: OAuth authorization server identifier. - :paramtype openid_provider_id: str - :keyword bearer_token_sending_methods: How to send token to the server. - :paramtype bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethods] - """ - super().__init__(**kwargs) - self.openid_provider_id = openid_provider_id - self.bearer_token_sending_methods = bearer_token_sending_methods - - -class OpenIdConnectProviderCollection(_serialization.Model): - """Paged OpenIdProviders list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.OpenidConnectProviderContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[OpenidConnectProviderContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.OpenidConnectProviderContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.OpenidConnectProviderContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class OpenidConnectProviderContract(ProxyResource): - """OpenId Connect Provider details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar display_name: User-friendly OpenID Connect Provider name. - :vartype display_name: str - :ivar description: User-friendly description of OpenID Connect Provider. - :vartype description: str - :ivar metadata_endpoint: Metadata endpoint URI. - :vartype metadata_endpoint: str - :ivar client_id: Client ID of developer console which is the client application. - :vartype client_id: str - :ivar client_secret: Client Secret of developer console which is the client application. - :vartype client_secret: str - :ivar use_in_test_console: If true, the Open ID Connect provider may be used in the developer - portal test console. True by default if no value is provided. - :vartype use_in_test_console: bool - :ivar use_in_api_documentation: If true, the Open ID Connect provider will be used in the API - documentation in the developer portal. False by default if no value is provided. - :vartype use_in_api_documentation: bool - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "display_name": {"max_length": 50}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "metadata_endpoint": {"key": "properties.metadataEndpoint", "type": "str"}, - "client_id": {"key": "properties.clientId", "type": "str"}, - "client_secret": {"key": "properties.clientSecret", "type": "str"}, - "use_in_test_console": {"key": "properties.useInTestConsole", "type": "bool"}, - "use_in_api_documentation": {"key": "properties.useInApiDocumentation", "type": "bool"}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - description: Optional[str] = None, - metadata_endpoint: Optional[str] = None, - client_id: Optional[str] = None, - client_secret: Optional[str] = None, - use_in_test_console: Optional[bool] = None, - use_in_api_documentation: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword display_name: User-friendly OpenID Connect Provider name. - :paramtype display_name: str - :keyword description: User-friendly description of OpenID Connect Provider. - :paramtype description: str - :keyword metadata_endpoint: Metadata endpoint URI. - :paramtype metadata_endpoint: str - :keyword client_id: Client ID of developer console which is the client application. - :paramtype client_id: str - :keyword client_secret: Client Secret of developer console which is the client application. - :paramtype client_secret: str - :keyword use_in_test_console: If true, the Open ID Connect provider may be used in the - developer portal test console. True by default if no value is provided. - :paramtype use_in_test_console: bool - :keyword use_in_api_documentation: If true, the Open ID Connect provider will be used in the - API documentation in the developer portal. False by default if no value is provided. - :paramtype use_in_api_documentation: bool - """ - super().__init__(**kwargs) - self.display_name = display_name - self.description = description - self.metadata_endpoint = metadata_endpoint - self.client_id = client_id - self.client_secret = client_secret - self.use_in_test_console = use_in_test_console - self.use_in_api_documentation = use_in_api_documentation - - -class OpenidConnectProviderUpdateContract(_serialization.Model): - """Parameters supplied to the Update OpenID Connect Provider operation. - - :ivar display_name: User-friendly OpenID Connect Provider name. - :vartype display_name: str - :ivar description: User-friendly description of OpenID Connect Provider. - :vartype description: str - :ivar metadata_endpoint: Metadata endpoint URI. - :vartype metadata_endpoint: str - :ivar client_id: Client ID of developer console which is the client application. - :vartype client_id: str - :ivar client_secret: Client Secret of developer console which is the client application. - :vartype client_secret: str - :ivar use_in_test_console: If true, the Open ID Connect provider may be used in the developer - portal test console. True by default if no value is provided. - :vartype use_in_test_console: bool - :ivar use_in_api_documentation: If true, the Open ID Connect provider will be used in the API - documentation in the developer portal. False by default if no value is provided. - :vartype use_in_api_documentation: bool - """ - - _validation = { - "display_name": {"max_length": 50}, - } - - _attribute_map = { - "display_name": {"key": "properties.displayName", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "metadata_endpoint": {"key": "properties.metadataEndpoint", "type": "str"}, - "client_id": {"key": "properties.clientId", "type": "str"}, - "client_secret": {"key": "properties.clientSecret", "type": "str"}, - "use_in_test_console": {"key": "properties.useInTestConsole", "type": "bool"}, - "use_in_api_documentation": {"key": "properties.useInApiDocumentation", "type": "bool"}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - description: Optional[str] = None, - metadata_endpoint: Optional[str] = None, - client_id: Optional[str] = None, - client_secret: Optional[str] = None, - use_in_test_console: Optional[bool] = None, - use_in_api_documentation: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword display_name: User-friendly OpenID Connect Provider name. - :paramtype display_name: str - :keyword description: User-friendly description of OpenID Connect Provider. - :paramtype description: str - :keyword metadata_endpoint: Metadata endpoint URI. - :paramtype metadata_endpoint: str - :keyword client_id: Client ID of developer console which is the client application. - :paramtype client_id: str - :keyword client_secret: Client Secret of developer console which is the client application. - :paramtype client_secret: str - :keyword use_in_test_console: If true, the Open ID Connect provider may be used in the - developer portal test console. True by default if no value is provided. - :paramtype use_in_test_console: bool - :keyword use_in_api_documentation: If true, the Open ID Connect provider will be used in the - API documentation in the developer portal. False by default if no value is provided. - :paramtype use_in_api_documentation: bool - """ - super().__init__(**kwargs) - self.display_name = display_name - self.description = description - self.metadata_endpoint = metadata_endpoint - self.client_id = client_id - self.client_secret = client_secret - self.use_in_test_console = use_in_test_console - self.use_in_api_documentation = use_in_api_documentation - - -class Operation(_serialization.Model): - """REST API operation. - - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :ivar display: The object that describes the operation. - :vartype display: ~azure.mgmt.apimanagement.models.OperationDisplay - :ivar origin: The operation origin. - :vartype origin: str - :ivar properties: The operation properties. - :vartype properties: JSON - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "display": {"key": "display", "type": "OperationDisplay"}, - "origin": {"key": "origin", "type": "str"}, - "properties": {"key": "properties", "type": "object"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display: Optional["_models.OperationDisplay"] = None, - origin: Optional[str] = None, - properties: Optional[JSON] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Operation name: {provider}/{resource}/{operation}. - :paramtype name: str - :keyword display: The object that describes the operation. - :paramtype display: ~azure.mgmt.apimanagement.models.OperationDisplay - :keyword origin: The operation origin. - :paramtype origin: str - :keyword properties: The operation properties. - :paramtype properties: JSON - """ - super().__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties - - -class OperationCollection(_serialization.Model): - """Paged Operation list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.OperationContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[OperationContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword count: Total record count number across all pages. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.OperationContract"]] = None - self.count = count - self.next_link: Optional[str] = None - - -class OperationContract(ProxyResource): - """API Operation details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar template_parameters: Collection of URL template parameters. - :vartype template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :ivar description: Description of the operation. May include HTML formatting tags. - :vartype description: str - :ivar request: An entity containing request details. - :vartype request: ~azure.mgmt.apimanagement.models.RequestContract - :ivar responses: Array of Operation responses. - :vartype responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :ivar policies: Operation Policies. - :vartype policies: str - :ivar display_name: Operation Name. - :vartype display_name: str - :ivar method: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not - limited by only them. - :vartype method: str - :ivar url_template: Relative URL template identifying the target resource for this operation. - May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. - :vartype url_template: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "description": {"max_length": 1000}, - "display_name": {"max_length": 300, "min_length": 1}, - "url_template": {"max_length": 1000, "min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "template_parameters": {"key": "properties.templateParameters", "type": "[ParameterContract]"}, - "description": {"key": "properties.description", "type": "str"}, - "request": {"key": "properties.request", "type": "RequestContract"}, - "responses": {"key": "properties.responses", "type": "[ResponseContract]"}, - "policies": {"key": "properties.policies", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "method": {"key": "properties.method", "type": "str"}, - "url_template": {"key": "properties.urlTemplate", "type": "str"}, - } - - def __init__( - self, - *, - template_parameters: Optional[list["_models.ParameterContract"]] = None, - description: Optional[str] = None, - request: Optional["_models.RequestContract"] = None, - responses: Optional[list["_models.ResponseContract"]] = None, - policies: Optional[str] = None, - display_name: Optional[str] = None, - method: Optional[str] = None, - url_template: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword template_parameters: Collection of URL template parameters. - :paramtype template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :keyword description: Description of the operation. May include HTML formatting tags. - :paramtype description: str - :keyword request: An entity containing request details. - :paramtype request: ~azure.mgmt.apimanagement.models.RequestContract - :keyword responses: Array of Operation responses. - :paramtype responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :keyword policies: Operation Policies. - :paramtype policies: str - :keyword display_name: Operation Name. - :paramtype display_name: str - :keyword method: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but - not limited by only them. - :paramtype method: str - :keyword url_template: Relative URL template identifying the target resource for this - operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. - :paramtype url_template: str - """ - super().__init__(**kwargs) - self.template_parameters = template_parameters - self.description = description - self.request = request - self.responses = responses - self.policies = policies - self.display_name = display_name - self.method = method - self.url_template = url_template - - -class OperationEntityBaseContract(_serialization.Model): - """API Operation Entity Base Contract details. - - :ivar template_parameters: Collection of URL template parameters. - :vartype template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :ivar description: Description of the operation. May include HTML formatting tags. - :vartype description: str - :ivar request: An entity containing request details. - :vartype request: ~azure.mgmt.apimanagement.models.RequestContract - :ivar responses: Array of Operation responses. - :vartype responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :ivar policies: Operation Policies. - :vartype policies: str - """ - - _validation = { - "description": {"max_length": 1000}, - } - - _attribute_map = { - "template_parameters": {"key": "templateParameters", "type": "[ParameterContract]"}, - "description": {"key": "description", "type": "str"}, - "request": {"key": "request", "type": "RequestContract"}, - "responses": {"key": "responses", "type": "[ResponseContract]"}, - "policies": {"key": "policies", "type": "str"}, - } - - def __init__( - self, - *, - template_parameters: Optional[list["_models.ParameterContract"]] = None, - description: Optional[str] = None, - request: Optional["_models.RequestContract"] = None, - responses: Optional[list["_models.ResponseContract"]] = None, - policies: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword template_parameters: Collection of URL template parameters. - :paramtype template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :keyword description: Description of the operation. May include HTML formatting tags. - :paramtype description: str - :keyword request: An entity containing request details. - :paramtype request: ~azure.mgmt.apimanagement.models.RequestContract - :keyword responses: Array of Operation responses. - :paramtype responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :keyword policies: Operation Policies. - :paramtype policies: str - """ - super().__init__(**kwargs) - self.template_parameters = template_parameters - self.description = description - self.request = request - self.responses = responses - self.policies = policies - - -class OperationContractProperties(OperationEntityBaseContract): - """Operation Contract Properties. - - All required parameters must be populated in order to send to server. - - :ivar template_parameters: Collection of URL template parameters. - :vartype template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :ivar description: Description of the operation. May include HTML formatting tags. - :vartype description: str - :ivar request: An entity containing request details. - :vartype request: ~azure.mgmt.apimanagement.models.RequestContract - :ivar responses: Array of Operation responses. - :vartype responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :ivar policies: Operation Policies. - :vartype policies: str - :ivar display_name: Operation Name. Required. - :vartype display_name: str - :ivar method: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not - limited by only them. Required. - :vartype method: str - :ivar url_template: Relative URL template identifying the target resource for this operation. - May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. Required. - :vartype url_template: str - """ - - _validation = { - "description": {"max_length": 1000}, - "display_name": {"required": True, "max_length": 300, "min_length": 1}, - "method": {"required": True}, - "url_template": {"required": True, "max_length": 1000, "min_length": 1}, - } - - _attribute_map = { - "template_parameters": {"key": "templateParameters", "type": "[ParameterContract]"}, - "description": {"key": "description", "type": "str"}, - "request": {"key": "request", "type": "RequestContract"}, - "responses": {"key": "responses", "type": "[ResponseContract]"}, - "policies": {"key": "policies", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "method": {"key": "method", "type": "str"}, - "url_template": {"key": "urlTemplate", "type": "str"}, - } - - def __init__( - self, - *, - display_name: str, - method: str, - url_template: str, - template_parameters: Optional[list["_models.ParameterContract"]] = None, - description: Optional[str] = None, - request: Optional["_models.RequestContract"] = None, - responses: Optional[list["_models.ResponseContract"]] = None, - policies: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword template_parameters: Collection of URL template parameters. - :paramtype template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :keyword description: Description of the operation. May include HTML formatting tags. - :paramtype description: str - :keyword request: An entity containing request details. - :paramtype request: ~azure.mgmt.apimanagement.models.RequestContract - :keyword responses: Array of Operation responses. - :paramtype responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :keyword policies: Operation Policies. - :paramtype policies: str - :keyword display_name: Operation Name. Required. - :paramtype display_name: str - :keyword method: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but - not limited by only them. Required. - :paramtype method: str - :keyword url_template: Relative URL template identifying the target resource for this - operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. - Required. - :paramtype url_template: str - """ - super().__init__( - template_parameters=template_parameters, - description=description, - request=request, - responses=responses, - policies=policies, - **kwargs - ) - self.display_name = display_name - self.method = method - self.url_template = url_template - - -class OperationDisplay(_serialization.Model): - """The object that describes the operation. - - :ivar provider: Friendly name of the resource provider. - :vartype provider: str - :ivar operation: Operation type: read, write, delete, listKeys/action, etc. - :vartype operation: str - :ivar resource: Resource type on which the operation is performed. - :vartype resource: str - :ivar description: Friendly name of the operation. - :vartype description: str - """ - - _attribute_map = { - "provider": {"key": "provider", "type": "str"}, - "operation": {"key": "operation", "type": "str"}, - "resource": {"key": "resource", "type": "str"}, - "description": {"key": "description", "type": "str"}, - } - - def __init__( - self, - *, - provider: Optional[str] = None, - operation: Optional[str] = None, - resource: Optional[str] = None, - description: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword provider: Friendly name of the resource provider. - :paramtype provider: str - :keyword operation: Operation type: read, write, delete, listKeys/action, etc. - :paramtype operation: str - :keyword resource: Resource type on which the operation is performed. - :paramtype resource: str - :keyword description: Friendly name of the operation. - :paramtype description: str - """ - super().__init__(**kwargs) - self.provider = provider - self.operation = operation - self.resource = resource - self.description = description - - -class OperationListResult(_serialization.Model): - """Result of the request to list REST API operations. It contains a list of operations and a URL - nextLink to get the next set of results. - - :ivar value: List of operations supported by the resource provider. - :vartype value: list[~azure.mgmt.apimanagement.models.Operation] - :ivar next_link: URL to get the next set of operation list results if there are any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[Operation]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: List of operations supported by the resource provider. - :paramtype value: list[~azure.mgmt.apimanagement.models.Operation] - :keyword next_link: URL to get the next set of operation list results if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class OperationResultContract(ProxyResource): - """Long Running Git Operation Results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar id_properties_id: Operation result identifier. - :vartype id_properties_id: str - :ivar status: Status of an async operation. Known values are: "Started", "InProgress", - "Succeeded", and "Failed". - :vartype status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus - :ivar started: Start time of an async operation. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype started: ~datetime.datetime - :ivar updated: Last update time of an async operation. The date conforms to the following - format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype updated: ~datetime.datetime - :ivar result_info: Optional result info. - :vartype result_info: str - :ivar error: Error Body Contract. - :vartype error: ~azure.mgmt.apimanagement.models.ErrorResponseBody - :ivar action_log: This property if only provided as part of the TenantConfiguration_Validate - operation. It contains the log the entities which will be updated/created/deleted as part of - the TenantConfiguration_Deploy operation. - :vartype action_log: list[~azure.mgmt.apimanagement.models.OperationResultLogItemContract] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "action_log": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "id_properties_id": {"key": "properties.id", "type": "str"}, - "status": {"key": "properties.status", "type": "str"}, - "started": {"key": "properties.started", "type": "iso-8601"}, - "updated": {"key": "properties.updated", "type": "iso-8601"}, - "result_info": {"key": "properties.resultInfo", "type": "str"}, - "error": {"key": "properties.error", "type": "ErrorResponseBody"}, - "action_log": {"key": "properties.actionLog", "type": "[OperationResultLogItemContract]"}, - } - - def __init__( - self, - *, - id_properties_id: Optional[str] = None, - status: Optional[Union[str, "_models.AsyncOperationStatus"]] = None, - started: Optional[datetime.datetime] = None, - updated: Optional[datetime.datetime] = None, - result_info: Optional[str] = None, - error: Optional["_models.ErrorResponseBody"] = None, - **kwargs: Any - ) -> None: - """ - :keyword id_properties_id: Operation result identifier. - :paramtype id_properties_id: str - :keyword status: Status of an async operation. Known values are: "Started", "InProgress", - "Succeeded", and "Failed". - :paramtype status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus - :keyword started: Start time of an async operation. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype started: ~datetime.datetime - :keyword updated: Last update time of an async operation. The date conforms to the following - format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype updated: ~datetime.datetime - :keyword result_info: Optional result info. - :paramtype result_info: str - :keyword error: Error Body Contract. - :paramtype error: ~azure.mgmt.apimanagement.models.ErrorResponseBody - """ - super().__init__(**kwargs) - self.id_properties_id = id_properties_id - self.status = status - self.started = started - self.updated = updated - self.result_info = result_info - self.error = error - self.action_log: Optional[list["_models.OperationResultLogItemContract"]] = None - - -class OperationResultLogItemContract(_serialization.Model): - """Log of the entity being created, updated or deleted. - - :ivar object_type: The type of entity contract. - :vartype object_type: str - :ivar action: Action like create/update/delete. - :vartype action: str - :ivar object_key: Identifier of the entity being created/updated/deleted. - :vartype object_key: str - """ - - _attribute_map = { - "object_type": {"key": "objectType", "type": "str"}, - "action": {"key": "action", "type": "str"}, - "object_key": {"key": "objectKey", "type": "str"}, - } - - def __init__( - self, - *, - object_type: Optional[str] = None, - action: Optional[str] = None, - object_key: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword object_type: The type of entity contract. - :paramtype object_type: str - :keyword action: Action like create/update/delete. - :paramtype action: str - :keyword object_key: Identifier of the entity being created/updated/deleted. - :paramtype object_key: str - """ - super().__init__(**kwargs) - self.object_type = object_type - self.action = action - self.object_key = object_key - - -class OperationStatusResult(_serialization.Model): - """The current status of an async operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified ID for the async operation. - :vartype id: str - :ivar resource_id: Fully qualified ID of the resource against which the original async - operation was started. - :vartype resource_id: str - :ivar name: Name of the async operation. - :vartype name: str - :ivar status: Operation status. Required. - :vartype status: str - :ivar percent_complete: Percent of the operation that is complete. - :vartype percent_complete: float - :ivar start_time: The start time of the operation. - :vartype start_time: ~datetime.datetime - :ivar end_time: The end time of the operation. - :vartype end_time: ~datetime.datetime - :ivar operations: The operations list. - :vartype operations: list[~azure.mgmt.apimanagement.models.OperationStatusResult] - :ivar error: If present, details of the operation error. - :vartype error: ~azure.mgmt.apimanagement.models.ErrorDetail - """ - - _validation = { - "resource_id": {"readonly": True}, - "status": {"required": True}, - "percent_complete": {"maximum": 100, "minimum": 0}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "resource_id": {"key": "resourceId", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "status": {"key": "status", "type": "str"}, - "percent_complete": {"key": "percentComplete", "type": "float"}, - "start_time": {"key": "startTime", "type": "iso-8601"}, - "end_time": {"key": "endTime", "type": "iso-8601"}, - "operations": {"key": "operations", "type": "[OperationStatusResult]"}, - "error": {"key": "error", "type": "ErrorDetail"}, - } - - def __init__( - self, - *, - status: str, - id: Optional[str] = None, # pylint: disable=redefined-builtin - name: Optional[str] = None, - percent_complete: Optional[float] = None, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - operations: Optional[list["_models.OperationStatusResult"]] = None, - error: Optional["_models.ErrorDetail"] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: Fully qualified ID for the async operation. - :paramtype id: str - :keyword name: Name of the async operation. - :paramtype name: str - :keyword status: Operation status. Required. - :paramtype status: str - :keyword percent_complete: Percent of the operation that is complete. - :paramtype percent_complete: float - :keyword start_time: The start time of the operation. - :paramtype start_time: ~datetime.datetime - :keyword end_time: The end time of the operation. - :paramtype end_time: ~datetime.datetime - :keyword operations: The operations list. - :paramtype operations: list[~azure.mgmt.apimanagement.models.OperationStatusResult] - :keyword error: If present, details of the operation error. - :paramtype error: ~azure.mgmt.apimanagement.models.ErrorDetail - """ - super().__init__(**kwargs) - self.id = id - self.resource_id: Optional[str] = None - self.name = name - self.status = status - self.percent_complete = percent_complete - self.start_time = start_time - self.end_time = end_time - self.operations = operations - self.error = error - - -class OperationTagResourceContractProperties(_serialization.Model): - """Operation Entity contract Properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Identifier of the operation in form /operations/{operationId}. - :vartype id: str - :ivar name: Operation name. - :vartype name: str - :ivar api_name: API Name. - :vartype api_name: str - :ivar api_revision: API Revision. - :vartype api_revision: str - :ivar api_version: API Version. - :vartype api_version: str - :ivar description: Operation Description. - :vartype description: str - :ivar method: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not - limited by only them. - :vartype method: str - :ivar url_template: Relative URL template identifying the target resource for this operation. - May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. - :vartype url_template: str - """ - - _validation = { - "name": {"readonly": True}, - "api_name": {"readonly": True}, - "api_revision": {"readonly": True}, - "api_version": {"readonly": True}, - "description": {"readonly": True}, - "method": {"readonly": True}, - "url_template": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "api_name": {"key": "apiName", "type": "str"}, - "api_revision": {"key": "apiRevision", "type": "str"}, - "api_version": {"key": "apiVersion", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "method": {"key": "method", "type": "str"}, - "url_template": {"key": "urlTemplate", "type": "str"}, - } - - def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin - """ - :keyword id: Identifier of the operation in form /operations/{operationId}. - :paramtype id: str - """ - super().__init__(**kwargs) - self.id = id - self.name: Optional[str] = None - self.api_name: Optional[str] = None - self.api_revision: Optional[str] = None - self.api_version: Optional[str] = None - self.description: Optional[str] = None - self.method: Optional[str] = None - self.url_template: Optional[str] = None - - -class OperationUpdateContract(_serialization.Model): - """API Operation Update Contract details. - - :ivar template_parameters: Collection of URL template parameters. - :vartype template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :ivar description: Description of the operation. May include HTML formatting tags. - :vartype description: str - :ivar request: An entity containing request details. - :vartype request: ~azure.mgmt.apimanagement.models.RequestContract - :ivar responses: Array of Operation responses. - :vartype responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :ivar policies: Operation Policies. - :vartype policies: str - :ivar display_name: Operation Name. - :vartype display_name: str - :ivar method: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not - limited by only them. - :vartype method: str - :ivar url_template: Relative URL template identifying the target resource for this operation. - May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. - :vartype url_template: str - """ - - _validation = { - "description": {"max_length": 1000}, - "display_name": {"max_length": 300, "min_length": 1}, - "url_template": {"max_length": 1000, "min_length": 1}, - } - - _attribute_map = { - "template_parameters": {"key": "properties.templateParameters", "type": "[ParameterContract]"}, - "description": {"key": "properties.description", "type": "str"}, - "request": {"key": "properties.request", "type": "RequestContract"}, - "responses": {"key": "properties.responses", "type": "[ResponseContract]"}, - "policies": {"key": "properties.policies", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "method": {"key": "properties.method", "type": "str"}, - "url_template": {"key": "properties.urlTemplate", "type": "str"}, - } - - def __init__( - self, - *, - template_parameters: Optional[list["_models.ParameterContract"]] = None, - description: Optional[str] = None, - request: Optional["_models.RequestContract"] = None, - responses: Optional[list["_models.ResponseContract"]] = None, - policies: Optional[str] = None, - display_name: Optional[str] = None, - method: Optional[str] = None, - url_template: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword template_parameters: Collection of URL template parameters. - :paramtype template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :keyword description: Description of the operation. May include HTML formatting tags. - :paramtype description: str - :keyword request: An entity containing request details. - :paramtype request: ~azure.mgmt.apimanagement.models.RequestContract - :keyword responses: Array of Operation responses. - :paramtype responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :keyword policies: Operation Policies. - :paramtype policies: str - :keyword display_name: Operation Name. - :paramtype display_name: str - :keyword method: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but - not limited by only them. - :paramtype method: str - :keyword url_template: Relative URL template identifying the target resource for this - operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. - :paramtype url_template: str - """ - super().__init__(**kwargs) - self.template_parameters = template_parameters - self.description = description - self.request = request - self.responses = responses - self.policies = policies - self.display_name = display_name - self.method = method - self.url_template = url_template - - -class OperationUpdateContractProperties(OperationEntityBaseContract): - """Operation Update Contract Properties. - - :ivar template_parameters: Collection of URL template parameters. - :vartype template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :ivar description: Description of the operation. May include HTML formatting tags. - :vartype description: str - :ivar request: An entity containing request details. - :vartype request: ~azure.mgmt.apimanagement.models.RequestContract - :ivar responses: Array of Operation responses. - :vartype responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :ivar policies: Operation Policies. - :vartype policies: str - :ivar display_name: Operation Name. - :vartype display_name: str - :ivar method: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not - limited by only them. - :vartype method: str - :ivar url_template: Relative URL template identifying the target resource for this operation. - May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. - :vartype url_template: str - """ - - _validation = { - "description": {"max_length": 1000}, - "display_name": {"max_length": 300, "min_length": 1}, - "url_template": {"max_length": 1000, "min_length": 1}, - } - - _attribute_map = { - "template_parameters": {"key": "templateParameters", "type": "[ParameterContract]"}, - "description": {"key": "description", "type": "str"}, - "request": {"key": "request", "type": "RequestContract"}, - "responses": {"key": "responses", "type": "[ResponseContract]"}, - "policies": {"key": "policies", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "method": {"key": "method", "type": "str"}, - "url_template": {"key": "urlTemplate", "type": "str"}, - } - - def __init__( - self, - *, - template_parameters: Optional[list["_models.ParameterContract"]] = None, - description: Optional[str] = None, - request: Optional["_models.RequestContract"] = None, - responses: Optional[list["_models.ResponseContract"]] = None, - policies: Optional[str] = None, - display_name: Optional[str] = None, - method: Optional[str] = None, - url_template: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword template_parameters: Collection of URL template parameters. - :paramtype template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :keyword description: Description of the operation. May include HTML formatting tags. - :paramtype description: str - :keyword request: An entity containing request details. - :paramtype request: ~azure.mgmt.apimanagement.models.RequestContract - :keyword responses: Array of Operation responses. - :paramtype responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :keyword policies: Operation Policies. - :paramtype policies: str - :keyword display_name: Operation Name. - :paramtype display_name: str - :keyword method: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but - not limited by only them. - :paramtype method: str - :keyword url_template: Relative URL template identifying the target resource for this - operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. - :paramtype url_template: str - """ - super().__init__( - template_parameters=template_parameters, - description=description, - request=request, - responses=responses, - policies=policies, - **kwargs - ) - self.display_name = display_name - self.method = method - self.url_template = url_template - - -class OutboundEnvironmentEndpoint(_serialization.Model): - """Endpoints accessed for a common purpose that the Api Management Service requires outbound - network access to. - - :ivar category: The type of service accessed by the Api Management Service, e.g., Azure - Storage, Azure SQL Database, and Azure Active Directory. - :vartype category: str - :ivar endpoints: The endpoints that the Api Management Service reaches the service at. - :vartype endpoints: list[~azure.mgmt.apimanagement.models.EndpointDependency] - """ - - _attribute_map = { - "category": {"key": "category", "type": "str"}, - "endpoints": {"key": "endpoints", "type": "[EndpointDependency]"}, - } - - def __init__( - self, - *, - category: Optional[str] = None, - endpoints: Optional[list["_models.EndpointDependency"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword category: The type of service accessed by the Api Management Service, e.g., Azure - Storage, Azure SQL Database, and Azure Active Directory. - :paramtype category: str - :keyword endpoints: The endpoints that the Api Management Service reaches the service at. - :paramtype endpoints: list[~azure.mgmt.apimanagement.models.EndpointDependency] - """ - super().__init__(**kwargs) - self.category = category - self.endpoints = endpoints - - -class OutboundEnvironmentEndpointList(_serialization.Model): - """Collection of Outbound Environment Endpoints. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar value: Collection of resources. Required. - :vartype value: list[~azure.mgmt.apimanagement.models.OutboundEnvironmentEndpoint] - :ivar next_link: Link to next page of resources. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[OutboundEnvironmentEndpoint]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: list["_models.OutboundEnvironmentEndpoint"], **kwargs: Any) -> None: - """ - :keyword value: Collection of resources. Required. - :paramtype value: list[~azure.mgmt.apimanagement.models.OutboundEnvironmentEndpoint] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class ParameterContract(_serialization.Model): - """Operation parameters details. - - All required parameters must be populated in order to send to server. - - :ivar name: Parameter name. Required. - :vartype name: str - :ivar description: Parameter description. - :vartype description: str - :ivar type: Parameter type. Required. - :vartype type: str - :ivar default_value: Default parameter value. - :vartype default_value: str - :ivar required: Specifies whether parameter is required or not. - :vartype required: bool - :ivar values: Parameter values. - :vartype values: list[str] - :ivar schema_id: Schema identifier. - :vartype schema_id: str - :ivar type_name: Type name defined by the schema. - :vartype type_name: str - :ivar examples: Exampled defined for the parameter. - :vartype examples: dict[str, ~azure.mgmt.apimanagement.models.ParameterExampleContract] - """ - - _validation = { - "name": {"required": True}, - "type": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "default_value": {"key": "defaultValue", "type": "str"}, - "required": {"key": "required", "type": "bool"}, - "values": {"key": "values", "type": "[str]"}, - "schema_id": {"key": "schemaId", "type": "str"}, - "type_name": {"key": "typeName", "type": "str"}, - "examples": {"key": "examples", "type": "{ParameterExampleContract}"}, - } - - def __init__( - self, - *, - name: str, - type: str, - description: Optional[str] = None, - default_value: Optional[str] = None, - required: Optional[bool] = None, - values: Optional[list[str]] = None, - schema_id: Optional[str] = None, - type_name: Optional[str] = None, - examples: Optional[dict[str, "_models.ParameterExampleContract"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Parameter name. Required. - :paramtype name: str - :keyword description: Parameter description. - :paramtype description: str - :keyword type: Parameter type. Required. - :paramtype type: str - :keyword default_value: Default parameter value. - :paramtype default_value: str - :keyword required: Specifies whether parameter is required or not. - :paramtype required: bool - :keyword values: Parameter values. - :paramtype values: list[str] - :keyword schema_id: Schema identifier. - :paramtype schema_id: str - :keyword type_name: Type name defined by the schema. - :paramtype type_name: str - :keyword examples: Exampled defined for the parameter. - :paramtype examples: dict[str, ~azure.mgmt.apimanagement.models.ParameterExampleContract] - """ - super().__init__(**kwargs) - self.name = name - self.description = description - self.type = type - self.default_value = default_value - self.required = required - self.values = values - self.schema_id = schema_id - self.type_name = type_name - self.examples = examples - - -class ParameterExampleContract(_serialization.Model): - """Parameter example. - - :ivar summary: Short description for the example. - :vartype summary: str - :ivar description: Long description for the example. - :vartype description: str - :ivar value: Example value. May be a primitive value, or an object. - :vartype value: any - :ivar external_value: A URL that points to the literal example. - :vartype external_value: str - """ - - _attribute_map = { - "summary": {"key": "summary", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "value": {"key": "value", "type": "object"}, - "external_value": {"key": "externalValue", "type": "str"}, - } - - def __init__( - self, - *, - summary: Optional[str] = None, - description: Optional[str] = None, - value: Optional[Any] = None, - external_value: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword summary: Short description for the example. - :paramtype summary: str - :keyword description: Long description for the example. - :paramtype description: str - :keyword value: Example value. May be a primitive value, or an object. - :paramtype value: any - :keyword external_value: A URL that points to the literal example. - :paramtype external_value: str - """ - super().__init__(**kwargs) - self.summary = summary - self.description = description - self.value = value - self.external_value = external_value - - -class PipelineDiagnosticSettings(_serialization.Model): - """Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. - - :ivar request: Diagnostic settings for request. - :vartype request: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic - :ivar response: Diagnostic settings for response. - :vartype response: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic - """ - - _attribute_map = { - "request": {"key": "request", "type": "HttpMessageDiagnostic"}, - "response": {"key": "response", "type": "HttpMessageDiagnostic"}, - } - - def __init__( - self, - *, - request: Optional["_models.HttpMessageDiagnostic"] = None, - response: Optional["_models.HttpMessageDiagnostic"] = None, - **kwargs: Any - ) -> None: - """ - :keyword request: Diagnostic settings for request. - :paramtype request: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic - :keyword response: Diagnostic settings for response. - :paramtype response: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic - """ - super().__init__(**kwargs) - self.request = request - self.response = response - - -class PolicyCollection(_serialization.Model): - """The response of the list policy operation. - - :ivar value: Policy Contract value. - :vartype value: list[~azure.mgmt.apimanagement.models.PolicyContract] - :ivar count: Total record count number. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[PolicyContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.PolicyContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Policy Contract value. - :paramtype value: list[~azure.mgmt.apimanagement.models.PolicyContract] - :keyword count: Total record count number. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class PolicyContract(ProxyResource): - """Policy Contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar value: Contents of the Policy as defined by the format. - :vartype value: str - :ivar format: Format of the policyContent. Known values are: "xml", "xml-link", "rawxml", and - "rawxml-link". - :vartype format: str or ~azure.mgmt.apimanagement.models.PolicyContentFormat - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "value": {"key": "properties.value", "type": "str"}, - "format": {"key": "properties.format", "type": "str"}, - } - - def __init__( - self, *, value: Optional[str] = None, format: Union[str, "_models.PolicyContentFormat"] = "xml", **kwargs: Any - ) -> None: - """ - :keyword value: Contents of the Policy as defined by the format. - :paramtype value: str - :keyword format: Format of the policyContent. Known values are: "xml", "xml-link", "rawxml", - and "rawxml-link". - :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyContentFormat - """ - super().__init__(**kwargs) - self.value = value - self.format = format - - -class PolicyDescriptionCollection(_serialization.Model): - """Descriptions of API Management policies. - - :ivar value: Descriptions of API Management policies. - :vartype value: list[~azure.mgmt.apimanagement.models.PolicyDescriptionContract] - :ivar count: Total record count number. - :vartype count: int - """ - - _attribute_map = { - "value": {"key": "value", "type": "[PolicyDescriptionContract]"}, - "count": {"key": "count", "type": "int"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.PolicyDescriptionContract"]] = None, - count: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Descriptions of API Management policies. - :paramtype value: list[~azure.mgmt.apimanagement.models.PolicyDescriptionContract] - :keyword count: Total record count number. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value = value - self.count = count - - -class PolicyDescriptionContract(ProxyResource): - """Policy description details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar description: Policy description. - :vartype description: str - :ivar scope: Binary OR value of the Snippet scope. - :vartype scope: int - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "description": {"readonly": True}, - "scope": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "scope": {"key": "properties.scope", "type": "int"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.description: Optional[str] = None - self.scope: Optional[int] = None - - -class PolicyFragmentCollection(_serialization.Model): - """The response of the get policy fragments operation. - - :ivar value: Policy fragment contract value. - :vartype value: list[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :ivar count: Total record count number. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[PolicyFragmentContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.PolicyFragmentContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Policy fragment contract value. - :paramtype value: list[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :keyword count: Total record count number. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class PolicyFragmentContract(ProxyResource): - """Policy fragment contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar value: Contents of the policy fragment. - :vartype value: str - :ivar description: Policy fragment description. - :vartype description: str - :ivar format: Format of the policy fragment content. Known values are: "xml" and "rawxml". - :vartype format: str or ~azure.mgmt.apimanagement.models.PolicyFragmentContentFormat - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "description": {"max_length": 1000}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "value": {"key": "properties.value", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "format": {"key": "properties.format", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[str] = None, - description: Optional[str] = None, - format: Optional[Union[str, "_models.PolicyFragmentContentFormat"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Contents of the policy fragment. - :paramtype value: str - :keyword description: Policy fragment description. - :paramtype description: str - :keyword format: Format of the policy fragment content. Known values are: "xml" and "rawxml". - :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyFragmentContentFormat - """ - super().__init__(**kwargs) - self.value = value - self.description = description - self.format = format - self.provisioning_state: Optional[str] = None - - -class PolicyRestrictionCollection(_serialization.Model): - """The response of the get policy restrictions operation. - - :ivar value: - :vartype value: list[~azure.mgmt.apimanagement.models.PolicyRestrictionContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[PolicyRestrictionContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.PolicyRestrictionContract"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: - :paramtype value: list[~azure.mgmt.apimanagement.models.PolicyRestrictionContract] - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class PolicyRestrictionContract(ProxyResource): - """Policy restriction contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar scope: Path to the policy document. - :vartype scope: str - :ivar require_base: Indicates if base policy should be enforced for the policy document. Known - values are: "true" and "false". - :vartype require_base: str or ~azure.mgmt.apimanagement.models.PolicyRestrictionRequireBase - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "scope": {"key": "properties.scope", "type": "str"}, - "require_base": {"key": "properties.requireBase", "type": "str"}, - } - - def __init__( - self, - *, - scope: Optional[str] = None, - require_base: Union[str, "_models.PolicyRestrictionRequireBase"] = "false", - **kwargs: Any - ) -> None: - """ - :keyword scope: Path to the policy document. - :paramtype scope: str - :keyword require_base: Indicates if base policy should be enforced for the policy document. - Known values are: "true" and "false". - :paramtype require_base: str or ~azure.mgmt.apimanagement.models.PolicyRestrictionRequireBase - """ - super().__init__(**kwargs) - self.scope = scope - self.require_base = require_base - - -class PolicyRestrictionUpdateContract(_serialization.Model): - """Policy restriction contract details. - - :ivar scope: Path to the policy document. - :vartype scope: str - :ivar require_base: Indicates if base policy should be enforced for the policy document. Known - values are: "true" and "false". - :vartype require_base: str or ~azure.mgmt.apimanagement.models.PolicyRestrictionRequireBase - """ - - _attribute_map = { - "scope": {"key": "properties.scope", "type": "str"}, - "require_base": {"key": "properties.requireBase", "type": "str"}, - } - - def __init__( - self, - *, - scope: Optional[str] = None, - require_base: Union[str, "_models.PolicyRestrictionRequireBase"] = "false", - **kwargs: Any - ) -> None: - """ - :keyword scope: Path to the policy document. - :paramtype scope: str - :keyword require_base: Indicates if base policy should be enforced for the policy document. - Known values are: "true" and "false". - :paramtype require_base: str or ~azure.mgmt.apimanagement.models.PolicyRestrictionRequireBase - """ - super().__init__(**kwargs) - self.scope = scope - self.require_base = require_base - - -class PolicyWithComplianceCollection(_serialization.Model): - """The response of the list policy operation. - - :ivar value: Policy Contract value. - :vartype value: list[~azure.mgmt.apimanagement.models.PolicyWithComplianceContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[PolicyWithComplianceContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.PolicyWithComplianceContract"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Policy Contract value. - :paramtype value: list[~azure.mgmt.apimanagement.models.PolicyWithComplianceContract] - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class PolicyWithComplianceContract(ProxyResource): - """Policy Contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar reference_policy_id: Policy Identifier. - :vartype reference_policy_id: str - :ivar compliance_state: Policy Restriction Compliance State. Known values are: "Pending", - "NonCompliant", and "Compliant". - :vartype compliance_state: str or ~azure.mgmt.apimanagement.models.PolicyComplianceState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "reference_policy_id": {"key": "properties.referencePolicyId", "type": "str"}, - "compliance_state": {"key": "properties.complianceState", "type": "str"}, - } - - def __init__( - self, - *, - reference_policy_id: Optional[str] = None, - compliance_state: Optional[Union[str, "_models.PolicyComplianceState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword reference_policy_id: Policy Identifier. - :paramtype reference_policy_id: str - :keyword compliance_state: Policy Restriction Compliance State. Known values are: "Pending", - "NonCompliant", and "Compliant". - :paramtype compliance_state: str or ~azure.mgmt.apimanagement.models.PolicyComplianceState - """ - super().__init__(**kwargs) - self.reference_policy_id = reference_policy_id - self.compliance_state = compliance_state - - -class PortalConfigCollection(_serialization.Model): - """The collection of the developer portal configurations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The developer portal configurations. - :vartype value: list[~azure.mgmt.apimanagement.models.PortalConfigContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[PortalConfigContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[list["_models.PortalConfigContract"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The developer portal configurations. - :paramtype value: list[~azure.mgmt.apimanagement.models.PortalConfigContract] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class PortalConfigContract(ProxyResource): - """The developer portal configuration contract. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar enable_basic_auth: Enable or disable Basic authentication method. - :vartype enable_basic_auth: bool - :ivar signin: - :vartype signin: ~azure.mgmt.apimanagement.models.PortalConfigPropertiesSignin - :ivar signup: - :vartype signup: ~azure.mgmt.apimanagement.models.PortalConfigPropertiesSignup - :ivar delegation: The developer portal delegation settings. - :vartype delegation: ~azure.mgmt.apimanagement.models.PortalConfigDelegationProperties - :ivar cors: The developer portal Cross-Origin Resource Sharing (CORS) settings. - :vartype cors: ~azure.mgmt.apimanagement.models.PortalConfigCorsProperties - :ivar csp: The developer portal Content Security Policy (CSP) settings. - :vartype csp: ~azure.mgmt.apimanagement.models.PortalConfigCspProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "enable_basic_auth": {"key": "properties.enableBasicAuth", "type": "bool"}, - "signin": {"key": "properties.signin", "type": "PortalConfigPropertiesSignin"}, - "signup": {"key": "properties.signup", "type": "PortalConfigPropertiesSignup"}, - "delegation": {"key": "properties.delegation", "type": "PortalConfigDelegationProperties"}, - "cors": {"key": "properties.cors", "type": "PortalConfigCorsProperties"}, - "csp": {"key": "properties.csp", "type": "PortalConfigCspProperties"}, - } - - def __init__( - self, - *, - enable_basic_auth: bool = True, - signin: Optional["_models.PortalConfigPropertiesSignin"] = None, - signup: Optional["_models.PortalConfigPropertiesSignup"] = None, - delegation: Optional["_models.PortalConfigDelegationProperties"] = None, - cors: Optional["_models.PortalConfigCorsProperties"] = None, - csp: Optional["_models.PortalConfigCspProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword enable_basic_auth: Enable or disable Basic authentication method. - :paramtype enable_basic_auth: bool - :keyword signin: - :paramtype signin: ~azure.mgmt.apimanagement.models.PortalConfigPropertiesSignin - :keyword signup: - :paramtype signup: ~azure.mgmt.apimanagement.models.PortalConfigPropertiesSignup - :keyword delegation: The developer portal delegation settings. - :paramtype delegation: ~azure.mgmt.apimanagement.models.PortalConfigDelegationProperties - :keyword cors: The developer portal Cross-Origin Resource Sharing (CORS) settings. - :paramtype cors: ~azure.mgmt.apimanagement.models.PortalConfigCorsProperties - :keyword csp: The developer portal Content Security Policy (CSP) settings. - :paramtype csp: ~azure.mgmt.apimanagement.models.PortalConfigCspProperties - """ - super().__init__(**kwargs) - self.enable_basic_auth = enable_basic_auth - self.signin = signin - self.signup = signup - self.delegation = delegation - self.cors = cors - self.csp = csp - - -class PortalConfigCorsProperties(_serialization.Model): - """The developer portal Cross-Origin Resource Sharing (CORS) settings. - - :ivar allowed_origins: Allowed origins, e.g. ``https://trusted.com``. - :vartype allowed_origins: list[str] - """ - - _attribute_map = { - "allowed_origins": {"key": "allowedOrigins", "type": "[str]"}, - } - - def __init__(self, *, allowed_origins: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword allowed_origins: Allowed origins, e.g. ``https://trusted.com``. - :paramtype allowed_origins: list[str] - """ - super().__init__(**kwargs) - self.allowed_origins = allowed_origins - - -class PortalConfigCspProperties(_serialization.Model): - """The developer portal Content Security Policy (CSP) settings. - - :ivar mode: The mode of the developer portal Content Security Policy (CSP). Known values are: - "enabled", "disabled", and "reportOnly". - :vartype mode: str or ~azure.mgmt.apimanagement.models.PortalSettingsCspMode - :ivar report_uri: The URLs used by the browser to report CSP violations. - :vartype report_uri: list[str] - :ivar allowed_sources: Allowed sources, e.g. ``*.trusted.com``\\ , ``trusted.com``\\ , - ``https://``. - :vartype allowed_sources: list[str] - """ - - _attribute_map = { - "mode": {"key": "mode", "type": "str"}, - "report_uri": {"key": "reportUri", "type": "[str]"}, - "allowed_sources": {"key": "allowedSources", "type": "[str]"}, - } - - def __init__( - self, - *, - mode: Union[str, "_models.PortalSettingsCspMode"] = "disabled", - report_uri: Optional[list[str]] = None, - allowed_sources: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword mode: The mode of the developer portal Content Security Policy (CSP). Known values - are: "enabled", "disabled", and "reportOnly". - :paramtype mode: str or ~azure.mgmt.apimanagement.models.PortalSettingsCspMode - :keyword report_uri: The URLs used by the browser to report CSP violations. - :paramtype report_uri: list[str] - :keyword allowed_sources: Allowed sources, e.g. ``*.trusted.com``\\ , ``trusted.com``\\ , - ``https://``. - :paramtype allowed_sources: list[str] - """ - super().__init__(**kwargs) - self.mode = mode - self.report_uri = report_uri - self.allowed_sources = allowed_sources - - -class PortalConfigDelegationProperties(_serialization.Model): - """PortalConfigDelegationProperties. - - :ivar delegate_registration: Enable or disable delegation for user registration. - :vartype delegate_registration: bool - :ivar delegate_subscription: Enable or disable delegation for product subscriptions. - :vartype delegate_subscription: bool - :ivar delegation_url: A delegation endpoint URL. - :vartype delegation_url: str - :ivar validation_key: A base64-encoded validation key to ensure requests originate from Azure - API Management service. - :vartype validation_key: str - """ - - _attribute_map = { - "delegate_registration": {"key": "delegateRegistration", "type": "bool"}, - "delegate_subscription": {"key": "delegateSubscription", "type": "bool"}, - "delegation_url": {"key": "delegationUrl", "type": "str"}, - "validation_key": {"key": "validationKey", "type": "str"}, - } - - def __init__( - self, - *, - delegate_registration: bool = False, - delegate_subscription: bool = False, - delegation_url: Optional[str] = None, - validation_key: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword delegate_registration: Enable or disable delegation for user registration. - :paramtype delegate_registration: bool - :keyword delegate_subscription: Enable or disable delegation for product subscriptions. - :paramtype delegate_subscription: bool - :keyword delegation_url: A delegation endpoint URL. - :paramtype delegation_url: str - :keyword validation_key: A base64-encoded validation key to ensure requests originate from - Azure API Management service. - :paramtype validation_key: str - """ - super().__init__(**kwargs) - self.delegate_registration = delegate_registration - self.delegate_subscription = delegate_subscription - self.delegation_url = delegation_url - self.validation_key = validation_key - - -class PortalConfigPropertiesSignin(_serialization.Model): - """PortalConfigPropertiesSignin. - - :ivar require: Redirect anonymous users to the sign-in page. - :vartype require: bool - """ - - _attribute_map = { - "require": {"key": "require", "type": "bool"}, - } - - def __init__(self, *, require: bool = False, **kwargs: Any) -> None: - """ - :keyword require: Redirect anonymous users to the sign-in page. - :paramtype require: bool - """ - super().__init__(**kwargs) - self.require = require - - -class PortalConfigPropertiesSignup(_serialization.Model): - """PortalConfigPropertiesSignup. - - :ivar terms_of_service: Terms of service settings. - :vartype terms_of_service: - ~azure.mgmt.apimanagement.models.PortalConfigTermsOfServiceProperties - """ - - _attribute_map = { - "terms_of_service": {"key": "termsOfService", "type": "PortalConfigTermsOfServiceProperties"}, - } - - def __init__( - self, *, terms_of_service: Optional["_models.PortalConfigTermsOfServiceProperties"] = None, **kwargs: Any - ) -> None: - """ - :keyword terms_of_service: Terms of service settings. - :paramtype terms_of_service: - ~azure.mgmt.apimanagement.models.PortalConfigTermsOfServiceProperties - """ - super().__init__(**kwargs) - self.terms_of_service = terms_of_service - - -class PortalConfigTermsOfServiceProperties(_serialization.Model): - """Terms of service contract properties. - - :ivar text: A terms of service text. - :vartype text: str - :ivar require_consent: Ask user for consent to the terms of service. - :vartype require_consent: bool - """ - - _attribute_map = { - "text": {"key": "text", "type": "str"}, - "require_consent": {"key": "requireConsent", "type": "bool"}, - } - - def __init__(self, *, text: Optional[str] = None, require_consent: bool = False, **kwargs: Any) -> None: - """ - :keyword text: A terms of service text. - :paramtype text: str - :keyword require_consent: Ask user for consent to the terms of service. - :paramtype require_consent: bool - """ - super().__init__(**kwargs) - self.text = text - self.require_consent = require_consent - - -class PortalDelegationSettings(ProxyResource): - """Delegation settings for a developer portal. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar url: A delegation Url. - :vartype url: str - :ivar validation_key: A base64-encoded validation key to validate, that a request is coming - from Azure API Management. - :vartype validation_key: str - :ivar subscriptions: Subscriptions delegation settings. - :vartype subscriptions: - ~azure.mgmt.apimanagement.models.SubscriptionsDelegationSettingsProperties - :ivar user_registration: User registration delegation settings. - :vartype user_registration: - ~azure.mgmt.apimanagement.models.RegistrationDelegationSettingsProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "url": {"key": "properties.url", "type": "str"}, - "validation_key": {"key": "properties.validationKey", "type": "str"}, - "subscriptions": {"key": "properties.subscriptions", "type": "SubscriptionsDelegationSettingsProperties"}, - "user_registration": {"key": "properties.userRegistration", "type": "RegistrationDelegationSettingsProperties"}, - } - - def __init__( - self, - *, - url: Optional[str] = None, - validation_key: Optional[str] = None, - subscriptions: Optional["_models.SubscriptionsDelegationSettingsProperties"] = None, - user_registration: Optional["_models.RegistrationDelegationSettingsProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword url: A delegation Url. - :paramtype url: str - :keyword validation_key: A base64-encoded validation key to validate, that a request is coming - from Azure API Management. - :paramtype validation_key: str - :keyword subscriptions: Subscriptions delegation settings. - :paramtype subscriptions: - ~azure.mgmt.apimanagement.models.SubscriptionsDelegationSettingsProperties - :keyword user_registration: User registration delegation settings. - :paramtype user_registration: - ~azure.mgmt.apimanagement.models.RegistrationDelegationSettingsProperties - """ - super().__init__(**kwargs) - self.url = url - self.validation_key = validation_key - self.subscriptions = subscriptions - self.user_registration = user_registration - - -class PortalRevisionCollection(_serialization.Model): - """Paged list of portal revisions. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Collection of portal revisions. - :vartype value: list[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :ivar next_link: Next page link, if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[PortalRevisionContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.PortalRevisionContract"]] = None - self.next_link: Optional[str] = None - - -class PortalRevisionContract(ProxyResource): - """Portal Revision's contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar description: Portal revision description. - :vartype description: str - :ivar status_details: Portal revision publishing status details. - :vartype status_details: str - :ivar status: Status of the portal's revision. Known values are: "pending", "publishing", - "completed", and "failed". - :vartype status: str or ~azure.mgmt.apimanagement.models.PortalRevisionStatus - :ivar is_current: Indicates if the portal's revision is public. - :vartype is_current: bool - :ivar created_date_time: Portal's revision creation date and time. - :vartype created_date_time: ~datetime.datetime - :ivar updated_date_time: Last updated date and time. - :vartype updated_date_time: ~datetime.datetime - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "description": {"max_length": 2000}, - "status_details": {"readonly": True, "max_length": 2000}, - "status": {"readonly": True}, - "created_date_time": {"readonly": True}, - "updated_date_time": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "status_details": {"key": "properties.statusDetails", "type": "str"}, - "status": {"key": "properties.status", "type": "str"}, - "is_current": {"key": "properties.isCurrent", "type": "bool"}, - "created_date_time": {"key": "properties.createdDateTime", "type": "iso-8601"}, - "updated_date_time": {"key": "properties.updatedDateTime", "type": "iso-8601"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__(self, *, description: Optional[str] = None, is_current: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword description: Portal revision description. - :paramtype description: str - :keyword is_current: Indicates if the portal's revision is public. - :paramtype is_current: bool - """ - super().__init__(**kwargs) - self.description = description - self.status_details: Optional[str] = None - self.status: Optional[Union[str, "_models.PortalRevisionStatus"]] = None - self.is_current = is_current - self.created_date_time: Optional[datetime.datetime] = None - self.updated_date_time: Optional[datetime.datetime] = None - self.provisioning_state: Optional[str] = None - - -class PortalSettingsCollection(_serialization.Model): - """Descriptions of API Management policies. - - :ivar value: Descriptions of API Management policies. - :vartype value: list[~azure.mgmt.apimanagement.models.PortalSettingsContract] - :ivar count: Total record count number. - :vartype count: int - """ - - _attribute_map = { - "value": {"key": "value", "type": "[PortalSettingsContract]"}, - "count": {"key": "count", "type": "int"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.PortalSettingsContract"]] = None, - count: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Descriptions of API Management policies. - :paramtype value: list[~azure.mgmt.apimanagement.models.PortalSettingsContract] - :keyword count: Total record count number. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value = value - self.count = count - - -class PortalSettingsContract(ProxyResource): - """Portal Settings for the Developer Portal. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar url: A delegation Url. - :vartype url: str - :ivar validation_key: A base64-encoded validation key to validate, that a request is coming - from Azure API Management. - :vartype validation_key: str - :ivar subscriptions: Subscriptions delegation settings. - :vartype subscriptions: - ~azure.mgmt.apimanagement.models.SubscriptionsDelegationSettingsProperties - :ivar user_registration: User registration delegation settings. - :vartype user_registration: - ~azure.mgmt.apimanagement.models.RegistrationDelegationSettingsProperties - :ivar enabled: Redirect Anonymous users to the Sign-In page. - :vartype enabled: bool - :ivar terms_of_service: Terms of service contract properties. - :vartype terms_of_service: ~azure.mgmt.apimanagement.models.TermsOfServiceProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "url": {"key": "properties.url", "type": "str"}, - "validation_key": {"key": "properties.validationKey", "type": "str"}, - "subscriptions": {"key": "properties.subscriptions", "type": "SubscriptionsDelegationSettingsProperties"}, - "user_registration": {"key": "properties.userRegistration", "type": "RegistrationDelegationSettingsProperties"}, - "enabled": {"key": "properties.enabled", "type": "bool"}, - "terms_of_service": {"key": "properties.termsOfService", "type": "TermsOfServiceProperties"}, - } - - def __init__( - self, - *, - url: Optional[str] = None, - validation_key: Optional[str] = None, - subscriptions: Optional["_models.SubscriptionsDelegationSettingsProperties"] = None, - user_registration: Optional["_models.RegistrationDelegationSettingsProperties"] = None, - enabled: Optional[bool] = None, - terms_of_service: Optional["_models.TermsOfServiceProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword url: A delegation Url. - :paramtype url: str - :keyword validation_key: A base64-encoded validation key to validate, that a request is coming - from Azure API Management. - :paramtype validation_key: str - :keyword subscriptions: Subscriptions delegation settings. - :paramtype subscriptions: - ~azure.mgmt.apimanagement.models.SubscriptionsDelegationSettingsProperties - :keyword user_registration: User registration delegation settings. - :paramtype user_registration: - ~azure.mgmt.apimanagement.models.RegistrationDelegationSettingsProperties - :keyword enabled: Redirect Anonymous users to the Sign-In page. - :paramtype enabled: bool - :keyword terms_of_service: Terms of service contract properties. - :paramtype terms_of_service: ~azure.mgmt.apimanagement.models.TermsOfServiceProperties - """ - super().__init__(**kwargs) - self.url = url - self.validation_key = validation_key - self.subscriptions = subscriptions - self.user_registration = user_registration - self.enabled = enabled - self.terms_of_service = terms_of_service - - -class PortalSettingValidationKeyContract(_serialization.Model): - """Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. - - :ivar validation_key: This is secret value of the validation key in portal settings. - :vartype validation_key: str - """ - - _attribute_map = { - "validation_key": {"key": "validationKey", "type": "str"}, - } - - def __init__(self, *, validation_key: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword validation_key: This is secret value of the validation key in portal settings. - :paramtype validation_key: str - """ - super().__init__(**kwargs) - self.validation_key = validation_key - - -class PortalSigninSettings(ProxyResource): - """Sign-In settings for the Developer Portal. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar enabled: Redirect Anonymous users to the Sign-In page. - :vartype enabled: bool - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "enabled": {"key": "properties.enabled", "type": "bool"}, - } - - def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword enabled: Redirect Anonymous users to the Sign-In page. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.enabled = enabled - - -class PortalSignupSettings(ProxyResource): - """Sign-Up settings for a developer portal. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar enabled: Allow users to sign up on a developer portal. - :vartype enabled: bool - :ivar terms_of_service: Terms of service contract properties. - :vartype terms_of_service: ~azure.mgmt.apimanagement.models.TermsOfServiceProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "enabled": {"key": "properties.enabled", "type": "bool"}, - "terms_of_service": {"key": "properties.termsOfService", "type": "TermsOfServiceProperties"}, - } - - def __init__( - self, - *, - enabled: Optional[bool] = None, - terms_of_service: Optional["_models.TermsOfServiceProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword enabled: Allow users to sign up on a developer portal. - :paramtype enabled: bool - :keyword terms_of_service: Terms of service contract properties. - :paramtype terms_of_service: ~azure.mgmt.apimanagement.models.TermsOfServiceProperties - """ - super().__init__(**kwargs) - self.enabled = enabled - self.terms_of_service = terms_of_service - - -class PrivateEndpoint(_serialization.Model): - """The Private Endpoint resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The ARM identifier for Private Endpoint. - :vartype id: str - """ - - _validation = { - "id": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id: Optional[str] = None - - -class PrivateEndpointConnection(Resource): - """The Private Endpoint Connection resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar private_endpoint: The resource of private end point. - :vartype private_endpoint: ~azure.mgmt.apimanagement.models.PrivateEndpoint - :ivar private_link_service_connection_state: A collection of information about the state of the - connection between service consumer and provider. - :vartype private_link_service_connection_state: - ~azure.mgmt.apimanagement.models.PrivateLinkServiceConnectionState - :ivar provisioning_state: The provisioning state of the private endpoint connection resource. - Known values are: "Succeeded", "Creating", "Deleting", and "Failed". - :vartype provisioning_state: str or - ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "private_endpoint": {"key": "properties.privateEndpoint", "type": "PrivateEndpoint"}, - "private_link_service_connection_state": { - "key": "properties.privateLinkServiceConnectionState", - "type": "PrivateLinkServiceConnectionState", - }, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - private_endpoint: Optional["_models.PrivateEndpoint"] = None, - private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs: Any - ) -> None: - """ - :keyword private_endpoint: The resource of private end point. - :paramtype private_endpoint: ~azure.mgmt.apimanagement.models.PrivateEndpoint - :keyword private_link_service_connection_state: A collection of information about the state of - the connection between service consumer and provider. - :paramtype private_link_service_connection_state: - ~azure.mgmt.apimanagement.models.PrivateLinkServiceConnectionState - """ - super().__init__(**kwargs) - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - self.provisioning_state: Optional[Union[str, "_models.PrivateEndpointConnectionProvisioningState"]] = None - - -class PrivateEndpointConnectionListResult(_serialization.Model): - """List of private endpoint connection associated with the specified storage account. - - :ivar value: Array of private endpoint connections. - :vartype value: list[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, - } - - def __init__(self, *, value: Optional[list["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: - """ - :keyword value: Array of private endpoint connections. - :paramtype value: list[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] - """ - super().__init__(**kwargs) - self.value = value - - -class PrivateEndpointConnectionRequest(_serialization.Model): - """A request to approve or reject a private endpoint connection. - - :ivar id: Private Endpoint Connection Resource Id. - :vartype id: str - :ivar properties: The connection state of the private endpoint connection. - :vartype properties: - ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequestProperties - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "properties": {"key": "properties", "type": "PrivateEndpointConnectionRequestProperties"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - properties: Optional["_models.PrivateEndpointConnectionRequestProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: Private Endpoint Connection Resource Id. - :paramtype id: str - :keyword properties: The connection state of the private endpoint connection. - :paramtype properties: - ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequestProperties - """ - super().__init__(**kwargs) - self.id = id - self.properties = properties - - -class PrivateEndpointConnectionRequestProperties(_serialization.Model): # pylint: disable=name-too-long - """The connection state of the private endpoint connection. - - :ivar private_link_service_connection_state: A collection of information about the state of the - connection between service consumer and provider. - :vartype private_link_service_connection_state: - ~azure.mgmt.apimanagement.models.PrivateLinkServiceConnectionState - """ - - _attribute_map = { - "private_link_service_connection_state": { - "key": "privateLinkServiceConnectionState", - "type": "PrivateLinkServiceConnectionState", - }, - } - - def __init__( - self, - *, - private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs: Any - ) -> None: - """ - :keyword private_link_service_connection_state: A collection of information about the state of - the connection between service consumer and provider. - :paramtype private_link_service_connection_state: - ~azure.mgmt.apimanagement.models.PrivateLinkServiceConnectionState - """ - super().__init__(**kwargs) - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateLinkResource(Resource): - """A private link resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - :ivar required_zone_names: The private link resource Private link DNS zone name. - :vartype required_zone_names: list[str] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "group_id": {"readonly": True}, - "required_members": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "group_id": {"key": "properties.groupId", "type": "str"}, - "required_members": {"key": "properties.requiredMembers", "type": "[str]"}, - "required_zone_names": {"key": "properties.requiredZoneNames", "type": "[str]"}, - } - - def __init__(self, *, required_zone_names: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword required_zone_names: The private link resource Private link DNS zone name. - :paramtype required_zone_names: list[str] - """ - super().__init__(**kwargs) - self.group_id: Optional[str] = None - self.required_members: Optional[list[str]] = None - self.required_zone_names = required_zone_names - - -class PrivateLinkResourceListResult(_serialization.Model): - """A list of private link resources. - - :ivar value: Array of private link resources. - :vartype value: list[~azure.mgmt.apimanagement.models.PrivateLinkResource] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[PrivateLinkResource]"}, - } - - def __init__(self, *, value: Optional[list["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: - """ - :keyword value: Array of private link resources. - :paramtype value: list[~azure.mgmt.apimanagement.models.PrivateLinkResource] - """ - super().__init__(**kwargs) - self.value = value - - -class PrivateLinkServiceConnectionState(_serialization.Model): - """A collection of information about the state of the connection between service consumer and - provider. - - :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner - of the service. Known values are: "Pending", "Approved", and "Rejected". - :vartype status: str or ~azure.mgmt.apimanagement.models.PrivateEndpointServiceConnectionStatus - :ivar description: The reason for approval/rejection of the connection. - :vartype description: str - :ivar actions_required: A message indicating if changes on the service provider require any - updates on the consumer. - :vartype actions_required: str - """ - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "actions_required": {"key": "actionsRequired", "type": "str"}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "_models.PrivateEndpointServiceConnectionStatus"]] = None, - description: Optional[str] = None, - actions_required: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword status: Indicates whether the connection has been Approved/Rejected/Removed by the - owner of the service. Known values are: "Pending", "Approved", and "Rejected". - :paramtype status: str or - ~azure.mgmt.apimanagement.models.PrivateEndpointServiceConnectionStatus - :keyword description: The reason for approval/rejection of the connection. - :paramtype description: str - :keyword actions_required: A message indicating if changes on the service provider require any - updates on the consumer. - :paramtype actions_required: str - """ - super().__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = actions_required - - -class ProductApiLinkCollection(_serialization.Model): - """Paged Product-API link list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.ProductApiLinkContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ProductApiLinkContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.ProductApiLinkContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.ProductApiLinkContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class ProductApiLinkContract(ProxyResource): - """Product-API link details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar api_id: Full resource Id of an API. - :vartype api_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "api_id": {"key": "properties.apiId", "type": "str"}, - } - - def __init__(self, *, api_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword api_id: Full resource Id of an API. - :paramtype api_id: str - """ - super().__init__(**kwargs) - self.api_id = api_id - - -class ProductApplicationContract(_serialization.Model): - """Specifies Microsoft Entra settings needed to authorize product API calls using client - applications. - - :ivar entra: Specifies Microsoft Entra settings needed to authorize product API calls using - client application with Microsoft Entra OAuth token. - :vartype entra: ~azure.mgmt.apimanagement.models.ProductApplicationContractEntra - """ - - _attribute_map = { - "entra": {"key": "entra", "type": "ProductApplicationContractEntra"}, - } - - def __init__(self, *, entra: Optional["_models.ProductApplicationContractEntra"] = None, **kwargs: Any) -> None: - """ - :keyword entra: Specifies Microsoft Entra settings needed to authorize product API calls using - client application with Microsoft Entra OAuth token. - :paramtype entra: ~azure.mgmt.apimanagement.models.ProductApplicationContractEntra - """ - super().__init__(**kwargs) - self.entra = entra - - -class ProductApplicationContractEntra(_serialization.Model): - """Specifies Microsoft Entra settings needed to authorize product API calls using client - application with Microsoft Entra OAuth token. - - :ivar application_id: Product facing EntraID application client ID. - :vartype application_id: str - :ivar audience: The EntraID application audience claim. The audience claim is used to validate - the token. - :vartype audience: str - """ - - _attribute_map = { - "application_id": {"key": "applicationId", "type": "str"}, - "audience": {"key": "audience", "type": "str"}, - } - - def __init__(self, *, application_id: Optional[str] = None, audience: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword application_id: Product facing EntraID application client ID. - :paramtype application_id: str - :keyword audience: The EntraID application audience claim. The audience claim is used to - validate the token. - :paramtype audience: str - """ - super().__init__(**kwargs) - self.application_id = application_id - self.audience = audience - - -class ProductCollection(_serialization.Model): - """Paged Products list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.ProductContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ProductContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.ProductContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.ProductContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class ProductContract(ProxyResource): - """Product details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar description: Product description. May include HTML formatting tags. - :vartype description: str - :ivar terms: Product terms of use. Developers trying to subscribe to the product will be - presented and required to accept these terms before they can complete the subscription process. - :vartype terms: str - :ivar subscription_required: Whether a product subscription is required for accessing APIs - included in this product. If true, the product is referred to as "protected" and a valid - subscription key is required for a request to an API included in the product to succeed. If - false, the product is referred to as "open" and requests to an API included in the product can - be made without a subscription key. If property is omitted when creating a new product it's - value is assumed to be true. - :vartype subscription_required: bool - :ivar approval_required: whether subscription approval is required. If false, new subscriptions - will be approved automatically enabling developers to call the product’s APIs immediately after - subscribing. If true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if subscriptionRequired property - is present and has a value of false. - :vartype approval_required: bool - :ivar subscriptions_limit: Whether the number of subscriptions a user can have to this product - at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present - only if subscriptionRequired property is present and has a value of false. - :vartype subscriptions_limit: int - :ivar authentication_type: Type of supported authentication for the product. The application - configuration is required for application-token authentication type. The subscription-key - authentication type is used by default. If the property is omitted, the subscription-key - authentication type is used. - :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] - :ivar application: Specifies identity provider settings needed to authorize applications API - calls. - :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication - :ivar state: whether product is published or not. Published products are discoverable by users - of developer portal. Non published products are visible only to administrators. Default state - of Product is notPublished. Known values are: "notPublished" and "published". - :vartype state: str or ~azure.mgmt.apimanagement.models.ProductState - :ivar display_name: Product name. - :vartype display_name: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "description": {"max_length": 1000}, - "display_name": {"max_length": 300, "min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "terms": {"key": "properties.terms", "type": "str"}, - "subscription_required": {"key": "properties.subscriptionRequired", "type": "bool"}, - "approval_required": {"key": "properties.approvalRequired", "type": "bool"}, - "subscriptions_limit": {"key": "properties.subscriptionsLimit", "type": "int"}, - "authentication_type": {"key": "properties.authenticationType", "type": "[str]"}, - "application": {"key": "properties.application", "type": "ProductEntityBaseParametersApplication"}, - "state": {"key": "properties.state", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - terms: Optional[str] = None, - subscription_required: Optional[bool] = None, - approval_required: Optional[bool] = None, - subscriptions_limit: Optional[int] = None, - authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, - application: Optional["_models.ProductEntityBaseParametersApplication"] = None, - state: Optional[Union[str, "_models.ProductState"]] = None, - display_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Product description. May include HTML formatting tags. - :paramtype description: str - :keyword terms: Product terms of use. Developers trying to subscribe to the product will be - presented and required to accept these terms before they can complete the subscription process. - :paramtype terms: str - :keyword subscription_required: Whether a product subscription is required for accessing APIs - included in this product. If true, the product is referred to as "protected" and a valid - subscription key is required for a request to an API included in the product to succeed. If - false, the product is referred to as "open" and requests to an API included in the product can - be made without a subscription key. If property is omitted when creating a new product it's - value is assumed to be true. - :paramtype subscription_required: bool - :keyword approval_required: whether subscription approval is required. If false, new - subscriptions will be approved automatically enabling developers to call the product’s APIs - immediately after subscribing. If true, administrators must manually approve the subscription - before the developer can any of the product’s APIs. Can be present only if subscriptionRequired - property is present and has a value of false. - :paramtype approval_required: bool - :keyword subscriptions_limit: Whether the number of subscriptions a user can have to this - product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be - present only if subscriptionRequired property is present and has a value of false. - :paramtype subscriptions_limit: int - :keyword authentication_type: Type of supported authentication for the product. The application - configuration is required for application-token authentication type. The subscription-key - authentication type is used by default. If the property is omitted, the subscription-key - authentication type is used. - :paramtype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] - :keyword application: Specifies identity provider settings needed to authorize applications API - calls. - :paramtype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication - :keyword state: whether product is published or not. Published products are discoverable by - users of developer portal. Non published products are visible only to administrators. Default - state of Product is notPublished. Known values are: "notPublished" and "published". - :paramtype state: str or ~azure.mgmt.apimanagement.models.ProductState - :keyword display_name: Product name. - :paramtype display_name: str - """ - super().__init__(**kwargs) - self.description = description - self.terms = terms - self.subscription_required = subscription_required - self.approval_required = approval_required - self.subscriptions_limit = subscriptions_limit - self.authentication_type = authentication_type - self.application = application - self.state = state - self.display_name = display_name - - -class ProductEntityBaseParameters(_serialization.Model): - """Product Entity Base Parameters. - - :ivar description: Product description. May include HTML formatting tags. - :vartype description: str - :ivar terms: Product terms of use. Developers trying to subscribe to the product will be - presented and required to accept these terms before they can complete the subscription process. - :vartype terms: str - :ivar subscription_required: Whether a product subscription is required for accessing APIs - included in this product. If true, the product is referred to as "protected" and a valid - subscription key is required for a request to an API included in the product to succeed. If - false, the product is referred to as "open" and requests to an API included in the product can - be made without a subscription key. If property is omitted when creating a new product it's - value is assumed to be true. - :vartype subscription_required: bool - :ivar approval_required: whether subscription approval is required. If false, new subscriptions - will be approved automatically enabling developers to call the product’s APIs immediately after - subscribing. If true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if subscriptionRequired property - is present and has a value of false. - :vartype approval_required: bool - :ivar subscriptions_limit: Whether the number of subscriptions a user can have to this product - at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present - only if subscriptionRequired property is present and has a value of false. - :vartype subscriptions_limit: int - :ivar authentication_type: Type of supported authentication for the product. The application - configuration is required for application-token authentication type. The subscription-key - authentication type is used by default. If the property is omitted, the subscription-key - authentication type is used. - :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] - :ivar application: Specifies identity provider settings needed to authorize applications API - calls. - :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication - :ivar state: whether product is published or not. Published products are discoverable by users - of developer portal. Non published products are visible only to administrators. Default state - of Product is notPublished. Known values are: "notPublished" and "published". - :vartype state: str or ~azure.mgmt.apimanagement.models.ProductState - """ - - _validation = { - "description": {"max_length": 1000}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "terms": {"key": "terms", "type": "str"}, - "subscription_required": {"key": "subscriptionRequired", "type": "bool"}, - "approval_required": {"key": "approvalRequired", "type": "bool"}, - "subscriptions_limit": {"key": "subscriptionsLimit", "type": "int"}, - "authentication_type": {"key": "authenticationType", "type": "[str]"}, - "application": {"key": "application", "type": "ProductEntityBaseParametersApplication"}, - "state": {"key": "state", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - terms: Optional[str] = None, - subscription_required: Optional[bool] = None, - approval_required: Optional[bool] = None, - subscriptions_limit: Optional[int] = None, - authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, - application: Optional["_models.ProductEntityBaseParametersApplication"] = None, - state: Optional[Union[str, "_models.ProductState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Product description. May include HTML formatting tags. - :paramtype description: str - :keyword terms: Product terms of use. Developers trying to subscribe to the product will be - presented and required to accept these terms before they can complete the subscription process. - :paramtype terms: str - :keyword subscription_required: Whether a product subscription is required for accessing APIs - included in this product. If true, the product is referred to as "protected" and a valid - subscription key is required for a request to an API included in the product to succeed. If - false, the product is referred to as "open" and requests to an API included in the product can - be made without a subscription key. If property is omitted when creating a new product it's - value is assumed to be true. - :paramtype subscription_required: bool - :keyword approval_required: whether subscription approval is required. If false, new - subscriptions will be approved automatically enabling developers to call the product’s APIs - immediately after subscribing. If true, administrators must manually approve the subscription - before the developer can any of the product’s APIs. Can be present only if subscriptionRequired - property is present and has a value of false. - :paramtype approval_required: bool - :keyword subscriptions_limit: Whether the number of subscriptions a user can have to this - product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be - present only if subscriptionRequired property is present and has a value of false. - :paramtype subscriptions_limit: int - :keyword authentication_type: Type of supported authentication for the product. The application - configuration is required for application-token authentication type. The subscription-key - authentication type is used by default. If the property is omitted, the subscription-key - authentication type is used. - :paramtype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] - :keyword application: Specifies identity provider settings needed to authorize applications API - calls. - :paramtype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication - :keyword state: whether product is published or not. Published products are discoverable by - users of developer portal. Non published products are visible only to administrators. Default - state of Product is notPublished. Known values are: "notPublished" and "published". - :paramtype state: str or ~azure.mgmt.apimanagement.models.ProductState - """ - super().__init__(**kwargs) - self.description = description - self.terms = terms - self.subscription_required = subscription_required - self.approval_required = approval_required - self.subscriptions_limit = subscriptions_limit - self.authentication_type = authentication_type - self.application = application - self.state = state - - -class ProductContractProperties(ProductEntityBaseParameters): - """Product profile. - - All required parameters must be populated in order to send to server. - - :ivar description: Product description. May include HTML formatting tags. - :vartype description: str - :ivar terms: Product terms of use. Developers trying to subscribe to the product will be - presented and required to accept these terms before they can complete the subscription process. - :vartype terms: str - :ivar subscription_required: Whether a product subscription is required for accessing APIs - included in this product. If true, the product is referred to as "protected" and a valid - subscription key is required for a request to an API included in the product to succeed. If - false, the product is referred to as "open" and requests to an API included in the product can - be made without a subscription key. If property is omitted when creating a new product it's - value is assumed to be true. - :vartype subscription_required: bool - :ivar approval_required: whether subscription approval is required. If false, new subscriptions - will be approved automatically enabling developers to call the product’s APIs immediately after - subscribing. If true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if subscriptionRequired property - is present and has a value of false. - :vartype approval_required: bool - :ivar subscriptions_limit: Whether the number of subscriptions a user can have to this product - at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present - only if subscriptionRequired property is present and has a value of false. - :vartype subscriptions_limit: int - :ivar authentication_type: Type of supported authentication for the product. The application - configuration is required for application-token authentication type. The subscription-key - authentication type is used by default. If the property is omitted, the subscription-key - authentication type is used. - :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] - :ivar application: Specifies identity provider settings needed to authorize applications API - calls. - :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication - :ivar state: whether product is published or not. Published products are discoverable by users - of developer portal. Non published products are visible only to administrators. Default state - of Product is notPublished. Known values are: "notPublished" and "published". - :vartype state: str or ~azure.mgmt.apimanagement.models.ProductState - :ivar display_name: Product name. Required. - :vartype display_name: str - """ - - _validation = { - "description": {"max_length": 1000}, - "display_name": {"required": True, "max_length": 300, "min_length": 1}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "terms": {"key": "terms", "type": "str"}, - "subscription_required": {"key": "subscriptionRequired", "type": "bool"}, - "approval_required": {"key": "approvalRequired", "type": "bool"}, - "subscriptions_limit": {"key": "subscriptionsLimit", "type": "int"}, - "authentication_type": {"key": "authenticationType", "type": "[str]"}, - "application": {"key": "application", "type": "ProductEntityBaseParametersApplication"}, - "state": {"key": "state", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - } - - def __init__( - self, - *, - display_name: str, - description: Optional[str] = None, - terms: Optional[str] = None, - subscription_required: Optional[bool] = None, - approval_required: Optional[bool] = None, - subscriptions_limit: Optional[int] = None, - authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, - application: Optional["_models.ProductEntityBaseParametersApplication"] = None, - state: Optional[Union[str, "_models.ProductState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Product description. May include HTML formatting tags. - :paramtype description: str - :keyword terms: Product terms of use. Developers trying to subscribe to the product will be - presented and required to accept these terms before they can complete the subscription process. - :paramtype terms: str - :keyword subscription_required: Whether a product subscription is required for accessing APIs - included in this product. If true, the product is referred to as "protected" and a valid - subscription key is required for a request to an API included in the product to succeed. If - false, the product is referred to as "open" and requests to an API included in the product can - be made without a subscription key. If property is omitted when creating a new product it's - value is assumed to be true. - :paramtype subscription_required: bool - :keyword approval_required: whether subscription approval is required. If false, new - subscriptions will be approved automatically enabling developers to call the product’s APIs - immediately after subscribing. If true, administrators must manually approve the subscription - before the developer can any of the product’s APIs. Can be present only if subscriptionRequired - property is present and has a value of false. - :paramtype approval_required: bool - :keyword subscriptions_limit: Whether the number of subscriptions a user can have to this - product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be - present only if subscriptionRequired property is present and has a value of false. - :paramtype subscriptions_limit: int - :keyword authentication_type: Type of supported authentication for the product. The application - configuration is required for application-token authentication type. The subscription-key - authentication type is used by default. If the property is omitted, the subscription-key - authentication type is used. - :paramtype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] - :keyword application: Specifies identity provider settings needed to authorize applications API - calls. - :paramtype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication - :keyword state: whether product is published or not. Published products are discoverable by - users of developer portal. Non published products are visible only to administrators. Default - state of Product is notPublished. Known values are: "notPublished" and "published". - :paramtype state: str or ~azure.mgmt.apimanagement.models.ProductState - :keyword display_name: Product name. Required. - :paramtype display_name: str - """ - super().__init__( - description=description, - terms=terms, - subscription_required=subscription_required, - approval_required=approval_required, - subscriptions_limit=subscriptions_limit, - authentication_type=authentication_type, - application=application, - state=state, - **kwargs - ) - self.display_name = display_name - - -class ProductEntityBaseParametersApplication(ProductApplicationContract): - """Specifies identity provider settings needed to authorize applications API calls. - - :ivar entra: Specifies Microsoft Entra settings needed to authorize product API calls using - client application with Microsoft Entra OAuth token. - :vartype entra: ~azure.mgmt.apimanagement.models.ProductApplicationContractEntra - """ - - -class ProductGroupLinkCollection(_serialization.Model): - """Paged Product-group link list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.ProductGroupLinkContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ProductGroupLinkContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.ProductGroupLinkContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.ProductGroupLinkContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class ProductGroupLinkContract(ProxyResource): - """Product-group link details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar group_id: Full resource Id of a group. - :vartype group_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "group_id": {"key": "properties.groupId", "type": "str"}, - } - - def __init__(self, *, group_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword group_id: Full resource Id of a group. - :paramtype group_id: str - """ - super().__init__(**kwargs) - self.group_id = group_id - - -class ProductTagResourceContractProperties(ProductEntityBaseParameters): - """Product profile. - - All required parameters must be populated in order to send to server. - - :ivar description: Product description. May include HTML formatting tags. - :vartype description: str - :ivar terms: Product terms of use. Developers trying to subscribe to the product will be - presented and required to accept these terms before they can complete the subscription process. - :vartype terms: str - :ivar subscription_required: Whether a product subscription is required for accessing APIs - included in this product. If true, the product is referred to as "protected" and a valid - subscription key is required for a request to an API included in the product to succeed. If - false, the product is referred to as "open" and requests to an API included in the product can - be made without a subscription key. If property is omitted when creating a new product it's - value is assumed to be true. - :vartype subscription_required: bool - :ivar approval_required: whether subscription approval is required. If false, new subscriptions - will be approved automatically enabling developers to call the product’s APIs immediately after - subscribing. If true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if subscriptionRequired property - is present and has a value of false. - :vartype approval_required: bool - :ivar subscriptions_limit: Whether the number of subscriptions a user can have to this product - at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present - only if subscriptionRequired property is present and has a value of false. - :vartype subscriptions_limit: int - :ivar authentication_type: Type of supported authentication for the product. The application - configuration is required for application-token authentication type. The subscription-key - authentication type is used by default. If the property is omitted, the subscription-key - authentication type is used. - :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] - :ivar application: Specifies identity provider settings needed to authorize applications API - calls. - :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication - :ivar state: whether product is published or not. Published products are discoverable by users - of developer portal. Non published products are visible only to administrators. Default state - of Product is notPublished. Known values are: "notPublished" and "published". - :vartype state: str or ~azure.mgmt.apimanagement.models.ProductState - :ivar id: Identifier of the product in the form of /products/{productId}. - :vartype id: str - :ivar name: Product name. Required. - :vartype name: str - """ - - _validation = { - "description": {"max_length": 1000}, - "name": {"required": True, "max_length": 300, "min_length": 1}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "terms": {"key": "terms", "type": "str"}, - "subscription_required": {"key": "subscriptionRequired", "type": "bool"}, - "approval_required": {"key": "approvalRequired", "type": "bool"}, - "subscriptions_limit": {"key": "subscriptionsLimit", "type": "int"}, - "authentication_type": {"key": "authenticationType", "type": "[str]"}, - "application": {"key": "application", "type": "ProductEntityBaseParametersApplication"}, - "state": {"key": "state", "type": "str"}, - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - } - - def __init__( - self, - *, - name: str, - description: Optional[str] = None, - terms: Optional[str] = None, - subscription_required: Optional[bool] = None, - approval_required: Optional[bool] = None, - subscriptions_limit: Optional[int] = None, - authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, - application: Optional["_models.ProductEntityBaseParametersApplication"] = None, - state: Optional[Union[str, "_models.ProductState"]] = None, - id: Optional[str] = None, # pylint: disable=redefined-builtin - **kwargs: Any - ) -> None: - """ - :keyword description: Product description. May include HTML formatting tags. - :paramtype description: str - :keyword terms: Product terms of use. Developers trying to subscribe to the product will be - presented and required to accept these terms before they can complete the subscription process. - :paramtype terms: str - :keyword subscription_required: Whether a product subscription is required for accessing APIs - included in this product. If true, the product is referred to as "protected" and a valid - subscription key is required for a request to an API included in the product to succeed. If - false, the product is referred to as "open" and requests to an API included in the product can - be made without a subscription key. If property is omitted when creating a new product it's - value is assumed to be true. - :paramtype subscription_required: bool - :keyword approval_required: whether subscription approval is required. If false, new - subscriptions will be approved automatically enabling developers to call the product’s APIs - immediately after subscribing. If true, administrators must manually approve the subscription - before the developer can any of the product’s APIs. Can be present only if subscriptionRequired - property is present and has a value of false. - :paramtype approval_required: bool - :keyword subscriptions_limit: Whether the number of subscriptions a user can have to this - product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be - present only if subscriptionRequired property is present and has a value of false. - :paramtype subscriptions_limit: int - :keyword authentication_type: Type of supported authentication for the product. The application - configuration is required for application-token authentication type. The subscription-key - authentication type is used by default. If the property is omitted, the subscription-key - authentication type is used. - :paramtype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] - :keyword application: Specifies identity provider settings needed to authorize applications API - calls. - :paramtype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication - :keyword state: whether product is published or not. Published products are discoverable by - users of developer portal. Non published products are visible only to administrators. Default - state of Product is notPublished. Known values are: "notPublished" and "published". - :paramtype state: str or ~azure.mgmt.apimanagement.models.ProductState - :keyword id: Identifier of the product in the form of /products/{productId}. - :paramtype id: str - :keyword name: Product name. Required. - :paramtype name: str - """ - super().__init__( - description=description, - terms=terms, - subscription_required=subscription_required, - approval_required=approval_required, - subscriptions_limit=subscriptions_limit, - authentication_type=authentication_type, - application=application, - state=state, - **kwargs - ) - self.id = id - self.name = name - - -class ProductUpdateParameters(_serialization.Model): - """Product Update parameters. - - :ivar description: Product description. May include HTML formatting tags. - :vartype description: str - :ivar terms: Product terms of use. Developers trying to subscribe to the product will be - presented and required to accept these terms before they can complete the subscription process. - :vartype terms: str - :ivar subscription_required: Whether a product subscription is required for accessing APIs - included in this product. If true, the product is referred to as "protected" and a valid - subscription key is required for a request to an API included in the product to succeed. If - false, the product is referred to as "open" and requests to an API included in the product can - be made without a subscription key. If property is omitted when creating a new product it's - value is assumed to be true. - :vartype subscription_required: bool - :ivar approval_required: whether subscription approval is required. If false, new subscriptions - will be approved automatically enabling developers to call the product’s APIs immediately after - subscribing. If true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if subscriptionRequired property - is present and has a value of false. - :vartype approval_required: bool - :ivar subscriptions_limit: Whether the number of subscriptions a user can have to this product - at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present - only if subscriptionRequired property is present and has a value of false. - :vartype subscriptions_limit: int - :ivar authentication_type: Type of supported authentication for the product. The application - configuration is required for application-token authentication type. The subscription-key - authentication type is used by default. If the property is omitted, the subscription-key - authentication type is used. - :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] - :ivar application: Specifies identity provider settings needed to authorize applications API - calls. - :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication - :ivar state: whether product is published or not. Published products are discoverable by users - of developer portal. Non published products are visible only to administrators. Default state - of Product is notPublished. Known values are: "notPublished" and "published". - :vartype state: str or ~azure.mgmt.apimanagement.models.ProductState - :ivar display_name: Product name. - :vartype display_name: str - """ - - _validation = { - "description": {"max_length": 1000}, - "display_name": {"max_length": 300, "min_length": 1}, - } - - _attribute_map = { - "description": {"key": "properties.description", "type": "str"}, - "terms": {"key": "properties.terms", "type": "str"}, - "subscription_required": {"key": "properties.subscriptionRequired", "type": "bool"}, - "approval_required": {"key": "properties.approvalRequired", "type": "bool"}, - "subscriptions_limit": {"key": "properties.subscriptionsLimit", "type": "int"}, - "authentication_type": {"key": "properties.authenticationType", "type": "[str]"}, - "application": {"key": "properties.application", "type": "ProductEntityBaseParametersApplication"}, - "state": {"key": "properties.state", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - terms: Optional[str] = None, - subscription_required: Optional[bool] = None, - approval_required: Optional[bool] = None, - subscriptions_limit: Optional[int] = None, - authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, - application: Optional["_models.ProductEntityBaseParametersApplication"] = None, - state: Optional[Union[str, "_models.ProductState"]] = None, - display_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Product description. May include HTML formatting tags. - :paramtype description: str - :keyword terms: Product terms of use. Developers trying to subscribe to the product will be - presented and required to accept these terms before they can complete the subscription process. - :paramtype terms: str - :keyword subscription_required: Whether a product subscription is required for accessing APIs - included in this product. If true, the product is referred to as "protected" and a valid - subscription key is required for a request to an API included in the product to succeed. If - false, the product is referred to as "open" and requests to an API included in the product can - be made without a subscription key. If property is omitted when creating a new product it's - value is assumed to be true. - :paramtype subscription_required: bool - :keyword approval_required: whether subscription approval is required. If false, new - subscriptions will be approved automatically enabling developers to call the product’s APIs - immediately after subscribing. If true, administrators must manually approve the subscription - before the developer can any of the product’s APIs. Can be present only if subscriptionRequired - property is present and has a value of false. - :paramtype approval_required: bool - :keyword subscriptions_limit: Whether the number of subscriptions a user can have to this - product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be - present only if subscriptionRequired property is present and has a value of false. - :paramtype subscriptions_limit: int - :keyword authentication_type: Type of supported authentication for the product. The application - configuration is required for application-token authentication type. The subscription-key - authentication type is used by default. If the property is omitted, the subscription-key - authentication type is used. - :paramtype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] - :keyword application: Specifies identity provider settings needed to authorize applications API - calls. - :paramtype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication - :keyword state: whether product is published or not. Published products are discoverable by - users of developer portal. Non published products are visible only to administrators. Default - state of Product is notPublished. Known values are: "notPublished" and "published". - :paramtype state: str or ~azure.mgmt.apimanagement.models.ProductState - :keyword display_name: Product name. - :paramtype display_name: str - """ - super().__init__(**kwargs) - self.description = description - self.terms = terms - self.subscription_required = subscription_required - self.approval_required = approval_required - self.subscriptions_limit = subscriptions_limit - self.authentication_type = authentication_type - self.application = application - self.state = state - self.display_name = display_name - - -class ProductUpdateProperties(ProductEntityBaseParameters): - """Parameters supplied to the Update Product operation. - - :ivar description: Product description. May include HTML formatting tags. - :vartype description: str - :ivar terms: Product terms of use. Developers trying to subscribe to the product will be - presented and required to accept these terms before they can complete the subscription process. - :vartype terms: str - :ivar subscription_required: Whether a product subscription is required for accessing APIs - included in this product. If true, the product is referred to as "protected" and a valid - subscription key is required for a request to an API included in the product to succeed. If - false, the product is referred to as "open" and requests to an API included in the product can - be made without a subscription key. If property is omitted when creating a new product it's - value is assumed to be true. - :vartype subscription_required: bool - :ivar approval_required: whether subscription approval is required. If false, new subscriptions - will be approved automatically enabling developers to call the product’s APIs immediately after - subscribing. If true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if subscriptionRequired property - is present and has a value of false. - :vartype approval_required: bool - :ivar subscriptions_limit: Whether the number of subscriptions a user can have to this product - at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present - only if subscriptionRequired property is present and has a value of false. - :vartype subscriptions_limit: int - :ivar authentication_type: Type of supported authentication for the product. The application - configuration is required for application-token authentication type. The subscription-key - authentication type is used by default. If the property is omitted, the subscription-key - authentication type is used. - :vartype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] - :ivar application: Specifies identity provider settings needed to authorize applications API - calls. - :vartype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication - :ivar state: whether product is published or not. Published products are discoverable by users - of developer portal. Non published products are visible only to administrators. Default state - of Product is notPublished. Known values are: "notPublished" and "published". - :vartype state: str or ~azure.mgmt.apimanagement.models.ProductState - :ivar display_name: Product name. - :vartype display_name: str - """ - - _validation = { - "description": {"max_length": 1000}, - "display_name": {"max_length": 300, "min_length": 1}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "terms": {"key": "terms", "type": "str"}, - "subscription_required": {"key": "subscriptionRequired", "type": "bool"}, - "approval_required": {"key": "approvalRequired", "type": "bool"}, - "subscriptions_limit": {"key": "subscriptionsLimit", "type": "int"}, - "authentication_type": {"key": "authenticationType", "type": "[str]"}, - "application": {"key": "application", "type": "ProductEntityBaseParametersApplication"}, - "state": {"key": "state", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - terms: Optional[str] = None, - subscription_required: Optional[bool] = None, - approval_required: Optional[bool] = None, - subscriptions_limit: Optional[int] = None, - authentication_type: Optional[list[Union[str, "_models.ProductAuthType"]]] = None, - application: Optional["_models.ProductEntityBaseParametersApplication"] = None, - state: Optional[Union[str, "_models.ProductState"]] = None, - display_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Product description. May include HTML formatting tags. - :paramtype description: str - :keyword terms: Product terms of use. Developers trying to subscribe to the product will be - presented and required to accept these terms before they can complete the subscription process. - :paramtype terms: str - :keyword subscription_required: Whether a product subscription is required for accessing APIs - included in this product. If true, the product is referred to as "protected" and a valid - subscription key is required for a request to an API included in the product to succeed. If - false, the product is referred to as "open" and requests to an API included in the product can - be made without a subscription key. If property is omitted when creating a new product it's - value is assumed to be true. - :paramtype subscription_required: bool - :keyword approval_required: whether subscription approval is required. If false, new - subscriptions will be approved automatically enabling developers to call the product’s APIs - immediately after subscribing. If true, administrators must manually approve the subscription - before the developer can any of the product’s APIs. Can be present only if subscriptionRequired - property is present and has a value of false. - :paramtype approval_required: bool - :keyword subscriptions_limit: Whether the number of subscriptions a user can have to this - product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be - present only if subscriptionRequired property is present and has a value of false. - :paramtype subscriptions_limit: int - :keyword authentication_type: Type of supported authentication for the product. The application - configuration is required for application-token authentication type. The subscription-key - authentication type is used by default. If the property is omitted, the subscription-key - authentication type is used. - :paramtype authentication_type: list[str or ~azure.mgmt.apimanagement.models.ProductAuthType] - :keyword application: Specifies identity provider settings needed to authorize applications API - calls. - :paramtype application: ~azure.mgmt.apimanagement.models.ProductEntityBaseParametersApplication - :keyword state: whether product is published or not. Published products are discoverable by - users of developer portal. Non published products are visible only to administrators. Default - state of Product is notPublished. Known values are: "notPublished" and "published". - :paramtype state: str or ~azure.mgmt.apimanagement.models.ProductState - :keyword display_name: Product name. - :paramtype display_name: str - """ - super().__init__( - description=description, - terms=terms, - subscription_required=subscription_required, - approval_required=approval_required, - subscriptions_limit=subscriptions_limit, - authentication_type=authentication_type, - application=application, - state=state, - **kwargs - ) - self.display_name = display_name - - -class QuotaCounterCollection(_serialization.Model): - """Paged Quota Counter list representation. - - :ivar value: Quota counter values. - :vartype value: list[~azure.mgmt.apimanagement.models.QuotaCounterContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[QuotaCounterContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.QuotaCounterContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Quota counter values. - :paramtype value: list[~azure.mgmt.apimanagement.models.QuotaCounterContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class QuotaCounterContract(_serialization.Model): - """Quota counter details. - - All required parameters must be populated in order to send to server. - - :ivar counter_key: The Key value of the Counter. Must not be empty. Required. - :vartype counter_key: str - :ivar period_key: Identifier of the Period for which the counter was collected. Must not be - empty. Required. - :vartype period_key: str - :ivar period_start_time: The date of the start of Counter Period. The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required. - :vartype period_start_time: ~datetime.datetime - :ivar period_end_time: The date of the end of Counter Period. The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required. - :vartype period_end_time: ~datetime.datetime - :ivar value: Quota Value Properties. - :vartype value: ~azure.mgmt.apimanagement.models.QuotaCounterValueContractProperties - """ - - _validation = { - "counter_key": {"required": True, "min_length": 1}, - "period_key": {"required": True, "min_length": 1}, - "period_start_time": {"required": True}, - "period_end_time": {"required": True}, - } - - _attribute_map = { - "counter_key": {"key": "counterKey", "type": "str"}, - "period_key": {"key": "periodKey", "type": "str"}, - "period_start_time": {"key": "periodStartTime", "type": "iso-8601"}, - "period_end_time": {"key": "periodEndTime", "type": "iso-8601"}, - "value": {"key": "value", "type": "QuotaCounterValueContractProperties"}, - } - - def __init__( - self, - *, - counter_key: str, - period_key: str, - period_start_time: datetime.datetime, - period_end_time: datetime.datetime, - value: Optional["_models.QuotaCounterValueContractProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword counter_key: The Key value of the Counter. Must not be empty. Required. - :paramtype counter_key: str - :keyword period_key: Identifier of the Period for which the counter was collected. Must not be - empty. Required. - :paramtype period_key: str - :keyword period_start_time: The date of the start of Counter Period. The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required. - :paramtype period_start_time: ~datetime.datetime - :keyword period_end_time: The date of the end of Counter Period. The date conforms to the - following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. Required. - :paramtype period_end_time: ~datetime.datetime - :keyword value: Quota Value Properties. - :paramtype value: ~azure.mgmt.apimanagement.models.QuotaCounterValueContractProperties - """ - super().__init__(**kwargs) - self.counter_key = counter_key - self.period_key = period_key - self.period_start_time = period_start_time - self.period_end_time = period_end_time - self.value = value - - -class QuotaCounterValueContract(_serialization.Model): - """Quota counter value details. - - :ivar calls_count: Number of times Counter was called. - :vartype calls_count: int - :ivar kb_transferred: Data Transferred in KiloBytes. - :vartype kb_transferred: float - """ - - _attribute_map = { - "calls_count": {"key": "value.callsCount", "type": "int"}, - "kb_transferred": {"key": "value.kbTransferred", "type": "float"}, - } - - def __init__( - self, *, calls_count: Optional[int] = None, kb_transferred: Optional[float] = None, **kwargs: Any - ) -> None: - """ - :keyword calls_count: Number of times Counter was called. - :paramtype calls_count: int - :keyword kb_transferred: Data Transferred in KiloBytes. - :paramtype kb_transferred: float - """ - super().__init__(**kwargs) - self.calls_count = calls_count - self.kb_transferred = kb_transferred - - -class QuotaCounterValueContractProperties(_serialization.Model): - """Quota counter value details. - - :ivar calls_count: Number of times Counter was called. - :vartype calls_count: int - :ivar kb_transferred: Data Transferred in KiloBytes. - :vartype kb_transferred: float - """ - - _attribute_map = { - "calls_count": {"key": "callsCount", "type": "int"}, - "kb_transferred": {"key": "kbTransferred", "type": "float"}, - } - - def __init__( - self, *, calls_count: Optional[int] = None, kb_transferred: Optional[float] = None, **kwargs: Any - ) -> None: - """ - :keyword calls_count: Number of times Counter was called. - :paramtype calls_count: int - :keyword kb_transferred: Data Transferred in KiloBytes. - :paramtype kb_transferred: float - """ - super().__init__(**kwargs) - self.calls_count = calls_count - self.kb_transferred = kb_transferred - - -class QuotaCounterValueUpdateContract(_serialization.Model): - """Quota counter value details. - - :ivar calls_count: Number of times Counter was called. - :vartype calls_count: int - :ivar kb_transferred: Data Transferred in KiloBytes. - :vartype kb_transferred: float - """ - - _attribute_map = { - "calls_count": {"key": "properties.callsCount", "type": "int"}, - "kb_transferred": {"key": "properties.kbTransferred", "type": "float"}, - } - - def __init__( - self, *, calls_count: Optional[int] = None, kb_transferred: Optional[float] = None, **kwargs: Any - ) -> None: - """ - :keyword calls_count: Number of times Counter was called. - :paramtype calls_count: int - :keyword kb_transferred: Data Transferred in KiloBytes. - :paramtype kb_transferred: float - """ - super().__init__(**kwargs) - self.calls_count = calls_count - self.kb_transferred = kb_transferred - - -class RecipientEmailCollection(_serialization.Model): - """Paged Recipient User list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.RecipientEmailContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[RecipientEmailContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.RecipientEmailContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.RecipientEmailContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class RecipientEmailContract(ProxyResource): - """Recipient Email details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar email: User Email subscribed to notification. - :vartype email: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "email": {"key": "properties.email", "type": "str"}, - } - - def __init__(self, *, email: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword email: User Email subscribed to notification. - :paramtype email: str - """ - super().__init__(**kwargs) - self.email = email - - -class RecipientsContractProperties(_serialization.Model): - """Notification Parameter contract. - - :ivar emails: List of Emails subscribed for the notification. - :vartype emails: list[str] - :ivar users: List of Users subscribed for the notification. - :vartype users: list[str] - """ - - _attribute_map = { - "emails": {"key": "emails", "type": "[str]"}, - "users": {"key": "users", "type": "[str]"}, - } - - def __init__(self, *, emails: Optional[list[str]] = None, users: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword emails: List of Emails subscribed for the notification. - :paramtype emails: list[str] - :keyword users: List of Users subscribed for the notification. - :paramtype users: list[str] - """ - super().__init__(**kwargs) - self.emails = emails - self.users = users - - -class RecipientUserCollection(_serialization.Model): - """Paged Recipient User list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.RecipientUserContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[RecipientUserContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.RecipientUserContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.RecipientUserContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class RecipientUserContract(ProxyResource): - """Recipient User details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar user_id: API Management UserId subscribed to notification. - :vartype user_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "user_id": {"key": "properties.userId", "type": "str"}, - } - - def __init__(self, *, user_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword user_id: API Management UserId subscribed to notification. - :paramtype user_id: str - """ - super().__init__(**kwargs) - self.user_id = user_id - - -class RegionContract(_serialization.Model): - """Region profile. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Region name. - :vartype name: str - :ivar is_master_region: whether Region is the master region. - :vartype is_master_region: bool - :ivar is_deleted: whether Region is deleted. - :vartype is_deleted: bool - """ - - _validation = { - "name": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "is_master_region": {"key": "isMasterRegion", "type": "bool"}, - "is_deleted": {"key": "isDeleted", "type": "bool"}, - } - - def __init__( - self, *, is_master_region: Optional[bool] = None, is_deleted: Optional[bool] = None, **kwargs: Any - ) -> None: - """ - :keyword is_master_region: whether Region is the master region. - :paramtype is_master_region: bool - :keyword is_deleted: whether Region is deleted. - :paramtype is_deleted: bool - """ - super().__init__(**kwargs) - self.name: Optional[str] = None - self.is_master_region = is_master_region - self.is_deleted = is_deleted - - -class RegionListResult(_serialization.Model): - """Lists Regions operation response details. - - :ivar value: Lists of Regions. - :vartype value: list[~azure.mgmt.apimanagement.models.RegionContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[RegionContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.RegionContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Lists of Regions. - :paramtype value: list[~azure.mgmt.apimanagement.models.RegionContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class RegistrationDelegationSettingsProperties(_serialization.Model): - """User registration delegation settings properties. - - :ivar enabled: Enable or disable delegation for user registration. - :vartype enabled: bool - """ - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - } - - def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword enabled: Enable or disable delegation for user registration. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.enabled = enabled - - -class RemotePrivateEndpointConnectionWrapper(_serialization.Model): - """Remote Private Endpoint Connection resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Private Endpoint connection resource id. - :vartype id: str - :ivar name: Private Endpoint Connection Name. - :vartype name: str - :ivar type: Private Endpoint Connection Resource Type. - :vartype type: str - :ivar private_endpoint: The resource of private end point. - :vartype private_endpoint: ~azure.mgmt.apimanagement.models.ArmIdWrapper - :ivar private_link_service_connection_state: A collection of information about the state of the - connection between service consumer and provider. - :vartype private_link_service_connection_state: - ~azure.mgmt.apimanagement.models.PrivateLinkServiceConnectionState - :ivar provisioning_state: The provisioning state of the private endpoint connection resource. - :vartype provisioning_state: str - :ivar group_ids: All the Group ids. - :vartype group_ids: list[str] - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "group_ids": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "private_endpoint": {"key": "properties.privateEndpoint", "type": "ArmIdWrapper"}, - "private_link_service_connection_state": { - "key": "properties.privateLinkServiceConnectionState", - "type": "PrivateLinkServiceConnectionState", - }, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "group_ids": {"key": "properties.groupIds", "type": "[str]"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - name: Optional[str] = None, - type: Optional[str] = None, - private_endpoint: Optional["_models.ArmIdWrapper"] = None, - private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: Private Endpoint connection resource id. - :paramtype id: str - :keyword name: Private Endpoint Connection Name. - :paramtype name: str - :keyword type: Private Endpoint Connection Resource Type. - :paramtype type: str - :keyword private_endpoint: The resource of private end point. - :paramtype private_endpoint: ~azure.mgmt.apimanagement.models.ArmIdWrapper - :keyword private_link_service_connection_state: A collection of information about the state of - the connection between service consumer and provider. - :paramtype private_link_service_connection_state: - ~azure.mgmt.apimanagement.models.PrivateLinkServiceConnectionState - """ - super().__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - self.provisioning_state: Optional[str] = None - self.group_ids: Optional[list[str]] = None - - -class ReportCollection(_serialization.Model): - """Paged Report records list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.ReportRecordContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ReportRecordContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.ReportRecordContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.ReportRecordContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class ReportRecordContract(_serialization.Model): - """Report data. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name depending on report endpoint specifies product, API, operation or developer - name. - :vartype name: str - :ivar timestamp: Start of aggregation period. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype timestamp: ~datetime.datetime - :ivar interval: Length of aggregation period. Interval must be multiple of 15 minutes and may - not be zero. The value should be in ISO 8601 format - (http://en.wikipedia.org/wiki/ISO_8601#Durations). - :vartype interval: str - :ivar country: Country to which this record data is related. - :vartype country: str - :ivar region: Country region to which this record data is related. - :vartype region: str - :ivar zip: Zip code to which this record data is related. - :vartype zip: str - :ivar user_id: User identifier path. /users/{userId}. - :vartype user_id: str - :ivar product_id: Product identifier path. /products/{productId}. - :vartype product_id: str - :ivar api_id: API identifier path. /apis/{apiId}. - :vartype api_id: str - :ivar operation_id: Operation identifier path. /apis/{apiId}/operations/{operationId}. - :vartype operation_id: str - :ivar api_region: API region identifier. - :vartype api_region: str - :ivar subscription_id: Subscription identifier path. /subscriptions/{subscriptionId}. - :vartype subscription_id: str - :ivar call_count_success: Number of successful calls. This includes calls returning - HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect. - :vartype call_count_success: int - :ivar call_count_blocked: Number of calls blocked due to invalid credentials. This includes - calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and - HttpStatusCode.TooManyRequests. - :vartype call_count_blocked: int - :ivar call_count_failed: Number of calls failed due to gateway or backend errors. This includes - calls returning HttpStatusCode.BadRequest(400) and any Code between - HttpStatusCode.InternalServerError (500) and 600. - :vartype call_count_failed: int - :ivar call_count_other: Number of other calls. - :vartype call_count_other: int - :ivar call_count_total: Total number of calls. - :vartype call_count_total: int - :ivar bandwidth: Bandwidth consumed. - :vartype bandwidth: int - :ivar cache_hit_count: Number of times when content was served from cache policy. - :vartype cache_hit_count: int - :ivar cache_miss_count: Number of times content was fetched from backend. - :vartype cache_miss_count: int - :ivar api_time_avg: Average time it took to process request. - :vartype api_time_avg: float - :ivar api_time_min: Minimum time it took to process request. - :vartype api_time_min: float - :ivar api_time_max: Maximum time it took to process request. - :vartype api_time_max: float - :ivar service_time_avg: Average time it took to process request on backend. - :vartype service_time_avg: float - :ivar service_time_min: Minimum time it took to process request on backend. - :vartype service_time_min: float - :ivar service_time_max: Maximum time it took to process request on backend. - :vartype service_time_max: float - """ - - _validation = { - "user_id": {"readonly": True}, - "product_id": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "timestamp": {"key": "timestamp", "type": "iso-8601"}, - "interval": {"key": "interval", "type": "str"}, - "country": {"key": "country", "type": "str"}, - "region": {"key": "region", "type": "str"}, - "zip": {"key": "zip", "type": "str"}, - "user_id": {"key": "userId", "type": "str"}, - "product_id": {"key": "productId", "type": "str"}, - "api_id": {"key": "apiId", "type": "str"}, - "operation_id": {"key": "operationId", "type": "str"}, - "api_region": {"key": "apiRegion", "type": "str"}, - "subscription_id": {"key": "subscriptionId", "type": "str"}, - "call_count_success": {"key": "callCountSuccess", "type": "int"}, - "call_count_blocked": {"key": "callCountBlocked", "type": "int"}, - "call_count_failed": {"key": "callCountFailed", "type": "int"}, - "call_count_other": {"key": "callCountOther", "type": "int"}, - "call_count_total": {"key": "callCountTotal", "type": "int"}, - "bandwidth": {"key": "bandwidth", "type": "int"}, - "cache_hit_count": {"key": "cacheHitCount", "type": "int"}, - "cache_miss_count": {"key": "cacheMissCount", "type": "int"}, - "api_time_avg": {"key": "apiTimeAvg", "type": "float"}, - "api_time_min": {"key": "apiTimeMin", "type": "float"}, - "api_time_max": {"key": "apiTimeMax", "type": "float"}, - "service_time_avg": {"key": "serviceTimeAvg", "type": "float"}, - "service_time_min": {"key": "serviceTimeMin", "type": "float"}, - "service_time_max": {"key": "serviceTimeMax", "type": "float"}, - } - - def __init__( # pylint: disable=too-many-locals - self, - *, - name: Optional[str] = None, - timestamp: Optional[datetime.datetime] = None, - interval: Optional[str] = None, - country: Optional[str] = None, - region: Optional[str] = None, - zip: Optional[str] = None, - api_id: Optional[str] = None, - operation_id: Optional[str] = None, - api_region: Optional[str] = None, - subscription_id: Optional[str] = None, - call_count_success: Optional[int] = None, - call_count_blocked: Optional[int] = None, - call_count_failed: Optional[int] = None, - call_count_other: Optional[int] = None, - call_count_total: Optional[int] = None, - bandwidth: Optional[int] = None, - cache_hit_count: Optional[int] = None, - cache_miss_count: Optional[int] = None, - api_time_avg: Optional[float] = None, - api_time_min: Optional[float] = None, - api_time_max: Optional[float] = None, - service_time_avg: Optional[float] = None, - service_time_min: Optional[float] = None, - service_time_max: Optional[float] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Name depending on report endpoint specifies product, API, operation or developer - name. - :paramtype name: str - :keyword timestamp: Start of aggregation period. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype timestamp: ~datetime.datetime - :keyword interval: Length of aggregation period. Interval must be multiple of 15 minutes and - may not be zero. The value should be in ISO 8601 format - (http://en.wikipedia.org/wiki/ISO_8601#Durations). - :paramtype interval: str - :keyword country: Country to which this record data is related. - :paramtype country: str - :keyword region: Country region to which this record data is related. - :paramtype region: str - :keyword zip: Zip code to which this record data is related. - :paramtype zip: str - :keyword api_id: API identifier path. /apis/{apiId}. - :paramtype api_id: str - :keyword operation_id: Operation identifier path. /apis/{apiId}/operations/{operationId}. - :paramtype operation_id: str - :keyword api_region: API region identifier. - :paramtype api_region: str - :keyword subscription_id: Subscription identifier path. /subscriptions/{subscriptionId}. - :paramtype subscription_id: str - :keyword call_count_success: Number of successful calls. This includes calls returning - HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect. - :paramtype call_count_success: int - :keyword call_count_blocked: Number of calls blocked due to invalid credentials. This includes - calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and - HttpStatusCode.TooManyRequests. - :paramtype call_count_blocked: int - :keyword call_count_failed: Number of calls failed due to gateway or backend errors. This - includes calls returning HttpStatusCode.BadRequest(400) and any Code between - HttpStatusCode.InternalServerError (500) and 600. - :paramtype call_count_failed: int - :keyword call_count_other: Number of other calls. - :paramtype call_count_other: int - :keyword call_count_total: Total number of calls. - :paramtype call_count_total: int - :keyword bandwidth: Bandwidth consumed. - :paramtype bandwidth: int - :keyword cache_hit_count: Number of times when content was served from cache policy. - :paramtype cache_hit_count: int - :keyword cache_miss_count: Number of times content was fetched from backend. - :paramtype cache_miss_count: int - :keyword api_time_avg: Average time it took to process request. - :paramtype api_time_avg: float - :keyword api_time_min: Minimum time it took to process request. - :paramtype api_time_min: float - :keyword api_time_max: Maximum time it took to process request. - :paramtype api_time_max: float - :keyword service_time_avg: Average time it took to process request on backend. - :paramtype service_time_avg: float - :keyword service_time_min: Minimum time it took to process request on backend. - :paramtype service_time_min: float - :keyword service_time_max: Maximum time it took to process request on backend. - :paramtype service_time_max: float - """ - super().__init__(**kwargs) - self.name = name - self.timestamp = timestamp - self.interval = interval - self.country = country - self.region = region - self.zip = zip - self.user_id: Optional[str] = None - self.product_id: Optional[str] = None - self.api_id = api_id - self.operation_id = operation_id - self.api_region = api_region - self.subscription_id = subscription_id - self.call_count_success = call_count_success - self.call_count_blocked = call_count_blocked - self.call_count_failed = call_count_failed - self.call_count_other = call_count_other - self.call_count_total = call_count_total - self.bandwidth = bandwidth - self.cache_hit_count = cache_hit_count - self.cache_miss_count = cache_miss_count - self.api_time_avg = api_time_avg - self.api_time_min = api_time_min - self.api_time_max = api_time_max - self.service_time_avg = service_time_avg - self.service_time_min = service_time_min - self.service_time_max = service_time_max - - -class RepresentationContract(_serialization.Model): - """Operation request/response representation details. - - All required parameters must be populated in order to send to server. - - :ivar content_type: Specifies a registered or custom content type for this representation, e.g. - application/xml. Required. - :vartype content_type: str - :ivar schema_id: Schema identifier. Applicable only if 'contentType' value is neither - 'application/x-www-form-urlencoded' nor 'multipart/form-data'. - :vartype schema_id: str - :ivar type_name: Type name defined by the schema. Applicable only if 'contentType' value is - neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. - :vartype type_name: str - :ivar form_parameters: Collection of form parameters. Required if 'contentType' value is either - 'application/x-www-form-urlencoded' or 'multipart/form-data'.. - :vartype form_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :ivar examples: Exampled defined for the representation. - :vartype examples: dict[str, ~azure.mgmt.apimanagement.models.ParameterExampleContract] - """ - - _validation = { - "content_type": {"required": True}, - } - - _attribute_map = { - "content_type": {"key": "contentType", "type": "str"}, - "schema_id": {"key": "schemaId", "type": "str"}, - "type_name": {"key": "typeName", "type": "str"}, - "form_parameters": {"key": "formParameters", "type": "[ParameterContract]"}, - "examples": {"key": "examples", "type": "{ParameterExampleContract}"}, - } - - def __init__( - self, - *, - content_type: str, - schema_id: Optional[str] = None, - type_name: Optional[str] = None, - form_parameters: Optional[list["_models.ParameterContract"]] = None, - examples: Optional[dict[str, "_models.ParameterExampleContract"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword content_type: Specifies a registered or custom content type for this representation, - e.g. application/xml. Required. - :paramtype content_type: str - :keyword schema_id: Schema identifier. Applicable only if 'contentType' value is neither - 'application/x-www-form-urlencoded' nor 'multipart/form-data'. - :paramtype schema_id: str - :keyword type_name: Type name defined by the schema. Applicable only if 'contentType' value is - neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. - :paramtype type_name: str - :keyword form_parameters: Collection of form parameters. Required if 'contentType' value is - either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. - :paramtype form_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :keyword examples: Exampled defined for the representation. - :paramtype examples: dict[str, ~azure.mgmt.apimanagement.models.ParameterExampleContract] - """ - super().__init__(**kwargs) - self.content_type = content_type - self.schema_id = schema_id - self.type_name = type_name - self.form_parameters = form_parameters - self.examples = examples - - -class RequestContract(_serialization.Model): - """Operation request details. - - :ivar description: Operation request description. - :vartype description: str - :ivar query_parameters: Collection of operation request query parameters. - :vartype query_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :ivar headers: Collection of operation request headers. - :vartype headers: list[~azure.mgmt.apimanagement.models.ParameterContract] - :ivar representations: Collection of operation request representations. - :vartype representations: list[~azure.mgmt.apimanagement.models.RepresentationContract] - """ - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "query_parameters": {"key": "queryParameters", "type": "[ParameterContract]"}, - "headers": {"key": "headers", "type": "[ParameterContract]"}, - "representations": {"key": "representations", "type": "[RepresentationContract]"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - query_parameters: Optional[list["_models.ParameterContract"]] = None, - headers: Optional[list["_models.ParameterContract"]] = None, - representations: Optional[list["_models.RepresentationContract"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Operation request description. - :paramtype description: str - :keyword query_parameters: Collection of operation request query parameters. - :paramtype query_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] - :keyword headers: Collection of operation request headers. - :paramtype headers: list[~azure.mgmt.apimanagement.models.ParameterContract] - :keyword representations: Collection of operation request representations. - :paramtype representations: list[~azure.mgmt.apimanagement.models.RepresentationContract] - """ - super().__init__(**kwargs) - self.description = description - self.query_parameters = query_parameters - self.headers = headers - self.representations = representations - - -class RequestReportCollection(_serialization.Model): - """Paged Report records list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.RequestReportRecordContract] - :ivar count: Total record count number across all pages. - :vartype count: int - """ - - _attribute_map = { - "value": {"key": "value", "type": "[RequestReportRecordContract]"}, - "count": {"key": "count", "type": "int"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.RequestReportRecordContract"]] = None, - count: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.RequestReportRecordContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value = value - self.count = count - - -class RequestReportRecordContract(_serialization.Model): - """Request Report data. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar api_id: API identifier path. /apis/{apiId}. - :vartype api_id: str - :ivar operation_id: Operation identifier path. /apis/{apiId}/operations/{operationId}. - :vartype operation_id: str - :ivar product_id: Product identifier path. /products/{productId}. - :vartype product_id: str - :ivar user_id: User identifier path. /users/{userId}. - :vartype user_id: str - :ivar method: The HTTP method associated with this request.. - :vartype method: str - :ivar url: The full URL associated with this request. - :vartype url: str - :ivar ip_address: The client IP address associated with this request. - :vartype ip_address: str - :ivar backend_response_code: The HTTP status code received by the gateway as a result of - forwarding this request to the backend. - :vartype backend_response_code: str - :ivar response_code: The HTTP status code returned by the gateway. - :vartype response_code: int - :ivar response_size: The size of the response returned by the gateway. - :vartype response_size: int - :ivar timestamp: The date and time when this request was received by the gateway in ISO 8601 - format. - :vartype timestamp: ~datetime.datetime - :ivar cache: Specifies if response cache was involved in generating the response. If the value - is none, the cache was not used. If the value is hit, cached response was returned. If the - value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by - the backend. - :vartype cache: str - :ivar api_time: The total time it took to process this request. - :vartype api_time: float - :ivar service_time: he time it took to forward this request to the backend and get the response - back. - :vartype service_time: float - :ivar api_region: Azure region where the gateway that processed this request is located. - :vartype api_region: str - :ivar subscription_id: Subscription identifier path. /subscriptions/{subscriptionId}. - :vartype subscription_id: str - :ivar request_id: Request Identifier. - :vartype request_id: str - :ivar request_size: The size of this request.. - :vartype request_size: int - """ - - _validation = { - "product_id": {"readonly": True}, - "user_id": {"readonly": True}, - } - - _attribute_map = { - "api_id": {"key": "apiId", "type": "str"}, - "operation_id": {"key": "operationId", "type": "str"}, - "product_id": {"key": "productId", "type": "str"}, - "user_id": {"key": "userId", "type": "str"}, - "method": {"key": "method", "type": "str"}, - "url": {"key": "url", "type": "str"}, - "ip_address": {"key": "ipAddress", "type": "str"}, - "backend_response_code": {"key": "backendResponseCode", "type": "str"}, - "response_code": {"key": "responseCode", "type": "int"}, - "response_size": {"key": "responseSize", "type": "int"}, - "timestamp": {"key": "timestamp", "type": "iso-8601"}, - "cache": {"key": "cache", "type": "str"}, - "api_time": {"key": "apiTime", "type": "float"}, - "service_time": {"key": "serviceTime", "type": "float"}, - "api_region": {"key": "apiRegion", "type": "str"}, - "subscription_id": {"key": "subscriptionId", "type": "str"}, - "request_id": {"key": "requestId", "type": "str"}, - "request_size": {"key": "requestSize", "type": "int"}, - } - - def __init__( - self, - *, - api_id: Optional[str] = None, - operation_id: Optional[str] = None, - method: Optional[str] = None, - url: Optional[str] = None, - ip_address: Optional[str] = None, - backend_response_code: Optional[str] = None, - response_code: Optional[int] = None, - response_size: Optional[int] = None, - timestamp: Optional[datetime.datetime] = None, - cache: Optional[str] = None, - api_time: Optional[float] = None, - service_time: Optional[float] = None, - api_region: Optional[str] = None, - subscription_id: Optional[str] = None, - request_id: Optional[str] = None, - request_size: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword api_id: API identifier path. /apis/{apiId}. - :paramtype api_id: str - :keyword operation_id: Operation identifier path. /apis/{apiId}/operations/{operationId}. - :paramtype operation_id: str - :keyword method: The HTTP method associated with this request.. - :paramtype method: str - :keyword url: The full URL associated with this request. - :paramtype url: str - :keyword ip_address: The client IP address associated with this request. - :paramtype ip_address: str - :keyword backend_response_code: The HTTP status code received by the gateway as a result of - forwarding this request to the backend. - :paramtype backend_response_code: str - :keyword response_code: The HTTP status code returned by the gateway. - :paramtype response_code: int - :keyword response_size: The size of the response returned by the gateway. - :paramtype response_size: int - :keyword timestamp: The date and time when this request was received by the gateway in ISO 8601 - format. - :paramtype timestamp: ~datetime.datetime - :keyword cache: Specifies if response cache was involved in generating the response. If the - value is none, the cache was not used. If the value is hit, cached response was returned. If - the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled - by the backend. - :paramtype cache: str - :keyword api_time: The total time it took to process this request. - :paramtype api_time: float - :keyword service_time: he time it took to forward this request to the backend and get the - response back. - :paramtype service_time: float - :keyword api_region: Azure region where the gateway that processed this request is located. - :paramtype api_region: str - :keyword subscription_id: Subscription identifier path. /subscriptions/{subscriptionId}. - :paramtype subscription_id: str - :keyword request_id: Request Identifier. - :paramtype request_id: str - :keyword request_size: The size of this request.. - :paramtype request_size: int - """ - super().__init__(**kwargs) - self.api_id = api_id - self.operation_id = operation_id - self.product_id: Optional[str] = None - self.user_id: Optional[str] = None - self.method = method - self.url = url - self.ip_address = ip_address - self.backend_response_code = backend_response_code - self.response_code = response_code - self.response_size = response_size - self.timestamp = timestamp - self.cache = cache - self.api_time = api_time - self.service_time = service_time - self.api_region = api_region - self.subscription_id = subscription_id - self.request_id = request_id - self.request_size = request_size - - -class ResolverCollection(_serialization.Model): - """Paged Resolver list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.ResolverContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ResolverContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword count: Total record count number across all pages. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.ResolverContract"]] = None - self.count = count - self.next_link: Optional[str] = None - - -class ResolverContract(ProxyResource): - """GraphQL API Resolver details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar display_name: Resolver Name. - :vartype display_name: str - :ivar path: Path is type/field being resolved. - :vartype path: str - :ivar description: Description of the resolver. May include HTML formatting tags. - :vartype description: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "display_name": {"max_length": 300, "min_length": 1}, - "path": {"max_length": 300, "min_length": 1}, - "description": {"max_length": 1000}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "path": {"key": "properties.path", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - path: Optional[str] = None, - description: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword display_name: Resolver Name. - :paramtype display_name: str - :keyword path: Path is type/field being resolved. - :paramtype path: str - :keyword description: Description of the resolver. May include HTML formatting tags. - :paramtype description: str - """ - super().__init__(**kwargs) - self.display_name = display_name - self.path = path - self.description = description - - -class ResolverResultContract(ProxyResource): - """Long Running Git Resolver Results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar id_properties_id: Resolver result identifier. - :vartype id_properties_id: str - :ivar status: Status of an async resolver. Known values are: "Started", "InProgress", - "Succeeded", and "Failed". - :vartype status: str or ~azure.mgmt.apimanagement.models.AsyncResolverStatus - :ivar started: Start time of an async resolver. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype started: ~datetime.datetime - :ivar updated: Last update time of an async resolver. The date conforms to the following - format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype updated: ~datetime.datetime - :ivar result_info: Optional result info. - :vartype result_info: str - :ivar error: Error Body Contract. - :vartype error: ~azure.mgmt.apimanagement.models.ErrorResponseBody - :ivar action_log: This property if only provided as part of the TenantConfiguration_Validate - resolver. It contains the log the entities which will be updated/created/deleted as part of the - TenantConfiguration_Deploy resolver. - :vartype action_log: list[~azure.mgmt.apimanagement.models.ResolverResultLogItemContract] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "action_log": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "id_properties_id": {"key": "properties.id", "type": "str"}, - "status": {"key": "properties.status", "type": "str"}, - "started": {"key": "properties.started", "type": "iso-8601"}, - "updated": {"key": "properties.updated", "type": "iso-8601"}, - "result_info": {"key": "properties.resultInfo", "type": "str"}, - "error": {"key": "properties.error", "type": "ErrorResponseBody"}, - "action_log": {"key": "properties.actionLog", "type": "[ResolverResultLogItemContract]"}, - } - - def __init__( - self, - *, - id_properties_id: Optional[str] = None, - status: Optional[Union[str, "_models.AsyncResolverStatus"]] = None, - started: Optional[datetime.datetime] = None, - updated: Optional[datetime.datetime] = None, - result_info: Optional[str] = None, - error: Optional["_models.ErrorResponseBody"] = None, - **kwargs: Any - ) -> None: - """ - :keyword id_properties_id: Resolver result identifier. - :paramtype id_properties_id: str - :keyword status: Status of an async resolver. Known values are: "Started", "InProgress", - "Succeeded", and "Failed". - :paramtype status: str or ~azure.mgmt.apimanagement.models.AsyncResolverStatus - :keyword started: Start time of an async resolver. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype started: ~datetime.datetime - :keyword updated: Last update time of an async resolver. The date conforms to the following - format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype updated: ~datetime.datetime - :keyword result_info: Optional result info. - :paramtype result_info: str - :keyword error: Error Body Contract. - :paramtype error: ~azure.mgmt.apimanagement.models.ErrorResponseBody - """ - super().__init__(**kwargs) - self.id_properties_id = id_properties_id - self.status = status - self.started = started - self.updated = updated - self.result_info = result_info - self.error = error - self.action_log: Optional[list["_models.ResolverResultLogItemContract"]] = None - - -class ResolverResultLogItemContract(_serialization.Model): - """Log of the entity being created, updated or deleted. - - :ivar object_type: The type of entity contract. - :vartype object_type: str - :ivar action: Action like create/update/delete. - :vartype action: str - :ivar object_key: Identifier of the entity being created/updated/deleted. - :vartype object_key: str - """ - - _attribute_map = { - "object_type": {"key": "objectType", "type": "str"}, - "action": {"key": "action", "type": "str"}, - "object_key": {"key": "objectKey", "type": "str"}, - } - - def __init__( - self, - *, - object_type: Optional[str] = None, - action: Optional[str] = None, - object_key: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword object_type: The type of entity contract. - :paramtype object_type: str - :keyword action: Action like create/update/delete. - :paramtype action: str - :keyword object_key: Identifier of the entity being created/updated/deleted. - :paramtype object_key: str - """ - super().__init__(**kwargs) - self.object_type = object_type - self.action = action - self.object_key = object_key - - -class ResolverUpdateContract(_serialization.Model): - """GraphQL API Resolver Update Contract details. - - :ivar display_name: Resolver Name. - :vartype display_name: str - :ivar path: Path is type/field being resolved. - :vartype path: str - :ivar description: Description of the resolver. May include HTML formatting tags. - :vartype description: str - """ - - _validation = { - "display_name": {"max_length": 300, "min_length": 1}, - "path": {"max_length": 300, "min_length": 1}, - "description": {"max_length": 1000}, - } - - _attribute_map = { - "display_name": {"key": "properties.displayName", "type": "str"}, - "path": {"key": "properties.path", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - path: Optional[str] = None, - description: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword display_name: Resolver Name. - :paramtype display_name: str - :keyword path: Path is type/field being resolved. - :paramtype path: str - :keyword description: Description of the resolver. May include HTML formatting tags. - :paramtype description: str - """ - super().__init__(**kwargs) - self.display_name = display_name - self.path = path - self.description = description - - -class ResourceCollection(_serialization.Model): - """A collection of resources. - - :ivar value: A collection of resources. - :vartype value: list[~azure.mgmt.apimanagement.models.ResourceCollectionValueItem] - :ivar count: Total record count number. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ResourceCollectionValueItem]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.ResourceCollectionValueItem"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: A collection of resources. - :paramtype value: list[~azure.mgmt.apimanagement.models.ResourceCollectionValueItem] - :keyword count: Total record count number. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class ResourceCollectionValueItem(ProxyResource): - """ResourceCollectionValueItem. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - -class ResourceLocationDataContract(_serialization.Model): - """Resource location data properties. - - All required parameters must be populated in order to send to server. - - :ivar name: A canonical name for the geographic or physical location. Required. - :vartype name: str - :ivar city: The city or locality where the resource is located. - :vartype city: str - :ivar district: The district, state, or province where the resource is located. - :vartype district: str - :ivar country_or_region: The country or region where the resource is located. - :vartype country_or_region: str - """ - - _validation = { - "name": {"required": True, "max_length": 256}, - "city": {"max_length": 256}, - "district": {"max_length": 256}, - "country_or_region": {"max_length": 256}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "city": {"key": "city", "type": "str"}, - "district": {"key": "district", "type": "str"}, - "country_or_region": {"key": "countryOrRegion", "type": "str"}, - } - - def __init__( - self, - *, - name: str, - city: Optional[str] = None, - district: Optional[str] = None, - country_or_region: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: A canonical name for the geographic or physical location. Required. - :paramtype name: str - :keyword city: The city or locality where the resource is located. - :paramtype city: str - :keyword district: The district, state, or province where the resource is located. - :paramtype district: str - :keyword country_or_region: The country or region where the resource is located. - :paramtype country_or_region: str - """ - super().__init__(**kwargs) - self.name = name - self.city = city - self.district = district - self.country_or_region = country_or_region - - -class ResourceSku(_serialization.Model): - """Describes an available API Management SKU. - - :ivar name: Name of the Sku. Known values are: "Developer", "Standard", "Premium", "Basic", - "Consumption", "Isolated", "BasicV2", "StandardV2", and "PremiumV2". - :vartype name: str or ~azure.mgmt.apimanagement.models.SkuType - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - } - - def __init__(self, *, name: Optional[Union[str, "_models.SkuType"]] = None, **kwargs: Any) -> None: - """ - :keyword name: Name of the Sku. Known values are: "Developer", "Standard", "Premium", "Basic", - "Consumption", "Isolated", "BasicV2", "StandardV2", and "PremiumV2". - :paramtype name: str or ~azure.mgmt.apimanagement.models.SkuType - """ - super().__init__(**kwargs) - self.name = name - - -class ResourceSkuCapacity(_serialization.Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: int - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: int - :ivar default: The default capacity. - :vartype default: int - :ivar scale_type: The scale type applicable to the sku. Known values are: "automatic", - "manual", and "none". - :vartype scale_type: str or ~azure.mgmt.apimanagement.models.ResourceSkuCapacityScaleType - """ - - _validation = { - "minimum": {"readonly": True}, - "maximum": {"readonly": True}, - "default": {"readonly": True}, - "scale_type": {"readonly": True}, - } - - _attribute_map = { - "minimum": {"key": "minimum", "type": "int"}, - "maximum": {"key": "maximum", "type": "int"}, - "default": {"key": "default", "type": "int"}, - "scale_type": {"key": "scaleType", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.minimum: Optional[int] = None - self.maximum: Optional[int] = None - self.default: Optional[int] = None - self.scale_type: Optional[Union[str, "_models.ResourceSkuCapacityScaleType"]] = None - - -class ResourceSkuResult(_serialization.Model): - """Describes an available API Management service SKU. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar sku: Specifies API Management SKU. - :vartype sku: ~azure.mgmt.apimanagement.models.ResourceSku - :ivar capacity: Specifies the number of API Management units. - :vartype capacity: ~azure.mgmt.apimanagement.models.ResourceSkuCapacity - """ - - _validation = { - "resource_type": {"readonly": True}, - "sku": {"readonly": True}, - "capacity": {"readonly": True}, - } - - _attribute_map = { - "resource_type": {"key": "resourceType", "type": "str"}, - "sku": {"key": "sku", "type": "ResourceSku"}, - "capacity": {"key": "capacity", "type": "ResourceSkuCapacity"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.resource_type: Optional[str] = None - self.sku: Optional["_models.ResourceSku"] = None - self.capacity: Optional["_models.ResourceSkuCapacity"] = None - - -class ResourceSkuResults(_serialization.Model): - """The API Management service SKUs operation response. - - All required parameters must be populated in order to send to server. - - :ivar value: The list of skus available for the service. Required. - :vartype value: list[~azure.mgmt.apimanagement.models.ResourceSkuResult] - :ivar next_link: The uri to fetch the next page of API Management service Skus. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ResourceSkuResult]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: list["_models.ResourceSkuResult"], next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of skus available for the service. Required. - :paramtype value: list[~azure.mgmt.apimanagement.models.ResourceSkuResult] - :keyword next_link: The uri to fetch the next page of API Management service Skus. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ResponseContract(_serialization.Model): - """Operation response details. - - All required parameters must be populated in order to send to server. - - :ivar status_code: Operation response HTTP status code. Required. - :vartype status_code: int - :ivar description: Operation response description. - :vartype description: str - :ivar representations: Collection of operation response representations. - :vartype representations: list[~azure.mgmt.apimanagement.models.RepresentationContract] - :ivar headers: Collection of operation response headers. - :vartype headers: list[~azure.mgmt.apimanagement.models.ParameterContract] - """ - - _validation = { - "status_code": {"required": True}, - } - - _attribute_map = { - "status_code": {"key": "statusCode", "type": "int"}, - "description": {"key": "description", "type": "str"}, - "representations": {"key": "representations", "type": "[RepresentationContract]"}, - "headers": {"key": "headers", "type": "[ParameterContract]"}, - } - - def __init__( - self, - *, - status_code: int, - description: Optional[str] = None, - representations: Optional[list["_models.RepresentationContract"]] = None, - headers: Optional[list["_models.ParameterContract"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword status_code: Operation response HTTP status code. Required. - :paramtype status_code: int - :keyword description: Operation response description. - :paramtype description: str - :keyword representations: Collection of operation response representations. - :paramtype representations: list[~azure.mgmt.apimanagement.models.RepresentationContract] - :keyword headers: Collection of operation response headers. - :paramtype headers: list[~azure.mgmt.apimanagement.models.ParameterContract] - """ - super().__init__(**kwargs) - self.status_code = status_code - self.description = description - self.representations = representations - self.headers = headers - - -class SamplingSettings(_serialization.Model): - """Sampling settings for Diagnostic. - - :ivar sampling_type: Sampling type. "fixed" - :vartype sampling_type: str or ~azure.mgmt.apimanagement.models.SamplingType - :ivar percentage: Rate of sampling for fixed-rate sampling. - :vartype percentage: float - """ - - _validation = { - "percentage": {"maximum": 100, "minimum": 0}, - } - - _attribute_map = { - "sampling_type": {"key": "samplingType", "type": "str"}, - "percentage": {"key": "percentage", "type": "float"}, - } - - def __init__( - self, - *, - sampling_type: Optional[Union[str, "_models.SamplingType"]] = None, - percentage: Optional[float] = None, - **kwargs: Any - ) -> None: - """ - :keyword sampling_type: Sampling type. "fixed" - :paramtype sampling_type: str or ~azure.mgmt.apimanagement.models.SamplingType - :keyword percentage: Rate of sampling for fixed-rate sampling. - :paramtype percentage: float - """ - super().__init__(**kwargs) - self.sampling_type = sampling_type - self.percentage = percentage - - -class SaveConfigurationParameter(_serialization.Model): - """Save Tenant Configuration Contract details. - - :ivar branch: The name of the Git branch in which to commit the current configuration snapshot. - :vartype branch: str - :ivar force: The value if true, the current configuration database is committed to the Git - repository, even if the Git repository has newer changes that would be overwritten. - :vartype force: bool - """ - - _attribute_map = { - "branch": {"key": "properties.branch", "type": "str"}, - "force": {"key": "properties.force", "type": "bool"}, - } - - def __init__(self, *, branch: Optional[str] = None, force: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword branch: The name of the Git branch in which to commit the current configuration - snapshot. - :paramtype branch: str - :keyword force: The value if true, the current configuration database is committed to the Git - repository, even if the Git repository has newer changes that would be overwritten. - :paramtype force: bool - """ - super().__init__(**kwargs) - self.branch = branch - self.force = force - - -class SchemaCollection(_serialization.Model): - """The response of the list schema operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: API Schema Contract value. - :vartype value: list[~azure.mgmt.apimanagement.models.SchemaContract] - :ivar count: Total record count number. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[SchemaContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword count: Total record count number. - :paramtype count: int - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.SchemaContract"]] = None - self.count = count - self.next_link: Optional[str] = None - - -class SchemaContract(ProxyResource): - """API Schema Contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar content_type: Must be a valid a media type used in a Content-Type header as defined in - the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
- - ``Swagger`` Schema use ``application/vnd.ms-azure-apim.swagger.definitions+json``
- - ``WSDL`` Schema use ``application/vnd.ms-azure-apim.xsd+xml``
- ``OpenApi`` Schema use - ``application/vnd.oai.openapi.components+json``
- ``WADL Schema`` use - ``application/vnd.ms-azure-apim.wadl.grammars+xml``
- ``OData Schema`` use - ``application/vnd.ms-azure-apim.odata.schema``
- ``gRPC Schema`` use ``text/protobuf``. - :vartype content_type: str - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - :ivar value: Json escaped string defining the document representing the Schema. Used for - schemas other than Swagger/OpenAPI. - :vartype value: str - :ivar definitions: Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. - :vartype definitions: JSON - :ivar components: Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null - otherwise. - :vartype components: JSON - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "content_type": {"key": "properties.contentType", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "value": {"key": "properties.document.value", "type": "str"}, - "definitions": {"key": "properties.document.definitions", "type": "object"}, - "components": {"key": "properties.document.components", "type": "object"}, - } - - def __init__( - self, - *, - content_type: Optional[str] = None, - value: Optional[str] = None, - definitions: Optional[JSON] = None, - components: Optional[JSON] = None, - **kwargs: Any - ) -> None: - """ - :keyword content_type: Must be a valid a media type used in a Content-Type header as defined in - the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
- - ``Swagger`` Schema use ``application/vnd.ms-azure-apim.swagger.definitions+json``
- - ``WSDL`` Schema use ``application/vnd.ms-azure-apim.xsd+xml``
- ``OpenApi`` Schema use - ``application/vnd.oai.openapi.components+json``
- ``WADL Schema`` use - ``application/vnd.ms-azure-apim.wadl.grammars+xml``
- ``OData Schema`` use - ``application/vnd.ms-azure-apim.odata.schema``
- ``gRPC Schema`` use ``text/protobuf``. - :paramtype content_type: str - :keyword value: Json escaped string defining the document representing the Schema. Used for - schemas other than Swagger/OpenAPI. - :paramtype value: str - :keyword definitions: Types definitions. Used for Swagger/OpenAPI v1 schemas only, null - otherwise. - :paramtype definitions: JSON - :keyword components: Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null - otherwise. - :paramtype components: JSON - """ - super().__init__(**kwargs) - self.content_type = content_type - self.provisioning_state: Optional[str] = None - self.value = value - self.definitions = definitions - self.components = components - - -class SubscriptionCollection(_serialization.Model): - """Paged Subscriptions list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.SubscriptionContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[SubscriptionContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.SubscriptionContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.SubscriptionContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class SubscriptionContract(ProxyResource): - """Subscription details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar owner_id: The user resource identifier of the subscription owner. The value is a valid - relative URL in the format of /users/{userId} where {userId} is a user identifier. - :vartype owner_id: str - :ivar scope: Scope like /products/{productId} or /apis or /apis/{apiId}. - :vartype scope: str - :ivar display_name: The name of the subscription, or null if the subscription has no name. - :vartype display_name: str - :ivar state: Subscription state. Possible states are * active – the subscription is active, * - suspended – the subscription is blocked, and the subscriber cannot call any APIs of the - product, * submitted – the subscription request has been made by the developer, but has not yet - been approved or rejected, * rejected – the subscription request has been denied by an - administrator, * cancelled – the subscription has been cancelled by the developer or - administrator, * expired – the subscription reached its expiration date and was deactivated. - Known values are: "suspended", "active", "expired", "submitted", "rejected", and "cancelled". - :vartype state: str or ~azure.mgmt.apimanagement.models.SubscriptionState - :ivar created_date: Subscription creation date. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype created_date: ~datetime.datetime - :ivar start_date: Subscription activation date. The setting is for audit purposes only and the - subscription is not automatically activated. The subscription lifecycle can be managed by using - the ``state`` property. The date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as - specified by the ISO 8601 standard. - :vartype start_date: ~datetime.datetime - :ivar expiration_date: Subscription expiration date. The setting is for audit purposes only and - the subscription is not automatically expired. The subscription lifecycle can be managed by - using the ``state`` property. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype expiration_date: ~datetime.datetime - :ivar end_date: Date when subscription was cancelled or expired. The setting is for audit - purposes only and the subscription is not automatically cancelled. The subscription lifecycle - can be managed by using the ``state`` property. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype end_date: ~datetime.datetime - :ivar notification_date: Upcoming subscription expiration notification date. The date conforms - to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype notification_date: ~datetime.datetime - :ivar primary_key: Subscription primary key. This property will not be filled on 'GET' - operations! Use '/listSecrets' POST request to get the value. - :vartype primary_key: str - :ivar secondary_key: Subscription secondary key. This property will not be filled on 'GET' - operations! Use '/listSecrets' POST request to get the value. - :vartype secondary_key: str - :ivar state_comment: Optional subscription comment added by an administrator when the state is - changed to the 'rejected'. - :vartype state_comment: str - :ivar allow_tracing: Determines whether tracing is enabled. - :vartype allow_tracing: bool - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "display_name": {"max_length": 100}, - "created_date": {"readonly": True}, - "primary_key": {"max_length": 256, "min_length": 1}, - "secondary_key": {"max_length": 256, "min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "owner_id": {"key": "properties.ownerId", "type": "str"}, - "scope": {"key": "properties.scope", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "state": {"key": "properties.state", "type": "str"}, - "created_date": {"key": "properties.createdDate", "type": "iso-8601"}, - "start_date": {"key": "properties.startDate", "type": "iso-8601"}, - "expiration_date": {"key": "properties.expirationDate", "type": "iso-8601"}, - "end_date": {"key": "properties.endDate", "type": "iso-8601"}, - "notification_date": {"key": "properties.notificationDate", "type": "iso-8601"}, - "primary_key": {"key": "properties.primaryKey", "type": "str"}, - "secondary_key": {"key": "properties.secondaryKey", "type": "str"}, - "state_comment": {"key": "properties.stateComment", "type": "str"}, - "allow_tracing": {"key": "properties.allowTracing", "type": "bool"}, - } - - def __init__( - self, - *, - owner_id: Optional[str] = None, - scope: Optional[str] = None, - display_name: Optional[str] = None, - state: Optional[Union[str, "_models.SubscriptionState"]] = None, - start_date: Optional[datetime.datetime] = None, - expiration_date: Optional[datetime.datetime] = None, - end_date: Optional[datetime.datetime] = None, - notification_date: Optional[datetime.datetime] = None, - primary_key: Optional[str] = None, - secondary_key: Optional[str] = None, - state_comment: Optional[str] = None, - allow_tracing: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword owner_id: The user resource identifier of the subscription owner. The value is a valid - relative URL in the format of /users/{userId} where {userId} is a user identifier. - :paramtype owner_id: str - :keyword scope: Scope like /products/{productId} or /apis or /apis/{apiId}. - :paramtype scope: str - :keyword display_name: The name of the subscription, or null if the subscription has no name. - :paramtype display_name: str - :keyword state: Subscription state. Possible states are * active – the subscription is active, - * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the - product, * submitted – the subscription request has been made by the developer, but has not yet - been approved or rejected, * rejected – the subscription request has been denied by an - administrator, * cancelled – the subscription has been cancelled by the developer or - administrator, * expired – the subscription reached its expiration date and was deactivated. - Known values are: "suspended", "active", "expired", "submitted", "rejected", and "cancelled". - :paramtype state: str or ~azure.mgmt.apimanagement.models.SubscriptionState - :keyword start_date: Subscription activation date. The setting is for audit purposes only and - the subscription is not automatically activated. The subscription lifecycle can be managed by - using the ``state`` property. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype start_date: ~datetime.datetime - :keyword expiration_date: Subscription expiration date. The setting is for audit purposes only - and the subscription is not automatically expired. The subscription lifecycle can be managed by - using the ``state`` property. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype expiration_date: ~datetime.datetime - :keyword end_date: Date when subscription was cancelled or expired. The setting is for audit - purposes only and the subscription is not automatically cancelled. The subscription lifecycle - can be managed by using the ``state`` property. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype end_date: ~datetime.datetime - :keyword notification_date: Upcoming subscription expiration notification date. The date - conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 - standard. - :paramtype notification_date: ~datetime.datetime - :keyword primary_key: Subscription primary key. This property will not be filled on 'GET' - operations! Use '/listSecrets' POST request to get the value. - :paramtype primary_key: str - :keyword secondary_key: Subscription secondary key. This property will not be filled on 'GET' - operations! Use '/listSecrets' POST request to get the value. - :paramtype secondary_key: str - :keyword state_comment: Optional subscription comment added by an administrator when the state - is changed to the 'rejected'. - :paramtype state_comment: str - :keyword allow_tracing: Determines whether tracing is enabled. - :paramtype allow_tracing: bool - """ - super().__init__(**kwargs) - self.owner_id = owner_id - self.scope = scope - self.display_name = display_name - self.state = state - self.created_date: Optional[datetime.datetime] = None - self.start_date = start_date - self.expiration_date = expiration_date - self.end_date = end_date - self.notification_date = notification_date - self.primary_key = primary_key - self.secondary_key = secondary_key - self.state_comment = state_comment - self.allow_tracing = allow_tracing - - -class SubscriptionCreateParameters(_serialization.Model): - """Subscription create details. - - :ivar owner_id: User (user id path) for whom subscription is being created in form - /users/{userId}. - :vartype owner_id: str - :ivar scope: Scope like /products/{productId} or /apis or /apis/{apiId}. - :vartype scope: str - :ivar display_name: Subscription name. - :vartype display_name: str - :ivar primary_key: Primary subscription key. If not specified during request key will be - generated automatically. - :vartype primary_key: str - :ivar secondary_key: Secondary subscription key. If not specified during request key will be - generated automatically. - :vartype secondary_key: str - :ivar state: Initial subscription state. If no value is specified, subscription is created with - Submitted state. Possible states are * active – the subscription is active, * suspended – the - subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – - the subscription request has been made by the developer, but has not yet been approved or - rejected, * rejected – the subscription request has been denied by an administrator, * - cancelled – the subscription has been cancelled by the developer or administrator, * expired – - the subscription reached its expiration date and was deactivated. Known values are: - "suspended", "active", "expired", "submitted", "rejected", and "cancelled". - :vartype state: str or ~azure.mgmt.apimanagement.models.SubscriptionState - :ivar allow_tracing: Determines whether tracing can be enabled. - :vartype allow_tracing: bool - """ - - _validation = { - "display_name": {"max_length": 100, "min_length": 1}, - "primary_key": {"max_length": 256, "min_length": 1}, - "secondary_key": {"max_length": 256, "min_length": 1}, - } - - _attribute_map = { - "owner_id": {"key": "properties.ownerId", "type": "str"}, - "scope": {"key": "properties.scope", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "primary_key": {"key": "properties.primaryKey", "type": "str"}, - "secondary_key": {"key": "properties.secondaryKey", "type": "str"}, - "state": {"key": "properties.state", "type": "str"}, - "allow_tracing": {"key": "properties.allowTracing", "type": "bool"}, - } - - def __init__( - self, - *, - owner_id: Optional[str] = None, - scope: Optional[str] = None, - display_name: Optional[str] = None, - primary_key: Optional[str] = None, - secondary_key: Optional[str] = None, - state: Optional[Union[str, "_models.SubscriptionState"]] = None, - allow_tracing: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword owner_id: User (user id path) for whom subscription is being created in form - /users/{userId}. - :paramtype owner_id: str - :keyword scope: Scope like /products/{productId} or /apis or /apis/{apiId}. - :paramtype scope: str - :keyword display_name: Subscription name. - :paramtype display_name: str - :keyword primary_key: Primary subscription key. If not specified during request key will be - generated automatically. - :paramtype primary_key: str - :keyword secondary_key: Secondary subscription key. If not specified during request key will be - generated automatically. - :paramtype secondary_key: str - :keyword state: Initial subscription state. If no value is specified, subscription is created - with Submitted state. Possible states are * active – the subscription is active, * suspended – - the subscription is blocked, and the subscriber cannot call any APIs of the product, * - submitted – the subscription request has been made by the developer, but has not yet been - approved or rejected, * rejected – the subscription request has been denied by an - administrator, * cancelled – the subscription has been cancelled by the developer or - administrator, * expired – the subscription reached its expiration date and was deactivated. - Known values are: "suspended", "active", "expired", "submitted", "rejected", and "cancelled". - :paramtype state: str or ~azure.mgmt.apimanagement.models.SubscriptionState - :keyword allow_tracing: Determines whether tracing can be enabled. - :paramtype allow_tracing: bool - """ - super().__init__(**kwargs) - self.owner_id = owner_id - self.scope = scope - self.display_name = display_name - self.primary_key = primary_key - self.secondary_key = secondary_key - self.state = state - self.allow_tracing = allow_tracing - - -class SubscriptionKeyParameterNamesContract(_serialization.Model): - """Subscription key parameter names details. - - :ivar header: Subscription key header name. - :vartype header: str - :ivar query: Subscription key query string parameter name. - :vartype query: str - """ - - _attribute_map = { - "header": {"key": "header", "type": "str"}, - "query": {"key": "query", "type": "str"}, - } - - def __init__(self, *, header: Optional[str] = None, query: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword header: Subscription key header name. - :paramtype header: str - :keyword query: Subscription key query string parameter name. - :paramtype query: str - """ - super().__init__(**kwargs) - self.header = header - self.query = query - - -class SubscriptionKeysContract(_serialization.Model): - """Subscription keys. - - :ivar primary_key: Subscription primary key. - :vartype primary_key: str - :ivar secondary_key: Subscription secondary key. - :vartype secondary_key: str - """ - - _validation = { - "primary_key": {"max_length": 256, "min_length": 1}, - "secondary_key": {"max_length": 256, "min_length": 1}, - } - - _attribute_map = { - "primary_key": {"key": "primaryKey", "type": "str"}, - "secondary_key": {"key": "secondaryKey", "type": "str"}, - } - - def __init__( - self, *, primary_key: Optional[str] = None, secondary_key: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword primary_key: Subscription primary key. - :paramtype primary_key: str - :keyword secondary_key: Subscription secondary key. - :paramtype secondary_key: str - """ - super().__init__(**kwargs) - self.primary_key = primary_key - self.secondary_key = secondary_key - - -class SubscriptionsDelegationSettingsProperties(_serialization.Model): # pylint: disable=name-too-long - """Subscriptions delegation settings properties. - - :ivar enabled: Enable or disable delegation for subscriptions. - :vartype enabled: bool - """ - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - } - - def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword enabled: Enable or disable delegation for subscriptions. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.enabled = enabled - - -class SubscriptionUpdateParameters(_serialization.Model): - """Subscription update details. - - :ivar owner_id: User identifier path: /users/{userId}. - :vartype owner_id: str - :ivar scope: Scope like /products/{productId} or /apis or /apis/{apiId}. - :vartype scope: str - :ivar expiration_date: Subscription expiration date. The setting is for audit purposes only and - the subscription is not automatically expired. The subscription lifecycle can be managed by - using the ``state`` property. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype expiration_date: ~datetime.datetime - :ivar display_name: Subscription name. - :vartype display_name: str - :ivar primary_key: Primary subscription key. - :vartype primary_key: str - :ivar secondary_key: Secondary subscription key. - :vartype secondary_key: str - :ivar state: Subscription state. Possible states are * active – the subscription is active, * - suspended – the subscription is blocked, and the subscriber cannot call any APIs of the - product, * submitted – the subscription request has been made by the developer, but has not yet - been approved or rejected, * rejected – the subscription request has been denied by an - administrator, * cancelled – the subscription has been cancelled by the developer or - administrator, * expired – the subscription reached its expiration date and was deactivated. - Known values are: "suspended", "active", "expired", "submitted", "rejected", and "cancelled". - :vartype state: str or ~azure.mgmt.apimanagement.models.SubscriptionState - :ivar state_comment: Comments describing subscription state change by the administrator when - the state is changed to the 'rejected'. - :vartype state_comment: str - :ivar allow_tracing: Determines whether tracing can be enabled. - :vartype allow_tracing: bool - """ - - _validation = { - "primary_key": {"max_length": 256, "min_length": 1}, - "secondary_key": {"max_length": 256, "min_length": 1}, - } - - _attribute_map = { - "owner_id": {"key": "properties.ownerId", "type": "str"}, - "scope": {"key": "properties.scope", "type": "str"}, - "expiration_date": {"key": "properties.expirationDate", "type": "iso-8601"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "primary_key": {"key": "properties.primaryKey", "type": "str"}, - "secondary_key": {"key": "properties.secondaryKey", "type": "str"}, - "state": {"key": "properties.state", "type": "str"}, - "state_comment": {"key": "properties.stateComment", "type": "str"}, - "allow_tracing": {"key": "properties.allowTracing", "type": "bool"}, - } - - def __init__( - self, - *, - owner_id: Optional[str] = None, - scope: Optional[str] = None, - expiration_date: Optional[datetime.datetime] = None, - display_name: Optional[str] = None, - primary_key: Optional[str] = None, - secondary_key: Optional[str] = None, - state: Optional[Union[str, "_models.SubscriptionState"]] = None, - state_comment: Optional[str] = None, - allow_tracing: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword owner_id: User identifier path: /users/{userId}. - :paramtype owner_id: str - :keyword scope: Scope like /products/{productId} or /apis or /apis/{apiId}. - :paramtype scope: str - :keyword expiration_date: Subscription expiration date. The setting is for audit purposes only - and the subscription is not automatically expired. The subscription lifecycle can be managed by - using the ``state`` property. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype expiration_date: ~datetime.datetime - :keyword display_name: Subscription name. - :paramtype display_name: str - :keyword primary_key: Primary subscription key. - :paramtype primary_key: str - :keyword secondary_key: Secondary subscription key. - :paramtype secondary_key: str - :keyword state: Subscription state. Possible states are * active – the subscription is active, - * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the - product, * submitted – the subscription request has been made by the developer, but has not yet - been approved or rejected, * rejected – the subscription request has been denied by an - administrator, * cancelled – the subscription has been cancelled by the developer or - administrator, * expired – the subscription reached its expiration date and was deactivated. - Known values are: "suspended", "active", "expired", "submitted", "rejected", and "cancelled". - :paramtype state: str or ~azure.mgmt.apimanagement.models.SubscriptionState - :keyword state_comment: Comments describing subscription state change by the administrator when - the state is changed to the 'rejected'. - :paramtype state_comment: str - :keyword allow_tracing: Determines whether tracing can be enabled. - :paramtype allow_tracing: bool - """ - super().__init__(**kwargs) - self.owner_id = owner_id - self.scope = scope - self.expiration_date = expiration_date - self.display_name = display_name - self.primary_key = primary_key - self.secondary_key = secondary_key - self.state = state - self.state_comment = state_comment - self.allow_tracing = allow_tracing - - -class SystemData(_serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :ivar created_by: The identity that created the resource. - :vartype created_by: str - :ivar created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~azure.mgmt.apimanagement.models.CreatedByType - :ivar created_at: The timestamp of resource creation (UTC). - :vartype created_at: ~datetime.datetime - :ivar last_modified_by: The identity that last modified the resource. - :vartype last_modified_by: str - :ivar last_modified_by_type: The type of identity that last modified the resource. Known values - are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or ~azure.mgmt.apimanagement.models.CreatedByType - :ivar last_modified_at: The timestamp of resource last modification (UTC). - :vartype last_modified_at: ~datetime.datetime - """ - - _attribute_map = { - "created_by": {"key": "createdBy", "type": "str"}, - "created_by_type": {"key": "createdByType", "type": "str"}, - "created_at": {"key": "createdAt", "type": "iso-8601"}, - "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, - "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, - "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, - } - - def __init__( - self, - *, - created_by: Optional[str] = None, - created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - created_at: Optional[datetime.datetime] = None, - last_modified_by: Optional[str] = None, - last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - last_modified_at: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword created_by: The identity that created the resource. - :paramtype created_by: str - :keyword created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~azure.mgmt.apimanagement.models.CreatedByType - :keyword created_at: The timestamp of resource creation (UTC). - :paramtype created_at: ~datetime.datetime - :keyword last_modified_by: The identity that last modified the resource. - :paramtype last_modified_by: str - :keyword last_modified_by_type: The type of identity that last modified the resource. Known - values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or ~azure.mgmt.apimanagement.models.CreatedByType - :keyword last_modified_at: The timestamp of resource last modification (UTC). - :paramtype last_modified_at: ~datetime.datetime - """ - super().__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at - - -class TagApiLinkCollection(_serialization.Model): - """Paged Tag-API link list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.TagApiLinkContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[TagApiLinkContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.TagApiLinkContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.TagApiLinkContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class TagApiLinkContract(ProxyResource): - """Tag-API link details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar api_id: Full resource Id of an API. - :vartype api_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "api_id": {"key": "properties.apiId", "type": "str"}, - } - - def __init__(self, *, api_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword api_id: Full resource Id of an API. - :paramtype api_id: str - """ - super().__init__(**kwargs) - self.api_id = api_id - - -class TagCollection(_serialization.Model): - """Paged Tag list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.TagContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[TagContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.TagContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.TagContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class TagContract(ProxyResource): - """Tag Contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar display_name: Tag name. - :vartype display_name: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "display_name": {"max_length": 160, "min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - } - - def __init__(self, *, display_name: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword display_name: Tag name. - :paramtype display_name: str - """ - super().__init__(**kwargs) - self.display_name = display_name - - -class TagCreateUpdateParameters(_serialization.Model): - """Parameters supplied to Create/Update Tag operations. - - :ivar display_name: Tag name. - :vartype display_name: str - """ - - _validation = { - "display_name": {"max_length": 160, "min_length": 1}, - } - - _attribute_map = { - "display_name": {"key": "properties.displayName", "type": "str"}, - } - - def __init__(self, *, display_name: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword display_name: Tag name. - :paramtype display_name: str - """ - super().__init__(**kwargs) - self.display_name = display_name - - -class TagDescriptionBaseProperties(_serialization.Model): - """Parameters supplied to the Create TagDescription operation. - - :ivar description: Description of the Tag. - :vartype description: str - :ivar external_docs_url: Absolute URL of external resources describing the tag. - :vartype external_docs_url: str - :ivar external_docs_description: Description of the external resources describing the tag. - :vartype external_docs_description: str - """ - - _validation = { - "external_docs_url": {"max_length": 2000}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "external_docs_url": {"key": "externalDocsUrl", "type": "str"}, - "external_docs_description": {"key": "externalDocsDescription", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - external_docs_url: Optional[str] = None, - external_docs_description: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the Tag. - :paramtype description: str - :keyword external_docs_url: Absolute URL of external resources describing the tag. - :paramtype external_docs_url: str - :keyword external_docs_description: Description of the external resources describing the tag. - :paramtype external_docs_description: str - """ - super().__init__(**kwargs) - self.description = description - self.external_docs_url = external_docs_url - self.external_docs_description = external_docs_description - - -class TagDescriptionCollection(_serialization.Model): - """Paged TagDescription list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.TagDescriptionContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[TagDescriptionContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.TagDescriptionContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.TagDescriptionContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class TagDescriptionContract(ProxyResource): - """Contract details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar description: Description of the Tag. - :vartype description: str - :ivar external_docs_url: Absolute URL of external resources describing the tag. - :vartype external_docs_url: str - :ivar external_docs_description: Description of the external resources describing the tag. - :vartype external_docs_description: str - :ivar tag_id: Identifier of the tag in the form of /tags/{tagId}. - :vartype tag_id: str - :ivar display_name: Tag name. - :vartype display_name: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "external_docs_url": {"max_length": 2000}, - "display_name": {"max_length": 160, "min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "external_docs_url": {"key": "properties.externalDocsUrl", "type": "str"}, - "external_docs_description": {"key": "properties.externalDocsDescription", "type": "str"}, - "tag_id": {"key": "properties.tagId", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - external_docs_url: Optional[str] = None, - external_docs_description: Optional[str] = None, - tag_id: Optional[str] = None, - display_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the Tag. - :paramtype description: str - :keyword external_docs_url: Absolute URL of external resources describing the tag. - :paramtype external_docs_url: str - :keyword external_docs_description: Description of the external resources describing the tag. - :paramtype external_docs_description: str - :keyword tag_id: Identifier of the tag in the form of /tags/{tagId}. - :paramtype tag_id: str - :keyword display_name: Tag name. - :paramtype display_name: str - """ - super().__init__(**kwargs) - self.description = description - self.external_docs_url = external_docs_url - self.external_docs_description = external_docs_description - self.tag_id = tag_id - self.display_name = display_name - - -class TagDescriptionContractProperties(TagDescriptionBaseProperties): - """TagDescription contract Properties. - - :ivar description: Description of the Tag. - :vartype description: str - :ivar external_docs_url: Absolute URL of external resources describing the tag. - :vartype external_docs_url: str - :ivar external_docs_description: Description of the external resources describing the tag. - :vartype external_docs_description: str - :ivar tag_id: Identifier of the tag in the form of /tags/{tagId}. - :vartype tag_id: str - :ivar display_name: Tag name. - :vartype display_name: str - """ - - _validation = { - "external_docs_url": {"max_length": 2000}, - "display_name": {"max_length": 160, "min_length": 1}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "external_docs_url": {"key": "externalDocsUrl", "type": "str"}, - "external_docs_description": {"key": "externalDocsDescription", "type": "str"}, - "tag_id": {"key": "tagId", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - external_docs_url: Optional[str] = None, - external_docs_description: Optional[str] = None, - tag_id: Optional[str] = None, - display_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the Tag. - :paramtype description: str - :keyword external_docs_url: Absolute URL of external resources describing the tag. - :paramtype external_docs_url: str - :keyword external_docs_description: Description of the external resources describing the tag. - :paramtype external_docs_description: str - :keyword tag_id: Identifier of the tag in the form of /tags/{tagId}. - :paramtype tag_id: str - :keyword display_name: Tag name. - :paramtype display_name: str - """ - super().__init__( - description=description, - external_docs_url=external_docs_url, - external_docs_description=external_docs_description, - **kwargs - ) - self.tag_id = tag_id - self.display_name = display_name - - -class TagDescriptionCreateParameters(_serialization.Model): - """Parameters supplied to the Create TagDescription operation. - - :ivar description: Description of the Tag. - :vartype description: str - :ivar external_docs_url: Absolute URL of external resources describing the tag. - :vartype external_docs_url: str - :ivar external_docs_description: Description of the external resources describing the tag. - :vartype external_docs_description: str - """ - - _validation = { - "external_docs_url": {"max_length": 2000}, - } - - _attribute_map = { - "description": {"key": "properties.description", "type": "str"}, - "external_docs_url": {"key": "properties.externalDocsUrl", "type": "str"}, - "external_docs_description": {"key": "properties.externalDocsDescription", "type": "str"}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - external_docs_url: Optional[str] = None, - external_docs_description: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of the Tag. - :paramtype description: str - :keyword external_docs_url: Absolute URL of external resources describing the tag. - :paramtype external_docs_url: str - :keyword external_docs_description: Description of the external resources describing the tag. - :paramtype external_docs_description: str - """ - super().__init__(**kwargs) - self.description = description - self.external_docs_url = external_docs_url - self.external_docs_description = external_docs_description - - -class TagOperationLinkCollection(_serialization.Model): - """Paged Tag-operation link list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.TagOperationLinkContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[TagOperationLinkContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.TagOperationLinkContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.TagOperationLinkContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class TagOperationLinkContract(ProxyResource): - """Tag-operation link details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar operation_id: Full resource Id of an API operation. - :vartype operation_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "operation_id": {"key": "properties.operationId", "type": "str"}, - } - - def __init__(self, *, operation_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword operation_id: Full resource Id of an API operation. - :paramtype operation_id: str - """ - super().__init__(**kwargs) - self.operation_id = operation_id - - -class TagProductLinkCollection(_serialization.Model): - """Paged Tag-product link list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.TagProductLinkContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[TagProductLinkContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.TagProductLinkContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.TagProductLinkContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class TagProductLinkContract(ProxyResource): - """Tag-product link details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar product_id: Full resource Id of a product. - :vartype product_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "product_id": {"key": "properties.productId", "type": "str"}, - } - - def __init__(self, *, product_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword product_id: Full resource Id of a product. - :paramtype product_id: str - """ - super().__init__(**kwargs) - self.product_id = product_id - - -class TagResourceCollection(_serialization.Model): - """Paged Tag list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.TagResourceContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[TagResourceContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.TagResourceContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.TagResourceContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class TagResourceContract(_serialization.Model): - """TagResource contract properties. - - All required parameters must be populated in order to send to server. - - :ivar tag: Tag associated with the resource. Required. - :vartype tag: ~azure.mgmt.apimanagement.models.TagResourceContractProperties - :ivar api: API associated with the tag. - :vartype api: ~azure.mgmt.apimanagement.models.ApiTagResourceContractProperties - :ivar operation: Operation associated with the tag. - :vartype operation: ~azure.mgmt.apimanagement.models.OperationTagResourceContractProperties - :ivar product: Product associated with the tag. - :vartype product: ~azure.mgmt.apimanagement.models.ProductTagResourceContractProperties - """ - - _validation = { - "tag": {"required": True}, - } - - _attribute_map = { - "tag": {"key": "tag", "type": "TagResourceContractProperties"}, - "api": {"key": "api", "type": "ApiTagResourceContractProperties"}, - "operation": {"key": "operation", "type": "OperationTagResourceContractProperties"}, - "product": {"key": "product", "type": "ProductTagResourceContractProperties"}, - } - - def __init__( - self, - *, - tag: "_models.TagResourceContractProperties", - api: Optional["_models.ApiTagResourceContractProperties"] = None, - operation: Optional["_models.OperationTagResourceContractProperties"] = None, - product: Optional["_models.ProductTagResourceContractProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tag: Tag associated with the resource. Required. - :paramtype tag: ~azure.mgmt.apimanagement.models.TagResourceContractProperties - :keyword api: API associated with the tag. - :paramtype api: ~azure.mgmt.apimanagement.models.ApiTagResourceContractProperties - :keyword operation: Operation associated with the tag. - :paramtype operation: ~azure.mgmt.apimanagement.models.OperationTagResourceContractProperties - :keyword product: Product associated with the tag. - :paramtype product: ~azure.mgmt.apimanagement.models.ProductTagResourceContractProperties - """ - super().__init__(**kwargs) - self.tag = tag - self.api = api - self.operation = operation - self.product = product - - -class TagResourceContractProperties(_serialization.Model): - """Contract defining the Tag property in the Tag Resource Contract. - - :ivar id: Tag identifier. - :vartype id: str - :ivar name: Tag Name. - :vartype name: str - """ - - _validation = { - "name": {"max_length": 160, "min_length": 1}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: Tag identifier. - :paramtype id: str - :keyword name: Tag Name. - :paramtype name: str - """ - super().__init__(**kwargs) - self.id = id - self.name = name - - -class TenantConfigurationSyncStateContract(ProxyResource): - """Result of Tenant Configuration Sync State. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar branch: The name of Git branch. - :vartype branch: str - :ivar commit_id: The latest commit Id. - :vartype commit_id: str - :ivar is_export: value indicating if last sync was save (true) or deploy (false) operation. - :vartype is_export: bool - :ivar is_synced: value indicating if last synchronization was later than the configuration - change. - :vartype is_synced: bool - :ivar is_git_enabled: value indicating whether Git configuration access is enabled. - :vartype is_git_enabled: bool - :ivar sync_date: The date of the latest synchronization. The date conforms to the following - format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype sync_date: ~datetime.datetime - :ivar configuration_change_date: The date of the latest configuration change. The date conforms - to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype configuration_change_date: ~datetime.datetime - :ivar last_operation_id: Most recent tenant configuration operation identifier. - :vartype last_operation_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "branch": {"key": "properties.branch", "type": "str"}, - "commit_id": {"key": "properties.commitId", "type": "str"}, - "is_export": {"key": "properties.isExport", "type": "bool"}, - "is_synced": {"key": "properties.isSynced", "type": "bool"}, - "is_git_enabled": {"key": "properties.isGitEnabled", "type": "bool"}, - "sync_date": {"key": "properties.syncDate", "type": "iso-8601"}, - "configuration_change_date": {"key": "properties.configurationChangeDate", "type": "iso-8601"}, - "last_operation_id": {"key": "properties.lastOperationId", "type": "str"}, - } - - def __init__( - self, - *, - branch: Optional[str] = None, - commit_id: Optional[str] = None, - is_export: Optional[bool] = None, - is_synced: Optional[bool] = None, - is_git_enabled: Optional[bool] = None, - sync_date: Optional[datetime.datetime] = None, - configuration_change_date: Optional[datetime.datetime] = None, - last_operation_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword branch: The name of Git branch. - :paramtype branch: str - :keyword commit_id: The latest commit Id. - :paramtype commit_id: str - :keyword is_export: value indicating if last sync was save (true) or deploy (false) operation. - :paramtype is_export: bool - :keyword is_synced: value indicating if last synchronization was later than the configuration - change. - :paramtype is_synced: bool - :keyword is_git_enabled: value indicating whether Git configuration access is enabled. - :paramtype is_git_enabled: bool - :keyword sync_date: The date of the latest synchronization. The date conforms to the following - format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype sync_date: ~datetime.datetime - :keyword configuration_change_date: The date of the latest configuration change. The date - conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 - standard. - :paramtype configuration_change_date: ~datetime.datetime - :keyword last_operation_id: Most recent tenant configuration operation identifier. - :paramtype last_operation_id: str - """ - super().__init__(**kwargs) - self.branch = branch - self.commit_id = commit_id - self.is_export = is_export - self.is_synced = is_synced - self.is_git_enabled = is_git_enabled - self.sync_date = sync_date - self.configuration_change_date = configuration_change_date - self.last_operation_id = last_operation_id - - -class TenantSettingsCollection(_serialization.Model): - """Paged AccessInformation list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.TenantSettingsContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[TenantSettingsContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.TenantSettingsContract"]] = None - self.next_link: Optional[str] = None - - -class TenantSettingsContract(ProxyResource): - """Tenant Settings. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar settings: Tenant settings. - :vartype settings: dict[str, str] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "settings": {"key": "properties.settings", "type": "{str}"}, - } - - def __init__(self, *, settings: Optional[dict[str, str]] = None, **kwargs: Any) -> None: - """ - :keyword settings: Tenant settings. - :paramtype settings: dict[str, str] - """ - super().__init__(**kwargs) - self.settings = settings - - -class TermsOfServiceProperties(_serialization.Model): - """Terms of service contract properties. - - :ivar text: A terms of service text. - :vartype text: str - :ivar enabled: Display terms of service during a sign-up process. - :vartype enabled: bool - :ivar consent_required: Ask user for consent to the terms of service. - :vartype consent_required: bool - """ - - _attribute_map = { - "text": {"key": "text", "type": "str"}, - "enabled": {"key": "enabled", "type": "bool"}, - "consent_required": {"key": "consentRequired", "type": "bool"}, - } - - def __init__( - self, - *, - text: Optional[str] = None, - enabled: Optional[bool] = None, - consent_required: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword text: A terms of service text. - :paramtype text: str - :keyword enabled: Display terms of service during a sign-up process. - :paramtype enabled: bool - :keyword consent_required: Ask user for consent to the terms of service. - :paramtype consent_required: bool - """ - super().__init__(**kwargs) - self.text = text - self.enabled = enabled - self.consent_required = consent_required - - -class TokenBodyParameterContract(_serialization.Model): - """OAuth acquire token request body parameter (www-url-form-encoded). - - All required parameters must be populated in order to send to server. - - :ivar name: body parameter name. Required. - :vartype name: str - :ivar value: body parameter value. Required. - :vartype value: str - """ - - _validation = { - "name": {"required": True}, - "value": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, *, name: str, value: str, **kwargs: Any) -> None: - """ - :keyword name: body parameter name. Required. - :paramtype name: str - :keyword value: body parameter value. Required. - :paramtype value: str - """ - super().__init__(**kwargs) - self.name = name - self.value = value - - -class ToolCollection(_serialization.Model): - """Paged Tool list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values of Tools contract. - :vartype value: list[~azure.mgmt.apimanagement.models.ToolContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ToolContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.ToolContract"]] = None - self.next_link: Optional[str] = None - - -class ToolContract(ProxyResource): - """Tool details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar display_name: Tool Name. MCP tool name must contain only letters, numbers, underscores, - and hyphens. - :vartype display_name: str - :ivar description: Description of the tool. - :vartype description: str - :ivar operation_id: Identifier of the operation this MCP tool is associated with in the form of - /apis/{apiId}/operations/{operationId}. - :vartype operation_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "display_name": {"max_length": 300, "min_length": 1}, - "description": {"max_length": 1000}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - "operation_id": {"key": "properties.operationId", "type": "str"}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - description: Optional[str] = None, - operation_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword display_name: Tool Name. MCP tool name must contain only letters, numbers, - underscores, and hyphens. - :paramtype display_name: str - :keyword description: Description of the tool. - :paramtype description: str - :keyword operation_id: Identifier of the operation this MCP tool is associated with in the form - of /apis/{apiId}/operations/{operationId}. - :paramtype operation_id: str - """ - super().__init__(**kwargs) - self.display_name = display_name - self.description = description - self.operation_id = operation_id - - -class UserAssignedIdentity(_serialization.Model): - """User assigned identity properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: The principal ID of the assigned identity. - :vartype principal_id: str - :ivar client_id: The client ID of the assigned identity. - :vartype client_id: str - """ - - _validation = { - "principal_id": {"readonly": True}, - "client_id": {"readonly": True}, - } - - _attribute_map = { - "principal_id": {"key": "principalId", "type": "str"}, - "client_id": {"key": "clientId", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.principal_id: Optional[str] = None - self.client_id: Optional[str] = None - - -class UserCollection(_serialization.Model): - """Paged Users list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.UserContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[UserContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.UserContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.UserContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class UserContract(ProxyResource): - """User details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :vartype state: str or ~azure.mgmt.apimanagement.models.UserState - :ivar note: Optional note about a user set by the administrator. - :vartype note: str - :ivar identities: Collection of user identities. - :vartype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :ivar first_name: First name. - :vartype first_name: str - :ivar last_name: Last name. - :vartype last_name: str - :ivar email: Email address. - :vartype email: str - :ivar registration_date: Date of user registration. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype registration_date: ~datetime.datetime - :ivar groups: Collection of groups user is part of. - :vartype groups: list[~azure.mgmt.apimanagement.models.GroupContractProperties] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "groups": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "state": {"key": "properties.state", "type": "str"}, - "note": {"key": "properties.note", "type": "str"}, - "identities": {"key": "properties.identities", "type": "[UserIdentityContract]"}, - "first_name": {"key": "properties.firstName", "type": "str"}, - "last_name": {"key": "properties.lastName", "type": "str"}, - "email": {"key": "properties.email", "type": "str"}, - "registration_date": {"key": "properties.registrationDate", "type": "iso-8601"}, - "groups": {"key": "properties.groups", "type": "[GroupContractProperties]"}, - } - - def __init__( - self, - *, - state: Union[str, "_models.UserState"] = "active", - note: Optional[str] = None, - identities: Optional[list["_models.UserIdentityContract"]] = None, - first_name: Optional[str] = None, - last_name: Optional[str] = None, - email: Optional[str] = None, - registration_date: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :paramtype state: str or ~azure.mgmt.apimanagement.models.UserState - :keyword note: Optional note about a user set by the administrator. - :paramtype note: str - :keyword identities: Collection of user identities. - :paramtype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :keyword first_name: First name. - :paramtype first_name: str - :keyword last_name: Last name. - :paramtype last_name: str - :keyword email: Email address. - :paramtype email: str - :keyword registration_date: Date of user registration. The date conforms to the following - format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype registration_date: ~datetime.datetime - """ - super().__init__(**kwargs) - self.state = state - self.note = note - self.identities = identities - self.first_name = first_name - self.last_name = last_name - self.email = email - self.registration_date = registration_date - self.groups: Optional[list["_models.GroupContractProperties"]] = None - - -class UserEntityBaseParameters(_serialization.Model): - """User Entity Base Parameters set. - - :ivar state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :vartype state: str or ~azure.mgmt.apimanagement.models.UserState - :ivar note: Optional note about a user set by the administrator. - :vartype note: str - :ivar identities: Collection of user identities. - :vartype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - """ - - _attribute_map = { - "state": {"key": "state", "type": "str"}, - "note": {"key": "note", "type": "str"}, - "identities": {"key": "identities", "type": "[UserIdentityContract]"}, - } - - def __init__( - self, - *, - state: Union[str, "_models.UserState"] = "active", - note: Optional[str] = None, - identities: Optional[list["_models.UserIdentityContract"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :paramtype state: str or ~azure.mgmt.apimanagement.models.UserState - :keyword note: Optional note about a user set by the administrator. - :paramtype note: str - :keyword identities: Collection of user identities. - :paramtype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - """ - super().__init__(**kwargs) - self.state = state - self.note = note - self.identities = identities - - -class UserContractProperties(UserEntityBaseParameters): - """User profile. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :vartype state: str or ~azure.mgmt.apimanagement.models.UserState - :ivar note: Optional note about a user set by the administrator. - :vartype note: str - :ivar identities: Collection of user identities. - :vartype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :ivar first_name: First name. - :vartype first_name: str - :ivar last_name: Last name. - :vartype last_name: str - :ivar email: Email address. - :vartype email: str - :ivar registration_date: Date of user registration. The date conforms to the following format: - ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :vartype registration_date: ~datetime.datetime - :ivar groups: Collection of groups user is part of. - :vartype groups: list[~azure.mgmt.apimanagement.models.GroupContractProperties] - """ - - _validation = { - "groups": {"readonly": True}, - } - - _attribute_map = { - "state": {"key": "state", "type": "str"}, - "note": {"key": "note", "type": "str"}, - "identities": {"key": "identities", "type": "[UserIdentityContract]"}, - "first_name": {"key": "firstName", "type": "str"}, - "last_name": {"key": "lastName", "type": "str"}, - "email": {"key": "email", "type": "str"}, - "registration_date": {"key": "registrationDate", "type": "iso-8601"}, - "groups": {"key": "groups", "type": "[GroupContractProperties]"}, - } - - def __init__( - self, - *, - state: Union[str, "_models.UserState"] = "active", - note: Optional[str] = None, - identities: Optional[list["_models.UserIdentityContract"]] = None, - first_name: Optional[str] = None, - last_name: Optional[str] = None, - email: Optional[str] = None, - registration_date: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :paramtype state: str or ~azure.mgmt.apimanagement.models.UserState - :keyword note: Optional note about a user set by the administrator. - :paramtype note: str - :keyword identities: Collection of user identities. - :paramtype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :keyword first_name: First name. - :paramtype first_name: str - :keyword last_name: Last name. - :paramtype last_name: str - :keyword email: Email address. - :paramtype email: str - :keyword registration_date: Date of user registration. The date conforms to the following - format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. - :paramtype registration_date: ~datetime.datetime - """ - super().__init__(state=state, note=note, identities=identities, **kwargs) - self.first_name = first_name - self.last_name = last_name - self.email = email - self.registration_date = registration_date - self.groups: Optional[list["_models.GroupContractProperties"]] = None - - -class UserCreateParameterProperties(UserEntityBaseParameters): - """Parameters supplied to the Create User operation. - - All required parameters must be populated in order to send to server. - - :ivar state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :vartype state: str or ~azure.mgmt.apimanagement.models.UserState - :ivar note: Optional note about a user set by the administrator. - :vartype note: str - :ivar identities: Collection of user identities. - :vartype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :ivar email: Email address. Must not be empty and must be unique within the service instance. - Required. - :vartype email: str - :ivar first_name: First name. Required. - :vartype first_name: str - :ivar last_name: Last name. Required. - :vartype last_name: str - :ivar password: User Password. If no value is provided, a default password is generated. - :vartype password: str - :ivar app_type: Determines the type of application which send the create user request. Default - is legacy portal. Known values are: "portal" and "developerPortal". - :vartype app_type: str or ~azure.mgmt.apimanagement.models.AppType - :ivar confirmation: Determines the type of confirmation e-mail that will be sent to the newly - created user. Known values are: "signup" and "invite". - :vartype confirmation: str or ~azure.mgmt.apimanagement.models.Confirmation - """ - - _validation = { - "email": {"required": True, "max_length": 254, "min_length": 1}, - "first_name": {"required": True, "max_length": 100, "min_length": 1}, - "last_name": {"required": True, "max_length": 100, "min_length": 1}, - } - - _attribute_map = { - "state": {"key": "state", "type": "str"}, - "note": {"key": "note", "type": "str"}, - "identities": {"key": "identities", "type": "[UserIdentityContract]"}, - "email": {"key": "email", "type": "str"}, - "first_name": {"key": "firstName", "type": "str"}, - "last_name": {"key": "lastName", "type": "str"}, - "password": {"key": "password", "type": "str"}, - "app_type": {"key": "appType", "type": "str"}, - "confirmation": {"key": "confirmation", "type": "str"}, - } - - def __init__( - self, - *, - email: str, - first_name: str, - last_name: str, - state: Union[str, "_models.UserState"] = "active", - note: Optional[str] = None, - identities: Optional[list["_models.UserIdentityContract"]] = None, - password: Optional[str] = None, - app_type: Optional[Union[str, "_models.AppType"]] = None, - confirmation: Optional[Union[str, "_models.Confirmation"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :paramtype state: str or ~azure.mgmt.apimanagement.models.UserState - :keyword note: Optional note about a user set by the administrator. - :paramtype note: str - :keyword identities: Collection of user identities. - :paramtype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :keyword email: Email address. Must not be empty and must be unique within the service - instance. Required. - :paramtype email: str - :keyword first_name: First name. Required. - :paramtype first_name: str - :keyword last_name: Last name. Required. - :paramtype last_name: str - :keyword password: User Password. If no value is provided, a default password is generated. - :paramtype password: str - :keyword app_type: Determines the type of application which send the create user request. - Default is legacy portal. Known values are: "portal" and "developerPortal". - :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword confirmation: Determines the type of confirmation e-mail that will be sent to the - newly created user. Known values are: "signup" and "invite". - :paramtype confirmation: str or ~azure.mgmt.apimanagement.models.Confirmation - """ - super().__init__(state=state, note=note, identities=identities, **kwargs) - self.email = email - self.first_name = first_name - self.last_name = last_name - self.password = password - self.app_type = app_type - self.confirmation = confirmation - - -class UserCreateParameters(_serialization.Model): - """User create details. - - :ivar state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :vartype state: str or ~azure.mgmt.apimanagement.models.UserState - :ivar note: Optional note about a user set by the administrator. - :vartype note: str - :ivar identities: Collection of user identities. - :vartype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :ivar email: Email address. Must not be empty and must be unique within the service instance. - :vartype email: str - :ivar first_name: First name. - :vartype first_name: str - :ivar last_name: Last name. - :vartype last_name: str - :ivar password: User Password. If no value is provided, a default password is generated. - :vartype password: str - :ivar app_type: Determines the type of application which send the create user request. Default - is legacy portal. Known values are: "portal" and "developerPortal". - :vartype app_type: str or ~azure.mgmt.apimanagement.models.AppType - :ivar confirmation: Determines the type of confirmation e-mail that will be sent to the newly - created user. Known values are: "signup" and "invite". - :vartype confirmation: str or ~azure.mgmt.apimanagement.models.Confirmation - """ - - _validation = { - "email": {"max_length": 254, "min_length": 1}, - "first_name": {"max_length": 100, "min_length": 1}, - "last_name": {"max_length": 100, "min_length": 1}, - } - - _attribute_map = { - "state": {"key": "properties.state", "type": "str"}, - "note": {"key": "properties.note", "type": "str"}, - "identities": {"key": "properties.identities", "type": "[UserIdentityContract]"}, - "email": {"key": "properties.email", "type": "str"}, - "first_name": {"key": "properties.firstName", "type": "str"}, - "last_name": {"key": "properties.lastName", "type": "str"}, - "password": {"key": "properties.password", "type": "str"}, - "app_type": {"key": "properties.appType", "type": "str"}, - "confirmation": {"key": "properties.confirmation", "type": "str"}, - } - - def __init__( - self, - *, - state: Union[str, "_models.UserState"] = "active", - note: Optional[str] = None, - identities: Optional[list["_models.UserIdentityContract"]] = None, - email: Optional[str] = None, - first_name: Optional[str] = None, - last_name: Optional[str] = None, - password: Optional[str] = None, - app_type: Optional[Union[str, "_models.AppType"]] = None, - confirmation: Optional[Union[str, "_models.Confirmation"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :paramtype state: str or ~azure.mgmt.apimanagement.models.UserState - :keyword note: Optional note about a user set by the administrator. - :paramtype note: str - :keyword identities: Collection of user identities. - :paramtype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :keyword email: Email address. Must not be empty and must be unique within the service - instance. - :paramtype email: str - :keyword first_name: First name. - :paramtype first_name: str - :keyword last_name: Last name. - :paramtype last_name: str - :keyword password: User Password. If no value is provided, a default password is generated. - :paramtype password: str - :keyword app_type: Determines the type of application which send the create user request. - Default is legacy portal. Known values are: "portal" and "developerPortal". - :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword confirmation: Determines the type of confirmation e-mail that will be sent to the - newly created user. Known values are: "signup" and "invite". - :paramtype confirmation: str or ~azure.mgmt.apimanagement.models.Confirmation - """ - super().__init__(**kwargs) - self.state = state - self.note = note - self.identities = identities - self.email = email - self.first_name = first_name - self.last_name = last_name - self.password = password - self.app_type = app_type - self.confirmation = confirmation - - -class UserIdentityCollection(_serialization.Model): - """List of Users Identity list representation. - - :ivar value: User Identity values. - :vartype value: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[UserIdentityContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.UserIdentityContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: User Identity values. - :paramtype value: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class UserIdentityContract(_serialization.Model): - """User identity details. - - :ivar provider: Identity provider name. - :vartype provider: str - :ivar id: Identifier value within provider. - :vartype id: str - """ - - _attribute_map = { - "provider": {"key": "provider", "type": "str"}, - "id": {"key": "id", "type": "str"}, - } - - def __init__( - self, - *, - provider: Optional[str] = None, - id: Optional[str] = None, # pylint: disable=redefined-builtin - **kwargs: Any - ) -> None: - """ - :keyword provider: Identity provider name. - :paramtype provider: str - :keyword id: Identifier value within provider. - :paramtype id: str - """ - super().__init__(**kwargs) - self.provider = provider - self.id = id - - -class UserIdentityProperties(_serialization.Model): - """UserIdentityProperties. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _attribute_map = { - "principal_id": {"key": "principalId", "type": "str"}, - "client_id": {"key": "clientId", "type": "str"}, - } - - def __init__(self, *, principal_id: Optional[str] = None, client_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword principal_id: The principal id of user assigned identity. - :paramtype principal_id: str - :keyword client_id: The client id of user assigned identity. - :paramtype client_id: str - """ - super().__init__(**kwargs) - self.principal_id = principal_id - self.client_id = client_id - - -class UserTokenParameters(_serialization.Model): - """Get User Token parameters. - - :ivar key_type: The Key to be used to generate token for user. Known values are: "primary" and - "secondary". - :vartype key_type: str or ~azure.mgmt.apimanagement.models.KeyType - :ivar expiry: The Expiry time of the Token. Maximum token expiry time is set to 30 days. The - date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 - standard. - :vartype expiry: ~datetime.datetime - """ - - _attribute_map = { - "key_type": {"key": "properties.keyType", "type": "str"}, - "expiry": {"key": "properties.expiry", "type": "iso-8601"}, - } - - def __init__( - self, - *, - key_type: Optional[Union[str, "_models.KeyType"]] = None, - expiry: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword key_type: The Key to be used to generate token for user. Known values are: "primary" - and "secondary". - :paramtype key_type: str or ~azure.mgmt.apimanagement.models.KeyType - :keyword expiry: The Expiry time of the Token. Maximum token expiry time is set to 30 days. The - date conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 - standard. - :paramtype expiry: ~datetime.datetime - """ - super().__init__(**kwargs) - self.key_type = key_type - self.expiry = expiry - - -class UserTokenResult(_serialization.Model): - """Get User Token response details. - - :ivar value: Shared Access Authorization token for the User. - :vartype value: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, *, value: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword value: Shared Access Authorization token for the User. - :paramtype value: str - """ - super().__init__(**kwargs) - self.value = value - - -class UserUpdateParameters(_serialization.Model): - """User update parameters. - - :ivar state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :vartype state: str or ~azure.mgmt.apimanagement.models.UserState - :ivar note: Optional note about a user set by the administrator. - :vartype note: str - :ivar identities: Collection of user identities. - :vartype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :ivar email: Email address. Must not be empty and must be unique within the service instance. - :vartype email: str - :ivar password: User Password. - :vartype password: str - :ivar first_name: First name. - :vartype first_name: str - :ivar last_name: Last name. - :vartype last_name: str - """ - - _validation = { - "email": {"max_length": 254, "min_length": 1}, - "first_name": {"max_length": 100, "min_length": 1}, - "last_name": {"max_length": 100, "min_length": 1}, - } - - _attribute_map = { - "state": {"key": "properties.state", "type": "str"}, - "note": {"key": "properties.note", "type": "str"}, - "identities": {"key": "properties.identities", "type": "[UserIdentityContract]"}, - "email": {"key": "properties.email", "type": "str"}, - "password": {"key": "properties.password", "type": "str"}, - "first_name": {"key": "properties.firstName", "type": "str"}, - "last_name": {"key": "properties.lastName", "type": "str"}, - } - - def __init__( - self, - *, - state: Union[str, "_models.UserState"] = "active", - note: Optional[str] = None, - identities: Optional[list["_models.UserIdentityContract"]] = None, - email: Optional[str] = None, - password: Optional[str] = None, - first_name: Optional[str] = None, - last_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :paramtype state: str or ~azure.mgmt.apimanagement.models.UserState - :keyword note: Optional note about a user set by the administrator. - :paramtype note: str - :keyword identities: Collection of user identities. - :paramtype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :keyword email: Email address. Must not be empty and must be unique within the service - instance. - :paramtype email: str - :keyword password: User Password. - :paramtype password: str - :keyword first_name: First name. - :paramtype first_name: str - :keyword last_name: Last name. - :paramtype last_name: str - """ - super().__init__(**kwargs) - self.state = state - self.note = note - self.identities = identities - self.email = email - self.password = password - self.first_name = first_name - self.last_name = last_name - - -class UserUpdateParametersProperties(UserEntityBaseParameters): - """Parameters supplied to the Update User operation. - - :ivar state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :vartype state: str or ~azure.mgmt.apimanagement.models.UserState - :ivar note: Optional note about a user set by the administrator. - :vartype note: str - :ivar identities: Collection of user identities. - :vartype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :ivar email: Email address. Must not be empty and must be unique within the service instance. - :vartype email: str - :ivar password: User Password. - :vartype password: str - :ivar first_name: First name. - :vartype first_name: str - :ivar last_name: Last name. - :vartype last_name: str - """ - - _validation = { - "email": {"max_length": 254, "min_length": 1}, - "first_name": {"max_length": 100, "min_length": 1}, - "last_name": {"max_length": 100, "min_length": 1}, - } - - _attribute_map = { - "state": {"key": "state", "type": "str"}, - "note": {"key": "note", "type": "str"}, - "identities": {"key": "identities", "type": "[UserIdentityContract]"}, - "email": {"key": "email", "type": "str"}, - "password": {"key": "password", "type": "str"}, - "first_name": {"key": "firstName", "type": "str"}, - "last_name": {"key": "lastName", "type": "str"}, - } - - def __init__( - self, - *, - state: Union[str, "_models.UserState"] = "active", - note: Optional[str] = None, - identities: Optional[list["_models.UserIdentityContract"]] = None, - email: Optional[str] = None, - password: Optional[str] = None, - first_name: Optional[str] = None, - last_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword state: Account state. Specifies whether the user is active or not. Blocked users are - unable to sign into the developer portal or call any APIs of subscribed products. Default state - is Active. Known values are: "active", "blocked", "pending", and "deleted". - :paramtype state: str or ~azure.mgmt.apimanagement.models.UserState - :keyword note: Optional note about a user set by the administrator. - :paramtype note: str - :keyword identities: Collection of user identities. - :paramtype identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :keyword email: Email address. Must not be empty and must be unique within the service - instance. - :paramtype email: str - :keyword password: User Password. - :paramtype password: str - :keyword first_name: First name. - :paramtype first_name: str - :keyword last_name: Last name. - :paramtype last_name: str - """ - super().__init__(state=state, note=note, identities=identities, **kwargs) - self.email = email - self.password = password - self.first_name = first_name - self.last_name = last_name - - -class VirtualNetworkConfiguration(_serialization.Model): - """Configuration of a virtual network to which API Management service is deployed. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar vnetid: The virtual network ID. This is typically a GUID. Expect a null GUID by default. - :vartype vnetid: str - :ivar subnetname: The name of the subnet. - :vartype subnetname: str - :ivar subnet_resource_id: The full resource ID of a subnet in a virtual network to deploy the - API Management service in. - :vartype subnet_resource_id: str - """ - - _validation = { - "vnetid": {"readonly": True}, - "subnetname": {"readonly": True}, - "subnet_resource_id": { - "pattern": r"^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$" - }, - } - - _attribute_map = { - "vnetid": {"key": "vnetid", "type": "str"}, - "subnetname": {"key": "subnetname", "type": "str"}, - "subnet_resource_id": {"key": "subnetResourceId", "type": "str"}, - } - - def __init__(self, *, subnet_resource_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword subnet_resource_id: The full resource ID of a subnet in a virtual network to deploy - the API Management service in. - :paramtype subnet_resource_id: str - """ - super().__init__(**kwargs) - self.vnetid: Optional[str] = None - self.subnetname: Optional[str] = None - self.subnet_resource_id = subnet_resource_id - - -class WikiCollection(_serialization.Model): - """Paged Wiki list representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.WikiContract] - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[WikiContract]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.WikiContract"]] = None - self.next_link: Optional[str] = None - - -class WikiContract(ProxyResource): - """Wiki properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar documents: Collection wiki documents included into this wiki. - :vartype documents: list[~azure.mgmt.apimanagement.models.WikiDocumentationContract] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "documents": {"key": "properties.documents", "type": "[WikiDocumentationContract]"}, - } - - def __init__(self, *, documents: Optional[list["_models.WikiDocumentationContract"]] = None, **kwargs: Any) -> None: - """ - :keyword documents: Collection wiki documents included into this wiki. - :paramtype documents: list[~azure.mgmt.apimanagement.models.WikiDocumentationContract] - """ - super().__init__(**kwargs) - self.documents = documents - - -class WikiDocumentationContract(_serialization.Model): - """Wiki documentation details. - - :ivar documentation_id: Documentation Identifier. - :vartype documentation_id: str - """ - - _attribute_map = { - "documentation_id": {"key": "documentationId", "type": "str"}, - } - - def __init__(self, *, documentation_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword documentation_id: Documentation Identifier. - :paramtype documentation_id: str - """ - super().__init__(**kwargs) - self.documentation_id = documentation_id - - -class WikiUpdateContract(_serialization.Model): - """Wiki update contract details. - - :ivar documents: Collection wiki documents included into this wiki. - :vartype documents: list[~azure.mgmt.apimanagement.models.WikiDocumentationContract] - """ - - _attribute_map = { - "documents": {"key": "properties.documents", "type": "[WikiDocumentationContract]"}, - } - - def __init__(self, *, documents: Optional[list["_models.WikiDocumentationContract"]] = None, **kwargs: Any) -> None: - """ - :keyword documents: Collection wiki documents included into this wiki. - :paramtype documents: list[~azure.mgmt.apimanagement.models.WikiDocumentationContract] - """ - super().__init__(**kwargs) - self.documents = documents - - -class WorkspaceCollection(_serialization.Model): - """Paged workspace list representation. - - :ivar value: Page values. - :vartype value: list[~azure.mgmt.apimanagement.models.WorkspaceContract] - :ivar count: Total record count number across all pages. - :vartype count: int - :ivar next_link: Next page link if any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[WorkspaceContract]"}, - "count": {"key": "count", "type": "int"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.WorkspaceContract"]] = None, - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Page values. - :paramtype value: list[~azure.mgmt.apimanagement.models.WorkspaceContract] - :keyword count: Total record count number across all pages. - :paramtype count: int - :keyword next_link: Next page link if any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link - - -class WorkspaceContract(ProxyResource): - """Workspace details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar display_name: Name of the workspace. - :vartype display_name: str - :ivar description: Description of the workspace. - :vartype description: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "description": {"key": "properties.description", "type": "str"}, - } - - def __init__(self, *, display_name: Optional[str] = None, description: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword display_name: Name of the workspace. - :paramtype display_name: str - :keyword description: Description of the workspace. - :paramtype description: str - """ - super().__init__(**kwargs) - self.display_name = display_name - self.description = description - - -class WorkspaceLinksGateway(_serialization.Model): - """WorkspaceLinksGateway. - - :ivar id: The link to the API Management gateway. - :vartype id: str - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin - """ - :keyword id: The link to the API Management gateway. - :paramtype id: str - """ - super().__init__(**kwargs) - self.id = id - - -class X509CertificateName(_serialization.Model): - """Properties of server X509Names. - - :ivar name: Common Name of the Certificate. - :vartype name: str - :ivar issuer_certificate_thumbprint: Thumbprint for the Issuer of the Certificate. - :vartype issuer_certificate_thumbprint: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "issuer_certificate_thumbprint": {"key": "issuerCertificateThumbprint", "type": "str"}, - } - - def __init__( - self, *, name: Optional[str] = None, issuer_certificate_thumbprint: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword name: Common Name of the Certificate. - :paramtype name: str - :keyword issuer_certificate_thumbprint: Thumbprint for the Issuer of the Certificate. - :paramtype issuer_certificate_thumbprint: str - """ - super().__init__(**kwargs) - self.name = name - self.issuer_certificate_thumbprint = issuer_certificate_thumbprint diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_patch.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_patch.py index 49900f6ab120..87676c65a8f0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_patch.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_patch.py @@ -1,15 +1,15 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py index 22aa559c73b5..e3b8884a66e9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,177 +12,228 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._api_gateway_operations import ApiGatewayOperations # type: ignore -from ._api_management_gateway_skus_operations import ApiManagementGatewaySkusOperations # type: ignore -from ._all_policies_operations import AllPoliciesOperations # type: ignore -from ._api_operations import ApiOperations # type: ignore -from ._api_revision_operations import ApiRevisionOperations # type: ignore -from ._api_release_operations import ApiReleaseOperations # type: ignore -from ._api_operation_operations import ApiOperationOperations # type: ignore -from ._api_operation_policy_operations import ApiOperationPolicyOperations # type: ignore -from ._tag_operations import TagOperations # type: ignore -from ._graph_ql_api_resolver_operations import GraphQLApiResolverOperations # type: ignore -from ._graph_ql_api_resolver_policy_operations import GraphQLApiResolverPolicyOperations # type: ignore -from ._api_product_operations import ApiProductOperations # type: ignore -from ._api_policy_operations import ApiPolicyOperations # type: ignore -from ._api_schema_operations import ApiSchemaOperations # type: ignore -from ._api_diagnostic_operations import ApiDiagnosticOperations # type: ignore -from ._api_issue_operations import ApiIssueOperations # type: ignore -from ._api_issue_comment_operations import ApiIssueCommentOperations # type: ignore -from ._api_issue_attachment_operations import ApiIssueAttachmentOperations # type: ignore -from ._api_tag_description_operations import ApiTagDescriptionOperations # type: ignore -from ._operation_operations import OperationOperations # type: ignore -from ._api_wiki_operations import ApiWikiOperations # type: ignore -from ._api_wikis_operations import ApiWikisOperations # type: ignore -from ._api_tool_operations import ApiToolOperations # type: ignore -from ._api_export_operations import ApiExportOperations # type: ignore -from ._api_version_set_operations import ApiVersionSetOperations # type: ignore -from ._authorization_provider_operations import AuthorizationProviderOperations # type: ignore -from ._authorization_operations import AuthorizationOperations # type: ignore -from ._authorization_login_links_operations import AuthorizationLoginLinksOperations # type: ignore -from ._authorization_access_policy_operations import AuthorizationAccessPolicyOperations # type: ignore -from ._authorization_server_operations import AuthorizationServerOperations # type: ignore -from ._backend_operations import BackendOperations # type: ignore -from ._cache_operations import CacheOperations # type: ignore -from ._certificate_operations import CertificateOperations # type: ignore -from ._client_application_operations import ClientApplicationOperations # type: ignore -from ._client_application_product_link_operations import ClientApplicationProductLinkOperations # type: ignore -from ._api_management_client_operations import _ApiManagementClientOperationsMixin # type: ignore # pylint: disable=unused-import -from ._content_type_operations import ContentTypeOperations # type: ignore -from ._content_item_operations import ContentItemOperations # type: ignore -from ._deleted_services_operations import DeletedServicesOperations # type: ignore -from ._api_management_operations_operations import ApiManagementOperationsOperations # type: ignore -from ._api_management_service_skus_operations import ApiManagementServiceSkusOperations # type: ignore -from ._api_management_service_operations import ApiManagementServiceOperations # type: ignore -from ._diagnostic_operations import DiagnosticOperations # type: ignore -from ._documentation_operations import DocumentationOperations # type: ignore -from ._email_template_operations import EmailTemplateOperations # type: ignore -from ._api_gateway_config_connection_operations import ApiGatewayConfigConnectionOperations # type: ignore -from ._api_gateway_hostname_binding_operations import ApiGatewayHostnameBindingOperations # type: ignore -from ._gateway_operations import GatewayOperations # type: ignore -from ._gateway_hostname_configuration_operations import GatewayHostnameConfigurationOperations # type: ignore -from ._gateway_api_operations import GatewayApiOperations # type: ignore -from ._gateway_certificate_authority_operations import GatewayCertificateAuthorityOperations # type: ignore -from ._group_operations import GroupOperations # type: ignore -from ._group_user_operations import GroupUserOperations # type: ignore -from ._identity_provider_operations import IdentityProviderOperations # type: ignore -from ._issue_operations import IssueOperations # type: ignore -from ._logger_operations import LoggerOperations # type: ignore -from ._named_value_operations import NamedValueOperations # type: ignore -from ._network_status_operations import NetworkStatusOperations # type: ignore -from ._notification_operations import NotificationOperations # type: ignore -from ._notification_recipient_user_operations import NotificationRecipientUserOperations # type: ignore -from ._notification_recipient_email_operations import NotificationRecipientEmailOperations # type: ignore -from ._open_id_connect_provider_operations import OpenIdConnectProviderOperations # type: ignore -from ._outbound_network_dependencies_endpoints_operations import OutboundNetworkDependenciesEndpointsOperations # type: ignore -from ._policy_operations import PolicyOperations # type: ignore -from ._policy_description_operations import PolicyDescriptionOperations # type: ignore -from ._policy_fragment_operations import PolicyFragmentOperations # type: ignore -from ._policy_restriction_operations import PolicyRestrictionOperations # type: ignore -from ._policy_restriction_validations_operations import PolicyRestrictionValidationsOperations # type: ignore -from ._portal_config_operations import PortalConfigOperations # type: ignore -from ._portal_revision_operations import PortalRevisionOperations # type: ignore -from ._portal_settings_operations import PortalSettingsOperations # type: ignore -from ._sign_in_settings_operations import SignInSettingsOperations # type: ignore -from ._sign_up_settings_operations import SignUpSettingsOperations # type: ignore -from ._delegation_settings_operations import DelegationSettingsOperations # type: ignore -from ._private_endpoint_connection_operations import PrivateEndpointConnectionOperations # type: ignore -from ._product_operations import ProductOperations # type: ignore -from ._product_api_operations import ProductApiOperations # type: ignore -from ._product_group_operations import ProductGroupOperations # type: ignore -from ._product_subscriptions_operations import ProductSubscriptionsOperations # type: ignore -from ._product_policy_operations import ProductPolicyOperations # type: ignore -from ._product_wiki_operations import ProductWikiOperations # type: ignore -from ._product_wikis_operations import ProductWikisOperations # type: ignore -from ._product_api_link_operations import ProductApiLinkOperations # type: ignore -from ._product_group_link_operations import ProductGroupLinkOperations # type: ignore -from ._quota_by_counter_keys_operations import QuotaByCounterKeysOperations # type: ignore -from ._quota_by_period_keys_operations import QuotaByPeriodKeysOperations # type: ignore -from ._region_operations import RegionOperations # type: ignore -from ._reports_operations import ReportsOperations # type: ignore -from ._global_schema_operations import GlobalSchemaOperations # type: ignore -from ._tenant_settings_operations import TenantSettingsOperations # type: ignore -from ._api_management_skus_operations import ApiManagementSkusOperations # type: ignore -from ._subscription_operations import SubscriptionOperations # type: ignore -from ._tag_resource_operations import TagResourceOperations # type: ignore -from ._tag_api_link_operations import TagApiLinkOperations # type: ignore -from ._tag_operation_link_operations import TagOperationLinkOperations # type: ignore -from ._tag_product_link_operations import TagProductLinkOperations # type: ignore -from ._tenant_access_operations import TenantAccessOperations # type: ignore -from ._tenant_access_git_operations import TenantAccessGitOperations # type: ignore -from ._tenant_configuration_operations import TenantConfigurationOperations # type: ignore -from ._user_operations import UserOperations # type: ignore -from ._user_group_operations import UserGroupOperations # type: ignore -from ._user_subscription_operations import UserSubscriptionOperations # type: ignore -from ._user_identities_operations import UserIdentitiesOperations # type: ignore -from ._user_confirmation_password_operations import UserConfirmationPasswordOperations # type: ignore -from ._workspace_backend_operations import WorkspaceBackendOperations # type: ignore -from ._workspace_certificate_operations import WorkspaceCertificateOperations # type: ignore -from ._workspace_diagnostic_operations import WorkspaceDiagnosticOperations # type: ignore -from ._workspace_api_diagnostic_operations import WorkspaceApiDiagnosticOperations # type: ignore -from ._api_management_workspace_links_operations import ApiManagementWorkspaceLinksOperations # type: ignore -from ._api_management_workspace_link_operations import ApiManagementWorkspaceLinkOperations # type: ignore -from ._workspace_logger_operations import WorkspaceLoggerOperations # type: ignore -from ._workspace_operations import WorkspaceOperations # type: ignore -from ._workspace_policy_operations import WorkspacePolicyOperations # type: ignore -from ._workspace_named_value_operations import WorkspaceNamedValueOperations # type: ignore -from ._workspace_global_schema_operations import WorkspaceGlobalSchemaOperations # type: ignore -from ._workspace_notification_operations import WorkspaceNotificationOperations # type: ignore -from ._workspace_notification_recipient_user_operations import WorkspaceNotificationRecipientUserOperations # type: ignore -from ._workspace_notification_recipient_email_operations import WorkspaceNotificationRecipientEmailOperations # type: ignore -from ._workspace_policy_fragment_operations import WorkspacePolicyFragmentOperations # type: ignore -from ._workspace_group_operations import WorkspaceGroupOperations # type: ignore -from ._workspace_group_user_operations import WorkspaceGroupUserOperations # type: ignore -from ._workspace_subscription_operations import WorkspaceSubscriptionOperations # type: ignore -from ._workspace_api_version_set_operations import WorkspaceApiVersionSetOperations # type: ignore -from ._workspace_api_operations import WorkspaceApiOperations # type: ignore -from ._workspace_api_revision_operations import WorkspaceApiRevisionOperations # type: ignore -from ._workspace_api_release_operations import WorkspaceApiReleaseOperations # type: ignore -from ._workspace_api_operation_operations import WorkspaceApiOperationOperations # type: ignore -from ._workspace_api_operation_policy_operations import WorkspaceApiOperationPolicyOperations # type: ignore -from ._workspace_api_policy_operations import WorkspaceApiPolicyOperations # type: ignore -from ._workspace_api_schema_operations import WorkspaceApiSchemaOperations # type: ignore -from ._workspace_product_operations import WorkspaceProductOperations # type: ignore -from ._workspace_product_api_link_operations import WorkspaceProductApiLinkOperations # type: ignore -from ._workspace_product_group_link_operations import WorkspaceProductGroupLinkOperations # type: ignore -from ._workspace_product_policy_operations import WorkspaceProductPolicyOperations # type: ignore -from ._workspace_tag_operations import WorkspaceTagOperations # type: ignore -from ._workspace_tag_api_link_operations import WorkspaceTagApiLinkOperations # type: ignore -from ._workspace_tag_operation_link_operations import WorkspaceTagOperationLinkOperations # type: ignore -from ._workspace_tag_product_link_operations import WorkspaceTagProductLinkOperations # type: ignore -from ._workspace_api_export_operations import WorkspaceApiExportOperations # type: ignore -from ._operation_status_operations import OperationStatusOperations # type: ignore -from ._operations_results_operations import OperationsResultsOperations # type: ignore +from ._operations import WorkspaceApiOperations # type: ignore +from ._operations import WorkspaceApiReleaseOperations # type: ignore +from ._operations import WorkspaceApiOperationOperations # type: ignore +from ._operations import GraphQLApiResolverPolicyOperations # type: ignore +from ._operations import ApiPolicyOperations # type: ignore +from ._operations import PolicyOperations # type: ignore +from ._operations import ProductPolicyOperations # type: ignore +from ._operations import WorkspacePolicyOperations # type: ignore +from ._operations import WorkspaceApiOperationPolicyOperations # type: ignore +from ._operations import WorkspaceApiPolicyOperations # type: ignore +from ._operations import WorkspaceProductPolicyOperations # type: ignore +from ._operations import TagOperations # type: ignore +from ._operations import WorkspaceTagOperations # type: ignore +from ._operations import WorkspaceApiSchemaOperations # type: ignore +from ._operations import DiagnosticOperations # type: ignore +from ._operations import WorkspaceDiagnosticOperations # type: ignore +from ._operations import WorkspaceApiDiagnosticOperations # type: ignore +from ._operations import IssueOperations # type: ignore +from ._operations import ProductWikiOperations # type: ignore +from ._operations import WorkspaceApiVersionSetOperations # type: ignore +from ._operations import WorkspaceBackendOperations # type: ignore +from ._operations import WorkspaceCertificateOperations # type: ignore +from ._operations import WorkspaceGroupOperations # type: ignore +from ._operations import WorkspaceLoggerOperations # type: ignore +from ._operations import WorkspaceNamedValueOperations # type: ignore +from ._operations import WorkspaceNotificationOperations # type: ignore +from ._operations import WorkspacePolicyFragmentOperations # type: ignore +from ._operations import SignInSettingsOperations # type: ignore +from ._operations import SignUpSettingsOperations # type: ignore +from ._operations import DelegationSettingsOperations # type: ignore +from ._operations import WorkspaceProductOperations # type: ignore +from ._operations import WorkspaceProductApiLinkOperations # type: ignore +from ._operations import WorkspaceProductGroupLinkOperations # type: ignore +from ._operations import WorkspaceGlobalSchemaOperations # type: ignore +from ._operations import UserSubscriptionOperations # type: ignore +from ._operations import WorkspaceSubscriptionOperations # type: ignore +from ._operations import WorkspaceTagApiLinkOperations # type: ignore +from ._operations import WorkspaceTagOperationLinkOperations # type: ignore +from ._operations import WorkspaceTagProductLinkOperations # type: ignore +from ._operations import ApiManagementOperationsOperations # type: ignore +from ._operations import ApiGatewayOperations # type: ignore +from ._operations import ApiManagementGatewaySkusOperations # type: ignore +from ._operations import ApiOperations # type: ignore +from ._operations import ApiRevisionOperations # type: ignore +from ._operations import ApiProductOperations # type: ignore +from ._operations import OperationOperations # type: ignore +from ._operations import WorkspaceApiRevisionOperations # type: ignore +from ._operations import ApiManagementServiceOperations # type: ignore +from ._operations import AllPoliciesOperations # type: ignore +from ._operations import ApiManagementServiceSkusOperations # type: ignore +from ._operations import NetworkStatusOperations # type: ignore +from ._operations import OutboundNetworkDependenciesEndpointsOperations # type: ignore +from ._operations import PolicyDescriptionOperations # type: ignore +from ._operations import PolicyRestrictionValidationsOperations # type: ignore +from ._operations import PortalSettingsOperations # type: ignore +from ._operations import ProductOperations # type: ignore +from ._operations import QuotaByCounterKeysOperations # type: ignore +from ._operations import QuotaByPeriodKeysOperations # type: ignore +from ._operations import RegionOperations # type: ignore +from ._operations import ReportsOperations # type: ignore +from ._operations import TagResourceOperations # type: ignore +from ._operations import ApiReleaseOperations # type: ignore +from ._operations import ApiOperationOperations # type: ignore +from ._operations import ApiOperationPolicyOperations # type: ignore +from ._operations import GraphQLApiResolverOperations # type: ignore +from ._operations import ApiSchemaOperations # type: ignore +from ._operations import ApiDiagnosticOperations # type: ignore +from ._operations import ApiIssueOperations # type: ignore +from ._operations import ApiIssueCommentOperations # type: ignore +from ._operations import ApiIssueAttachmentOperations # type: ignore +from ._operations import ApiTagDescriptionOperations # type: ignore +from ._operations import ApiWikiOperations # type: ignore +from ._operations import ApiWikisOperations # type: ignore +from ._operations import ProductWikisOperations # type: ignore +from ._operations import ApiToolOperations # type: ignore +from ._operations import ApiVersionSetOperations # type: ignore +from ._operations import AuthorizationProviderOperations # type: ignore +from ._operations import AuthorizationOperations # type: ignore +from ._operations import AuthorizationLoginLinksOperations # type: ignore +from ._operations import AuthorizationAccessPolicyOperations # type: ignore +from ._operations import AuthorizationServerOperations # type: ignore +from ._operations import BackendOperations # type: ignore +from ._operations import CacheOperations # type: ignore +from ._operations import CertificateOperations # type: ignore +from ._operations import ContentTypeOperations # type: ignore +from ._operations import ContentItemOperations # type: ignore +from ._operations import DeletedServicesOperations # type: ignore +from ._operations import DocumentationOperations # type: ignore +from ._operations import EmailTemplateOperations # type: ignore +from ._operations import ApiGatewayConfigConnectionOperations # type: ignore +from ._operations import ApiGatewayHostnameBindingOperations # type: ignore +from ._operations import GatewayOperations # type: ignore +from ._operations import GatewayApiOperations # type: ignore +from ._operations import GatewayHostnameConfigurationOperations # type: ignore +from ._operations import GatewayCertificateAuthorityOperations # type: ignore +from ._operations import GroupOperations # type: ignore +from ._operations import GroupUserOperations # type: ignore +from ._operations import WorkspaceGroupUserOperations # type: ignore +from ._operations import IdentityProviderOperations # type: ignore +from ._operations import LoggerOperations # type: ignore +from ._operations import NamedValueOperations # type: ignore +from ._operations import NotificationOperations # type: ignore +from ._operations import NotificationRecipientUserOperations # type: ignore +from ._operations import NotificationRecipientEmailOperations # type: ignore +from ._operations import WorkspaceNotificationRecipientUserOperations # type: ignore +from ._operations import WorkspaceNotificationRecipientEmailOperations # type: ignore +from ._operations import OpenIdConnectProviderOperations # type: ignore +from ._operations import PolicyFragmentOperations # type: ignore +from ._operations import PolicyRestrictionOperations # type: ignore +from ._operations import PortalConfigOperations # type: ignore +from ._operations import ClientApplicationOperations # type: ignore +from ._operations import ClientApplicationProductLinkOperations # type: ignore +from ._operations import PortalRevisionOperations # type: ignore +from ._operations import PrivateEndpointConnectionOperations # type: ignore +from ._operations import ProductApiOperations # type: ignore +from ._operations import ProductGroupOperations # type: ignore +from ._operations import ProductSubscriptionsOperations # type: ignore +from ._operations import ProductApiLinkOperations # type: ignore +from ._operations import ProductGroupLinkOperations # type: ignore +from ._operations import GlobalSchemaOperations # type: ignore +from ._operations import TenantSettingsOperations # type: ignore +from ._operations import SubscriptionOperations # type: ignore +from ._operations import TagApiLinkOperations # type: ignore +from ._operations import TagOperationLinkOperations # type: ignore +from ._operations import TagProductLinkOperations # type: ignore +from ._operations import TenantAccessOperations # type: ignore +from ._operations import TenantAccessGitOperations # type: ignore +from ._operations import TenantConfigurationOperations # type: ignore +from ._operations import UserOperations # type: ignore +from ._operations import UserGroupOperations # type: ignore +from ._operations import UserIdentitiesOperations # type: ignore +from ._operations import UserConfirmationPasswordOperations # type: ignore +from ._operations import ApiManagementWorkspaceLinkOperations # type: ignore +from ._operations import ApiManagementWorkspaceLinksOperations # type: ignore +from ._operations import WorkspaceOperations # type: ignore +from ._operations import ApiExportOperations # type: ignore +from ._operations import ApiManagementSkusOperations # type: ignore +from ._operations import WorkspaceApiExportOperations # type: ignore +from ._operations import OperationStatusOperations # type: ignore +from ._operations import OperationsResultsOperations # type: ignore +from ._operations import _ApiManagementClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ + "WorkspaceApiOperations", + "WorkspaceApiReleaseOperations", + "WorkspaceApiOperationOperations", + "GraphQLApiResolverPolicyOperations", + "ApiPolicyOperations", + "PolicyOperations", + "ProductPolicyOperations", + "WorkspacePolicyOperations", + "WorkspaceApiOperationPolicyOperations", + "WorkspaceApiPolicyOperations", + "WorkspaceProductPolicyOperations", + "TagOperations", + "WorkspaceTagOperations", + "WorkspaceApiSchemaOperations", + "DiagnosticOperations", + "WorkspaceDiagnosticOperations", + "WorkspaceApiDiagnosticOperations", + "IssueOperations", + "ProductWikiOperations", + "WorkspaceApiVersionSetOperations", + "WorkspaceBackendOperations", + "WorkspaceCertificateOperations", + "WorkspaceGroupOperations", + "WorkspaceLoggerOperations", + "WorkspaceNamedValueOperations", + "WorkspaceNotificationOperations", + "WorkspacePolicyFragmentOperations", + "SignInSettingsOperations", + "SignUpSettingsOperations", + "DelegationSettingsOperations", + "WorkspaceProductOperations", + "WorkspaceProductApiLinkOperations", + "WorkspaceProductGroupLinkOperations", + "WorkspaceGlobalSchemaOperations", + "UserSubscriptionOperations", + "WorkspaceSubscriptionOperations", + "WorkspaceTagApiLinkOperations", + "WorkspaceTagOperationLinkOperations", + "WorkspaceTagProductLinkOperations", + "ApiManagementOperationsOperations", "ApiGatewayOperations", "ApiManagementGatewaySkusOperations", - "AllPoliciesOperations", "ApiOperations", "ApiRevisionOperations", + "ApiProductOperations", + "OperationOperations", + "WorkspaceApiRevisionOperations", + "ApiManagementServiceOperations", + "AllPoliciesOperations", + "ApiManagementServiceSkusOperations", + "NetworkStatusOperations", + "OutboundNetworkDependenciesEndpointsOperations", + "PolicyDescriptionOperations", + "PolicyRestrictionValidationsOperations", + "PortalSettingsOperations", + "ProductOperations", + "QuotaByCounterKeysOperations", + "QuotaByPeriodKeysOperations", + "RegionOperations", + "ReportsOperations", + "TagResourceOperations", "ApiReleaseOperations", "ApiOperationOperations", "ApiOperationPolicyOperations", - "TagOperations", "GraphQLApiResolverOperations", - "GraphQLApiResolverPolicyOperations", - "ApiProductOperations", - "ApiPolicyOperations", "ApiSchemaOperations", "ApiDiagnosticOperations", "ApiIssueOperations", "ApiIssueCommentOperations", "ApiIssueAttachmentOperations", "ApiTagDescriptionOperations", - "OperationOperations", "ApiWikiOperations", "ApiWikisOperations", + "ProductWikisOperations", "ApiToolOperations", - "ApiExportOperations", "ApiVersionSetOperations", "AuthorizationProviderOperations", "AuthorizationOperations", @@ -193,65 +243,44 @@ "BackendOperations", "CacheOperations", "CertificateOperations", - "ClientApplicationOperations", - "ClientApplicationProductLinkOperations", "ContentTypeOperations", "ContentItemOperations", "DeletedServicesOperations", - "ApiManagementOperationsOperations", - "ApiManagementServiceSkusOperations", - "ApiManagementServiceOperations", - "DiagnosticOperations", "DocumentationOperations", "EmailTemplateOperations", "ApiGatewayConfigConnectionOperations", "ApiGatewayHostnameBindingOperations", "GatewayOperations", - "GatewayHostnameConfigurationOperations", "GatewayApiOperations", + "GatewayHostnameConfigurationOperations", "GatewayCertificateAuthorityOperations", "GroupOperations", "GroupUserOperations", + "WorkspaceGroupUserOperations", "IdentityProviderOperations", - "IssueOperations", "LoggerOperations", "NamedValueOperations", - "NetworkStatusOperations", "NotificationOperations", "NotificationRecipientUserOperations", "NotificationRecipientEmailOperations", + "WorkspaceNotificationRecipientUserOperations", + "WorkspaceNotificationRecipientEmailOperations", "OpenIdConnectProviderOperations", - "OutboundNetworkDependenciesEndpointsOperations", - "PolicyOperations", - "PolicyDescriptionOperations", "PolicyFragmentOperations", "PolicyRestrictionOperations", - "PolicyRestrictionValidationsOperations", "PortalConfigOperations", + "ClientApplicationOperations", + "ClientApplicationProductLinkOperations", "PortalRevisionOperations", - "PortalSettingsOperations", - "SignInSettingsOperations", - "SignUpSettingsOperations", - "DelegationSettingsOperations", "PrivateEndpointConnectionOperations", - "ProductOperations", "ProductApiOperations", "ProductGroupOperations", "ProductSubscriptionsOperations", - "ProductPolicyOperations", - "ProductWikiOperations", - "ProductWikisOperations", "ProductApiLinkOperations", "ProductGroupLinkOperations", - "QuotaByCounterKeysOperations", - "QuotaByPeriodKeysOperations", - "RegionOperations", - "ReportsOperations", "GlobalSchemaOperations", "TenantSettingsOperations", - "ApiManagementSkusOperations", "SubscriptionOperations", - "TagResourceOperations", "TagApiLinkOperations", "TagOperationLinkOperations", "TagProductLinkOperations", @@ -260,43 +289,13 @@ "TenantConfigurationOperations", "UserOperations", "UserGroupOperations", - "UserSubscriptionOperations", "UserIdentitiesOperations", "UserConfirmationPasswordOperations", - "WorkspaceBackendOperations", - "WorkspaceCertificateOperations", - "WorkspaceDiagnosticOperations", - "WorkspaceApiDiagnosticOperations", - "ApiManagementWorkspaceLinksOperations", "ApiManagementWorkspaceLinkOperations", - "WorkspaceLoggerOperations", + "ApiManagementWorkspaceLinksOperations", "WorkspaceOperations", - "WorkspacePolicyOperations", - "WorkspaceNamedValueOperations", - "WorkspaceGlobalSchemaOperations", - "WorkspaceNotificationOperations", - "WorkspaceNotificationRecipientUserOperations", - "WorkspaceNotificationRecipientEmailOperations", - "WorkspacePolicyFragmentOperations", - "WorkspaceGroupOperations", - "WorkspaceGroupUserOperations", - "WorkspaceSubscriptionOperations", - "WorkspaceApiVersionSetOperations", - "WorkspaceApiOperations", - "WorkspaceApiRevisionOperations", - "WorkspaceApiReleaseOperations", - "WorkspaceApiOperationOperations", - "WorkspaceApiOperationPolicyOperations", - "WorkspaceApiPolicyOperations", - "WorkspaceApiSchemaOperations", - "WorkspaceProductOperations", - "WorkspaceProductApiLinkOperations", - "WorkspaceProductGroupLinkOperations", - "WorkspaceProductPolicyOperations", - "WorkspaceTagOperations", - "WorkspaceTagApiLinkOperations", - "WorkspaceTagOperationLinkOperations", - "WorkspaceTagProductLinkOperations", + "ApiExportOperations", + "ApiManagementSkusOperations", "WorkspaceApiExportOperations", "OperationStatusOperations", "OperationsResultsOperations", diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_all_policies_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_all_policies_operations.py deleted file mode 100644 index c044bfaa1cda..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_all_policies_operations.py +++ /dev/null @@ -1,185 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/allPolicies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class AllPoliciesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`all_policies` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> ItemPaged["_models.AllPoliciesContract"]: - """Status of all policies of API Management services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either AllPoliciesContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.AllPoliciesContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AllPoliciesCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AllPoliciesCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py deleted file mode 100644 index 02038ba234ac..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py +++ /dev/null @@ -1,1037 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiDiagnosticOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_diagnostic` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.DiagnosticContract"]: - """Lists all diagnostics of an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either DiagnosticContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DiagnosticCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, **kwargs: Any - ) -> _models.DiagnosticContract: - """Gets the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - parameters: _models.DiagnosticContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - parameters: Union[_models.DiagnosticContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Is either a DiagnosticContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - if_match: str, - parameters: _models.DiagnosticContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - diagnostic_id: str, - if_match: str, - parameters: Union[_models.DiagnosticContract, IO[bytes]], - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Is either a DiagnosticContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or IO[bytes] - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified Diagnostic from an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py deleted file mode 100644 index 146a1860672c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py +++ /dev/null @@ -1,186 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - format: Union[str, _models.ExportFormat], - export: Union[str, _models.ExportApi], - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["format"] = _SERIALIZER.query("format", format, "str") - _params["export"] = _SERIALIZER.query("export", export, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiExportOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_export` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - api_id: str, - format: Union[str, _models.ExportFormat], - export: Union[str, _models.ExportApi], - **kwargs: Any - ) -> _models.ApiExportResult: - """Gets the details of the API specified by its identifier in the format specified to the Storage - Blob with SAS Key valid for 5 minutes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param format: Format in which to export the Api Details to the Storage Blob with Sas Key valid - for 5 minutes. New formats can be added in the future. Known values are: "swagger-link", - "wsdl-link", "wadl-link", "openapi-link", and "openapi+json-link". Required. - :type format: str or ~azure.mgmt.apimanagement.models.ExportFormat - :param export: Query parameter required to export the API details. "true" Required. - :type export: str or ~azure.mgmt.apimanagement.models.ExportApi - :return: ApiExportResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiExportResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiExportResult] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - format=format, - export=export, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiExportResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_config_connection_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_config_connection_operations.py deleted file mode 100644 index 4cfe5dfc36c2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_config_connection_operations.py +++ /dev/null @@ -1,761 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_gateway_request( - resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, gateway_name: str, config_connection_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "configConnectionName": _SERIALIZER.url( - "config_connection_name", - config_connection_name, - "str", - max_length=30, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, gateway_name: str, config_connection_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "configConnectionName": _SERIALIZER.url( - "config_connection_name", - config_connection_name, - "str", - max_length=30, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - gateway_name: str, - config_connection_name: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "configConnectionName": _SERIALIZER.url( - "config_connection_name", - config_connection_name, - "str", - max_length=30, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiGatewayConfigConnectionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_gateway_config_connection` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_gateway( - self, resource_group_name: str, gateway_name: str, **kwargs: Any - ) -> ItemPaged["_models.ApiManagementGatewayConfigConnectionResource"]: - """List all API Management gateway config connections within a gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :return: An iterator like instance of either ApiManagementGatewayConfigConnectionResource or - the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementGatewayConfigConnectionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_gateway_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementGatewayConfigConnectionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, gateway_name: str, config_connection_name: str, **kwargs: Any - ) -> _models.ApiManagementGatewayConfigConnectionResource: - """Gets an API Management gateway config connection resource description. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param config_connection_name: The name of the API Management gateway config connection. - Required. - :type config_connection_name: str - :return: ApiManagementGatewayConfigConnectionResource or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementGatewayConfigConnectionResource] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - config_connection_name=config_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize( - "ApiManagementGatewayConfigConnectionResource", pipeline_response.http_response - ) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - gateway_name: str, - config_connection_name: str, - parameters: Union[_models.ApiManagementGatewayConfigConnectionResource, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementGatewayConfigConnectionResource") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - config_connection_name=config_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - config_connection_name: str, - parameters: _models.ApiManagementGatewayConfigConnectionResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementGatewayConfigConnectionResource]: - """Creates or updates an API Management gateway config connection. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param config_connection_name: The name of the API Management gateway config connection. - Required. - :type config_connection_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config - connection operation. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - ApiManagementGatewayConfigConnectionResource or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - config_connection_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementGatewayConfigConnectionResource]: - """Creates or updates an API Management gateway config connection. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param config_connection_name: The name of the API Management gateway config connection. - Required. - :type config_connection_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config - connection operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - ApiManagementGatewayConfigConnectionResource or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - config_connection_name: str, - parameters: Union[_models.ApiManagementGatewayConfigConnectionResource, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ApiManagementGatewayConfigConnectionResource]: - """Creates or updates an API Management gateway config connection. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param config_connection_name: The name of the API Management gateway config connection. - Required. - :type config_connection_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config - connection operation. Is either a ApiManagementGatewayConfigConnectionResource type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource - or IO[bytes] - :return: An instance of LROPoller that returns either - ApiManagementGatewayConfigConnectionResource or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementGatewayConfigConnectionResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - config_connection_name=config_connection_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "ApiManagementGatewayConfigConnectionResource", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiManagementGatewayConfigConnectionResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiManagementGatewayConfigConnectionResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, gateway_name: str, config_connection_name: str, if_match: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - config_connection_name=config_connection_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, gateway_name: str, config_connection_name: str, if_match: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing API Management gateway config connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param config_connection_name: The name of the API Management gateway config connection. - Required. - :type config_connection_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - config_connection_name=config_connection_name, - if_match=if_match, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_hostname_binding_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_hostname_binding_operations.py deleted file mode 100644 index 3a4662bbb292..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_hostname_binding_operations.py +++ /dev/null @@ -1,967 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_gateway_request( - resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, gateway_name: str, hostname_binding_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "hostnameBindingName": _SERIALIZER.url( - "hostname_binding_name", - hostname_binding_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - gateway_name: str, - hostname_binding_name: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "hostnameBindingName": _SERIALIZER.url( - "hostname_binding_name", - hostname_binding_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - gateway_name: str, - hostname_binding_name: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "hostnameBindingName": _SERIALIZER.url( - "hostname_binding_name", - hostname_binding_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_refresh_secret_request( - resource_group_name: str, gateway_name: str, hostname_binding_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}/refreshSecret", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "hostnameBindingName": _SERIALIZER.url( - "hostname_binding_name", - hostname_binding_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiGatewayHostnameBindingOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_gateway_hostname_binding` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_gateway( - self, resource_group_name: str, gateway_name: str, **kwargs: Any - ) -> ItemPaged["_models.GatewayHostnameBindingResource"]: - """List all API Management gateway hostname bindings within a gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :return: An iterator like instance of either GatewayHostnameBindingResource or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayHostnameBindingListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_gateway_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("GatewayHostnameBindingListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any - ) -> _models.GatewayHostnameBindingResource: - """Gets an API Management gateway hostname binding resource description. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope - of parent Gateway entity. Required. - :type hostname_binding_name: str - :return: GatewayHostnameBindingResource or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayHostnameBindingResource] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GatewayHostnameBindingResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - gateway_name: str, - hostname_binding_name: str, - parameters: Union[_models.GatewayHostnameBindingResource, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayHostnameBindingResource") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - hostname_binding_name: str, - parameters: _models.GatewayHostnameBindingResource, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.GatewayHostnameBindingResource]: - """Creates or updates an API Management gateway hostname binding. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope - of parent Gateway entity. Required. - :type hostname_binding_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname - binding operation. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either GatewayHostnameBindingResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - hostname_binding_name: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.GatewayHostnameBindingResource]: - """Creates or updates an API Management gateway hostname binding. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope - of parent Gateway entity. Required. - :type hostname_binding_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname - binding operation. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either GatewayHostnameBindingResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - hostname_binding_name: str, - parameters: Union[_models.GatewayHostnameBindingResource, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.GatewayHostnameBindingResource]: - """Creates or updates an API Management gateway hostname binding. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope - of parent Gateway entity. Required. - :type hostname_binding_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname - binding operation. Is either a GatewayHostnameBindingResource type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of LROPoller that returns either GatewayHostnameBindingResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayHostnameBindingResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("GatewayHostnameBindingResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.GatewayHostnameBindingResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.GatewayHostnameBindingResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, if_match: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, if_match: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing API Management gateway hostname binding. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope - of parent Gateway entity. Required. - :type hostname_binding_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - if_match=if_match, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _refresh_secret_initial( - self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_secret_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_refresh_secret( - self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Refresh the secret for an API Management gateway hostname binding. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope - of parent Gateway entity. Required. - :type hostname_binding_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._refresh_secret_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - hostname_binding_name=hostname_binding_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_operations.py deleted file mode 100644 index 5356300a78c4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_gateway_operations.py +++ /dev/null @@ -1,1037 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_or_update_request( - resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/gateways") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiGatewayOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_gateway` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_or_update_initial( - self, - resource_group_name: str, - gateway_name: str, - parameters: Union[_models.ApiManagementGatewayResource, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementGatewayResource") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - parameters: _models.ApiManagementGatewayResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementGatewayResource]: - """Creates or updates an API Management gateway. This is long running operation and could take - several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementGatewayResource]: - """Creates or updates an API Management gateway. This is long running operation and could take - several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - gateway_name: str, - parameters: Union[_models.ApiManagementGatewayResource, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ApiManagementGatewayResource]: - """Creates or updates an API Management gateway. This is long running operation and could take - several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. - Is either a ApiManagementGatewayResource type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayResource or IO[bytes] - :return: An instance of LROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementGatewayResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiManagementGatewayResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiManagementGatewayResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - gateway_name: str, - parameters: Union[_models.ApiManagementGatewayUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementGatewayUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - gateway_name: str, - parameters: _models.ApiManagementGatewayUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementGatewayResource]: - """Updates an existing API Management gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - gateway_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementGatewayResource]: - """Updates an existing API Management gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - gateway_name: str, - parameters: Union[_models.ApiManagementGatewayUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ApiManagementGatewayResource]: - """Updates an existing API Management gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. - Is either a ApiManagementGatewayUpdateParameters type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateParameters or - IO[bytes] - :return: An instance of LROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementGatewayResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiManagementGatewayResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiManagementGatewayResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> _models.ApiManagementGatewayResource: - """Gets an API Management gateway resource description. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :return: ApiManagementGatewayResource or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementGatewayResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiManagementGatewayResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _delete_initial(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, gateway_name: str, **kwargs: Any - ) -> LROPoller[_models.ApiManagementGatewayResource]: - """Deletes an existing API Management gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :return: An instance of LROPoller that returns either ApiManagementGatewayResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = self._deserialize("ApiManagementGatewayResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiManagementGatewayResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiManagementGatewayResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.ApiManagementGatewayResource"]: - """List all API Management gateways within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either ApiManagementGatewayResource or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementGatewayListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementGatewayListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.ApiManagementGatewayResource"]: - """List all API Management gateways within a subscription. - - :return: An iterator like instance of either ApiManagementGatewayResource or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementGatewayListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementGatewayListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py deleted file mode 100644 index dd3c6de1cb2a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py +++ /dev/null @@ -1,876 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - attachment_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "attachmentId": _SERIALIZER.url( - "attachment_id", attachment_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - attachment_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "attachmentId": _SERIALIZER.url( - "attachment_id", attachment_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - attachment_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "attachmentId": _SERIALIZER.url( - "attachment_id", attachment_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - attachment_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "attachmentId": _SERIALIZER.url( - "attachment_id", attachment_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiIssueAttachmentOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_issue_attachment` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.IssueAttachmentContract"]: - """Lists all attachments for the Issue associated with the specified API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either IssueAttachmentContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.IssueAttachmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueAttachmentCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IssueAttachmentCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, attachment_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the issue Attachment for an API specified by its - identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be unique in the current - Issue. Required. - :type attachment_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - attachment_id=attachment_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, attachment_id: str, **kwargs: Any - ) -> _models.IssueAttachmentContract: - """Gets the details of the issue Attachment for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be unique in the current - Issue. Required. - :type attachment_id: str - :return: IssueAttachmentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueAttachmentContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - attachment_id=attachment_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueAttachmentContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - attachment_id: str, - parameters: _models.IssueAttachmentContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueAttachmentContract: - """Creates a new Attachment for the Issue in an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be unique in the current - Issue. Required. - :type attachment_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueAttachmentContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueAttachmentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - attachment_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueAttachmentContract: - """Creates a new Attachment for the Issue in an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be unique in the current - Issue. Required. - :type attachment_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueAttachmentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - attachment_id: str, - parameters: Union[_models.IssueAttachmentContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.IssueAttachmentContract: - """Creates a new Attachment for the Issue in an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be unique in the current - Issue. Required. - :type attachment_id: str - :param parameters: Create parameters. Is either a IssueAttachmentContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueAttachmentContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: IssueAttachmentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IssueAttachmentContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IssueAttachmentContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - attachment_id=attachment_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueAttachmentContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - attachment_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified comment from an Issue. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be unique in the current - Issue. Required. - :type attachment_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - attachment_id=attachment_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py deleted file mode 100644 index 87a7553ca0ae..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py +++ /dev/null @@ -1,876 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - comment_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "commentId": _SERIALIZER.url( - "comment_id", comment_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - comment_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "commentId": _SERIALIZER.url( - "comment_id", comment_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - comment_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "commentId": _SERIALIZER.url( - "comment_id", comment_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - comment_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "commentId": _SERIALIZER.url( - "comment_id", comment_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiIssueCommentOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_issue_comment` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.IssueCommentContract"]: - """Lists all comments for the Issue associated with the specified API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either IssueCommentContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.IssueCommentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueCommentCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IssueCommentCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, comment_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the issue Comment for an API specified by its - identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. - Required. - :type comment_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - comment_id=comment_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, comment_id: str, **kwargs: Any - ) -> _models.IssueCommentContract: - """Gets the details of the issue Comment for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. - Required. - :type comment_id: str - :return: IssueCommentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueCommentContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - comment_id=comment_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueCommentContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - comment_id: str, - parameters: _models.IssueCommentContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueCommentContract: - """Creates a new Comment for the Issue in an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. - Required. - :type comment_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueCommentContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueCommentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - comment_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueCommentContract: - """Creates a new Comment for the Issue in an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. - Required. - :type comment_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueCommentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - comment_id: str, - parameters: Union[_models.IssueCommentContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.IssueCommentContract: - """Creates a new Comment for the Issue in an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. - Required. - :type comment_id: str - :param parameters: Create parameters. Is either a IssueCommentContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueCommentContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: IssueCommentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IssueCommentContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IssueCommentContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - comment_id=comment_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueCommentContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - comment_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified comment from an Issue. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. - Required. - :type comment_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - comment_id=comment_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py deleted file mode 100644 index 43b99613ea37..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py +++ /dev/null @@ -1,1067 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - expand_comments_attachments: Optional[bool] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if expand_comments_attachments is not None: - _params["expandCommentsAttachments"] = _SERIALIZER.query( - "expand_comments_attachments", expand_comments_attachments, "bool" - ) - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, api_id: str, issue_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - subscription_id: str, - *, - expand_comments_attachments: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if expand_comments_attachments is not None: - _params["expandCommentsAttachments"] = _SERIALIZER.query( - "expand_comments_attachments", expand_comments_attachments, "bool" - ) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiIssueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_issue` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - expand_comments_attachments: Optional[bool] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.IssueContract"]: - """Lists all issues associated with the specified API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | - filter | eq | |
. Default value is None. - :type filter: str - :param expand_comments_attachments: Expand the comment attachments. Default value is None. - :type expand_comments_attachments: bool - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either IssueContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.IssueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - expand_comments_attachments=expand_comments_attachments, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IssueCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - expand_comments_attachments: Optional[bool] = None, - **kwargs: Any - ) -> _models.IssueContract: - """Gets the details of the Issue for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param expand_comments_attachments: Expand the comment attachments. Default value is None. - :type expand_comments_attachments: bool - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - expand_comments_attachments=expand_comments_attachments, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - parameters: _models.IssueContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueContract: - """Creates a new Issue for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueContract: - """Creates a new Issue for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - parameters: Union[_models.IssueContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.IssueContract: - """Creates a new Issue for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param parameters: Create parameters. Is either a IssueContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IssueContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - if_match: str, - parameters: _models.IssueUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueContract: - """Updates an existing issue for an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IssueContract: - """Updates an existing issue for an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - issue_id: str, - if_match: str, - parameters: Union[_models.IssueUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.IssueContract: - """Updates an existing issue for an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a IssueUpdateContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.IssueUpdateContract or IO[bytes] - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IssueUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified Issue from an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_client_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_client_operations.py deleted file mode 100644 index 298fcfc46236..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_client_operations.py +++ /dev/null @@ -1,300 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Serializer -from .._utils.utils import ClientMixinABC - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_perform_connectivity_check_async_request( # pylint: disable=name-too-long - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class _ApiManagementClientOperationsMixin( - ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], ApiManagementClientConfiguration] -): - - def _perform_connectivity_check_async_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - service_name: str, - connectivity_check_request_params: Union[_models.ConnectivityCheckRequest, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(connectivity_check_request_params, (IOBase, bytes)): - _content = connectivity_check_request_params - else: - _json = self._serialize.body(connectivity_check_request_params, "ConnectivityCheckRequest") - - _request = build_perform_connectivity_check_async_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_perform_connectivity_check_async( - self, - resource_group_name: str, - service_name: str, - connectivity_check_request_params: _models.ConnectivityCheckRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ConnectivityCheckResponse]: - """Performs a connectivity check between the API Management service and a given destination, and - returns metrics for the connection, as well as errors encountered while trying to establish it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param connectivity_check_request_params: Connectivity Check request parameters. Required. - :type connectivity_check_request_params: - ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ConnectivityCheckResponse or the result - of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_perform_connectivity_check_async( - self, - resource_group_name: str, - service_name: str, - connectivity_check_request_params: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ConnectivityCheckResponse]: - """Performs a connectivity check between the API Management service and a given destination, and - returns metrics for the connection, as well as errors encountered while trying to establish it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param connectivity_check_request_params: Connectivity Check request parameters. Required. - :type connectivity_check_request_params: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ConnectivityCheckResponse or the result - of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_perform_connectivity_check_async( - self, - resource_group_name: str, - service_name: str, - connectivity_check_request_params: Union[_models.ConnectivityCheckRequest, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ConnectivityCheckResponse]: - """Performs a connectivity check between the API Management service and a given destination, and - returns metrics for the connection, as well as errors encountered while trying to establish it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param connectivity_check_request_params: Connectivity Check request parameters. Is either a - ConnectivityCheckRequest type or a IO[bytes] type. Required. - :type connectivity_check_request_params: - ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest or IO[bytes] - :return: An instance of LROPoller that returns either ConnectivityCheckResponse or the result - of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ConnectivityCheckResponse] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._perform_connectivity_check_async_initial( - resource_group_name=resource_group_name, - service_name=service_name, - connectivity_check_request_params=connectivity_check_request_params, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ConnectivityCheckResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ConnectivityCheckResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ConnectivityCheckResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_gateway_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_gateway_skus_operations.py deleted file mode 100644 index 60b927943cc8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_gateway_skus_operations.py +++ /dev/null @@ -1,188 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_available_skus_request( - resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/skus", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "gatewayName": _SERIALIZER.url( - "gateway_name", - gateway_name, - "str", - max_length=45, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiManagementGatewaySkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_management_gateway_skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_available_skus( - self, resource_group_name: str, gateway_name: str, **kwargs: Any - ) -> ItemPaged["_models.GatewayResourceSkuResult"]: - """Gets available SKUs for API Management gateway. - - Gets all available SKU for a given API Management gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param gateway_name: The name of the API Management gateway. Required. - :type gateway_name: str - :return: An iterator like instance of either GatewayResourceSkuResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GatewayResourceSkuResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayResourceSkuResults] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_available_skus_request( - resource_group_name=resource_group_name, - gateway_name=gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("GatewayResourceSkuResults", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py deleted file mode 100644 index 8580551b91ec..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.ApiManagement/operations") - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiManagementOperationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_management_operations` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: - """Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - - :return: An iterator like instance of either Operation or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.Operation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("OperationListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py deleted file mode 100644 index b468cd878398..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py +++ /dev/null @@ -1,2554 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_restore_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_backup_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_migrate_to_stv2_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_sso_token_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_name_availability_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_domain_ownership_identifier_request( # pylint: disable=name-too-long - subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/getDomainOwnershipIdentifier" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_apply_network_configuration_updates_request( # pylint: disable=name-too-long - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_refresh_hostnames_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/refreshHostnames", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiManagementServiceOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_management_service` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _restore_initial( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementServiceBackupRestoreParameters") - - _request = build_restore_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_restore( - self, - resource_group_name: str, - service_name: str, - parameters: _models.ApiManagementServiceBackupRestoreParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Restores a backup of an API Management service created using the ApiManagementService_Backup - operation on the current service. This is a long running operation and could take several - minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the Restore API Management service from backup - operation. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_restore( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Restores a backup of an API Management service created using the ApiManagementService_Backup - operation on the current service. This is a long running operation and could take several - minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the Restore API Management service from backup - operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_restore( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Restores a backup of an API Management service created using the ApiManagementService_Backup - operation on the current service. This is a long running operation and could take several - minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the Restore API Management service from backup - operation. Is either a ApiManagementServiceBackupRestoreParameters type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters - or IO[bytes] - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._restore_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _backup_initial( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementServiceBackupRestoreParameters") - - _request = build_backup_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_backup( - self, - resource_group_name: str, - service_name: str, - parameters: _models.ApiManagementServiceBackupRestoreParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Creates a backup of the API Management service to the given Azure Storage Account. This is long - running operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_backup( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Creates a backup of the API Management service to the given Azure Storage Account. This is long - running operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_backup( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Creates a backup of the API Management service to the given Azure Storage Account. This is long - running operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Is either - a ApiManagementServiceBackupRestoreParameters type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters - or IO[bytes] - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._backup_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceResource, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementServiceResource") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: _models.ApiManagementServiceResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Creates or updates an API Management service. This is long running operation and could take - several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Creates or updates an API Management service. This is long running operation and could take - several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceResource, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Creates or updates an API Management service. This is long running operation and could take - several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. - Is either a ApiManagementServiceResource type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource or IO[bytes] - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementServiceUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - service_name: str, - parameters: _models.ApiManagementServiceUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Updates an existing API Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Updates an existing API Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.ApiManagementServiceUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Updates an existing API Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. - Is either a ApiManagementServiceUpdateParameters type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters or - IO[bytes] - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.ApiManagementServiceResource: - """Gets an API Management service resource description. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: ApiManagementServiceResource or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _delete_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Deletes an existing API Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - service_name=service_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _migrate_to_stv2_initial( - self, - resource_group_name: str, - service_name: str, - parameters: Optional[Union[_models.MigrateToStv2Contract, IO[bytes]]] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if parameters else None - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - if parameters is not None: - _json = self._serialize.body(parameters, "MigrateToStv2Contract") - else: - _json = None - - _request = build_migrate_to_stv2_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_migrate_to_stv2( - self, - resource_group_name: str, - service_name: str, - parameters: Optional[_models.MigrateToStv2Contract] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Upgrades an API Management service to the Stv2 platform. For details refer to - https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Optional parameters supplied to migrate service. Default value is None. - :type parameters: ~azure.mgmt.apimanagement.models.MigrateToStv2Contract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_migrate_to_stv2( - self, - resource_group_name: str, - service_name: str, - parameters: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Upgrades an API Management service to the Stv2 platform. For details refer to - https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Optional parameters supplied to migrate service. Default value is None. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_migrate_to_stv2( - self, - resource_group_name: str, - service_name: str, - parameters: Optional[Union[_models.MigrateToStv2Contract, IO[bytes]]] = None, - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Upgrades an API Management service to the Stv2 platform. For details refer to - https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation - and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Optional parameters supplied to migrate service. Is either a - MigrateToStv2Contract type or a IO[bytes] type. Default value is None. - :type parameters: ~azure.mgmt.apimanagement.models.MigrateToStv2Contract or IO[bytes] - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._migrate_to_stv2_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.ApiManagementServiceResource"]: - """List all API Management services within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either ApiManagementServiceResource or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementServiceListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.ApiManagementServiceResource"]: - """Lists all API Management services within an Azure subscription. - - :return: An iterator like instance of either ApiManagementServiceResource or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementServiceListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_sso_token( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> _models.ApiManagementServiceGetSsoTokenResult: - """Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: ApiManagementServiceGetSsoTokenResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceGetSsoTokenResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementServiceGetSsoTokenResult] = kwargs.pop("cls", None) - - _request = build_get_sso_token_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiManagementServiceGetSsoTokenResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def check_name_availability( - self, - parameters: _models.ApiManagementServiceCheckNameAvailabilityParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiManagementServiceNameAvailabilityResult: - """Checks availability and correctness of a name for an API Management service. - - :param parameters: Parameters supplied to the CheckNameAvailability operation. Required. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiManagementServiceCheckNameAvailabilityParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiManagementServiceNameAvailabilityResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ApiManagementServiceNameAvailabilityResult: - """Checks availability and correctness of a name for an API Management service. - - :param parameters: Parameters supplied to the CheckNameAvailability operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiManagementServiceNameAvailabilityResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, parameters: Union[_models.ApiManagementServiceCheckNameAvailabilityParameters, IO[bytes]], **kwargs: Any - ) -> _models.ApiManagementServiceNameAvailabilityResult: - """Checks availability and correctness of a name for an API Management service. - - :param parameters: Parameters supplied to the CheckNameAvailability operation. Is either a - ApiManagementServiceCheckNameAvailabilityParameters type or a IO[bytes] type. Required. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiManagementServiceCheckNameAvailabilityParameters or - IO[bytes] - :return: ApiManagementServiceNameAvailabilityResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiManagementServiceNameAvailabilityResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiManagementServiceCheckNameAvailabilityParameters") - - _request = build_check_name_availability_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiManagementServiceNameAvailabilityResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_domain_ownership_identifier( - self, **kwargs: Any - ) -> _models.ApiManagementServiceGetDomainOwnershipIdentifierResult: - """Get the custom domain ownership identifier for an API Management service. - - :return: ApiManagementServiceGetDomainOwnershipIdentifierResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceGetDomainOwnershipIdentifierResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementServiceGetDomainOwnershipIdentifierResult] = kwargs.pop("cls", None) - - _request = build_get_domain_ownership_identifier_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize( - "ApiManagementServiceGetDomainOwnershipIdentifierResult", pipeline_response.http_response - ) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _apply_network_configuration_updates_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - service_name: str, - parameters: Optional[Union[_models.ApiManagementServiceApplyNetworkConfigurationParameters, IO[bytes]]] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if parameters else None - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - if parameters is not None: - _json = self._serialize.body(parameters, "ApiManagementServiceApplyNetworkConfigurationParameters") - else: - _json = None - - _request = build_apply_network_configuration_updates_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_apply_network_configuration_updates( # pylint: disable=name-too-long - self, - resource_group_name: str, - service_name: str, - parameters: Optional[_models.ApiManagementServiceApplyNetworkConfigurationParameters] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated - DNS changes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the Apply Network Configuration operation. If the - parameters are empty, all the regions in which the Api Management service is deployed will be - updated sequentially without incurring downtime in the region. Default value is None. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_apply_network_configuration_updates( # pylint: disable=name-too-long - self, - resource_group_name: str, - service_name: str, - parameters: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated - DNS changes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the Apply Network Configuration operation. If the - parameters are empty, all the regions in which the Api Management service is deployed will be - updated sequentially without incurring downtime in the region. Default value is None. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_apply_network_configuration_updates( # pylint: disable=name-too-long - self, - resource_group_name: str, - service_name: str, - parameters: Optional[Union[_models.ApiManagementServiceApplyNetworkConfigurationParameters, IO[bytes]]] = None, - **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated - DNS changes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Parameters supplied to the Apply Network Configuration operation. If the - parameters are empty, all the regions in which the Api Management service is deployed will be - updated sequentially without incurring downtime in the region. Is either a - ApiManagementServiceApplyNetworkConfigurationParameters type or a IO[bytes] type. Default value - is None. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters or - IO[bytes] - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._apply_network_configuration_updates_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _refresh_hostnames_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_hostnames_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_refresh_hostnames( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> LROPoller[_models.ApiManagementServiceResource]: - """Force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from - KeyVault on the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An instance of LROPoller that returns either ApiManagementServiceResource or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._refresh_hostnames_initial( - resource_group_name=resource_group_name, - service_name=service_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ApiManagementServiceResource", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiManagementServiceResource]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py deleted file mode 100644 index f49612ad6763..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py +++ /dev/null @@ -1,187 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_available_service_skus_request( # pylint: disable=name-too-long - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiManagementServiceSkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_management_service_skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_available_service_skus( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> ItemPaged["_models.ResourceSkuResult"]: - """Gets available SKUs for API Management service. - - Gets all available SKU for a given API Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either ResourceSkuResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ResourceSkuResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourceSkuResults] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_available_service_skus_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ResourceSkuResults", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py deleted file mode 100644 index c745154972a8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiManagementSkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_management_skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.ApiManagementSku"]: - """Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - - :return: An iterator like instance of either ApiManagementSku or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementSku] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementSkusResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementSkusResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_link_operations.py deleted file mode 100644 index 03629e4ac095..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_link_operations.py +++ /dev/null @@ -1,164 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request( - resource_group_name: str, service_name: str, workspace_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiManagementWorkspaceLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_management_workspace_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any - ) -> _models.ApiManagementWorkspaceLinksResource: - """Gets an API Management WorkspaceLink resource description. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :return: ApiManagementWorkspaceLinksResource or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementWorkspaceLinksResource] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiManagementWorkspaceLinksResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_links_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_links_operations.py deleted file mode 100644 index b4e53d334eee..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_workspace_links_operations.py +++ /dev/null @@ -1,187 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiManagementWorkspaceLinksOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_management_workspace_links` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> ItemPaged["_models.ApiManagementWorkspaceLinksResource"]: - """List all API Management workspaceLinks for a service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either ApiManagementWorkspaceLinksResource or the result - of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiManagementWorkspaceLinksListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiManagementWorkspaceLinksListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py deleted file mode 100644 index d292d5839dae..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py +++ /dev/null @@ -1,1038 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_api_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - tags: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if tags is not None: - _params["tags"] = _SERIALIZER.query("tags", tags, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, api_id: str, operation_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, api_id: str, operation_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiOperationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_operation` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - tags: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.OperationContract"]: - """Lists a collection of the operations for the specified API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param tags: Include tags in the response. Default value is None. - :type tags: str - :return: An iterator like instance of either OperationContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.OperationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - tags=tags, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("OperationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API operation specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, **kwargs: Any - ) -> _models.OperationContract: - """Gets the details of the API Operation specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OperationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - parameters: _models.OperationContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Creates a new operation in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Creates a new operation in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - parameters: Union[_models.OperationContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.OperationContract: - """Creates a new operation in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param parameters: Create parameters. Is either a OperationContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "OperationContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OperationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - if_match: str, - parameters: _models.OperationUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Updates the details of the operation in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Operation Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Updates the details of the operation in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Operation Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - if_match: str, - parameters: Union[_models.OperationUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.OperationContract: - """Updates the details of the operation in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Operation Update parameters. Is either a OperationUpdateContract type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract or IO[bytes] - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "OperationUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OperationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified operation in the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py deleted file mode 100644 index 98ee2363f109..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py +++ /dev/null @@ -1,807 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_operation_request( - resource_group_name: str, service_name: str, api_id: str, operation_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if format is not None: - _params["format"] = _SERIALIZER.query("format", format, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiOperationPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_operation_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_operation( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, **kwargs: Any - ) -> _models.PolicyCollection: - """Get the list of policy configuration at the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :return: PolicyCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - _request = build_list_by_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PolicyCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API operation policy specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the Api Operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py deleted file mode 100644 index bc0066f69c7c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py +++ /dev/null @@ -1,1323 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - tags: Optional[str] = None, - expand_api_version_set: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if tags is not None: - _params["tags"] = _SERIALIZER.query("tags", tags, "str") - if expand_api_version_set is not None: - _params["expandApiVersionSet"] = _SERIALIZER.query("expand_api_version_set", expand_api_version_set, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, api_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - if_match: str, - delete_revisions: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if delete_revisions is not None: - _params["deleteRevisions"] = _SERIALIZER.query("delete_revisions", delete_revisions, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_tags_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - include_not_tagged_apis: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if include_not_tagged_apis is not None: - _params["includeNotTaggedApis"] = _SERIALIZER.query("include_not_tagged_apis", include_not_tagged_apis, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - tags: Optional[str] = None, - expand_api_version_set: Optional[bool] = None, - **kwargs: Any - ) -> ItemPaged["_models.ApiContract"]: - """Lists all APIs of the API Management service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-apis - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| isCurrent | filter | eq, ne | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param tags: Include tags in the response. Default value is None. - :type tags: str - :param expand_api_version_set: Include full ApiVersionSet resource in response. Default value - is None. - :type expand_api_version_set: bool - :return: An iterator like instance of either ApiContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - tags=tags, - expand_api_version_set=expand_api_version_set, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> _models.ApiContract: - """Gets the details of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: Union[_models.ApiCreateOrUpdateParameter, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiCreateOrUpdateParameter") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: _models.ApiCreateOrUpdateParameter, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiContract]: - """Creates new or updates existing specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiContract]: - """Creates new or updates existing specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: Union[_models.ApiCreateOrUpdateParameter, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.ApiContract]: - """Creates new or updates existing specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param parameters: Create or update parameters. Is either a ApiCreateOrUpdateParameter type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of LROPoller that returns either ApiContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - parameters: _models.ApiUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiContract: - """Updates the specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Update Contract parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiContract: - """Updates the specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Update Contract parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - parameters: Union[_models.ApiUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.ApiContract: - """Updates the specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Update Contract parameters. Is either a ApiUpdateContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract or IO[bytes] - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _delete_initial( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - delete_revisions: Optional[bool] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - delete_revisions=delete_revisions, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - delete_revisions: Optional[bool] = None, - **kwargs: Any - ) -> LROPoller[None]: - """Deletes the specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param delete_revisions: Delete all revisions of the Api. Default value is None. - :type delete_revisions: bool - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - if_match=if_match, - delete_revisions=delete_revisions, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_tags( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - include_not_tagged_apis: Optional[bool] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagResourceContract"]: - """Lists a collection of apis associated with tags. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| isCurrent | filter | eq | |
. Default value is - None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param include_not_tagged_apis: Include not tagged APIs. Default value is None. - :type include_not_tagged_apis: bool - :return: An iterator like instance of either TagResourceContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagResourceCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_tags_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - include_not_tagged_apis=include_not_tagged_apis, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagResourceCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py deleted file mode 100644 index 3acd66cece90..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py +++ /dev/null @@ -1,769 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_api_request( - resource_group_name: str, service_name: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop( - "Accept", - "application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml", - ) - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if format is not None: - _params["format"] = _SERIALIZER.query("format", format, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any - ) -> _models.PolicyCollection: - """Get the policy configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: PolicyCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PolicyCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API policy specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py deleted file mode 100644 index 54e1c73d53bc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py +++ /dev/null @@ -1,223 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_apis_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiProductOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_product` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_apis( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ProductContract"]: - """Lists all Products, which the API is part of. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ProductContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_apis_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ProductCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py deleted file mode 100644 index 5a3c6e65b2ba..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py +++ /dev/null @@ -1,1039 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, api_id: str, release_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "releaseId": _SERIALIZER.url( - "release_id", release_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, api_id: str, release_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "releaseId": _SERIALIZER.url( - "release_id", release_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "releaseId": _SERIALIZER.url( - "release_id", release_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "releaseId": _SERIALIZER.url( - "release_id", release_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "releaseId": _SERIALIZER.url( - "release_id", release_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiReleaseOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_release` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ApiReleaseContract"]: - """Lists all releases of an API. An API release is created when making an API Revision current. - Releases are also used to rollback to previous revisions. Results will be paged and can be - constrained by the $top and $skip parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| notes | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiReleaseContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiReleaseContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiReleaseCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiReleaseCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, release_id: str, **kwargs: Any - ) -> bool: - """Returns the etag of an API release. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, api_id: str, release_id: str, **kwargs: Any - ) -> _models.ApiReleaseContract: - """Returns the details of an API release. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiReleaseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - parameters: _models.ApiReleaseContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Creates a new Release for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Creates a new Release for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - parameters: Union[_models.ApiReleaseContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Creates a new Release for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param parameters: Create parameters. Is either a ApiReleaseContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiReleaseContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiReleaseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - if_match: str, - parameters: _models.ApiReleaseContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Updates the details of the release of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Release Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Updates the details of the release of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Release Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - release_id: str, - if_match: str, - parameters: Union[_models.ApiReleaseContract, IO[bytes]], - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Updates the details of the release of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Release Update parameters. Is either a ApiReleaseContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or IO[bytes] - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiReleaseContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiReleaseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, api_id: str, release_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified release in the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py deleted file mode 100644 index 55fc5f12741f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py +++ /dev/null @@ -1,223 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiRevisionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_revision` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ApiRevisionContract"]: - """Lists all revisions of an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| apiRevision - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiRevisionContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiRevisionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiRevisionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py deleted file mode 100644 index 31469d983cb2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py +++ /dev/null @@ -1,898 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_api_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, api_id: str, schema_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, api_id: str, schema_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - schema_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - api_id: str, - schema_id: str, - subscription_id: str, - *, - if_match: str, - force: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if force is not None: - _params["force"] = _SERIALIZER.query("force", force, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiSchemaOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_schema` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.SchemaContract"]: - """Get the schema configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| contentType - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either SchemaContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SchemaCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SchemaCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, schema_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the schema specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, api_id: str, schema_id: str, **kwargs: Any - ) -> _models.SchemaContract: - """Get the schema configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: SchemaContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SchemaContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SchemaContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - api_id: str, - schema_id: str, - parameters: Union[_models.SchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SchemaContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - schema_id: str, - parameters: _models.SchemaContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.SchemaContract]: - """Creates or updates schema configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: The schema contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - schema_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.SchemaContract]: - """Creates or updates schema configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: The schema contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - schema_id: str, - parameters: Union[_models.SchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.SchemaContract]: - """Creates or updates schema configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: The schema contents to apply. Is either a SchemaContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of LROPoller that returns either SchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - schema_id=schema_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("SchemaContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.SchemaContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.SchemaContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - api_id: str, - schema_id: str, - if_match: str, - force: Optional[bool] = None, - **kwargs: Any - ) -> None: - """Deletes the schema configuration at the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param force: If true removes all references to the schema before deleting it. Default value is - None. - :type force: bool - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - force=force, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py deleted file mode 100644 index 3c1905710fb4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py +++ /dev/null @@ -1,825 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - api_id: str, - tag_description_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "tagDescriptionId": _SERIALIZER.url( - "tag_description_id", tag_description_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - api_id: str, - tag_description_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "tagDescriptionId": _SERIALIZER.url( - "tag_description_id", tag_description_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - tag_description_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "tagDescriptionId": _SERIALIZER.url( - "tag_description_id", tag_description_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - api_id: str, - tag_description_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "tagDescriptionId": _SERIALIZER.url( - "tag_description_id", tag_description_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiTagDescriptionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_tag_description` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagDescriptionContract"]: - """Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is - defined on API level but tag may be assigned to the Operations. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagDescriptionContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagDescriptionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagDescriptionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagDescriptionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, tag_description_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_description_id: Tag description identifier. Used when creating tagDescription for - API/Tag association. Based on API and Tag names. Required. - :type tag_description_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_description_id=tag_description_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, api_id: str, tag_description_id: str, **kwargs: Any - ) -> _models.TagDescriptionContract: - """Get Tag description in scope of API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_description_id: Tag description identifier. Used when creating tagDescription for - API/Tag association. Based on API and Tag names. Required. - :type tag_description_id: str - :return: TagDescriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagDescriptionContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_description_id=tag_description_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagDescriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tag_description_id: str, - parameters: _models.TagDescriptionCreateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagDescriptionContract: - """Create/Update tag description in scope of the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_description_id: Tag description identifier. Used when creating tagDescription for - API/Tag association. Based on API and Tag names. Required. - :type tag_description_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagDescriptionCreateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagDescriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tag_description_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagDescriptionContract: - """Create/Update tag description in scope of the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_description_id: Tag description identifier. Used when creating tagDescription for - API/Tag association. Based on API and Tag names. Required. - :type tag_description_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagDescriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tag_description_id: str, - parameters: Union[_models.TagDescriptionCreateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.TagDescriptionContract: - """Create/Update tag description in scope of the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_description_id: Tag description identifier. Used when creating tagDescription for - API/Tag association. Based on API and Tag names. Required. - :type tag_description_id: str - :param parameters: Create parameters. Is either a TagDescriptionCreateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagDescriptionCreateParameters or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: TagDescriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagDescriptionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagDescriptionCreateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_description_id=tag_description_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagDescriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - api_id: str, - tag_description_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Delete tag description for the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_description_id: Tag description identifier. Used when creating tagDescription for - API/Tag association. Based on API and Tag names. Required. - :type tag_description_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_description_id=tag_description_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tool_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tool_operations.py deleted file mode 100644 index 4f9d01c3a5d3..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tool_operations.py +++ /dev/null @@ -1,983 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_api_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "toolId": _SERIALIZER.url( - "tool_id", tool_id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "toolId": _SERIALIZER.url( - "tool_id", tool_id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "toolId": _SERIALIZER.url( - "tool_id", tool_id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "toolId": _SERIALIZER.url( - "tool_id", tool_id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "toolId": _SERIALIZER.url( - "tool_id", tool_id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiToolOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_tool` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ToolContract"]: - """Lists a collection of the MCP tools for the specified API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ToolContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ToolContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ToolCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ToolCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API tool specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tool_id=tool_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any - ) -> _models.ToolContract: - """Gets the details of the API Tool specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tool_id=tool_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ToolContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tool_id: str, - parameters: _models.ToolContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ToolContract: - """Creates a new tool in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ToolContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tool_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ToolContract: - """Creates a new tool in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tool_id: str, - parameters: Union[_models.ToolContract, IO[bytes]], - **kwargs: Any - ) -> _models.ToolContract: - """Creates a new tool in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :param parameters: Create parameters. Is either a ToolContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ToolContract or IO[bytes] - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ToolContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tool_id=tool_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ToolContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tool_id: str, - parameters: _models.ToolContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ToolContract: - """Updates the details of the tool in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :param parameters: API Tool Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ToolContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tool_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ToolContract: - """Updates the details of the tool in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :param parameters: API Tool Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - tool_id: str, - parameters: Union[_models.ToolContract, IO[bytes]], - **kwargs: Any - ) -> _models.ToolContract: - """Updates the details of the tool in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :param parameters: API Tool Update parameters. Is either a ToolContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ToolContract or IO[bytes] - :return: ToolContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ToolContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ToolContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tool_id=tool_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ToolContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any - ) -> None: - """Deletes the specified tool in the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tool_id: Tool identifier within an API. Must be unique in the current API Management - service instance. Required. - :type tool_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tool_id=tool_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py deleted file mode 100644 index 12d8556ed531..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py +++ /dev/null @@ -1,982 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, version_set_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "versionSetId": _SERIALIZER.url( - "version_set_id", version_set_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, version_set_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "versionSetId": _SERIALIZER.url( - "version_set_id", version_set_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - version_set_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "versionSetId": _SERIALIZER.url( - "version_set_id", version_set_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - version_set_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "versionSetId": _SERIALIZER.url( - "version_set_id", version_set_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - version_set_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "versionSetId": _SERIALIZER.url( - "version_set_id", version_set_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiVersionSetOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_version_set` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ApiVersionSetContract"]: - """Lists a collection of API Version Sets in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiVersionSetContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiVersionSetContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiVersionSetCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiVersionSetCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, version_set_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, version_set_id: str, **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Gets the details of the Api Version Set specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiVersionSetContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - version_set_id: str, - parameters: _models.ApiVersionSetContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Creates or Updates a Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - version_set_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Creates or Updates a Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - version_set_id: str, - parameters: Union[_models.ApiVersionSetContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Creates or Updates a Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param parameters: Create or update parameters. Is either a ApiVersionSetContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiVersionSetContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiVersionSetContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - version_set_id: str, - if_match: str, - parameters: _models.ApiVersionSetUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Updates the details of the Api VersionSet specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - version_set_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Updates the details of the Api VersionSet specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - version_set_id: str, - if_match: str, - parameters: Union[_models.ApiVersionSetUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Updates the details of the Api VersionSet specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a ApiVersionSetUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters or IO[bytes] - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiVersionSetUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiVersionSetContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, version_set_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wiki_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wiki_operations.py deleted file mode 100644 index fe6b48f02193..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wiki_operations.py +++ /dev/null @@ -1,798 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, api_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, api_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiWikiOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_wiki` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> _models.WikiContract: - """Gets the details of the Wiki for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WikiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: _models.WikiContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Creates a new Wiki for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Creates a new Wiki for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - parameters: Union[_models.WikiContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.WikiContract: - """Creates a new Wiki for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param parameters: Create parameters. Is either a WikiContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "WikiContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WikiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - parameters: _models.WikiUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Updates the details of the Wiki for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Wiki Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Updates the details of the Wiki for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Wiki Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - if_match: str, - parameters: Union[_models.WikiUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.WikiContract: - """Updates the details of the Wiki for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Wiki Update parameters. Is either a WikiUpdateContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract or IO[bytes] - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "WikiUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WikiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, api_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified Wiki from an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wikis_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wikis_operations.py deleted file mode 100644 index d44458bb27ff..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_wikis_operations.py +++ /dev/null @@ -1,222 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ApiWikisOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`api_wikis` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.WikiContract"]: - """Gets the wikis for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | eq | contains |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either WikiContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.WikiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WikiCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("WikiCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_access_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_access_policy_operations.py deleted file mode 100644 index fb35c521db50..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_access_policy_operations.py +++ /dev/null @@ -1,783 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_authorization_request( - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "authorizationId": _SERIALIZER.url( - "authorization_id", authorization_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - authorization_access_policy_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "authorizationId": _SERIALIZER.url( - "authorization_id", authorization_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "authorizationAccessPolicyId": _SERIALIZER.url( - "authorization_access_policy_id", - authorization_access_policy_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - authorization_access_policy_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "authorizationId": _SERIALIZER.url( - "authorization_id", authorization_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "authorizationAccessPolicyId": _SERIALIZER.url( - "authorization_access_policy_id", - authorization_access_policy_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - authorization_access_policy_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "authorizationId": _SERIALIZER.url( - "authorization_id", authorization_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "authorizationAccessPolicyId": _SERIALIZER.url( - "authorization_access_policy_id", - authorization_access_policy_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class AuthorizationAccessPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`authorization_access_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_authorization( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.AuthorizationAccessPolicyContract"]: - """Lists a collection of authorization access policy defined within a authorization. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either AuthorizationAccessPolicyContract or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationAccessPolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_authorization_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AuthorizationAccessPolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - authorization_access_policy_id: str, - **kwargs: Any - ) -> _models.AuthorizationAccessPolicyContract: - """Gets the details of the authorization access policy specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param authorization_access_policy_id: Identifier of the authorization access policy. Required. - :type authorization_access_policy_id: str - :return: AuthorizationAccessPolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationAccessPolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - authorization_access_policy_id=authorization_access_policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationAccessPolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - authorization_access_policy_id: str, - parameters: _models.AuthorizationAccessPolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationAccessPolicyContract: - """Creates or updates Authorization Access Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param authorization_access_policy_id: Identifier of the authorization access policy. Required. - :type authorization_access_policy_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationAccessPolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - authorization_access_policy_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationAccessPolicyContract: - """Creates or updates Authorization Access Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param authorization_access_policy_id: Identifier of the authorization access policy. Required. - :type authorization_access_policy_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationAccessPolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - authorization_access_policy_id: str, - parameters: Union[_models.AuthorizationAccessPolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.AuthorizationAccessPolicyContract: - """Creates or updates Authorization Access Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param authorization_access_policy_id: Identifier of the authorization access policy. Required. - :type authorization_access_policy_id: str - :param parameters: Create parameters. Is either a AuthorizationAccessPolicyContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract or - IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: AuthorizationAccessPolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AuthorizationAccessPolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationAccessPolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - authorization_access_policy_id=authorization_access_policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationAccessPolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - authorization_access_policy_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific access policy from the Authorization. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param authorization_access_policy_id: Identifier of the authorization access policy. Required. - :type authorization_access_policy_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - authorization_access_policy_id=authorization_access_policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_login_links_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_login_links_operations.py deleted file mode 100644 index 2e3adb3474cf..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_login_links_operations.py +++ /dev/null @@ -1,274 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_post_request( - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "authorizationId": _SERIALIZER.url( - "authorization_id", authorization_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class AuthorizationLoginLinksOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`authorization_login_links` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - def post( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: _models.AuthorizationLoginRequestContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationLoginResponseContract: - """Gets authorization login links. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationLoginRequestContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationLoginResponseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def post( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationLoginResponseContract: - """Gets authorization login links. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationLoginResponseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def post( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: Union[_models.AuthorizationLoginRequestContract, IO[bytes]], - **kwargs: Any - ) -> _models.AuthorizationLoginResponseContract: - """Gets authorization login links. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Is either a AuthorizationLoginRequestContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationLoginRequestContract or - IO[bytes] - :return: AuthorizationLoginResponseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AuthorizationLoginResponseContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationLoginRequestContract") - - _request = build_post_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationLoginResponseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_operations.py deleted file mode 100644 index 6a65222b2027..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_operations.py +++ /dev/null @@ -1,942 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_authorization_provider_request( # pylint: disable=name-too-long - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "authorizationId": _SERIALIZER.url( - "authorization_id", authorization_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "authorizationId": _SERIALIZER.url( - "authorization_id", authorization_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "authorizationId": _SERIALIZER.url( - "authorization_id", authorization_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_confirm_consent_code_request( - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "authorizationId": _SERIALIZER.url( - "authorization_id", authorization_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class AuthorizationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`authorization` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_authorization_provider( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.AuthorizationContract"]: - """Lists a collection of authorization providers defined within a authorization provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either AuthorizationContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.AuthorizationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_authorization_provider_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AuthorizationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - **kwargs: Any - ) -> _models.AuthorizationContract: - """Gets the details of the authorization specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :return: AuthorizationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: _models.AuthorizationContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationContract: - """Creates or updates authorization. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationContract: - """Creates or updates authorization. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: Union[_models.AuthorizationContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.AuthorizationContract: - """Creates or updates authorization. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Is either a AuthorizationContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: AuthorizationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AuthorizationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific Authorization from the Authorization provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - def confirm_consent_code( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: _models.AuthorizationConfirmConsentCodeRequestContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Confirm valid consent code to suppress Authorizations anti-phishing page. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Required. - :type parameters: - ~azure.mgmt.apimanagement.models.AuthorizationConfirmConsentCodeRequestContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def confirm_consent_code( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Confirm valid consent code to suppress Authorizations anti-phishing page. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def confirm_consent_code( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - authorization_id: str, - parameters: Union[_models.AuthorizationConfirmConsentCodeRequestContract, IO[bytes]], - **kwargs: Any - ) -> None: - """Confirm valid consent code to suppress Authorizations anti-phishing page. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param authorization_id: Identifier of the authorization. Required. - :type authorization_id: str - :param parameters: Create parameters. Is either a - AuthorizationConfirmConsentCodeRequestContract type or a IO[bytes] type. Required. - :type parameters: - ~azure.mgmt.apimanagement.models.AuthorizationConfirmConsentCodeRequestContract or IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationConfirmConsentCodeRequestContract") - - _request = build_confirm_consent_code_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - authorization_id=authorization_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_provider_operations.py deleted file mode 100644 index aa445e152a78..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_provider_operations.py +++ /dev/null @@ -1,788 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, authorization_provider_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_refresh_secret_request( - resource_group_name: str, service_name: str, authorization_provider_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/refreshSecret", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authorizationProviderId": _SERIALIZER.url( - "authorization_provider_id", - authorization_provider_id, - "str", - max_length=256, - min_length=1, - pattern=r"^[^*#&+:<>?]+$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class AuthorizationProviderOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`authorization_provider` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.AuthorizationProviderContract"]: - """Lists a collection of authorization providers defined within a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either AuthorizationProviderContract or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.AuthorizationProviderContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationProviderCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AuthorizationProviderCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, authorization_provider_id: str, **kwargs: Any - ) -> _models.AuthorizationProviderContract: - """Gets the details of the authorization provider specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :return: AuthorizationProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - parameters: _models.AuthorizationProviderContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationProviderContract: - """Creates or updates authorization provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationProviderContract: - """Creates or updates authorization provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - authorization_provider_id: str, - parameters: Union[_models.AuthorizationProviderContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.AuthorizationProviderContract: - """Creates or updates authorization provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param parameters: Create parameters. Is either a AuthorizationProviderContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: AuthorizationProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationProviderContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, authorization_provider_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific authorization provider from the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def refresh_secret( - self, resource_group_name: str, service_name: str, authorization_provider_id: str, **kwargs: Any - ) -> _models.AuthorizationProviderContract: - """Refreshes the Key Vault reference secret for the specified authorization provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authorization_provider_id: Identifier of the authorization provider. Required. - :type authorization_provider_id: str - :return: AuthorizationProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) - - _request = build_refresh_secret_request( - resource_group_name=resource_group_name, - service_name=service_name, - authorization_provider_id=authorization_provider_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py deleted file mode 100644 index 72c2561259f9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py +++ /dev/null @@ -1,1063 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, authsid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authsid": _SERIALIZER.url("authsid", authsid, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, authsid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authsid": _SERIALIZER.url("authsid", authsid, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - authsid: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authsid": _SERIALIZER.url("authsid", authsid, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, authsid: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authsid": _SERIALIZER.url("authsid", authsid, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, authsid: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authsid": _SERIALIZER.url("authsid", authsid, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_secrets_request( - resource_group_name: str, service_name: str, authsid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}/listSecrets", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "authsid": _SERIALIZER.url("authsid", authsid, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class AuthorizationServerOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`authorization_server` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.AuthorizationServerContract"]: - """Lists a collection of authorization servers defined within a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either AuthorizationServerContract or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.AuthorizationServerContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationServerCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AuthorizationServerCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, authsid: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - authsid=authsid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, authsid: str, **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Gets the details of the authorization server specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationServerContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - authsid=authsid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationServerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - authsid: str, - parameters: _models.AuthorizationServerContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Creates new authorization server or updates an existing authorization server. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - authsid: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Creates new authorization server or updates an existing authorization server. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - authsid: str, - parameters: Union[_models.AuthorizationServerContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Creates new authorization server or updates an existing authorization server. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param parameters: Create or update parameters. Is either a AuthorizationServerContract type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AuthorizationServerContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationServerContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - authsid=authsid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationServerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - authsid: str, - if_match: str, - parameters: _models.AuthorizationServerUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Updates the details of the authorization server specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: OAuth2 Server settings Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - authsid: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Updates the details of the authorization server specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: OAuth2 Server settings Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - authsid: str, - if_match: str, - parameters: Union[_models.AuthorizationServerUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.AuthorizationServerContract: - """Updates the details of the authorization server specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: OAuth2 Server settings Update parameters. Is either a - AuthorizationServerUpdateContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerUpdateContract or - IO[bytes] - :return: AuthorizationServerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AuthorizationServerContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AuthorizationServerUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - authsid=authsid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationServerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, authsid: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific authorization server instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - authsid=authsid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_secrets( - self, resource_group_name: str, service_name: str, authsid: str, **kwargs: Any - ) -> _models.AuthorizationServerSecretsContract: - """Gets the client secret details of the authorization server. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param authsid: Identifier of the authorization server. Required. - :type authsid: str - :return: AuthorizationServerSecretsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerSecretsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AuthorizationServerSecretsContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - authsid=authsid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AuthorizationServerSecretsContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py deleted file mode 100644 index 91fe0efb14d7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py +++ /dev/null @@ -1,1156 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, backend_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "backendId": _SERIALIZER.url("backend_id", backend_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, backend_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "backendId": _SERIALIZER.url("backend_id", backend_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - backend_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "backendId": _SERIALIZER.url("backend_id", backend_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, backend_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "backendId": _SERIALIZER.url("backend_id", backend_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, backend_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "backendId": _SERIALIZER.url("backend_id", backend_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_reconnect_request( - resource_group_name: str, service_name: str, backend_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "backendId": _SERIALIZER.url("backend_id", backend_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class BackendOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`backend` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.BackendContract"]: - """Lists a collection of backends in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either BackendContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.BackendContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BackendCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("BackendCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, backend_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the backend specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, backend_id: str, **kwargs: Any - ) -> _models.BackendContract: - """Gets the details of the backend specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("BackendContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - parameters: _models.BackendContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Creates or Updates a backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Creates or Updates a backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - parameters: Union[_models.BackendContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.BackendContract: - """Creates or Updates a backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Create parameters. Is either a BackendContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "BackendContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("BackendContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - if_match: str, - parameters: _models.BackendUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Updates an existing backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Updates an existing backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - if_match: str, - parameters: Union[_models.BackendUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.BackendContract: - """Updates an existing backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a BackendUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters or IO[bytes] - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "BackendUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("BackendContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, backend_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - def reconnect( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - parameters: Optional[_models.BackendReconnectContract] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Notifies the API Management gateway to create a new connection to the backend after the - specified timeout. If no timeout was specified, timeout of 2 minutes is used. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Reconnect request parameters. Default value is None. - :type parameters: ~azure.mgmt.apimanagement.models.BackendReconnectContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def reconnect( - self, - resource_group_name: str, - service_name: str, - backend_id: str, - parameters: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Notifies the API Management gateway to create a new connection to the backend after the - specified timeout. If no timeout was specified, timeout of 2 minutes is used. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Reconnect request parameters. Default value is None. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def reconnect( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - backend_id: str, - parameters: Optional[Union[_models.BackendReconnectContract, IO[bytes]]] = None, - **kwargs: Any - ) -> None: - """Notifies the API Management gateway to create a new connection to the backend after the - specified timeout. If no timeout was specified, timeout of 2 minutes is used. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Reconnect request parameters. Is either a BackendReconnectContract type or a - IO[bytes] type. Default value is None. - :type parameters: ~azure.mgmt.apimanagement.models.BackendReconnectContract or IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if parameters else None - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - if parameters is not None: - _json = self._serialize.body(parameters, "BackendReconnectContract") - else: - _json = None - - _request = build_reconnect_request( - resource_group_name=resource_group_name, - service_name=service_name, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py deleted file mode 100644 index 8fb8dc6a2385..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py +++ /dev/null @@ -1,957 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, cache_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "cacheId": _SERIALIZER.url("cache_id", cache_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, cache_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "cacheId": _SERIALIZER.url("cache_id", cache_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - cache_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "cacheId": _SERIALIZER.url("cache_id", cache_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, cache_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "cacheId": _SERIALIZER.url("cache_id", cache_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, cache_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "cacheId": _SERIALIZER.url("cache_id", cache_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class CacheOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`cache` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.CacheContract"]: - """Lists a collection of all external Caches in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either CacheContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.CacheContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CacheCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("CacheCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, cache_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the Cache specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - cache_id=cache_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, cache_id: str, **kwargs: Any) -> _models.CacheContract: - """Gets the details of the Cache specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CacheContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - cache_id=cache_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CacheContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - cache_id: str, - parameters: _models.CacheContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheContract: - """Creates or updates an External Cache to be used in Api Management instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-cache-external - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param parameters: Create or Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CacheContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - cache_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheContract: - """Creates or updates an External Cache to be used in Api Management instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-cache-external - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param parameters: Create or Update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - cache_id: str, - parameters: Union[_models.CacheContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.CacheContract: - """Creates or updates an External Cache to be used in Api Management instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-cache-external - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param parameters: Create or Update parameters. Is either a CacheContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CacheContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CacheContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "CacheContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - cache_id=cache_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CacheContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - cache_id: str, - if_match: str, - parameters: _models.CacheUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheContract: - """Updates the details of the cache specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CacheUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - cache_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheContract: - """Updates the details of the cache specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - cache_id: str, - if_match: str, - parameters: Union[_models.CacheUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.CacheContract: - """Updates the details of the cache specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a CacheUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CacheUpdateParameters or IO[bytes] - :return: CacheContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CacheContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CacheContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "CacheUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - cache_id=cache_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CacheContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, cache_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific Cache. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' - or valid Azure region identifier). Required. - :type cache_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - cache_id=cache_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py deleted file mode 100644 index b6c75163c554..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py +++ /dev/null @@ -1,906 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - is_key_vault_refresh_failed: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if is_key_vault_refresh_failed is not None: - _params["isKeyVaultRefreshFailed"] = _SERIALIZER.query( - "is_key_vault_refresh_failed", is_key_vault_refresh_failed, "bool" - ) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, certificate_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, certificate_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - certificate_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - certificate_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_refresh_secret_request( - resource_group_name: str, service_name: str, certificate_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}/refreshSecret", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class CertificateOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`certificate` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - is_key_vault_refresh_failed: Optional[bool] = None, - **kwargs: Any - ) -> ItemPaged["_models.CertificateContract"]: - """Lists a collection of all certificates in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param is_key_vault_refresh_failed: When set to true, the response contains only certificates - entities which failed refresh. Default value is None. - :type is_key_vault_refresh_failed: bool - :return: An iterator like instance of either CertificateContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.CertificateContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - is_key_vault_refresh_failed=is_key_vault_refresh_failed, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("CertificateCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, certificate_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the certificate specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, certificate_id: str, **kwargs: Any - ) -> _models.CertificateContract: - """Gets the details of the certificate specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CertificateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - certificate_id: str, - parameters: _models.CertificateCreateOrUpdateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateContract: - """Creates or updates the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Create or Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - certificate_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateContract: - """Creates or updates the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Create or Update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - certificate_id: str, - parameters: Union[_models.CertificateCreateOrUpdateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.CertificateContract: - """Creates or updates the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Create or Update parameters. Is either a CertificateCreateOrUpdateParameters - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters or - IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "CertificateCreateOrUpdateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CertificateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, certificate_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific certificate. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def refresh_secret( - self, resource_group_name: str, service_name: str, certificate_id: str, **kwargs: Any - ) -> _models.CertificateContract: - """From KeyVault, Refresh the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) - - _request = build_refresh_secret_request( - resource_group_name=resource_group_name, - service_name=service_name, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CertificateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_operations.py deleted file mode 100644 index dbe1d9e50621..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_operations.py +++ /dev/null @@ -1,848 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "clientApplicationId": _SERIALIZER.url( - "client_application_id", client_application_id, "str", max_length=256, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "clientApplicationId": _SERIALIZER.url( - "client_application_id", client_application_id, "str", max_length=256, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "clientApplicationId": _SERIALIZER.url( - "client_application_id", client_application_id, "str", max_length=256, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "clientApplicationId": _SERIALIZER.url( - "client_application_id", client_application_id, "str", max_length=256, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_secrets_request( - resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/listSecrets", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "clientApplicationId": _SERIALIZER.url( - "client_application_id", client_application_id, "str", max_length=256, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class ClientApplicationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`client_application` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ClientApplicationContract"]: - """Lists a collection of client applications in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
state | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
|. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ClientApplicationContract or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ClientApplicationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientApplicationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ClientApplicationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any - ) -> _models.ClientApplicationContract: - """Gets the details of the client application specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :return: ClientApplicationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientApplicationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ClientApplicationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - parameters: _models.ClientApplicationContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ClientApplicationContract: - """Creates or Updates a client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ClientApplicationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ClientApplicationContract: - """Creates or Updates a client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ClientApplicationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - parameters: Union[_models.ClientApplicationContract, IO[bytes]], - **kwargs: Any - ) -> _models.ClientApplicationContract: - """Creates or Updates a client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param parameters: Create or update parameters. Is either a ClientApplicationContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationContract or IO[bytes] - :return: ClientApplicationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ClientApplicationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ClientApplicationContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ClientApplicationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any - ) -> None: - """Delete client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_secrets( - self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any - ) -> _models.ClientApplicationSecretsContract: - """Retrived client application secrets. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :return: ClientApplicationSecretsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationSecretsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientApplicationSecretsContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ClientApplicationSecretsContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_product_link_operations.py deleted file mode 100644 index 5ec26326cbc7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_client_application_product_link_operations.py +++ /dev/null @@ -1,694 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_client_applications_request( # pylint: disable=name-too-long - resource_group_name: str, - service_name: str, - client_application_id: str, - subscription_id: str, - *, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "clientApplicationId": _SERIALIZER.url( - "client_application_id", client_application_id, "str", max_length=256, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - client_application_id: str, - client_application_product_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks/{clientApplicationProductLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "clientApplicationId": _SERIALIZER.url( - "client_application_id", client_application_id, "str", max_length=256, min_length=1 - ), - "clientApplicationProductLinkId": _SERIALIZER.url( - "client_application_product_link_id", - client_application_product_link_id, - "str", - max_length=256, - min_length=1, - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, - service_name: str, - client_application_id: str, - client_application_product_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks/{clientApplicationProductLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "clientApplicationId": _SERIALIZER.url( - "client_application_id", client_application_id, "str", max_length=256, min_length=1 - ), - "clientApplicationProductLinkId": _SERIALIZER.url( - "client_application_product_link_id", - client_application_product_link_id, - "str", - max_length=256, - min_length=1, - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - client_application_id: str, - client_application_product_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks/{clientApplicationProductLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "clientApplicationId": _SERIALIZER.url( - "client_application_id", client_application_id, "str", max_length=256, min_length=1 - ), - "clientApplicationProductLinkId": _SERIALIZER.url( - "client_application_product_link_id", - client_application_product_link_id, - "str", - max_length=256, - min_length=1, - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ClientApplicationProductLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`client_application_product_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_client_applications( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ClientApplicationProductLinkContract"]: - """Lists a collection of product links associated with the specified client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ClientApplicationProductLinkContract or the result - of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientApplicationProductLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_client_applications_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - subscription_id=self._config.subscription_id, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ClientApplicationProductLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - client_application_product_link_id: str, - **kwargs: Any - ) -> _models.ClientApplicationProductLinkContract: - """Gets the product link for the client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param client_application_product_link_id: Client Application Product Link identifier. Must be - unique in the current API Management service instance. Required. - :type client_application_product_link_id: str - :return: ClientApplicationProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientApplicationProductLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - client_application_product_link_id=client_application_product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ClientApplicationProductLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - client_application_product_link_id: str, - parameters: _models.ClientApplicationProductLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ClientApplicationProductLinkContract: - """Adds an Product to the specified Client Application via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param client_application_product_link_id: Client Application Product Link identifier. Must be - unique in the current API Management service instance. Required. - :type client_application_product_link_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ClientApplicationProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - client_application_product_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ClientApplicationProductLinkContract: - """Adds an Product to the specified Client Application via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param client_application_product_link_id: Client Application Product Link identifier. Must be - unique in the current API Management service instance. Required. - :type client_application_product_link_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ClientApplicationProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create( - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - client_application_product_link_id: str, - parameters: Union[_models.ClientApplicationProductLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.ClientApplicationProductLinkContract: - """Adds an Product to the specified Client Application via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param client_application_product_link_id: Client Application Product Link identifier. Must be - unique in the current API Management service instance. Required. - :type client_application_product_link_id: str - :param parameters: Create parameters. Is either a ClientApplicationProductLinkContract type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract or - IO[bytes] - :return: ClientApplicationProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ClientApplicationProductLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ClientApplicationProductLinkContract") - - _request = build_create_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - client_application_product_link_id=client_application_product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ClientApplicationProductLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - client_application_id: str, - client_application_product_link_id: str, - **kwargs: Any - ) -> None: - """Deletes the specified Product from the specified client application. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param client_application_id: Client Application identifier. Must be unique in the current API - Management service instance. Required. - :type client_application_id: str - :param client_application_product_link_id: Client Application Product Link identifier. Must be - unique in the current API Management service instance. Required. - :type client_application_product_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - client_application_id=client_application_id, - client_application_product_link_id=client_application_product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py deleted file mode 100644 index d333d1d60ff4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py +++ /dev/null @@ -1,769 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, content_type_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - content_type_id: str, - content_item_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str", max_length=80, min_length=1), - "contentItemId": _SERIALIZER.url("content_item_id", content_item_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - content_type_id: str, - content_item_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str", max_length=80, min_length=1), - "contentItemId": _SERIALIZER.url("content_item_id", content_item_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - content_type_id: str, - content_item_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str", max_length=80, min_length=1), - "contentItemId": _SERIALIZER.url("content_item_id", content_item_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - content_type_id: str, - content_item_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str", max_length=80, min_length=1), - "contentItemId": _SERIALIZER.url("content_item_id", content_item_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ContentItemOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`content_item` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, content_type_id: str, **kwargs: Any - ) -> ItemPaged["_models.ContentItemContract"]: - """Lists developer portal's content items specified by the provided content type. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :return: An iterator like instance of either ContentItemContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ContentItemContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ContentItemCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ContentItemCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, content_type_id: str, content_item_id: str, **kwargs: Any - ) -> bool: - """Returns the entity state (ETag) version of the developer portal's content item specified by its - identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param content_item_id: Content item identifier. Required. - :type content_item_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - content_item_id=content_item_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, content_type_id: str, content_item_id: str, **kwargs: Any - ) -> _models.ContentItemContract: - """Returns the developer portal's content item specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param content_item_id: Content item identifier. Required. - :type content_item_id: str - :return: ContentItemContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ContentItemContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - content_item_id=content_item_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ContentItemContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - content_item_id: str, - parameters: _models.ContentItemContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ContentItemContract: - """Creates a new developer portal's content item specified by the provided content type. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param content_item_id: Content item identifier. Required. - :type content_item_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ContentItemContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ContentItemContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - content_item_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ContentItemContract: - """Creates a new developer portal's content item specified by the provided content type. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param content_item_id: Content item identifier. Required. - :type content_item_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ContentItemContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - content_item_id: str, - parameters: Union[_models.ContentItemContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ContentItemContract: - """Creates a new developer portal's content item specified by the provided content type. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param content_item_id: Content item identifier. Required. - :type content_item_id: str - :param parameters: Create or update parameters. Is either a ContentItemContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ContentItemContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ContentItemContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ContentItemContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ContentItemContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - content_item_id=content_item_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ContentItemContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - content_item_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Removes the specified developer portal's content item. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param content_item_id: Content item identifier. Required. - :type content_item_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - content_item_id=content_item_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py deleted file mode 100644 index f3e6cc497f86..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py +++ /dev/null @@ -1,628 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, content_type_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - content_type_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - content_type_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ContentTypeOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`content_type` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> ItemPaged["_models.ContentTypeContract"]: - """Lists the developer portal's content types. Content types describe content items' properties, - validation rules, and constraints. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either ContentTypeContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ContentTypeContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ContentTypeCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ContentTypeCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, content_type_id: str, **kwargs: Any - ) -> _models.ContentTypeContract: - """Gets the details of the developer portal's content type. Content types describe content items' - properties, validation rules, and constraints. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :return: ContentTypeContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ContentTypeContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ContentTypeContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - parameters: _models.ContentTypeContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ContentTypeContract: - """Creates or updates the developer portal's content type. Content types describe content items' - properties, validation rules, and constraints. Custom content types' identifiers need to start - with the ``c-`` prefix. Built-in content types can't be modified. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ContentTypeContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ContentTypeContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ContentTypeContract: - """Creates or updates the developer portal's content type. Content types describe content items' - properties, validation rules, and constraints. Custom content types' identifiers need to start - with the ``c-`` prefix. Built-in content types can't be modified. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ContentTypeContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - content_type_id: str, - parameters: Union[_models.ContentTypeContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ContentTypeContract: - """Creates or updates the developer portal's content type. Content types describe content items' - properties, validation rules, and constraints. Custom content types' identifiers need to start - with the ``c-`` prefix. Built-in content types can't be modified. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param parameters: Create or update parameters. Is either a ContentTypeContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ContentTypeContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ContentTypeContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ContentTypeContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ContentTypeContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ContentTypeContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, content_type_id: str, if_match: str, **kwargs: Any - ) -> None: - """Removes the specified developer portal's content type. Content types describe content items' - properties, validation rules, and constraints. Built-in content types (with identifiers - starting with the ``c-`` prefix) can't be removed. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param content_type_id: Content type identifier. Required. - :type content_type_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - content_type_id=content_type_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py deleted file mode 100644 index 5e77b4569879..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py +++ /dev/null @@ -1,736 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, service_name: str, subscription_id: str, *, if_match: Optional[str] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_secrets_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class DelegationSettingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`delegation_settings` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the DelegationSettings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.PortalDelegationSettings: - """Get Delegation Settings for the Portal. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: PortalDelegationSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalDelegationSettings] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PortalDelegationSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: _models.PortalDelegationSettings, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Update Delegation settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Delegation settings. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Update Delegation settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Delegation settings. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: Union[_models.PortalDelegationSettings, IO[bytes]], - **kwargs: Any - ) -> None: - """Update Delegation settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Delegation settings. Is either a PortalDelegationSettings type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings or IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalDelegationSettings") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: _models.PortalDelegationSettings, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalDelegationSettings: - """Create or Update Delegation settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalDelegationSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalDelegationSettings: - """Create or Update Delegation settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalDelegationSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.PortalDelegationSettings, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PortalDelegationSettings: - """Create or Update Delegation settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Is either a PortalDelegationSettings type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PortalDelegationSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalDelegationSettings] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalDelegationSettings") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalDelegationSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_secrets( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> _models.PortalSettingValidationKeyContract: - """Gets the secret validation key of the DelegationSettings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: PortalSettingValidationKeyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSettingValidationKeyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalSettingValidationKeyContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalSettingValidationKeyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py deleted file mode 100644 index f7073e2e46ba..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py +++ /dev/null @@ -1,416 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Iterator, Optional, TypeVar, Union, cast -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/deletedservices" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_by_name_request(service_name: str, location: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", - ) - path_format_arguments = { - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_purge_request(service_name: str, location: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", - ) - path_format_arguments = { - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class DeletedServicesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`deleted_services` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.DeletedServiceContract"]: - """Lists all soft-deleted services available for undelete for the given subscription. - - :return: An iterator like instance of either DeletedServiceContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.DeletedServiceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DeletedServicesCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DeletedServicesCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_by_name(self, service_name: str, location: str, **kwargs: Any) -> _models.DeletedServiceContract: - """Get soft-deleted Api Management Service by name. - - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param location: The location of the deleted API Management service. Required. - :type location: str - :return: DeletedServiceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DeletedServiceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DeletedServiceContract] = kwargs.pop("cls", None) - - _request = build_get_by_name_request( - service_name=service_name, - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DeletedServiceContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _purge_initial(self, service_name: str, location: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_purge_request( - service_name=service_name, - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_purge(self, service_name: str, location: str, **kwargs: Any) -> LROPoller[_models.DeletedServiceContract]: - """Purges Api Management Service (deletes it with no option to undelete). - - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param location: The location of the deleted API Management service. Required. - :type location: str - :return: An instance of LROPoller that returns either DeletedServiceContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.DeletedServiceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._purge_initial( - service_name=service_name, - location=location, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = self._deserialize("DeletedServiceContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.DeletedServiceContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.DeletedServiceContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py deleted file mode 100644 index 68336bd6e1b4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py +++ /dev/null @@ -1,982 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, diagnostic_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, diagnostic_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - diagnostic_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - diagnostic_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - diagnostic_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class DiagnosticOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`diagnostic` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.DiagnosticContract"]: - """Lists all diagnostics of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either DiagnosticContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DiagnosticCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, diagnostic_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, diagnostic_id: str, **kwargs: Any - ) -> _models.DiagnosticContract: - """Gets the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - diagnostic_id: str, - parameters: _models.DiagnosticContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - diagnostic_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - diagnostic_id: str, - parameters: Union[_models.DiagnosticContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Is either a DiagnosticContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - diagnostic_id: str, - if_match: str, - parameters: _models.DiagnosticContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - diagnostic_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - diagnostic_id: str, - if_match: str, - parameters: Union[_models.DiagnosticContract, IO[bytes]], - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Is either a DiagnosticContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or IO[bytes] - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, diagnostic_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified Diagnostic. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_documentation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_documentation_operations.py deleted file mode 100644 index 64118940932e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_documentation_operations.py +++ /dev/null @@ -1,982 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, documentation_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "documentationId": _SERIALIZER.url( - "documentation_id", documentation_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, documentation_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "documentationId": _SERIALIZER.url( - "documentation_id", documentation_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - documentation_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "documentationId": _SERIALIZER.url( - "documentation_id", documentation_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - documentation_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "documentationId": _SERIALIZER.url( - "documentation_id", documentation_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - documentation_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "documentationId": _SERIALIZER.url( - "documentation_id", documentation_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class DocumentationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`documentation` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.DocumentationContract"]: - """Lists all Documentations of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | eq | contains |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either DocumentationContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.DocumentationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DocumentationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DocumentationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, documentation_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the Documentation by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - documentation_id=documentation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, documentation_id: str, **kwargs: Any - ) -> _models.DocumentationContract: - """Gets the details of the Documentation specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DocumentationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - documentation_id=documentation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DocumentationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - documentation_id: str, - parameters: _models.DocumentationContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DocumentationContract: - """Creates a new Documentation or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DocumentationContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - documentation_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DocumentationContract: - """Creates a new Documentation or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - documentation_id: str, - parameters: Union[_models.DocumentationContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.DocumentationContract: - """Creates a new Documentation or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param parameters: Create parameters. Is either a DocumentationContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DocumentationContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DocumentationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DocumentationContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - documentation_id=documentation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DocumentationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - documentation_id: str, - if_match: str, - parameters: _models.DocumentationUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DocumentationContract: - """Updates the details of the Documentation for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Documentation Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DocumentationUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - documentation_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DocumentationContract: - """Updates the details of the Documentation for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Documentation Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - documentation_id: str, - if_match: str, - parameters: Union[_models.DocumentationUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.DocumentationContract: - """Updates the details of the Documentation for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Documentation Update parameters. Is either a DocumentationUpdateContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DocumentationUpdateContract or IO[bytes] - :return: DocumentationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DocumentationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DocumentationUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - documentation_id=documentation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DocumentationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, documentation_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified Documentation from an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param documentation_id: Documentation identifier. Must be unique in the current API Management - service instance. Required. - :type documentation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - documentation_id=documentation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py deleted file mode 100644 index 6779e6f8dc60..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py +++ /dev/null @@ -1,1047 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "templateName": _SERIALIZER.url("template_name", template_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "templateName": _SERIALIZER.url("template_name", template_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "templateName": _SERIALIZER.url("template_name", template_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "templateName": _SERIALIZER.url("template_name", template_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "templateName": _SERIALIZER.url("template_name", template_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class EmailTemplateOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`email_template` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.EmailTemplateContract"]: - """Gets all email templates. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either EmailTemplateContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.EmailTemplateContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EmailTemplateCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("EmailTemplateCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the email template specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - template_name=template_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Gets the details of the email template specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EmailTemplateContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - template_name=template_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("EmailTemplateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - parameters: _models.EmailTemplateUpdateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Updates an Email Template. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param parameters: Email Template update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Updates an Email Template. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param parameters: Email Template update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - parameters: Union[_models.EmailTemplateUpdateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Updates an Email Template. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param parameters: Email Template update parameters. Is either a EmailTemplateUpdateParameters - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.EmailTemplateContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "EmailTemplateUpdateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - template_name=template_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("EmailTemplateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - if_match: str, - parameters: _models.EmailTemplateUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Updates API Management email template. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Updates API Management email template. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - if_match: str, - parameters: Union[_models.EmailTemplateUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.EmailTemplateContract: - """Updates API Management email template. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a EmailTemplateUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters or IO[bytes] - :return: EmailTemplateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.EmailTemplateContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "EmailTemplateUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - template_name=template_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("EmailTemplateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - template_name: Union[str, _models.TemplateName], - if_match: str, - **kwargs: Any - ) -> None: - """Reset the Email Template to default template provided by the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param template_name: Email Template Name Identifier. Known values are: - "applicationApprovedNotificationMessage", "accountClosedDeveloper", - "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", - "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", - "confirmSignUpIdentityDefault", "newIssueNotificationMessage", - "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", - "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and - "requestDeveloperNotificationMessage". Required. - :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - template_name=template_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py deleted file mode 100644 index 4a0a48d0c0bc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py +++ /dev/null @@ -1,651 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - gateway_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, gateway_id: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, service_name: str, gateway_id: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, gateway_id: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class GatewayApiOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`gateway_api` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ApiContract"]: - """Lists a collection of the APIs associated with a gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, gateway_id: str, api_id: str, **kwargs: Any - ) -> bool: - """Checks that API entity specified by identifier is associated with the Gateway entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - api_id: str, - parameters: Optional[_models.AssociationContract] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiContract: - """Adds an API to the specified Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param parameters: Default value is None. - :type parameters: ~azure.mgmt.apimanagement.models.AssociationContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - api_id: str, - parameters: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiContract: - """Adds an API to the specified Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param parameters: Default value is None. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - api_id: str, - parameters: Optional[Union[_models.AssociationContract, IO[bytes]]] = None, - **kwargs: Any - ) -> _models.ApiContract: - """Adds an API to the specified Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param parameters: Is either a AssociationContract type or a IO[bytes] type. Default value is - None. - :type parameters: ~azure.mgmt.apimanagement.models.AssociationContract or IO[bytes] - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if parameters else None - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - if parameters is not None: - _json = self._serialize.body(parameters, "AssociationContract") - else: - _json = None - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, gateway_id: str, api_id: str, **kwargs: Any - ) -> None: - """Deletes the specified API from the specified Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py deleted file mode 100644 index 52622e06477b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py +++ /dev/null @@ -1,824 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - gateway_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - gateway_id: str, - certificate_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - gateway_id: str, - certificate_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - gateway_id: str, - certificate_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - gateway_id: str, - certificate_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class GatewayCertificateAuthorityOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`gateway_certificate_authority` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.GatewayCertificateAuthorityContract"]: - """Lists the collection of Certificate Authorities for the specified Gateway entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | eq, ne | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GatewayCertificateAuthorityContract or the result - of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayCertificateAuthorityCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("GatewayCertificateAuthorityCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, gateway_id: str, certificate_id: str, **kwargs: Any - ) -> bool: - """Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, gateway_id: str, certificate_id: str, **kwargs: Any - ) -> _models.GatewayCertificateAuthorityContract: - """Get assigned Gateway Certificate Authority details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: GatewayCertificateAuthorityContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayCertificateAuthorityContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayCertificateAuthorityContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - certificate_id: str, - parameters: _models.GatewayCertificateAuthorityContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayCertificateAuthorityContract: - """Assign Certificate entity to Gateway entity as Certificate Authority. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayCertificateAuthorityContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - certificate_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayCertificateAuthorityContract: - """Assign Certificate entity to Gateway entity as Certificate Authority. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayCertificateAuthorityContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - certificate_id: str, - parameters: Union[_models.GatewayCertificateAuthorityContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.GatewayCertificateAuthorityContract: - """Assign Certificate entity to Gateway entity as Certificate Authority. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Is either a GatewayCertificateAuthorityContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract or - IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: GatewayCertificateAuthorityContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayCertificateAuthorityContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayCertificateAuthorityContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayCertificateAuthorityContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - certificate_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Remove relationship between Certificate Authority and Gateway entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py deleted file mode 100644 index 8fe005f27b38..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py +++ /dev/null @@ -1,803 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - gateway_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "hcId": _SERIALIZER.url("hc_id", hc_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "hcId": _SERIALIZER.url("hc_id", hc_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - gateway_id: str, - hc_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "hcId": _SERIALIZER.url("hc_id", hc_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - gateway_id: str, - hc_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "hcId": _SERIALIZER.url("hc_id", hc_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class GatewayHostnameConfigurationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`gateway_hostname_configuration` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.GatewayHostnameConfigurationContract"]: - """Lists the collection of hostname configurations for the specified gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| hostname - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GatewayHostnameConfigurationContract or the result - of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayHostnameConfigurationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("GatewayHostnameConfigurationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, **kwargs: Any - ) -> bool: - """Checks that hostname configuration entity specified by identifier exists for specified Gateway - entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent - Gateway entity. Required. - :type hc_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - hc_id=hc_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, **kwargs: Any - ) -> _models.GatewayHostnameConfigurationContract: - """Get details of a hostname configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent - Gateway entity. Required. - :type hc_id: str - :return: GatewayHostnameConfigurationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayHostnameConfigurationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - hc_id=hc_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayHostnameConfigurationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - hc_id: str, - parameters: _models.GatewayHostnameConfigurationContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayHostnameConfigurationContract: - """Creates of updates hostname configuration for a Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent - Gateway entity. Required. - :type hc_id: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayHostnameConfigurationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - hc_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayHostnameConfigurationContract: - """Creates of updates hostname configuration for a Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent - Gateway entity. Required. - :type hc_id: str - :param parameters: Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayHostnameConfigurationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - hc_id: str, - parameters: Union[_models.GatewayHostnameConfigurationContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.GatewayHostnameConfigurationContract: - """Creates of updates hostname configuration for a Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent - Gateway entity. Required. - :type hc_id: str - :param parameters: Is either a GatewayHostnameConfigurationContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract or - IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: GatewayHostnameConfigurationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayHostnameConfigurationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayHostnameConfigurationContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - hc_id=hc_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayHostnameConfigurationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified hostname configuration from the specified Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent - Gateway entity. Required. - :type hc_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - hc_id=hc_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py deleted file mode 100644 index 2efba8207100..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py +++ /dev/null @@ -1,1932 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - gateway_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_keys_request( - resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listKeys", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_regenerate_key_request( - resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/regenerateKey", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_generate_token_request( - resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/generateToken", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_invalidate_debug_credentials_request( # pylint: disable=name-too-long - resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/invalidateDebugCredentials", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_debug_credentials_request( - resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listDebugCredentials", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_trace_request( - resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listTrace", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str", max_length=80, min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class GatewayOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`gateway` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.GatewayContract"]: - """Lists a collection of gateways registered with service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| region | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GatewayContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GatewayContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("GatewayCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the Gateway specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any - ) -> _models.GatewayContract: - """Gets the details of the Gateway specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: _models.GatewayContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayContract: - """Creates or updates a Gateway to be used in Api Management instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayContract: - """Creates or updates a Gateway to be used in Api Management instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: Union[_models.GatewayContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.GatewayContract: - """Creates or updates a Gateway to be used in Api Management instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Is either a GatewayContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - if_match: str, - parameters: _models.GatewayContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayContract: - """Updates the details of the gateway specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayContract: - """Updates the details of the gateway specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - if_match: str, - parameters: Union[_models.GatewayContract, IO[bytes]], - **kwargs: Any - ) -> _models.GatewayContract: - """Updates the details of the gateway specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Is either a GatewayContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract or IO[bytes] - :return: GatewayContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, gateway_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_keys( - self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any - ) -> _models.GatewayKeysContract: - """Retrieves gateway keys. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :return: GatewayKeysContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayKeysContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GatewayKeysContract] = kwargs.pop("cls", None) - - _request = build_list_keys_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GatewayKeysContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def regenerate_key( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: _models.GatewayKeyRegenerationRequestContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Regenerates specified gateway key invalidating any tokens created with it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayKeyRegenerationRequestContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def regenerate_key( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Regenerates specified gateway key invalidating any tokens created with it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def regenerate_key( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: Union[_models.GatewayKeyRegenerationRequestContract, IO[bytes]], - **kwargs: Any - ) -> None: - """Regenerates specified gateway key invalidating any tokens created with it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Is either a GatewayKeyRegenerationRequestContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayKeyRegenerationRequestContract or - IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayKeyRegenerationRequestContract") - - _request = build_regenerate_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - def generate_token( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: _models.GatewayTokenRequestContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayTokenContract: - """Gets the Shared Access Authorization Token for the gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayTokenRequestContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayTokenContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def generate_token( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayTokenContract: - """Gets the Shared Access Authorization Token for the gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayTokenContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def generate_token( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: Union[_models.GatewayTokenRequestContract, IO[bytes]], - **kwargs: Any - ) -> _models.GatewayTokenContract: - """Gets the Shared Access Authorization Token for the gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: Is either a GatewayTokenRequestContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayTokenRequestContract or IO[bytes] - :return: GatewayTokenContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayTokenContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayTokenRequestContract") - - _request = build_generate_token_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GatewayTokenContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def invalidate_debug_credentials( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any - ) -> None: - """Action is invalidating all debug credentials issued for gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_invalidate_debug_credentials_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - def list_debug_credentials( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: _models.GatewayListDebugCredentialsContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayDebugCredentialsContract: - """Create new debug credentials for gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: List debug credentials properties. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayDebugCredentialsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def list_debug_credentials( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GatewayDebugCredentialsContract: - """Create new debug credentials for gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: List debug credentials properties. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GatewayDebugCredentialsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def list_debug_credentials( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: Union[_models.GatewayListDebugCredentialsContract, IO[bytes]], - **kwargs: Any - ) -> _models.GatewayDebugCredentialsContract: - """Create new debug credentials for gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: List debug credentials properties. Is either a - GatewayListDebugCredentialsContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContract or - IO[bytes] - :return: GatewayDebugCredentialsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GatewayDebugCredentialsContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayListDebugCredentialsContract") - - _request = build_list_debug_credentials_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GatewayDebugCredentialsContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def list_trace( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: _models.GatewayListTraceContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> dict[str, Any]: - """Fetches trace collected by gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: List trace properties. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayListTraceContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: dict mapping str to any or the result of cls(response) - :rtype: dict[str, any] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def list_trace( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> dict[str, Any]: - """Fetches trace collected by gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: List trace properties. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: dict mapping str to any or the result of cls(response) - :rtype: dict[str, any] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def list_trace( - self, - resource_group_name: str, - service_name: str, - gateway_id: str, - parameters: Union[_models.GatewayListTraceContract, IO[bytes]], - **kwargs: Any - ) -> dict[str, Any]: - """Fetches trace collected by gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param gateway_id: Gateway entity identifier. Must be unique in the current API Management - service instance. Must not have value 'managed'. Required. - :type gateway_id: str - :param parameters: List trace properties. Is either a GatewayListTraceContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GatewayListTraceContract or IO[bytes] - :return: dict mapping str to any or the result of cls(response) - :rtype: dict[str, any] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[dict[str, Any]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GatewayListTraceContract") - - _request = build_list_trace_request( - resource_group_name=resource_group_name, - service_name=service_name, - gateway_id=gateway_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("{object}", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_global_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_global_schema_operations.py deleted file mode 100644 index 00acbc05543b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_global_schema_operations.py +++ /dev/null @@ -1,837 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, schema_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, schema_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - schema_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, schema_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class GlobalSchemaOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`global_schema` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.GlobalSchemaContract"]: - """Lists a collection of schemas registered with service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GlobalSchemaContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GlobalSchemaCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("GlobalSchemaCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, schema_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the Schema specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, schema_id: str, **kwargs: Any - ) -> _models.GlobalSchemaContract: - """Gets the details of the Schema specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: GlobalSchemaContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GlobalSchemaContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GlobalSchemaContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - schema_id: str, - parameters: Union[_models.GlobalSchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GlobalSchemaContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - schema_id: str, - parameters: _models.GlobalSchemaContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.GlobalSchemaContract]: - """Creates new or updates existing specified Schema of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either GlobalSchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - schema_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.GlobalSchemaContract]: - """Creates new or updates existing specified Schema of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either GlobalSchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - schema_id: str, - parameters: Union[_models.GlobalSchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.GlobalSchemaContract]: - """Creates new or updates existing specified Schema of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: Create or update parameters. Is either a GlobalSchemaContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of LROPoller that returns either GlobalSchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - schema_id=schema_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("GlobalSchemaContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.GlobalSchemaContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.GlobalSchemaContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, schema_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific Schema. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_operations.py deleted file mode 100644 index 7be120c2e865..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_operations.py +++ /dev/null @@ -1,1030 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_api_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, api_id: str, resolver_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, api_id: str, resolver_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class GraphQLApiResolverOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`graph_ql_api_resolver` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ResolverContract"]: - """Lists a collection of the resolvers for the specified GraphQL API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ResolverContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ResolverContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResolverCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ResolverCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any - ) -> _models.ResolverContract: - """Gets the details of the GraphQL API Resolver specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResolverContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ResolverContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - parameters: _models.ResolverContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ResolverContract: - """Creates a new resolver in the GraphQL API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ResolverContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ResolverContract: - """Creates a new resolver in the GraphQL API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - parameters: Union[_models.ResolverContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ResolverContract: - """Creates a new resolver in the GraphQL API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param parameters: Create parameters. Is either a ResolverContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ResolverContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ResolverContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ResolverContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ResolverContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - if_match: str, - parameters: _models.ResolverUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ResolverContract: - """Updates the details of the resolver in the GraphQL API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: GraphQL API Resolver Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ResolverUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ResolverContract: - """Updates the details of the resolver in the GraphQL API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: GraphQL API Resolver Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - if_match: str, - parameters: Union[_models.ResolverUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.ResolverContract: - """Updates the details of the resolver in the GraphQL API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: GraphQL API Resolver Update parameters. Is either a ResolverUpdateContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ResolverUpdateContract or IO[bytes] - :return: ResolverContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResolverContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ResolverContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ResolverUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ResolverContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified resolver in the GraphQL API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_policy_operations.py deleted file mode 100644 index 88cc4c51b2f5..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_graph_ql_api_resolver_policy_operations.py +++ /dev/null @@ -1,836 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_resolver_request( - resource_group_name: str, service_name: str, api_id: str, resolver_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str", max_length=80, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str", max_length=80, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if format is not None: - _params["format"] = _SERIALIZER.query("format", format, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str", max_length=80, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str", max_length=80, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class GraphQLApiResolverPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`graph_ql_api_resolver_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_resolver( - self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any - ) -> ItemPaged["_models.PolicyContract"]: - """Get the list of policy configuration at the GraphQL API Resolver level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :return: An iterator like instance of either PolicyContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resolver_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its - identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the GraphQL API Resolver level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the GraphQL API Resolver level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the GraphQL API Resolver level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the GraphQL API Resolver level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - api_id: str, - resolver_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the GraphQL Api Resolver. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API - Management service instance. Required. - :type resolver_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - resolver_id=resolver_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py deleted file mode 100644 index 9932fcf97052..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py +++ /dev/null @@ -1,963 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, group_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, group_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - group_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, group_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, group_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class GroupOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`group` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.GroupContract"]: - """Lists a collection of groups defined within a service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-groups - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| externalId | filter | eq | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GroupContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GroupContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("GroupCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, group_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, group_id: str, **kwargs: Any) -> _models.GroupContract: - """Gets the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - group_id: str, - parameters: _models.GroupCreateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Creates or Updates a group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - group_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Creates or Updates a group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - group_id: str, - parameters: Union[_models.GroupCreateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.GroupContract: - """Creates or Updates a group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param parameters: Create parameters. Is either a GroupCreateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GroupCreateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - group_id: str, - if_match: str, - parameters: _models.GroupUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Updates the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - group_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Updates the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - group_id: str, - if_match: str, - parameters: Union[_models.GroupUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.GroupContract: - """Updates the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a GroupUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters or IO[bytes] - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GroupUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, group_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific group of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py deleted file mode 100644 index 5e0ffb9b1d6a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py +++ /dev/null @@ -1,553 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - resource_group_name: str, - service_name: str, - group_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_entity_exists_request( - resource_group_name: str, service_name: str, group_id: str, user_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, service_name: str, group_id: str, user_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, group_id: str, user_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class GroupUserOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`group_user` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - group_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.UserContract"]: - """Lists a collection of user entities associated with the group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, - le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either UserContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.UserContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("UserCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def check_entity_exists( - self, resource_group_name: str, service_name: str, group_id: str, user_id: str, **kwargs: Any - ) -> bool: - """Checks that user entity specified by identifier is associated with the group entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def create( - self, resource_group_name: str, service_name: str, group_id: str, user_id: str, **kwargs: Any - ) -> _models.UserContract: - """Add existing user to existing group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) - - _request = build_create_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("UserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, group_id: str, user_id: str, **kwargs: Any - ) -> None: - """Remove existing user from existing group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - group_id=group_id, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py deleted file mode 100644 index 043d72bbbe06..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py +++ /dev/null @@ -1,1088 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "identityProviderName": _SERIALIZER.url("identity_provider_name", identity_provider_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "identityProviderName": _SERIALIZER.url("identity_provider_name", identity_provider_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "identityProviderName": _SERIALIZER.url("identity_provider_name", identity_provider_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "identityProviderName": _SERIALIZER.url("identity_provider_name", identity_provider_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "identityProviderName": _SERIALIZER.url("identity_provider_name", identity_provider_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_secrets_request( - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}/listSecrets", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "identityProviderName": _SERIALIZER.url("identity_provider_name", identity_provider_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class IdentityProviderOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`identity_provider` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> ItemPaged["_models.IdentityProviderContract"]: - """Lists a collection of Identity Provider configured in the specified service instance. - - .. seealso:: - - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-aad#how-to-authorize-developer-accounts-using-azure-active-directory - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either IdentityProviderContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.IdentityProviderContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IdentityProviderList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IdentityProviderList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the identityProvider specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - identity_provider_name=identity_provider_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Gets the configuration details of the identity Provider configured in specified service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IdentityProviderContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - identity_provider_name=identity_provider_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IdentityProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - parameters: _models.IdentityProviderCreateContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Creates or Updates the IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderCreateContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Creates or Updates the IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - parameters: Union[_models.IdentityProviderCreateContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Creates or Updates the IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param parameters: Create parameters. Is either a IdentityProviderCreateContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderCreateContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IdentityProviderContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IdentityProviderCreateContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - identity_provider_name=identity_provider_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IdentityProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - if_match: str, - parameters: _models.IdentityProviderUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Updates an existing IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Updates an existing IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - if_match: str, - parameters: Union[_models.IdentityProviderUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.IdentityProviderContract: - """Updates an existing IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a IdentityProviderUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderUpdateParameters or - IO[bytes] - :return: IdentityProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IdentityProviderContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IdentityProviderUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - identity_provider_name=identity_provider_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IdentityProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified identity provider configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - identity_provider_name=identity_provider_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_secrets( - self, - resource_group_name: str, - service_name: str, - identity_provider_name: Union[str, _models.IdentityProviderType], - **kwargs: Any - ) -> _models.ClientSecretContract: - """Gets the client secret details of the Identity Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", - "google", "microsoft", "twitter", "aad", and "aadB2C". Required. - :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :return: ClientSecretContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientSecretContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientSecretContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - identity_provider_name=identity_provider_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ClientSecretContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py deleted file mode 100644 index a75ea0197aeb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py +++ /dev/null @@ -1,329 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, issue_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "issueId": _SERIALIZER.url( - "issue_id", issue_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class IssueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`issue` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.IssueContract"]: - """Lists a collection of issues in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| state | filter | eq | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either IssueContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.IssueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IssueCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, issue_id: str, **kwargs: Any) -> _models.IssueContract: - """Gets API Management issue details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param issue_id: Issue identifier. Must be unique in the current API Management service - instance. Required. - :type issue_id: str - :return: IssueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.IssueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - issue_id=issue_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("IssueContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py deleted file mode 100644 index e0344f0929dc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py +++ /dev/null @@ -1,963 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, logger_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "loggerId": _SERIALIZER.url("logger_id", logger_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, logger_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "loggerId": _SERIALIZER.url("logger_id", logger_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - logger_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "loggerId": _SERIALIZER.url("logger_id", logger_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, logger_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "loggerId": _SERIALIZER.url("logger_id", logger_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, logger_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "loggerId": _SERIALIZER.url("logger_id", logger_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class LoggerOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`logger` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.LoggerContract"]: - """Lists a collection of loggers in the specified service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-log-event-hubs - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either LoggerContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.LoggerContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LoggerCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("LoggerCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, logger_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the logger specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, logger_id: str, **kwargs: Any) -> _models.LoggerContract: - """Gets the details of the logger specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("LoggerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - logger_id: str, - parameters: _models.LoggerContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Creates or Updates a logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - logger_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Creates or Updates a logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - logger_id: str, - parameters: Union[_models.LoggerContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.LoggerContract: - """Creates or Updates a logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param parameters: Create parameters. Is either a LoggerContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "LoggerContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("LoggerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - logger_id: str, - if_match: str, - parameters: _models.LoggerUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Updates an existing logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - logger_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Updates an existing logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - logger_id: str, - if_match: str, - parameters: Union[_models.LoggerUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.LoggerContract: - """Updates an existing logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a LoggerUpdateContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract or IO[bytes] - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "LoggerUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("LoggerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, logger_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py deleted file mode 100644 index 8b9b0886d0d2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py +++ /dev/null @@ -1,1437 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - is_key_vault_refresh_failed: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if is_key_vault_refresh_failed is not None: - _params["isKeyVaultRefreshFailed"] = _SERIALIZER.query( - "is_key_vault_refresh_failed", is_key_vault_refresh_failed, "bool" - ) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, named_value_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, named_value_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - named_value_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - named_value_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - named_value_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_value_request( - resource_group_name: str, service_name: str, named_value_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/listValue", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_refresh_secret_request( - resource_group_name: str, service_name: str, named_value_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/refreshSecret", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class NamedValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`named_value` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - is_key_vault_refresh_failed: Optional[bool] = None, - **kwargs: Any - ) -> ItemPaged["_models.NamedValueContract"]: - """Lists a collection of named values defined within a service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-properties - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| tags | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param is_key_vault_refresh_failed: When set to true, the response contains only named value - entities which failed refresh. Default value is None. - :type is_key_vault_refresh_failed: bool - :return: An iterator like instance of either NamedValueContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - is_key_vault_refresh_failed=is_key_vault_refresh_failed, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NamedValueCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any - ) -> _models.NamedValueContract: - """Gets the details of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: NamedValueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NamedValueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - parameters: Union[_models.NamedValueCreateContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NamedValueCreateContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - parameters: _models.NamedValueCreateContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Creates or updates named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Creates or updates named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - parameters: Union[_models.NamedValueCreateContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Creates or updates named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param parameters: Create parameters. Is either a NamedValueCreateContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NamedValueContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NamedValueContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - if_match: str, - parameters: Union[_models.NamedValueUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NamedValueUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 200: - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - if_match: str, - parameters: _models.NamedValueUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Updates the specific named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Updates the specific named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - service_name: str, - named_value_id: str, - if_match: str, - parameters: Union[_models.NamedValueUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Updates the specific named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a NamedValueUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - if_match=if_match, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NamedValueContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NamedValueContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, named_value_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific named value from the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_value( - self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any - ) -> _models.NamedValueSecretContract: - """Gets the secret of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: NamedValueSecretContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NamedValueSecretContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueSecretContract] = kwargs.pop("cls", None) - - _request = build_list_value_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueSecretContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _refresh_secret_initial( - self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_secret_request( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 200: - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_refresh_secret( - self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Refresh the secret of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._refresh_secret_initial( - resource_group_name=resource_group_name, - service_name=service_name, - named_value_id=named_value_id, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NamedValueContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NamedValueContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py deleted file mode 100644 index 3b21922184fc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py +++ /dev/null @@ -1,267 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_location_request( - resource_group_name: str, service_name: str, location_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "locationName": _SERIALIZER.url("location_name", location_name, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class NetworkStatusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`network_status` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> List[_models.NetworkStatusContractByLocation]: - """Gets the Connectivity Status to the external resources on which the Api Management service - depends from inside the Cloud Service. This also returns the DNS Servers as visible to the - CloudService. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: list of NetworkStatusContractByLocation or the result of cls(response) - :rtype: list[~azure.mgmt.apimanagement.models.NetworkStatusContractByLocation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[List[_models.NetworkStatusContractByLocation]] = kwargs.pop("cls", None) - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("[NetworkStatusContractByLocation]", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_by_location( - self, resource_group_name: str, service_name: str, location_name: str, **kwargs: Any - ) -> _models.NetworkStatusContract: - """Gets the Connectivity Status to the external resources on which the Api Management service - depends from inside the Cloud Service. This also returns the DNS Servers as visible to the - CloudService. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param location_name: Location in which the API Management service is deployed. This is one of - the Azure Regions like West US, East US, South Central US. Required. - :type location_name: str - :return: NetworkStatusContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NetworkStatusContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkStatusContract] = kwargs.pop("cls", None) - - _request = build_list_by_location_request( - resource_group_name=resource_group_name, - service_name=service_name, - location_name=location_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkStatusContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py deleted file mode 100644 index a0bdba6dd8eb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py +++ /dev/null @@ -1,448 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -class NotificationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`notification` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.NotificationContract"]: - """Lists a collection of properties defined within a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either NotificationContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.NotificationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NotificationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NotificationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - **kwargs: Any - ) -> _models.NotificationContract: - """Gets the details of the Notification specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :return: NotificationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NotificationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.NotificationContract: - """Create or Update API Management publisher notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: NotificationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NotificationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py deleted file mode 100644 index 4134c061f086..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py +++ /dev/null @@ -1,531 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_notification_request( - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_entity_exists_request( - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - email: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "email": _SERIALIZER.url("email", email, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - email: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "email": _SERIALIZER.url("email", email, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - email: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "email": _SERIALIZER.url("email", email, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class NotificationRecipientEmailOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`notification_recipient_email` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_notification( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - **kwargs: Any - ) -> _models.RecipientEmailCollection: - """Gets the list of the Notification Recipient Emails subscribed to a notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :return: RecipientEmailCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientEmailCollection] = kwargs.pop("cls", None) - - _request = build_list_by_notification_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientEmailCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def check_entity_exists( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - email: str, - **kwargs: Any - ) -> bool: - """Determine if Notification Recipient Email subscribed to the notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. Required. - :type email: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - email=email, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - email: str, - **kwargs: Any - ) -> _models.RecipientEmailContract: - """Adds the Email address to the list of Recipients for the Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. Required. - :type email: str - :return: RecipientEmailContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientEmailContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - email=email, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientEmailContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - email: str, - **kwargs: Any - ) -> None: - """Removes the email from the list of Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. Required. - :type email: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - email=email, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py deleted file mode 100644 index f94d2a8d910e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py +++ /dev/null @@ -1,534 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_notification_request( - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_entity_exists_request( - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class NotificationRecipientUserOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`notification_recipient_user` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_notification( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - **kwargs: Any - ) -> _models.RecipientUserCollection: - """Gets the list of the Notification Recipient User subscribed to the notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :return: RecipientUserCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientUserCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientUserCollection] = kwargs.pop("cls", None) - - _request = build_list_by_notification_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientUserCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def check_entity_exists( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - **kwargs: Any - ) -> bool: - """Determine if the Notification Recipient User is subscribed to the notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - **kwargs: Any - ) -> _models.RecipientUserContract: - """Adds the API Management User to the list of Recipients for the Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: RecipientUserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientUserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientUserContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientUserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - **kwargs: Any - ) -> None: - """Removes the API Management user from the list of Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - notification_name=notification_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py deleted file mode 100644 index dba81cf0f3ac..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py +++ /dev/null @@ -1,1063 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, opid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "opid": _SERIALIZER.url("opid", opid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, opid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "opid": _SERIALIZER.url("opid", opid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - opid: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "opid": _SERIALIZER.url("opid", opid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, opid: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "opid": _SERIALIZER.url("opid", opid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, opid: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "opid": _SERIALIZER.url("opid", opid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_secrets_request( - resource_group_name: str, service_name: str, opid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}/listSecrets", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "opid": _SERIALIZER.url("opid", opid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class OpenIdConnectProviderOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`open_id_connect_provider` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.OpenidConnectProviderContract"]: - """Lists of all the OpenId Connect Providers. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either OpenidConnectProviderContract or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.OpenidConnectProviderContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OpenIdConnectProviderCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("OpenIdConnectProviderCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, opid: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - opid=opid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, opid: str, **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Gets specific OpenID Connect Provider without secrets. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OpenidConnectProviderContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - opid=opid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OpenidConnectProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - opid: str, - parameters: _models.OpenidConnectProviderContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Creates or updates the OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - opid: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Creates or updates the OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - opid: str, - parameters: Union[_models.OpenidConnectProviderContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Creates or updates the OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param parameters: Create parameters. Is either a OpenidConnectProviderContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OpenidConnectProviderContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "OpenidConnectProviderContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - opid=opid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OpenidConnectProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - opid: str, - if_match: str, - parameters: _models.OpenidConnectProviderUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Updates the specific OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - opid: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Updates the specific OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - opid: str, - if_match: str, - parameters: Union[_models.OpenidConnectProviderUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.OpenidConnectProviderContract: - """Updates the specific OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a OpenidConnectProviderUpdateContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContract or - IO[bytes] - :return: OpenidConnectProviderContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OpenidConnectProviderContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "OpenidConnectProviderUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - opid=opid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OpenidConnectProviderContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, opid: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific OpenID Connect Provider of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - opid=opid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_secrets( - self, resource_group_name: str, service_name: str, opid: str, **kwargs: Any - ) -> _models.ClientSecretContract: - """Gets the client secret details of the OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. Required. - :type opid: str - :return: ClientSecretContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ClientSecretContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClientSecretContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - opid=opid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ClientSecretContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py deleted file mode 100644 index d70e4a8aacc4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py +++ /dev/null @@ -1,237 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_tags_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - include_not_tagged_operations: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if include_not_tagged_operations is not None: - _params["includeNotTaggedOperations"] = _SERIALIZER.query( - "include_not_tagged_operations", include_not_tagged_operations, "bool" - ) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class OperationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`operation` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_tags( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - include_not_tagged_operations: Optional[bool] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagResourceContract"]: - """Lists a collection of operations associated with tags. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param include_not_tagged_operations: Include not tagged Operations. Default value is None. - :type include_not_tagged_operations: bool - :return: An iterator like instance of either TagResourceContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagResourceCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_tags_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - include_not_tagged_operations=include_not_tagged_operations, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagResourceCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_status_operations.py deleted file mode 100644 index f1f6e0ba8435..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_status_operations.py +++ /dev/null @@ -1,143 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request(location: str, operation_id: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationStatuses/{operationId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str", min_length=1), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class OperationStatusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`operation_status` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationStatusResult: - """Returns the current status of an async operation. - - :param location: The name of the Azure region. Required. - :type location: str - :param operation_id: The ID of an ongoing async operation. Required. - :type operation_id: str - :return: OperationStatusResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationStatusResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) - - _request = build_get_request( - location=location, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("OperationStatusResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operations.py new file mode 100644 index 000000000000..8fda6ae105c6 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operations.py @@ -0,0 +1,107496 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +import datetime +from io import IOBase +import json +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core import MatchConditions, PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceModifiedError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest, HttpResponse +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._configuration import ApiManagementClientConfiguration +from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from .._utils.serialization import Deserializer, Serializer +from .._utils.utils import ClientMixinABC, prep_if_match, prep_if_none_match + +JSON = MutableMapping[str, Any] +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_workspace_api_get_request( + resource_group_name: str, service_name: str, workspace_id: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_api_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_update_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_delete_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_revisions: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if delete_revisions is not None: + _params["deleteRevisions"] = _SERIALIZER.query("delete_revisions", delete_revisions, "bool") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + tags: Optional[str] = None, + expand_api_version_set: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if tags is not None: + _params["tags"] = _SERIALIZER.query("tags", tags, "str") + if expand_api_version_set is not None: + _params["expandApiVersionSet"] = _SERIALIZER.query("expand_api_version_set", expand_api_version_set, "bool") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_release_get_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "releaseId": _SERIALIZER.url("release_id", release_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_release_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "releaseId": _SERIALIZER.url("release_id", release_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_api_release_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "releaseId": _SERIALIZER.url("release_id", release_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_release_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "releaseId": _SERIALIZER.url("release_id", release_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_release_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "releaseId": _SERIALIZER.url("release_id", release_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_release_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_operation_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_operation_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_api_operation_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_operation_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_operation_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_operation_list_by_api_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + tags: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if tags is not None: + _params["tags"] = _SERIALIZER.query("tags", tags, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_graph_ql_api_resolver_policy_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if format is not None: + _params["format"] = _SERIALIZER.query("format", format, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_graph_ql_api_resolver_policy_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_graph_ql_api_resolver_policy_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_graph_ql_api_resolver_policy_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_graph_ql_api_resolver_policy_list_by_resolver_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, api_id: str, resolver_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_policy_get_request( + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if format is not None: + _params["format"] = _SERIALIZER.query("format", format, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_policy_get_entity_tag_request( + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_policy_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_policy_delete_request( + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_policy_list_by_api_request( + resource_group_name: str, service_name: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_get_request( + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if format is not None: + _params["format"] = _SERIALIZER.query("format", format, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_get_entity_tag_request( + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_policy_create_or_update_request( + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_delete_request( + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_list_by_service_request( + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_policy_get_request( + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if format is not None: + _params["format"] = _SERIALIZER.query("format", format, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_policy_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_product_policy_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_policy_delete_request( + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_policy_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, product_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_policy_get_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if format is not None: + _params["format"] = _SERIALIZER.query("format", format, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_policy_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_policy_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_policy_delete_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_policy_list_by_api_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_operation_policy_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if format is not None: + _params["format"] = _SERIALIZER.query("format", format, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_operation_policy_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_api_operation_policy_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_operation_policy_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_operation_policy_list_by_operation_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_policy_get_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if format is not None: + _params["format"] = _SERIALIZER.query("format", format, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_policy_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_api_policy_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_policy_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_policy_list_by_api_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_policy_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if format is not None: + _params["format"] = _SERIALIZER.query("format", format, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_policy_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_product_policy_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_policy_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_policy_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, product_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_get_by_api_request( + resource_group_name: str, service_name: str, api_id: str, tag_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_get_entity_state_by_api_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, api_id: str, tag_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_tag_assign_to_api_request( + resource_group_name: str, service_name: str, api_id: str, tag_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_detach_from_api_request( + resource_group_name: str, service_name: str, api_id: str, tag_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_tag_list_by_api_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_get_by_operation_request( + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + tag_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_get_entity_state_by_operation_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + tag_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_tag_assign_to_operation_request( + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + tag_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_detach_from_operation_request( + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + tag_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_tag_list_by_operation_request( + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_get_by_product_request( + resource_group_name: str, service_name: str, product_id: str, tag_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_get_entity_state_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, product_id: str, tag_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_tag_assign_to_product_request( + resource_group_name: str, service_name: str, product_id: str, tag_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_detach_from_product_request( + resource_group_name: str, service_name: str, product_id: str, tag_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_tag_list_by_product_request( + resource_group_name: str, + service_name: str, + product_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_get_request( + resource_group_name: str, service_name: str, tag_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_get_entity_state_request( + resource_group_name: str, service_name: str, tag_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_tag_create_or_update_request( + resource_group_name: str, + service_name: str, + tag_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_update_request( + resource_group_name: str, + service_name: str, + tag_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_delete_request( + resource_group_name: str, + service_name: str, + tag_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_list_by_service_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + scope: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if scope is not None: + _params["scope"] = _SERIALIZER.query("scope", scope, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_get_request( + resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_get_entity_state_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_tag_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_update_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_delete_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + scope: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if scope is not None: + _params["scope"] = _SERIALIZER.query("scope", scope, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_schema_get_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_schema_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_api_schema_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_schema_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + force: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if force is not None: + _params["force"] = _SERIALIZER.query("force", force, "bool") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_schema_list_by_api_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_diagnostic_get_request( + resource_group_name: str, service_name: str, diagnostic_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_diagnostic_get_entity_tag_request( + resource_group_name: str, service_name: str, diagnostic_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_diagnostic_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + diagnostic_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_diagnostic_update_request( + resource_group_name: str, + service_name: str, + diagnostic_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_diagnostic_delete_request( + resource_group_name: str, + service_name: str, + diagnostic_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_diagnostic_list_by_service_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_diagnostic_get_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_diagnostic_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_diagnostic_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_diagnostic_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_diagnostic_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_diagnostic_list_by_workspace_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_diagnostic_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_diagnostic_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_api_diagnostic_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_diagnostic_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_diagnostic_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_diagnostic_list_by_workspace_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_issue_get_request( + resource_group_name: str, service_name: str, issue_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_issue_list_by_service_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_wiki_get_request( + resource_group_name: str, service_name: str, product_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_wiki_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, product_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_product_wiki_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + product_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_wiki_update_request( + resource_group_name: str, + service_name: str, + product_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_wiki_delete_request( + resource_group_name: str, + service_name: str, + product_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_version_set_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "versionSetId": _SERIALIZER.url("version_set_id", version_set_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_version_set_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "versionSetId": _SERIALIZER.url("version_set_id", version_set_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_api_version_set_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "versionSetId": _SERIALIZER.url("version_set_id", version_set_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_version_set_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "versionSetId": _SERIALIZER.url("version_set_id", version_set_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_version_set_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "versionSetId": _SERIALIZER.url("version_set_id", version_set_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_version_set_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_backend_get_request( + resource_group_name: str, service_name: str, workspace_id: str, backend_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "backendId": _SERIALIZER.url("backend_id", backend_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_backend_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, backend_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "backendId": _SERIALIZER.url("backend_id", backend_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_backend_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "backendId": _SERIALIZER.url("backend_id", backend_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_backend_update_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "backendId": _SERIALIZER.url("backend_id", backend_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_backend_delete_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "backendId": _SERIALIZER.url("backend_id", backend_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_backend_list_by_workspace_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_certificate_get_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_certificate_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_certificate_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_certificate_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_certificate_list_by_workspace_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + is_key_vault_refresh_failed: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if is_key_vault_refresh_failed is not None: + _params["isKeyVaultRefreshFailed"] = _SERIALIZER.query( + "is_key_vault_refresh_failed", is_key_vault_refresh_failed, "bool" + ) + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_certificate_refresh_secret_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}/refreshSecret" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_group_get_request( + resource_group_name: str, service_name: str, workspace_id: str, group_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_group_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, group_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_group_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_group_update_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_group_delete_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_group_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_logger_get_request( + resource_group_name: str, service_name: str, workspace_id: str, logger_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "loggerId": _SERIALIZER.url("logger_id", logger_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_logger_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, logger_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "loggerId": _SERIALIZER.url("logger_id", logger_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_logger_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "loggerId": _SERIALIZER.url("logger_id", logger_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_logger_update_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "loggerId": _SERIALIZER.url("logger_id", logger_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_logger_delete_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "loggerId": _SERIALIZER.url("logger_id", logger_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_logger_list_by_workspace_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_named_value_get_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_named_value_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_named_value_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_named_value_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_named_value_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_named_value_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + is_key_vault_refresh_failed: Optional[Union[str, _models.KeyVaultRefreshState]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if is_key_vault_refresh_failed is not None: + _params["isKeyVaultRefreshFailed"] = _SERIALIZER.query( + "is_key_vault_refresh_failed", is_key_vault_refresh_failed, "str" + ) + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_named_value_list_value_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}/listValue" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_named_value_refresh_secret_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}/refreshSecret" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_notification_get_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_notification_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_notification_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_policy_fragment_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + subscription_id: str, + *, + format: Optional[Union[str, _models.PolicyFragmentContentFormat]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "id": _SERIALIZER.url("id", id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if format is not None: + _params["format"] = _SERIALIZER.query("format", format, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_policy_fragment_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "id": _SERIALIZER.url("id", id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_policy_fragment_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "id": _SERIALIZER.url("id", id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_policy_fragment_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "id": _SERIALIZER.url("id", id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_policy_fragment_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + orderby: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if orderby is not None: + _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_policy_fragment_list_references_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + subscription_id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}/listReferences" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "id": _SERIALIZER.url("id", id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_sign_in_settings_get_request( + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_sign_in_settings_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_sign_in_settings_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_sign_in_settings_update_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_sign_up_settings_get_request( + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_sign_up_settings_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_sign_up_settings_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_sign_up_settings_update_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delegation_settings_get_request( + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delegation_settings_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_delegation_settings_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delegation_settings_update_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delegation_settings_list_secrets_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_get_request( + resource_group_name: str, service_name: str, workspace_id: str, product_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, product_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_product_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_update_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_delete_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_subscriptions: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if delete_subscriptions is not None: + _params["deleteSubscriptions"] = _SERIALIZER.query("delete_subscriptions", delete_subscriptions, "bool") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + expand_groups: Optional[bool] = None, + tags: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if expand_groups is not None: + _params["expandGroups"] = _SERIALIZER.query("expand_groups", expand_groups, "bool") + if tags is not None: + _params["tags"] = _SERIALIZER.query("tags", tags, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_api_link_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "apiLinkId": _SERIALIZER.url("api_link_id", api_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_api_link_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "apiLinkId": _SERIALIZER.url("api_link_id", api_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_api_link_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "apiLinkId": _SERIALIZER.url("api_link_id", api_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_workspace_product_api_link_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_group_link_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "groupLinkId": _SERIALIZER.url("group_link_id", group_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_group_link_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "groupLinkId": _SERIALIZER.url("group_link_id", group_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_product_group_link_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "groupLinkId": _SERIALIZER.url("group_link_id", group_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_workspace_product_group_link_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_global_schema_get_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, schema_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_global_schema_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, schema_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_global_schema_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_global_schema_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_global_schema_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_user_subscription_get_request( + resource_group_name: str, service_name: str, user_id: str, sid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_user_subscription_list_request( + resource_group_name: str, + service_name: str, + user_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_subscription_get_request( + resource_group_name: str, service_name: str, workspace_id: str, sid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_subscription_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, sid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_subscription_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + subscription_id: str, + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if notify is not None: + _params["notify"] = _SERIALIZER.query("notify", notify, "bool") + if app_type is not None: + _params["appType"] = _SERIALIZER.query("app_type", app_type, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_subscription_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if notify is not None: + _params["notify"] = _SERIALIZER.query("notify", notify, "bool") + if app_type is not None: + _params["appType"] = _SERIALIZER.query("app_type", app_type, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_subscription_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_subscription_list_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_subscription_regenerate_primary_key_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, sid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/regeneratePrimaryKey" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_workspace_subscription_regenerate_secondary_key_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, sid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/regenerateSecondaryKey" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_workspace_subscription_list_secrets_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, sid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/listSecrets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_api_link_get_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "apiLinkId": _SERIALIZER.url("api_link_id", api_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_api_link_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "apiLinkId": _SERIALIZER.url("api_link_id", api_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_api_link_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "apiLinkId": _SERIALIZER.url("api_link_id", api_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_workspace_tag_api_link_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_operation_link_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "operationLinkId": _SERIALIZER.url("operation_link_id", operation_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_operation_link_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "operationLinkId": _SERIALIZER.url("operation_link_id", operation_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_operation_link_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "operationLinkId": _SERIALIZER.url("operation_link_id", operation_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_workspace_tag_operation_link_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_product_link_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "productLinkId": _SERIALIZER.url("product_link_id", product_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_product_link_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "productLinkId": _SERIALIZER.url("product_link_id", product_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_tag_product_link_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "productLinkId": _SERIALIZER.url("product_link_id", product_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_workspace_tag_product_link_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_operations_list_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.ApiManagement/operations" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_get_request( + resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_update_request( + resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_delete_request( + resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = ( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways" + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/gateways" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_gateway_skus_list_available_skus_request( # pylint: disable=name-too-long + resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/skus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_get_request( + resource_group_name: str, service_name: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_get_entity_tag_request( + resource_group_name: str, service_name: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_create_or_update_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_update_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_delete_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_revisions: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if delete_revisions is not None: + _params["deleteRevisions"] = _SERIALIZER.query("delete_revisions", delete_revisions, "bool") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_list_by_service_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + tags: Optional[str] = None, + expand_api_version_set: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if tags is not None: + _params["tags"] = _SERIALIZER.query("tags", tags, "str") + if expand_api_version_set is not None: + _params["expandApiVersionSet"] = _SERIALIZER.query("expand_api_version_set", expand_api_version_set, "bool") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_list_by_tags_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + include_not_tagged_apis: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if include_not_tagged_apis is not None: + _params["includeNotTaggedApis"] = _SERIALIZER.query("include_not_tagged_apis", include_not_tagged_apis, "bool") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_revision_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_product_list_by_apis_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_operation_list_by_tags_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + include_not_tagged_operations: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if include_not_tagged_operations is not None: + _params["includeNotTaggedOperations"] = _SERIALIZER.query( + "include_not_tagged_operations", include_not_tagged_operations, "bool" + ) + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_revision_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/revisions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_get_request( + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_update_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_delete_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = ( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service" + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_list_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_restore_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_backup_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_migrate_to_stv2_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_get_sso_token_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_apply_network_configuration_updates_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_refresh_hostnames_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/refreshHostnames" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_check_name_availability_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_get_domain_ownership_identifier_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/getDomainOwnershipIdentifier" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_all_policies_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/allPolicies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_service_skus_list_available_service_skus_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_status_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_status_list_by_location_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, location_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "locationName": _SERIALIZER.url("location_name", location_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_outbound_network_dependencies_endpoints_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_description_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + scope: Optional[Union[str, _models.PolicyScopeContract]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if scope is not None: + _params["scope"] = _SERIALIZER.query("scope", scope, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_restriction_validations_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/validatePolicies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_portal_settings_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_list_by_tags_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + include_not_tagged_products: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if include_not_tagged_products is not None: + _params["includeNotTaggedProducts"] = _SERIALIZER.query( + "include_not_tagged_products", include_not_tagged_products, "bool" + ) + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_get_request( + resource_group_name: str, service_name: str, product_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_get_entity_tag_request( + resource_group_name: str, service_name: str, product_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_product_create_or_update_request( + resource_group_name: str, + service_name: str, + product_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_update_request( + resource_group_name: str, + service_name: str, + product_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_delete_request( + resource_group_name: str, + service_name: str, + product_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_subscriptions: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if delete_subscriptions is not None: + _params["deleteSubscriptions"] = _SERIALIZER.query("delete_subscriptions", delete_subscriptions, "bool") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_list_by_service_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + expand_groups: Optional[bool] = None, + tags: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if expand_groups is not None: + _params["expandGroups"] = _SERIALIZER.query("expand_groups", expand_groups, "bool") + if tags is not None: + _params["tags"] = _SERIALIZER.query("tags", tags, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_quota_by_counter_keys_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, quota_counter_key: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "quotaCounterKey": _SERIALIZER.url("quota_counter_key", quota_counter_key, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_quota_by_counter_keys_update_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, quota_counter_key: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "quotaCounterKey": _SERIALIZER.url("quota_counter_key", quota_counter_key, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_quota_by_period_keys_get_request( + resource_group_name: str, + service_name: str, + quota_counter_key: str, + quota_period_key: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "quotaCounterKey": _SERIALIZER.url("quota_counter_key", quota_counter_key, "str"), + "quotaPeriodKey": _SERIALIZER.url("quota_period_key", quota_period_key, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_quota_by_period_keys_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + quota_counter_key: str, + quota_period_key: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "quotaCounterKey": _SERIALIZER.url("quota_counter_key", quota_counter_key, "str"), + "quotaPeriodKey": _SERIALIZER.url("quota_period_key", quota_period_key, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_region_list_by_service_request( + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_reports_list_by_api_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if orderby is not None: + _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_reports_list_by_user_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if orderby is not None: + _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_reports_list_by_operation_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if orderby is not None: + _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_reports_list_by_product_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if orderby is not None: + _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_reports_list_by_geo_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_reports_list_by_subscription_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if orderby is not None: + _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_reports_list_by_time_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: str, + interval: datetime.timedelta, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if orderby is not None: + _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") + _params["interval"] = _SERIALIZER.query("interval", interval, "duration") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_reports_list_by_request_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_resource_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_release_get_request( + resource_group_name: str, service_name: str, api_id: str, release_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "releaseId": _SERIALIZER.url("release_id", release_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_release_get_entity_tag_request( + resource_group_name: str, service_name: str, api_id: str, release_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "releaseId": _SERIALIZER.url("release_id", release_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_release_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "releaseId": _SERIALIZER.url("release_id", release_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_release_update_request( + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "releaseId": _SERIALIZER.url("release_id", release_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_release_delete_request( + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "releaseId": _SERIALIZER.url("release_id", release_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_release_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_operation_get_request( + resource_group_name: str, service_name: str, api_id: str, operation_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_operation_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, api_id: str, operation_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_operation_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_operation_update_request( + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_operation_delete_request( + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_operation_list_by_api_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + tags: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if tags is not None: + _params["tags"] = _SERIALIZER.query("tags", tags, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_operation_policy_get_request( + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if format is not None: + _params["format"] = _SERIALIZER.query("format", format, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_operation_policy_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_operation_policy_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_operation_policy_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_operation_policy_list_by_operation_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, api_id: str, operation_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_graph_ql_api_resolver_get_request( + resource_group_name: str, service_name: str, api_id: str, resolver_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_graph_ql_api_resolver_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, api_id: str, resolver_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_graph_ql_api_resolver_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_graph_ql_api_resolver_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_graph_ql_api_resolver_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "resolverId": _SERIALIZER.url("resolver_id", resolver_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_graph_ql_api_resolver_list_by_api_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_schema_get_request( + resource_group_name: str, service_name: str, api_id: str, schema_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_schema_get_entity_tag_request( + resource_group_name: str, service_name: str, api_id: str, schema_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_schema_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_schema_delete_request( + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + force: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if force is not None: + _params["force"] = _SERIALIZER.query("force", force, "bool") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_schema_list_by_api_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_diagnostic_get_request( + resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_diagnostic_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_diagnostic_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_diagnostic_update_request( + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_diagnostic_delete_request( + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "diagnosticId": _SERIALIZER.url("diagnostic_id", diagnostic_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_diagnostic_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_issue_get_request( + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + subscription_id: str, + *, + expand_comments_attachments: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if expand_comments_attachments is not None: + _params["expandCommentsAttachments"] = _SERIALIZER.query( + "expand_comments_attachments", expand_comments_attachments, "bool" + ) + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_issue_get_entity_tag_request( + resource_group_name: str, service_name: str, api_id: str, issue_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_issue_create_or_update_request( + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_issue_update_request( + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_issue_delete_request( + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_issue_list_by_service_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + expand_comments_attachments: Optional[bool] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if expand_comments_attachments is not None: + _params["expandCommentsAttachments"] = _SERIALIZER.query( + "expand_comments_attachments", expand_comments_attachments, "bool" + ) + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_issue_comment_get_request( + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + "commentId": _SERIALIZER.url("comment_id", comment_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_issue_comment_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + "commentId": _SERIALIZER.url("comment_id", comment_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_issue_comment_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + "commentId": _SERIALIZER.url("comment_id", comment_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_issue_comment_delete_request( + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + "commentId": _SERIALIZER.url("comment_id", comment_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_issue_comment_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_issue_attachment_get_request( + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + "attachmentId": _SERIALIZER.url("attachment_id", attachment_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_issue_attachment_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + "attachmentId": _SERIALIZER.url("attachment_id", attachment_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_issue_attachment_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + "attachmentId": _SERIALIZER.url("attachment_id", attachment_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_issue_attachment_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + "attachmentId": _SERIALIZER.url("attachment_id", attachment_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_issue_attachment_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "issueId": _SERIALIZER.url("issue_id", issue_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_tag_description_get_request( + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "tagDescriptionId": _SERIALIZER.url("tag_description_id", tag_description_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_tag_description_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "tagDescriptionId": _SERIALIZER.url("tag_description_id", tag_description_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_tag_description_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "tagDescriptionId": _SERIALIZER.url("tag_description_id", tag_description_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_tag_description_delete_request( + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "tagDescriptionId": _SERIALIZER.url("tag_description_id", tag_description_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_tag_description_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_wiki_get_request( + resource_group_name: str, service_name: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_wiki_get_entity_tag_request( + resource_group_name: str, service_name: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_wiki_create_or_update_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_wiki_update_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_wiki_delete_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_wikis_list_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_wikis_list_request( + resource_group_name: str, + service_name: str, + product_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_tool_get_request( + resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "toolId": _SERIALIZER.url("tool_id", tool_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_tool_get_entity_tag_request( + resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "toolId": _SERIALIZER.url("tool_id", tool_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_tool_create_or_update_request( + resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "toolId": _SERIALIZER.url("tool_id", tool_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_tool_update_request( + resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "toolId": _SERIALIZER.url("tool_id", tool_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_tool_delete_request( + resource_group_name: str, service_name: str, api_id: str, tool_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + "toolId": _SERIALIZER.url("tool_id", tool_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_api_tool_list_by_api_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_version_set_get_request( + resource_group_name: str, service_name: str, version_set_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "versionSetId": _SERIALIZER.url("version_set_id", version_set_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_version_set_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, version_set_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "versionSetId": _SERIALIZER.url("version_set_id", version_set_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_api_version_set_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + version_set_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "versionSetId": _SERIALIZER.url("version_set_id", version_set_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_version_set_update_request( + resource_group_name: str, + service_name: str, + version_set_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "versionSetId": _SERIALIZER.url("version_set_id", version_set_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_version_set_delete_request( + resource_group_name: str, + service_name: str, + version_set_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "versionSetId": _SERIALIZER.url("version_set_id", version_set_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_version_set_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_provider_get_request( + resource_group_name: str, service_name: str, authorization_provider_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_provider_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_provider_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_provider_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_provider_refresh_secret_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, authorization_provider_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/refreshSecret" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_get_request( + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + "authorizationId": _SERIALIZER.url("authorization_id", authorization_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + "authorizationId": _SERIALIZER.url("authorization_id", authorization_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_delete_request( + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + "authorizationId": _SERIALIZER.url("authorization_id", authorization_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_list_by_authorization_provider_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_confirm_consent_code_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + "authorizationId": _SERIALIZER.url("authorization_id", authorization_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_login_links_post_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + "authorizationId": _SERIALIZER.url("authorization_id", authorization_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_access_policy_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + "authorizationId": _SERIALIZER.url("authorization_id", authorization_id, "str"), + "authorizationAccessPolicyId": _SERIALIZER.url( + "authorization_access_policy_id", authorization_access_policy_id, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_access_policy_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + "authorizationId": _SERIALIZER.url("authorization_id", authorization_id, "str"), + "authorizationAccessPolicyId": _SERIALIZER.url( + "authorization_access_policy_id", authorization_access_policy_id, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_access_policy_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + "authorizationId": _SERIALIZER.url("authorization_id", authorization_id, "str"), + "authorizationAccessPolicyId": _SERIALIZER.url( + "authorization_access_policy_id", authorization_access_policy_id, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_access_policy_list_by_authorization_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authorizationProviderId": _SERIALIZER.url("authorization_provider_id", authorization_provider_id, "str"), + "authorizationId": _SERIALIZER.url("authorization_id", authorization_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_server_get_request( + resource_group_name: str, service_name: str, authsid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authsid": _SERIALIZER.url("authsid", authsid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_server_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, authsid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authsid": _SERIALIZER.url("authsid", authsid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_authorization_server_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + authsid: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authsid": _SERIALIZER.url("authsid", authsid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_server_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + authsid: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authsid": _SERIALIZER.url("authsid", authsid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_server_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + authsid: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authsid": _SERIALIZER.url("authsid", authsid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_server_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_authorization_server_list_secrets_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, authsid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}/listSecrets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "authsid": _SERIALIZER.url("authsid", authsid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_backend_get_request( + resource_group_name: str, service_name: str, backend_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "backendId": _SERIALIZER.url("backend_id", backend_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_backend_get_entity_tag_request( + resource_group_name: str, service_name: str, backend_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "backendId": _SERIALIZER.url("backend_id", backend_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_backend_create_or_update_request( + resource_group_name: str, + service_name: str, + backend_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "backendId": _SERIALIZER.url("backend_id", backend_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_backend_update_request( + resource_group_name: str, + service_name: str, + backend_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "backendId": _SERIALIZER.url("backend_id", backend_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_backend_delete_request( + resource_group_name: str, + service_name: str, + backend_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "backendId": _SERIALIZER.url("backend_id", backend_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_backend_list_by_service_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_backend_reconnect_request( + resource_group_name: str, service_name: str, backend_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "backendId": _SERIALIZER.url("backend_id", backend_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cache_get_request( + resource_group_name: str, service_name: str, cache_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "cacheId": _SERIALIZER.url("cache_id", cache_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cache_get_entity_tag_request( + resource_group_name: str, service_name: str, cache_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "cacheId": _SERIALIZER.url("cache_id", cache_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_cache_create_or_update_request( + resource_group_name: str, + service_name: str, + cache_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "cacheId": _SERIALIZER.url("cache_id", cache_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cache_update_request( + resource_group_name: str, + service_name: str, + cache_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "cacheId": _SERIALIZER.url("cache_id", cache_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cache_delete_request( + resource_group_name: str, + service_name: str, + cache_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "cacheId": _SERIALIZER.url("cache_id", cache_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cache_list_by_service_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_certificate_get_request( + resource_group_name: str, service_name: str, certificate_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_certificate_get_entity_tag_request( + resource_group_name: str, service_name: str, certificate_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_certificate_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + certificate_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_certificate_delete_request( + resource_group_name: str, + service_name: str, + certificate_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_certificate_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + is_key_vault_refresh_failed: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if is_key_vault_refresh_failed is not None: + _params["isKeyVaultRefreshFailed"] = _SERIALIZER.query( + "is_key_vault_refresh_failed", is_key_vault_refresh_failed, "bool" + ) + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_certificate_refresh_secret_request( + resource_group_name: str, service_name: str, certificate_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}/refreshSecret" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_content_type_get_request( + resource_group_name: str, service_name: str, content_type_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_content_type_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + content_type_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_content_type_delete_request( + resource_group_name: str, + service_name: str, + content_type_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_content_type_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_content_item_get_request( + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str"), + "contentItemId": _SERIALIZER.url("content_item_id", content_item_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_content_item_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str"), + "contentItemId": _SERIALIZER.url("content_item_id", content_item_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_content_item_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str"), + "contentItemId": _SERIALIZER.url("content_item_id", content_item_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_content_item_delete_request( + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str"), + "contentItemId": _SERIALIZER.url("content_item_id", content_item_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_content_item_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, content_type_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "contentTypeId": _SERIALIZER.url("content_type_id", content_type_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deleted_services_get_by_name_request( # pylint: disable=name-too-long + location: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deleted_services_purge_request( + location: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deleted_services_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/deletedservices" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_documentation_get_request( + resource_group_name: str, service_name: str, documentation_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "documentationId": _SERIALIZER.url("documentation_id", documentation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_documentation_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, documentation_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "documentationId": _SERIALIZER.url("documentation_id", documentation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_documentation_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + documentation_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "documentationId": _SERIALIZER.url("documentation_id", documentation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_documentation_update_request( + resource_group_name: str, + service_name: str, + documentation_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "documentationId": _SERIALIZER.url("documentation_id", documentation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_documentation_delete_request( + resource_group_name: str, + service_name: str, + documentation_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "documentationId": _SERIALIZER.url("documentation_id", documentation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_documentation_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_email_template_get_request( + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "templateName": _SERIALIZER.url("template_name", template_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_email_template_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "templateName": _SERIALIZER.url("template_name", template_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_email_template_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "templateName": _SERIALIZER.url("template_name", template_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_email_template_update_request( + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "templateName": _SERIALIZER.url("template_name", template_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_email_template_delete_request( + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "templateName": _SERIALIZER.url("template_name", template_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_email_template_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_config_connection_get_request( # pylint: disable=name-too-long + resource_group_name: str, gateway_name: str, config_connection_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + "configConnectionName": _SERIALIZER.url("config_connection_name", config_connection_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_config_connection_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, gateway_name: str, config_connection_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + "configConnectionName": _SERIALIZER.url("config_connection_name", config_connection_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_config_connection_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + "configConnectionName": _SERIALIZER.url("config_connection_name", config_connection_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_config_connection_list_by_gateway_request( # pylint: disable=name-too-long + resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_hostname_binding_get_request( # pylint: disable=name-too-long + resource_group_name: str, gateway_name: str, hostname_binding_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + "hostnameBindingName": _SERIALIZER.url("hostname_binding_name", hostname_binding_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_hostname_binding_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + "hostnameBindingName": _SERIALIZER.url("hostname_binding_name", hostname_binding_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_hostname_binding_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + "hostnameBindingName": _SERIALIZER.url("hostname_binding_name", hostname_binding_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_hostname_binding_list_by_gateway_request( # pylint: disable=name-too-long + resource_group_name: str, gateway_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_gateway_hostname_binding_refresh_secret_request( # pylint: disable=name-too-long + resource_group_name: str, gateway_name: str, hostname_binding_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}/refreshSecret" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str"), + "hostnameBindingName": _SERIALIZER.url("hostname_binding_name", hostname_binding_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_gateway_get_request( + resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_get_entity_tag_request( + resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_gateway_create_or_update_request( + resource_group_name: str, + service_name: str, + gateway_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_update_request( + resource_group_name: str, + service_name: str, + gateway_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_delete_request( + resource_group_name: str, + service_name: str, + gateway_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_list_by_service_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_list_keys_request( + resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listKeys" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_regenerate_key_request( + resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/regenerateKey" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_generate_token_request( + resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/generateToken" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_invalidate_debug_credentials_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/invalidateDebugCredentials" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_gateway_list_debug_credentials_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listDebugCredentials" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_list_trace_request( + resource_group_name: str, service_name: str, gateway_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listTrace" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_api_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + gateway_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_api_get_entity_tag_request( + resource_group_name: str, service_name: str, gateway_id: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_gateway_api_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, gateway_id: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_api_delete_request( + resource_group_name: str, service_name: str, gateway_id: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_gateway_hostname_configuration_get_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + "hcId": _SERIALIZER.url("hc_id", hc_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_hostname_configuration_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + "hcId": _SERIALIZER.url("hc_id", hc_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_gateway_hostname_configuration_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + gateway_id: str, + hc_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + "hcId": _SERIALIZER.url("hc_id", hc_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_hostname_configuration_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + gateway_id: str, + hc_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + "hcId": _SERIALIZER.url("hc_id", hc_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_hostname_configuration_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + gateway_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_certificate_authority_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_certificate_authority_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_gateway_certificate_authority_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_certificate_authority_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + "certificateId": _SERIALIZER.url("certificate_id", certificate_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_gateway_certificate_authority_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + gateway_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "gatewayId": _SERIALIZER.url("gateway_id", gateway_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_group_get_request( + resource_group_name: str, service_name: str, group_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_group_get_entity_tag_request( + resource_group_name: str, service_name: str, group_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_group_create_or_update_request( + resource_group_name: str, + service_name: str, + group_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_group_update_request( + resource_group_name: str, + service_name: str, + group_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_group_delete_request( + resource_group_name: str, + service_name: str, + group_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_group_list_by_service_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_group_user_list_request( + resource_group_name: str, + service_name: str, + group_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_group_user_check_entity_exists_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, group_id: str, user_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_group_user_create_request( + resource_group_name: str, service_name: str, group_id: str, user_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_group_user_delete_request( + resource_group_name: str, service_name: str, group_id: str, user_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_workspace_group_user_list_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_group_user_check_entity_exists_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + user_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_group_user_create_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + user_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_group_user_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + user_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_identity_provider_get_request( + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "identityProviderName": _SERIALIZER.url("identity_provider_name", identity_provider_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_identity_provider_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "identityProviderName": _SERIALIZER.url("identity_provider_name", identity_provider_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_identity_provider_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "identityProviderName": _SERIALIZER.url("identity_provider_name", identity_provider_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_identity_provider_update_request( + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "identityProviderName": _SERIALIZER.url("identity_provider_name", identity_provider_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_identity_provider_delete_request( + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "identityProviderName": _SERIALIZER.url("identity_provider_name", identity_provider_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_identity_provider_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_identity_provider_list_secrets_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}/listSecrets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "identityProviderName": _SERIALIZER.url("identity_provider_name", identity_provider_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_logger_get_request( + resource_group_name: str, service_name: str, logger_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "loggerId": _SERIALIZER.url("logger_id", logger_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_logger_get_entity_tag_request( + resource_group_name: str, service_name: str, logger_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "loggerId": _SERIALIZER.url("logger_id", logger_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_logger_create_or_update_request( + resource_group_name: str, + service_name: str, + logger_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "loggerId": _SERIALIZER.url("logger_id", logger_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_logger_update_request( + resource_group_name: str, + service_name: str, + logger_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "loggerId": _SERIALIZER.url("logger_id", logger_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_logger_delete_request( + resource_group_name: str, + service_name: str, + logger_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "loggerId": _SERIALIZER.url("logger_id", logger_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_logger_list_by_service_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_named_value_get_request( + resource_group_name: str, service_name: str, named_value_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_named_value_get_entity_tag_request( + resource_group_name: str, service_name: str, named_value_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_named_value_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + named_value_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_named_value_update_request( + resource_group_name: str, + service_name: str, + named_value_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_named_value_delete_request( + resource_group_name: str, + service_name: str, + named_value_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_named_value_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + is_key_vault_refresh_failed: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if is_key_vault_refresh_failed is not None: + _params["isKeyVaultRefreshFailed"] = _SERIALIZER.query( + "is_key_vault_refresh_failed", is_key_vault_refresh_failed, "bool" + ) + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_named_value_list_value_request( + resource_group_name: str, service_name: str, named_value_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/listValue" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_named_value_refresh_secret_request( + resource_group_name: str, service_name: str, named_value_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/refreshSecret" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "namedValueId": _SERIALIZER.url("named_value_id", named_value_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_notification_get_request( + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_notification_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_notification_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_notification_recipient_user_list_by_notification_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_notification_recipient_user_check_entity_exists_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_notification_recipient_user_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_notification_recipient_user_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_notification_recipient_email_list_by_notification_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_notification_recipient_email_check_entity_exists_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + email: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + "email": _SERIALIZER.url("email", email, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_notification_recipient_email_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + email: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + "email": _SERIALIZER.url("email", email, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_notification_recipient_email_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + email: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + "email": _SERIALIZER.url("email", email, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_workspace_notification_recipient_user_list_by_notification_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_notification_recipient_user_check_entity_exists_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_notification_recipient_user_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_notification_recipient_user_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_workspace_notification_recipient_email_list_by_notification_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_notification_recipient_email_check_entity_exists_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + email: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + "email": _SERIALIZER.url("email", email, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_notification_recipient_email_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + email: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + "email": _SERIALIZER.url("email", email, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_notification_recipient_email_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + email: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), + "email": _SERIALIZER.url("email", email, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_open_id_connect_provider_get_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, opid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "opid": _SERIALIZER.url("opid", opid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_open_id_connect_provider_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, opid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "opid": _SERIALIZER.url("opid", opid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_open_id_connect_provider_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + opid: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "opid": _SERIALIZER.url("opid", opid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_open_id_connect_provider_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + opid: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "opid": _SERIALIZER.url("opid", opid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_open_id_connect_provider_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + opid: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "opid": _SERIALIZER.url("opid", opid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_open_id_connect_provider_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_open_id_connect_provider_list_secrets_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, opid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}/listSecrets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "opid": _SERIALIZER.url("opid", opid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_fragment_get_request( + resource_group_name: str, + service_name: str, + id: str, + subscription_id: str, + *, + format: Optional[Union[str, _models.PolicyFragmentContentFormat]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "id": _SERIALIZER.url("id", id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if format is not None: + _params["format"] = _SERIALIZER.query("format", format, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_fragment_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "id": _SERIALIZER.url("id", id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_policy_fragment_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "id": _SERIALIZER.url("id", id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_fragment_delete_request( + resource_group_name: str, + service_name: str, + id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "id": _SERIALIZER.url("id", id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_fragment_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + orderby: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if orderby is not None: + _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_fragment_list_references_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + id: str, + subscription_id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "id": _SERIALIZER.url("id", id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_restriction_get_request( + resource_group_name: str, service_name: str, policy_restriction_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "policyRestrictionId": _SERIALIZER.url("policy_restriction_id", policy_restriction_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_restriction_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, policy_restriction_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "policyRestrictionId": _SERIALIZER.url("policy_restriction_id", policy_restriction_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_policy_restriction_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "policyRestrictionId": _SERIALIZER.url("policy_restriction_id", policy_restriction_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_restriction_update_request( + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "policyRestrictionId": _SERIALIZER.url("policy_restriction_id", policy_restriction_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_restriction_delete_request( + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "policyRestrictionId": _SERIALIZER.url("policy_restriction_id", policy_restriction_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policy_restriction_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_portal_config_get_request( + resource_group_name: str, service_name: str, portal_config_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "portalConfigId": _SERIALIZER.url("portal_config_id", portal_config_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_portal_config_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, portal_config_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "portalConfigId": _SERIALIZER.url("portal_config_id", portal_config_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_portal_config_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + portal_config_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "portalConfigId": _SERIALIZER.url("portal_config_id", portal_config_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_portal_config_update_request( + resource_group_name: str, + service_name: str, + portal_config_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "portalConfigId": _SERIALIZER.url("portal_config_id", portal_config_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_portal_config_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_client_application_get_request( + resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "clientApplicationId": _SERIALIZER.url("client_application_id", client_application_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_client_application_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "clientApplicationId": _SERIALIZER.url("client_application_id", client_application_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_client_application_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "clientApplicationId": _SERIALIZER.url("client_application_id", client_application_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_client_application_delete_request( + resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "clientApplicationId": _SERIALIZER.url("client_application_id", client_application_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_client_application_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_client_application_list_secrets_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, client_application_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/listSecrets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "clientApplicationId": _SERIALIZER.url("client_application_id", client_application_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_client_application_product_link_get_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks/{clientApplicationProductLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "clientApplicationId": _SERIALIZER.url("client_application_id", client_application_id, "str"), + "clientApplicationProductLinkId": _SERIALIZER.url( + "client_application_product_link_id", client_application_product_link_id, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_client_application_product_link_create_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks/{clientApplicationProductLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "clientApplicationId": _SERIALIZER.url("client_application_id", client_application_id, "str"), + "clientApplicationProductLinkId": _SERIALIZER.url( + "client_application_product_link_id", client_application_product_link_id, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_client_application_product_link_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks/{clientApplicationProductLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "clientApplicationId": _SERIALIZER.url("client_application_id", client_application_id, "str"), + "clientApplicationProductLinkId": _SERIALIZER.url( + "client_application_product_link_id", client_application_product_link_id, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_client_application_product_link_list_by_client_applications_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + client_application_id: str, + subscription_id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "clientApplicationId": _SERIALIZER.url("client_application_id", client_application_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_portal_revision_get_request( + resource_group_name: str, service_name: str, portal_revision_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "portalRevisionId": _SERIALIZER.url("portal_revision_id", portal_revision_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_portal_revision_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, portal_revision_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "portalRevisionId": _SERIALIZER.url("portal_revision_id", portal_revision_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_portal_revision_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, portal_revision_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "portalRevisionId": _SERIALIZER.url("portal_revision_id", portal_revision_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_portal_revision_update_request( + resource_group_name: str, + service_name: str, + portal_revision_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "portalRevisionId": _SERIALIZER.url("portal_revision_id", portal_revision_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_portal_revision_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connection_get_by_name_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connection_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connection_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_private_endpoint_connection_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connection_get_private_link_resource_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + private_link_sub_resource_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "privateLinkSubResourceName": _SERIALIZER.url( + "private_link_sub_resource_name", private_link_sub_resource_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connection_list_private_link_resources_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_api_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + product_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_api_check_entity_exists_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, product_id: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_product_api_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, product_id: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_api_delete_request( + resource_group_name: str, service_name: str, product_id: str, api_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_product_group_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + product_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_group_check_entity_exists_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, product_id: str, group_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_product_group_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, product_id: str, group_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_group_delete_request( + resource_group_name: str, service_name: str, product_id: str, group_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_product_subscriptions_list_request( + resource_group_name: str, + service_name: str, + product_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_api_link_get_request( + resource_group_name: str, service_name: str, product_id: str, api_link_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "apiLinkId": _SERIALIZER.url("api_link_id", api_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_api_link_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, product_id: str, api_link_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "apiLinkId": _SERIALIZER.url("api_link_id", api_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_api_link_delete_request( + resource_group_name: str, service_name: str, product_id: str, api_link_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "apiLinkId": _SERIALIZER.url("api_link_id", api_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_product_api_link_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + product_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_group_link_get_request( + resource_group_name: str, + service_name: str, + product_id: str, + group_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "groupLinkId": _SERIALIZER.url("group_link_id", group_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_group_link_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + product_id: str, + group_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "groupLinkId": _SERIALIZER.url("group_link_id", group_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_product_group_link_delete_request( + resource_group_name: str, + service_name: str, + product_id: str, + group_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + "groupLinkId": _SERIALIZER.url("group_link_id", group_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_product_group_link_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + product_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "productId": _SERIALIZER.url("product_id", product_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_global_schema_get_request( + resource_group_name: str, service_name: str, schema_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_global_schema_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, schema_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_global_schema_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + schema_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_global_schema_delete_request( + resource_group_name: str, + service_name: str, + schema_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "schemaId": _SERIALIZER.url("schema_id", schema_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_global_schema_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tenant_settings_get_request( + resource_group_name: str, + service_name: str, + settings_type: Union[str, _models.SettingsTypeName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "settingsType": _SERIALIZER.url("settings_type", settings_type, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tenant_settings_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_subscription_get_request( + resource_group_name: str, service_name: str, sid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_subscription_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, sid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_subscription_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + sid: str, + subscription_id: str, + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if notify is not None: + _params["notify"] = _SERIALIZER.query("notify", notify, "bool") + if app_type is not None: + _params["appType"] = _SERIALIZER.query("app_type", app_type, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_subscription_update_request( + resource_group_name: str, + service_name: str, + sid: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if notify is not None: + _params["notify"] = _SERIALIZER.query("notify", notify, "bool") + if app_type is not None: + _params["appType"] = _SERIALIZER.query("app_type", app_type, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_subscription_delete_request( + resource_group_name: str, + service_name: str, + sid: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_subscription_list_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_subscription_regenerate_primary_key_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, sid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_subscription_regenerate_secondary_key_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, sid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_subscription_list_secrets_request( + resource_group_name: str, service_name: str, sid: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/listSecrets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "sid": _SERIALIZER.url("sid", sid, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_api_link_get_request( + resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "apiLinkId": _SERIALIZER.url("api_link_id", api_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_api_link_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "apiLinkId": _SERIALIZER.url("api_link_id", api_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_api_link_delete_request( + resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "apiLinkId": _SERIALIZER.url("api_link_id", api_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_tag_api_link_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + tag_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_operation_link_get_request( + resource_group_name: str, + service_name: str, + tag_id: str, + operation_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "operationLinkId": _SERIALIZER.url("operation_link_id", operation_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_operation_link_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + tag_id: str, + operation_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "operationLinkId": _SERIALIZER.url("operation_link_id", operation_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_operation_link_delete_request( + resource_group_name: str, + service_name: str, + tag_id: str, + operation_link_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "operationLinkId": _SERIALIZER.url("operation_link_id", operation_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_tag_operation_link_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + tag_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_product_link_get_request( + resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "productLinkId": _SERIALIZER.url("product_link_id", product_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_product_link_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "productLinkId": _SERIALIZER.url("product_link_id", product_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tag_product_link_delete_request( + resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + "productLinkId": _SERIALIZER.url("product_link_id", product_link_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_tag_product_link_list_by_product_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + tag_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "tagId": _SERIALIZER.url("tag_id", tag_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tenant_access_get_request( + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "accessName": _SERIALIZER.url("access_name", access_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tenant_access_get_entity_tag_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "accessName": _SERIALIZER.url("access_name", access_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_tenant_access_create_request( + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "accessName": _SERIALIZER.url("access_name", access_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tenant_access_update_request( + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "accessName": _SERIALIZER.url("access_name", access_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tenant_access_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tenant_access_regenerate_primary_key_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "accessName": _SERIALIZER.url("access_name", access_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_tenant_access_regenerate_secondary_key_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "accessName": _SERIALIZER.url("access_name", access_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_tenant_access_list_secrets_request( + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "accessName": _SERIALIZER.url("access_name", access_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tenant_access_git_regenerate_primary_key_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "accessName": _SERIALIZER.url("access_name", access_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_tenant_access_git_regenerate_secondary_key_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "accessName": _SERIALIZER.url("access_name", access_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_tenant_configuration_deploy_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tenant_configuration_save_request( + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tenant_configuration_validate_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tenant_configuration_get_sync_state_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_user_get_request( + resource_group_name: str, service_name: str, user_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_user_get_entity_tag_request( + resource_group_name: str, service_name: str, user_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_user_create_or_update_request( + resource_group_name: str, + service_name: str, + user_id: str, + subscription_id: str, + *, + notify: Optional[bool] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if notify is not None: + _params["notify"] = _SERIALIZER.query("notify", notify, "bool") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_user_update_request( + resource_group_name: str, + service_name: str, + user_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_user_delete_request( + resource_group_name: str, + service_name: str, + user_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_subscriptions: Optional[bool] = None, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if delete_subscriptions is not None: + _params["deleteSubscriptions"] = _SERIALIZER.query("delete_subscriptions", delete_subscriptions, "bool") + if notify is not None: + _params["notify"] = _SERIALIZER.query("notify", notify, "bool") + if app_type is not None: + _params["appType"] = _SERIALIZER.query("app_type", app_type, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_user_list_by_service_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + expand_groups: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + if expand_groups is not None: + _params["expandGroups"] = _SERIALIZER.query("expand_groups", expand_groups, "bool") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_user_generate_sso_url_request( + resource_group_name: str, service_name: str, user_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_user_get_shared_access_token_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, user_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_user_group_list_request( + resource_group_name: str, + service_name: str, + user_id: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_user_identities_list_request( + resource_group_name: str, service_name: str, user_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_user_confirmation_password_send_request( # pylint: disable=name-too-long + resource_group_name: str, + service_name: str, + user_id: str, + subscription_id: str, + *, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "userId": _SERIALIZER.url("user_id", user_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if app_type is not None: + _params["appType"] = _SERIALIZER.query("app_type", app_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_api_management_workspace_link_get_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, workspace_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_workspace_links_list_by_service_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_get_request( + resource_group_name: str, service_name: str, workspace_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_get_entity_tag_request( + resource_group_name: str, service_name: str, workspace_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) + + +def build_workspace_create_or_update_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_update_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_delete_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_list_by_service_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skip is not None: + _params["$skip"] = _SERIALIZER.query("skip", skip, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_export_get_request( + resource_group_name: str, + service_name: str, + api_id: str, + subscription_id: str, + *, + format: Union[str, _models.ExportFormat], + export: Union[str, _models.ExportApi], + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}?export=true" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["format"] = _SERIALIZER.query("format", format, "str") + _params["export"] = _SERIALIZER.query("export", export, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_api_management_skus_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_workspace_api_export_get_request( + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + subscription_id: str, + *, + format: Union[str, _models.ExportFormat], + export: Union[str, _models.ExportApi], + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}?export=true" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + "workspaceId": _SERIALIZER.url("workspace_id", workspace_id, "str"), + "apiId": _SERIALIZER.url("api_id", api_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["format"] = _SERIALIZER.query("format", format, "str") + _params["export"] = _SERIALIZER.query("export", export, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_operation_status_get_request( + location: str, operation_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationStatuses/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_operations_results_get_request( + location: str, operation_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationResults/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="GET", url=_url, params=_params, **kwargs) + + +def build_api_management_perform_connectivity_check_async_request( # pylint: disable=name-too-long + resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "serviceName": _SERIALIZER.url("service_name", service_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class WorkspaceApiOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_api` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any + ) -> _models.ApiContract: + """Gets the details of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: Union[_models.ApiCreateOrUpdateParameter, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: _models.ApiCreateOrUpdateParameter, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ApiContract. The ApiContract is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ApiContract. The ApiContract is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ApiContract. The ApiContract is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: Union[_models.ApiCreateOrUpdateParameter, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Is one of the following types: + ApiCreateOrUpdateParameter, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ApiContract. The ApiContract is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.ApiContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: _models.ApiUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + parameters: Union[_models.ApiUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Is one of the following types: + ApiUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_revisions: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Deletes the specified API of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword delete_revisions: Delete all revisions of the Api. Default value is None. + :paramtype delete_revisions: bool + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + delete_revisions=delete_revisions, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + tags: Optional[str] = None, + expand_api_version_set: Optional[bool] = None, + **kwargs: Any + ) -> ItemPaged["_models.ApiContract"]: + """Lists all APIs of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| isCurrent | filter | eq, ne | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword tags: Include tags in the response. Default value is None. + :paramtype tags: str + :keyword expand_api_version_set: Include full ApiVersionSet resource in response. Default value + is None. + :paramtype expand_api_version_set: bool + :return: An iterator like instance of ApiContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + tags=tags, + expand_api_version_set=expand_api_version_set, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceApiReleaseOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_api_release` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Returns the details of an API release. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_release_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiReleaseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + **kwargs: Any + ) -> bool: + """Returns the etag of an API release. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_release_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: _models.ApiReleaseContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: Union[_models.ApiReleaseContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Is one of the following types: ApiReleaseContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_release_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiReleaseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: _models.ApiReleaseContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + parameters: Union[_models.ApiReleaseContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Is one of the following types: + ApiReleaseContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_release_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiReleaseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + release_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified release in the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_release_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ApiReleaseContract"]: + """Lists all releases of an API. An API release is created when making an API Revision current. + Releases are also used to rollback to previous revisions. Results will be paged and can be + constrained by the $top and $skip parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| notes | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiReleaseContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiReleaseContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiReleaseContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_release_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiReleaseContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceApiOperationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_api_operation` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + **kwargs: Any + ) -> _models.OperationContract: + """Gets the details of the API Operation specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_operation_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API operation specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_operation_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: _models.OperationContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: Union[_models.OperationContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Is one of the following types: OperationContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_operation_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: _models.OperationUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + parameters: Union[_models.OperationUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Is one of the following types: + OperationUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_operation_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified operation in the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_operation_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + tags: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.OperationContract"]: + """Lists a collection of the operations for the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword tags: Include tags in the response. Default value is None. + :paramtype tags: str + :return: An iterator like instance of OperationContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.OperationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OperationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_operation_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + tags=tags, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OperationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class GraphQLApiResolverPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`graph_ql_api_resolver_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the GraphQL API Resolver level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_graph_ql_api_resolver_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its + identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_graph_ql_api_resolver_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the GraphQL API Resolver level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the GraphQL API Resolver level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the GraphQL API Resolver level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the GraphQL API Resolver level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_graph_ql_api_resolver_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the GraphQL Api Resolver. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_graph_ql_api_resolver_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_resolver( + self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any + ) -> ItemPaged["_models.PolicyContract"]: + """Get the list of policy configuration at the GraphQL API Resolver level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :return: An iterator like instance of PolicyContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_graph_ql_api_resolver_policy_list_by_resolver_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_api_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API policy specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any + ) -> _models.PolicyCollection: + """Get the policy configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: PolicyCollection. The PolicyCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) + + _request = build_api_policy_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the Global policy definition of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, policy_id: Union[str, _models.PolicyIdName], **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Global policy definition in the Api Management + service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates the global policy configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates the global policy configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates the global policy configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates the global policy configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the global policy configuration of the Api Management Service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> ItemPaged["_models.PolicyContract"]: + """Lists all the Global Policy definitions of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of PolicyContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_policy_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ProductPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`product_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_product_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Get the ETag of the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any + ) -> ItemPaged["_models.PolicyContract"]: + """Get the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: An iterator like instance of PolicyContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_policy_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspacePolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_workspace_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the workspace policy specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any + ) -> ItemPaged["_models.PolicyContract"]: + """Get the policy configuration at the workspace level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :return: An iterator like instance of PolicyContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_policy_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceApiOperationPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_api_operation_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_operation_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API operation policy specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_operation_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_operation_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the Api Operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_operation_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_operation( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + operation_id: str, + **kwargs: Any + ) -> ItemPaged["_models.PolicyContract"]: + """Get the list of policy configuration at the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :return: An iterator like instance of PolicyContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_operation_policy_list_by_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceApiPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_api_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API policy specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any + ) -> ItemPaged["_models.PolicyContract"]: + """Get the policy configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: An iterator like instance of PolicyContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_policy_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceProductPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_product_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_workspace_product_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Get the ETag of the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_product_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_product_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_product_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, resource_group_name: str, service_name: str, workspace_id: str, product_id: str, **kwargs: Any + ) -> _models.PolicyCollection: + """Get the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: PolicyCollection. The PolicyCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) + + _request = build_workspace_product_policy_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class TagOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`tag` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get_by_api( + self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Get tag associated with the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_get_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_state_by_api( + self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_get_entity_state_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace + def assign_to_api( + self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Assign tag to the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_assign_to_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def detach_from_api( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any + ) -> None: + """Detach the tag from the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_detach_from_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagContract"]: + """Lists all Tags associated with the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_by_operation( + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Get tag associated with the Operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_get_by_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_state_by_operation( + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_get_entity_state_by_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace + def assign_to_operation( + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Assign tag to the Operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_assign_to_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def detach_from_operation( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any + ) -> None: + """Detach the tag from the Operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_detach_from_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_operation( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagContract"]: + """Lists all Tags associated with the Operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_list_by_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_by_product( + self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Get tag associated with the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_get_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_state_by_product( + self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_get_entity_state_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace + def assign_to_product( + self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Assign tag to the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_assign_to_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def detach_from_product( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any + ) -> None: + """Detach the tag from the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_detach_from_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagContract"]: + """Lists all Tags associated with the Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, tag_id: str, **kwargs: Any) -> _models.TagContract: + """Gets the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_tag_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_state(self, resource_group_name: str, service_name: str, tag_id: str, **kwargs: Any) -> bool: + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_get_entity_state_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: _models.TagCreateUpdateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: Union[_models.TagCreateUpdateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Is one of the following types: TagCreateUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tag_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: _models.TagCreateUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + parameters: Union[_models.TagCreateUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Is one of the following types: TagCreateUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tag_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + tag_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific tag of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + scope: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagContract"]: + """Lists a collection of tags defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword scope: Scope like 'apis', 'products' or 'apis/{apiId}. Default value is None. + :paramtype scope: str + :return: An iterator like instance of TagContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceTagOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_tag` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, **kwargs: Any + ) -> _models.TagContract: + """Gets the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + _request = build_workspace_tag_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_state( + self, resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_tag_get_entity_state_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: _models.TagCreateUpdateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: Union[_models.TagCreateUpdateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagContract: + """Creates a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Create parameters. Is one of the following types: TagCreateUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_tag_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: _models.TagCreateUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + parameters: Union[_models.TagCreateUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.TagContract: + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param parameters: Update parameters. Is one of the following types: TagCreateUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagContract. The TagContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_tag_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific tag of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_tag_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + scope: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagContract"]: + """Lists a collection of tags defined within a workspace in a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword scope: Scope like 'apis', 'products' or 'apis/{apiId}. Default value is None. + :paramtype scope: str + :return: An iterator like instance of TagContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_tag_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceApiSchemaOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_api_schema` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, schema_id: str, **kwargs: Any + ) -> _models.SchemaContract: + """Get the schema configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: SchemaContract. The SchemaContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SchemaContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_schema_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SchemaContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, schema_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the schema specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_schema_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + parameters: Union[_models.SchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_schema_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + parameters: _models.SchemaContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns SchemaContract. The SchemaContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns SchemaContract. The SchemaContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns SchemaContract. The SchemaContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + parameters: Union[_models.SchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Is one of the following types: SchemaContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns SchemaContract. The SchemaContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + schema_id=schema_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.SchemaContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.SchemaContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.SchemaContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + schema_id: str, + *, + etag: str, + match_condition: MatchConditions, + force: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Deletes the schema configuration at the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword force: If true removes all references to the schema before deleting it. Default value + is None. + :paramtype force: bool + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_schema_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + force=force, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.SchemaContract"]: + """Get the schema configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| contentType + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of SchemaContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SchemaContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_schema_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SchemaContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class DiagnosticOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`diagnostic` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, diagnostic_id: str, **kwargs: Any + ) -> _models.DiagnosticContract: + """Gets the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + _request = build_diagnostic_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, diagnostic_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_diagnostic_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: _models.DiagnosticContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Is one of the following types: DiagnosticContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_diagnostic_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: _models.DiagnosticContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Is one of the following types: + DiagnosticContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_diagnostic_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + diagnostic_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Diagnostic. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_diagnostic_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.DiagnosticContract"]: + """Lists all diagnostics of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of DiagnosticContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DiagnosticContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_diagnostic_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DiagnosticContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceDiagnosticOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_diagnostic` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, diagnostic_id: str, **kwargs: Any + ) -> _models.DiagnosticContract: + """Gets the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + _request = build_workspace_diagnostic_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, diagnostic_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_diagnostic_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: _models.DiagnosticContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Is one of the following types: DiagnosticContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_diagnostic_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: _models.DiagnosticUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Is one of the following types: + DiagnosticUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_diagnostic_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + diagnostic_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Diagnostic. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_diagnostic_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_workspace( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.DiagnosticContract"]: + """Lists all diagnostics in the specified workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of DiagnosticContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DiagnosticContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_diagnostic_list_by_workspace_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DiagnosticContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceApiDiagnosticOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_api_diagnostic` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Gets the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_diagnostic_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_diagnostic_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: _models.DiagnosticContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Is one of the following types: DiagnosticContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_diagnostic_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: _models.DiagnosticUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Is one of the following types: + DiagnosticUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_diagnostic_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + diagnostic_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Diagnostic from an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_diagnostic_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_workspace( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.DiagnosticContract"]: + """Lists all diagnostics of an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of DiagnosticContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DiagnosticContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_diagnostic_list_by_workspace_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DiagnosticContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class IssueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`issue` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, issue_id: str, **kwargs: Any) -> _models.IssueContract: + """Gets API Management issue details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) + + _request = build_issue_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.IssueContract"]: + """Lists a collection of issues in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| state | filter | eq | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of IssueContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.IssueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IssueContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_issue_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IssueContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ProductWikiOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`product_wiki` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any) -> _models.WikiContract: + """Gets the details of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) + + _request = build_product_wiki_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WikiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_wiki_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: _models.WikiContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for a Product or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for a Product or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for a Product or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: Union[_models.WikiContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for a Product or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create parameters. Is one of the following types: WikiContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_wiki_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WikiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: _models.WikiUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Wiki Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Wiki Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Wiki Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: Union[_models.WikiUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Wiki Update parameters. Is one of the following types: WikiUpdateContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_wiki_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WikiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Wiki from a Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_wiki_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class WorkspaceApiVersionSetOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_api_version_set` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, version_set_id: str, **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Gets the details of the Api Version Set specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) + + _request = build_workspace_api_version_set_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiVersionSetContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, version_set_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Api Version Set specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_version_set_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: _models.ApiVersionSetContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: Union[_models.ApiVersionSetContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Is one of the following types: + ApiVersionSetContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_version_set_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiVersionSetContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: _models.ApiVersionSetUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + parameters: Union[_models.ApiVersionSetUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Is one of the following types: + ApiVersionSetUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_api_version_set_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiVersionSetContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + version_set_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_api_version_set_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ApiVersionSetContract"]: + """Lists a collection of API Version Sets in the specified workspace with a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiVersionSetContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiVersionSetContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiVersionSetContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_version_set_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiVersionSetContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceBackendOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_backend` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, backend_id: str, **kwargs: Any + ) -> _models.BackendContract: + """Gets the details of the backend specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) + + _request = build_workspace_backend_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.BackendContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, backend_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the backend specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_backend_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: _models.BackendContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: Union[_models.BackendContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Is one of the following types: BackendContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_backend_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.BackendContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: _models.BackendUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + parameters: Union[_models.BackendUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Is one of the following types: BackendUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_backend_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.BackendContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + backend_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_backend_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_workspace( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.BackendContract"]: + """Lists a collection of backends in the specified workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of BackendContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.BackendContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BackendContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_backend_list_by_workspace_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BackendContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceCertificateOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_certificate` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, certificate_id: str, **kwargs: Any + ) -> _models.CertificateContract: + """Gets the details of the certificate specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) + + _request = build_workspace_certificate_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, certificate_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the certificate specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_certificate_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + parameters: _models.CertificateCreateOrUpdateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + parameters: Union[_models.CertificateCreateOrUpdateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Is one of the following types: + CertificateCreateOrUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters or JSON + or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_certificate_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + certificate_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_certificate_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_workspace( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + is_key_vault_refresh_failed: Optional[bool] = None, + **kwargs: Any + ) -> ItemPaged["_models.CertificateContract"]: + """Lists a collection of all certificates in the specified workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword is_key_vault_refresh_failed: When set to true, the response contains only certificates + entities which failed refresh. Default value is None. + :paramtype is_key_vault_refresh_failed: bool + :return: An iterator like instance of CertificateContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.CertificateContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CertificateContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_certificate_list_by_workspace_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + is_key_vault_refresh_failed=is_key_vault_refresh_failed, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CertificateContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def refresh_secret( + self, resource_group_name: str, service_name: str, workspace_id: str, certificate_id: str, **kwargs: Any + ) -> _models.CertificateContract: + """From KeyVault, Refresh the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) + + _request = build_workspace_certificate_refresh_secret_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class WorkspaceGroupOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_group` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, **kwargs: Any + ) -> _models.GroupContract: + """Gets the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + _request = build_workspace_group_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_group_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: _models.GroupCreateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: Union[_models.GroupCreateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Is one of the following types: GroupCreateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_group_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: _models.GroupUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + parameters: Union[_models.GroupUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Is one of the following types: GroupUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_group_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific group of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_group_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.GroupContract"]: + """Lists a collection of groups defined within a workspace in a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| externalId | filter | eq | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GroupContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GroupContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GroupContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_group_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GroupContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceLoggerOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_logger` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, logger_id: str, **kwargs: Any + ) -> _models.LoggerContract: + """Gets the details of the logger specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) + + _request = build_workspace_logger_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoggerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, logger_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the logger specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_logger_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: _models.LoggerContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: Union[_models.LoggerContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Is one of the following types: LoggerContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_logger_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoggerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: _models.LoggerUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + parameters: Union[_models.LoggerUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Is one of the following types: LoggerUpdateContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_logger_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoggerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + logger_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_logger_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_workspace( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.LoggerContract"]: + """Lists a collection of loggers in the specified workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of LoggerContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.LoggerContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LoggerContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_logger_list_by_workspace_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LoggerContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceNamedValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_named_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any + ) -> _models.NamedValueContract: + """Gets the details of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: NamedValueContract. The NamedValueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NamedValueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + + _request = build_workspace_named_value_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NamedValueContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_named_value_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: Union[_models.NamedValueCreateContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_named_value_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: _models.NamedValueCreateContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: Union[_models.NamedValueCreateContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Is one of the following types: NamedValueCreateContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.NamedValueContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NamedValueContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NamedValueContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: Union[_models.NamedValueUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_named_value_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: _models.NamedValueUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + parameters: Union[_models.NamedValueUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Is one of the following types: + NamedValueUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.NamedValueContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NamedValueContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NamedValueContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + named_value_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific named value from the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_named_value_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + is_key_vault_refresh_failed: Optional[Union[str, _models.KeyVaultRefreshState]] = None, + **kwargs: Any + ) -> ItemPaged["_models.NamedValueContract"]: + """Lists a collection of named values defined within a workspace in a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| tags | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword is_key_vault_refresh_failed: Query parameter to fetch named value entities based on + refresh status. Known values are: "true" and "false". Default value is None. + :paramtype is_key_vault_refresh_failed: str or + ~azure.mgmt.apimanagement.models.KeyVaultRefreshState + :return: An iterator like instance of NamedValueContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NamedValueContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_named_value_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + is_key_vault_refresh_failed=is_key_vault_refresh_failed, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NamedValueContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_value( + self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any + ) -> _models.NamedValueSecretContract: + """Gets the secret of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: NamedValueSecretContract. The NamedValueSecretContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NamedValueSecretContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NamedValueSecretContract] = kwargs.pop("cls", None) + + _request = build_workspace_named_value_list_value_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NamedValueSecretContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + def _refresh_secret_initial( + self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_workspace_named_value_refresh_secret_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_refresh_secret( + self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Refresh the secret of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._refresh_secret_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + named_value_id=named_value_id, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.NamedValueContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NamedValueContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NamedValueContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class WorkspaceNotificationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_notification` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + **kwargs: Any + ) -> _models.NotificationContract: + """Gets the details of the Notification specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :return: NotificationContract. The NotificationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NotificationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) + + _request = build_workspace_notification_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NotificationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.NotificationContract: + """Create or Update API Management publisher notification for the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: NotificationContract. The NotificationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NotificationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) + + _request = build_workspace_notification_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NotificationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.NotificationContract"]: + """Lists a collection of properties defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of NotificationContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.NotificationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NotificationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_notification_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NotificationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspacePolicyFragmentOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_policy_fragment` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + *, + format: Optional[Union[str, _models.PolicyFragmentContentFormat]] = None, + **kwargs: Any + ) -> _models.PolicyFragmentContract: + """Gets a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :keyword format: Policy fragment content format. Known values are: "xml" and "rawxml". Default + value is None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyFragmentContentFormat + :return: PolicyFragmentContract. The PolicyFragmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyFragmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) + + _request = build_workspace_policy_fragment_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + id=id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyFragmentContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_policy_fragment_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + id=id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + parameters: Union[_models.PolicyFragmentContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_policy_fragment_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + id=id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + parameters: _models.PolicyFragmentContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + parameters: Union[_models.PolicyFragmentContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Is one of the following types: + PolicyFragmentContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + id=id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.PolicyFragmentContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.PolicyFragmentContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.PolicyFragmentContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_policy_fragment_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + id=id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + orderby: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.PolicyFragmentContract"]: + """Gets all policy fragments defined within a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of PolicyFragmentContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyFragmentContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_policy_fragment_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + orderby=orderby, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyFragmentContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_references( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> _models.ResourceCollection: + """Lists policy resources that reference the policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param id: A resource identifier. Required. + :type id: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: ResourceCollection. The ResourceCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResourceCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ResourceCollection] = kwargs.pop("cls", None) + + _request = build_workspace_policy_fragment_list_references_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + id=id, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ResourceCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class SignInSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`sign_in_settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.PortalSigninSettings: + """Get Sign In Settings for the Portal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: PortalSigninSettings. The PortalSigninSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalSigninSettings] = kwargs.pop("cls", None) + + _request = build_sign_in_settings_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalSigninSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the SignInSettings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_sign_in_settings_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.PortalSigninSettings, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSigninSettings: + """Create or Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSigninSettings. The PortalSigninSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSigninSettings: + """Create or Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSigninSettings. The PortalSigninSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSigninSettings: + """Create or Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSigninSettings. The PortalSigninSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.PortalSigninSettings, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSigninSettings: + """Create or Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Is one of the following types: + PortalSigninSettings, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSigninSettings. The PortalSigninSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalSigninSettings] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sign_in_settings_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalSigninSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.PortalSigninSettings, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-In settings. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-In settings. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-In settings. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.PortalSigninSettings, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Update Sign-In settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-In settings. Is one of the following types: + PortalSigninSettings, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sign_in_settings_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class SignUpSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`sign_up_settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.PortalSignupSettings: + """Get Sign Up Settings for the Portal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: PortalSignupSettings. The PortalSignupSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalSignupSettings] = kwargs.pop("cls", None) + + _request = build_sign_up_settings_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalSignupSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the SignUpSettings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_sign_up_settings_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.PortalSignupSettings, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSignupSettings: + """Create or Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSignupSettings. The PortalSignupSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSignupSettings: + """Create or Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSignupSettings. The PortalSignupSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSignupSettings: + """Create or Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSignupSettings. The PortalSignupSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.PortalSignupSettings, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalSignupSettings: + """Create or Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Is one of the following types: + PortalSignupSettings, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalSignupSettings. The PortalSignupSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalSignupSettings] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sign_up_settings_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalSignupSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.PortalSignupSettings, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-Up settings. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-Up settings. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-Up settings. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.PortalSignupSettings, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Sign-Up settings. Is one of the following types: + PortalSignupSettings, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sign_up_settings_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class DelegationSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`delegation_settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.PortalDelegationSettings: + """Get Delegation Settings for the Portal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: PortalDelegationSettings. The PortalDelegationSettings is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalDelegationSettings] = kwargs.pop("cls", None) + + _request = build_delegation_settings_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalDelegationSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the DelegationSettings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delegation_settings_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.PortalDelegationSettings, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalDelegationSettings: + """Create or Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalDelegationSettings. The PortalDelegationSettings is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalDelegationSettings: + """Create or Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalDelegationSettings. The PortalDelegationSettings is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalDelegationSettings: + """Create or Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalDelegationSettings. The PortalDelegationSettings is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.PortalDelegationSettings, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PortalDelegationSettings: + """Create or Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Create or update parameters. Is one of the following types: + PortalDelegationSettings, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalDelegationSettings. The PortalDelegationSettings is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalDelegationSettings] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_delegation_settings_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalDelegationSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.PortalDelegationSettings, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Delegation settings. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Delegation settings. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Delegation settings. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.PortalDelegationSettings, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Update Delegation settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Update Delegation settings. Is one of the following types: + PortalDelegationSettings, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalDelegationSettings or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_delegation_settings_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_secrets( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> _models.PortalSettingValidationKeyContract: + """Gets the secret validation key of the DelegationSettings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: PortalSettingValidationKeyContract. The PortalSettingValidationKeyContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSettingValidationKeyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalSettingValidationKeyContract] = kwargs.pop("cls", None) + + _request = build_delegation_settings_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalSettingValidationKeyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class WorkspaceProductOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_product` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, product_id: str, **kwargs: Any + ) -> _models.ProductContract: + """Gets the details of the product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) + + _request = build_workspace_product_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, product_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_product_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: _models.ProductContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: Union[_models.ProductContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Is one of the following types: ProductContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_product_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: _models.ProductUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + parameters: Union[_models.ProductUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Is one of the following types: ProductUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_product_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_subscriptions: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Delete product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword delete_subscriptions: Delete existing subscriptions associated with the product or + not. Default value is None. + :paramtype delete_subscriptions: bool + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_product_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + delete_subscriptions=delete_subscriptions, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + expand_groups: Optional[bool] = None, + tags: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.ProductContract"]: + """Lists a collection of products in the specified workspace in a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| state | filter | eq | |
| groups | expand | | |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword expand_groups: When set to true, the response contains an array of groups that have + visibility to the product. The default is false. Default value is None. + :paramtype expand_groups: bool + :keyword tags: Products which are part of a specific tag. Default value is None. + :paramtype tags: str + :return: An iterator like instance of ProductContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_product_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + expand_groups=expand_groups, + tags=tags, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceProductApiLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_product_api_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Gets the API link for the product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) + + _request = build_workspace_product_api_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + parameters: _models.ProductApiLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + parameters: Union[_models.ProductApiLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + ProductApiLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract or JSON or IO[bytes] + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_product_api_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + api_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified API from the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_product_api_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ProductApiLinkContract"]: + """Lists a collection of the API links associated with a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| apiId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ProductApiLinkContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductApiLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductApiLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_product_api_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductApiLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceProductGroupLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_product_group_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Gets the group link for the product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) + + _request = build_workspace_product_group_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + group_link_id=group_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductGroupLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + parameters: _models.ProductGroupLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + parameters: Union[_models.ProductGroupLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + ProductGroupLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract or JSON or + IO[bytes] + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_product_group_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + group_link_id=group_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductGroupLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + group_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified group from the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_product_group_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + group_link_id=group_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ProductGroupLinkContract"]: + """Lists a collection of the group links associated with a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| groupId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ProductGroupLinkContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductGroupLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductGroupLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_product_group_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductGroupLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceGlobalSchemaOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_global_schema` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, schema_id: str, **kwargs: Any + ) -> _models.GlobalSchemaContract: + """Gets the details of the Schema specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: GlobalSchemaContract. The GlobalSchemaContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GlobalSchemaContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) + + _request = build_workspace_global_schema_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GlobalSchemaContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, schema_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Schema specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_global_schema_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + parameters: Union[_models.GlobalSchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_global_schema_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + parameters: _models.GlobalSchemaContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns GlobalSchemaContract. The GlobalSchemaContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns GlobalSchemaContract. The GlobalSchemaContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns GlobalSchemaContract. The GlobalSchemaContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + parameters: Union[_models.GlobalSchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Is one of the following types: + GlobalSchemaContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns GlobalSchemaContract. The GlobalSchemaContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + schema_id=schema_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.GlobalSchemaContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.GlobalSchemaContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.GlobalSchemaContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + schema_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Schema. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_global_schema_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.GlobalSchemaContract"]: + """Lists a collection of schemas registered with workspace in a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GlobalSchemaContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GlobalSchemaContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_global_schema_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GlobalSchemaContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class UserSubscriptionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`user_subscription` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, user_id: str, sid: str, **kwargs: Any + ) -> _models.SubscriptionContract: + """Gets the specified Subscription entity associated with a particular user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + _request = build_user_subscription_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + user_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.SubscriptionContract"]: + """Lists the collection of subscriptions of the specified user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :keyword filter: | Field | Usage | Supported operators | Supported functions + |
|-------------|------------------------|-----------------------------------|
|name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
|productId | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of SubscriptionContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SubscriptionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_user_subscription_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SubscriptionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceSubscriptionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_subscription` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any + ) -> _models.SubscriptionContract: + """Gets the specified Subscription entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + _request = build_workspace_subscription_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the apimanagement subscription specified by its + identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_subscription_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: _models.SubscriptionCreateParameters, + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: JSON, + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: IO[bytes], + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: Union[_models.SubscriptionCreateParameters, JSON, IO[bytes]], + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Is one of the following types: + SubscriptionCreateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters or JSON or + IO[bytes] + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_subscription_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + notify=notify, + app_type=app_type, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: _models.SubscriptionUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + parameters: Union[_models.SubscriptionUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Is one of the following types: + SubscriptionUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_subscription_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + notify=notify, + app_type=app_type, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + sid: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified subscription. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_subscription_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.SubscriptionContract"]: + """Lists all subscriptions of the workspace in an API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| state | filter | eq | |
| user | expand | | + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of SubscriptionContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SubscriptionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_subscription_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SubscriptionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def regenerate_primary_key( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any + ) -> None: + """Regenerates primary key of existing subscription of the workspace in an API Management service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_subscription_regenerate_primary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def regenerate_secondary_key( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any + ) -> None: + """Regenerates secondary key of existing subscription of the workspace in an API Management + service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_subscription_regenerate_secondary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_secrets( + self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any + ) -> _models.SubscriptionKeysContract: + """Gets the specified Subscription keys. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: SubscriptionKeysContract. The SubscriptionKeysContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionKeysContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SubscriptionKeysContract] = kwargs.pop("cls", None) + + _request = build_workspace_subscription_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionKeysContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class WorkspaceTagApiLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_tag_api_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Gets the API link for the tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) + + _request = build_workspace_tag_api_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + parameters: _models.TagApiLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + parameters: Union[_models.TagApiLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + TagApiLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract or JSON or IO[bytes] + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_tag_api_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + api_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified API from the specified tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_tag_api_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagApiLinkContract"]: + """Lists a collection of the API links associated with a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| apiId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagApiLinkContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagApiLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagApiLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_tag_api_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagApiLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceTagOperationLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_tag_operation_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Gets the operation link for the tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) + + _request = build_workspace_tag_operation_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + operation_link_id=operation_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagOperationLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + parameters: _models.TagOperationLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + parameters: Union[_models.TagOperationLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + TagOperationLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract or JSON or + IO[bytes] + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_tag_operation_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + operation_link_id=operation_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagOperationLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + operation_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified operation from the specified tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_tag_operation_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + operation_link_id=operation_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagOperationLinkContract"]: + """Lists a collection of the operation links associated with a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| operationId + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagOperationLinkContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagOperationLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagOperationLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_tag_operation_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagOperationLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceTagProductLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_tag_product_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Gets the product link for the tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) + + _request = build_workspace_tag_product_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + product_link_id=product_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagProductLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + parameters: _models.TagProductLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + parameters: Union[_models.TagProductLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + TagProductLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract or JSON or IO[bytes] + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_tag_product_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + product_link_id=product_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagProductLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + product_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified product from the specified tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_tag_product_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + product_link_id=product_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + tag_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagProductLinkContract"]: + """Lists a collection of the product links associated with a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| productId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagProductLinkContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagProductLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagProductLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_tag_product_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagProductLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiManagementOperationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_management_operations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: + """Lists all of the available REST API operations of the Microsoft.ApiManagement provider. + + :return: An iterator like instance of Operation + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Operation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiGatewayOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_gateway` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> _models.ApiManagementGatewayResource: + """Gets an API Management gateway resource description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :return: ApiManagementGatewayResource. The ApiManagementGatewayResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementGatewayResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) + + _request = build_api_gateway_get_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementGatewayResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + parameters: Union[_models.ApiManagementGatewayResource, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_gateway_create_or_update_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: _models.ApiManagementGatewayResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementGatewayResource]: + """Creates or updates an API Management gateway. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementGatewayResource]: + """Creates or updates an API Management gateway. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementGatewayResource]: + """Creates or updates an API Management gateway. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: Union[_models.ApiManagementGatewayResource, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ApiManagementGatewayResource]: + """Creates or updates an API Management gateway. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Is one of the following types: ApiManagementGatewayResource, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayResource or JSON or + IO[bytes] + :return: An instance of LROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ApiManagementGatewayResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiManagementGatewayResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiManagementGatewayResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + gateway_name: str, + parameters: Union[_models.ApiManagementGatewayUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_gateway_update_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: _models.ApiManagementGatewayUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementGatewayResource]: + """Updates an existing API Management gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementGatewayResource]: + """Updates an existing API Management gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementGatewayResource]: + """Updates an existing API Management gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + gateway_name: str, + parameters: Union[_models.ApiManagementGatewayUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ApiManagementGatewayResource]: + """Updates an existing API Management gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway operation. + Is one of the following types: ApiManagementGatewayUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayUpdateParameters or JSON + or IO[bytes] + :return: An instance of LROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ApiManagementGatewayResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiManagementGatewayResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiManagementGatewayResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, gateway_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_gateway_delete_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, gateway_name: str, **kwargs: Any + ) -> LROPoller[_models.ApiManagementGatewayResource]: + """Deletes an existing API Management gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :return: An instance of LROPoller that returns ApiManagementGatewayResource. The + ApiManagementGatewayResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementGatewayResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = _deserialize(_models.ApiManagementGatewayResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiManagementGatewayResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiManagementGatewayResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.ApiManagementGatewayResource"]: + """List all API Management gateways within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of ApiManagementGatewayResource + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementGatewayResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_gateway_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementGatewayResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.ApiManagementGatewayResource"]: + """List all API Management gateways within a subscription. + + :return: An iterator like instance of ApiManagementGatewayResource + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementGatewayResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementGatewayResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_gateway_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementGatewayResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiManagementGatewaySkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_management_gateway_skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_available_skus( + self, resource_group_name: str, gateway_name: str, **kwargs: Any + ) -> ItemPaged["_models.GatewayResourceSkuResult"]: + """Gets available SKUs for API Management gateway. + + Gets all available SKU for a given API Management gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :return: An iterator like instance of GatewayResourceSkuResult + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GatewayResourceSkuResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GatewayResourceSkuResult]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_gateway_skus_list_available_skus_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GatewayResourceSkuResult], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> _models.ApiContract: + """Gets the details of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + + _request = build_api_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: Union[_models.ApiCreateOrUpdateParameter, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: _models.ApiCreateOrUpdateParameter, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ApiContract. The ApiContract is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ApiContract. The ApiContract is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ApiContract. The ApiContract is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: Union[_models.ApiCreateOrUpdateParameter, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ApiContract]: + """Creates new or updates existing specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: Create or update parameters. Is one of the following types: + ApiCreateOrUpdateParameter, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ApiContract. The ApiContract is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.ApiContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: _models.ApiUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: Union[_models.ApiUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ApiContract: + """Updates the specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param parameters: API Update Contract parameters. Is one of the following types: + ApiUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + def _delete_initial( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_revisions: Optional[bool] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + delete_revisions=delete_revisions, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_revisions: Optional[bool] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword delete_revisions: Delete all revisions of the Api. Default value is None. + :paramtype delete_revisions: bool + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + etag=etag, + match_condition=match_condition, + delete_revisions=delete_revisions, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + tags: Optional[str] = None, + expand_api_version_set: Optional[bool] = None, + **kwargs: Any + ) -> ItemPaged["_models.ApiContract"]: + """Lists all APIs of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| isCurrent | filter | eq, ne | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword tags: Include tags in the response. Default value is None. + :paramtype tags: str + :keyword expand_api_version_set: Include full ApiVersionSet resource in response. Default value + is None. + :paramtype expand_api_version_set: bool + :return: An iterator like instance of ApiContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + tags=tags, + expand_api_version_set=expand_api_version_set, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_tags( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + include_not_tagged_apis: Optional[bool] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagResourceContract"]: + """Lists a collection of apis associated with tags. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| isCurrent | filter | eq | |
. Default value is + None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword include_not_tagged_apis: Include not tagged APIs. Default value is None. + :paramtype include_not_tagged_apis: bool + :return: An iterator like instance of TagResourceContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagResourceContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_list_by_tags_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + include_not_tagged_apis=include_not_tagged_apis, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagResourceContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiRevisionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_revision` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ApiRevisionContract"]: + """Lists all revisions of an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| apiRevision + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiRevisionContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiRevisionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_revision_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiRevisionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiProductOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_product` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_apis( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ProductContract"]: + """Lists all Products, which the API is part of. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ProductContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_product_list_by_apis_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class OperationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`operation` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_tags( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + include_not_tagged_operations: Optional[bool] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagResourceContract"]: + """Lists a collection of operations associated with tags. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword include_not_tagged_operations: Include not tagged Operations. Default value is None. + :paramtype include_not_tagged_operations: bool + :return: An iterator like instance of TagResourceContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagResourceContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operation_list_by_tags_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + include_not_tagged_operations=include_not_tagged_operations, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagResourceContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceApiRevisionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_api_revision` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ApiRevisionContract"]: + """Lists all revisions of an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| apiRevision + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiRevisionContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiRevisionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_api_revision_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiRevisionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiManagementServiceOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_management_service` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.ApiManagementServiceResource: + """Gets an API Management service resource description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: ApiManagementServiceResource. The ApiManagementServiceResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + + _request = build_api_management_service_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceResource, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_management_service_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.ApiManagementServiceResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Creates or updates an API Management service. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Creates or updates an API Management service. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Creates or updates an API Management service. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceResource, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Creates or updates an API Management service. This is long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Is one of the following types: ApiManagementServiceResource, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource or JSON or + IO[bytes] + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_management_service_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + service_name: str, + parameters: _models.ApiManagementServiceUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Updates an existing API Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Updates an existing API Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Updates an existing API Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Updates an existing API Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management service operation. + Is one of the following types: ApiManagementServiceUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters or JSON + or IO[bytes] + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_management_service_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Deletes an existing API Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.ApiManagementServiceResource"]: + """List all API Management services within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of ApiManagementServiceResource + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementServiceResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_service_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementServiceResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.ApiManagementServiceResource"]: + """Lists all API Management services within an Azure subscription. + + :return: An iterator like instance of ApiManagementServiceResource + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementServiceResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_service_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementServiceResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _restore_initial( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_management_service_restore_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_restore( + self, + resource_group_name: str, + service_name: str, + parameters: _models.ApiManagementServiceBackupRestoreParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Restores a backup of an API Management service created using the ApiManagementService_Backup + operation on the current service. This is a long running operation and could take several + minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Restore API Management service from backup + operation. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_restore( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Restores a backup of an API Management service created using the ApiManagementService_Backup + operation on the current service. This is a long running operation and could take several + minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Restore API Management service from backup + operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_restore( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Restores a backup of an API Management service created using the ApiManagementService_Backup + operation on the current service. This is a long running operation and could take several + minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Restore API Management service from backup + operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_restore( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Restores a backup of an API Management service created using the ApiManagementService_Backup + operation on the current service. This is a long running operation and could take several + minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Restore API Management service from backup + operation. Is one of the following types: ApiManagementServiceBackupRestoreParameters, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters + or JSON or IO[bytes] + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._restore_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _backup_initial( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_management_service_backup_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_backup( + self, + resource_group_name: str, + service_name: str, + parameters: _models.ApiManagementServiceBackupRestoreParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Creates a backup of the API Management service to the given Azure Storage Account. This is long + running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_backup( + self, + resource_group_name: str, + service_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Creates a backup of the API Management service to the given Azure Storage Account. This is long + running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_backup( + self, + resource_group_name: str, + service_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Creates a backup of the API Management service to the given Azure Storage Account. This is long + running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_backup( + self, + resource_group_name: str, + service_name: str, + parameters: Union[_models.ApiManagementServiceBackupRestoreParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Creates a backup of the API Management service to the given Azure Storage Account. This is long + running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the ApiManagementService_Backup operation. Is one of + the following types: ApiManagementServiceBackupRestoreParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters + or JSON or IO[bytes] + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._backup_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _migrate_to_stv2_initial( + self, + resource_group_name: str, + service_name: str, + parameters: Optional[Union[_models.MigrateToStv2Contract, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if parameters else None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_api_management_service_migrate_to_stv2_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_migrate_to_stv2( + self, + resource_group_name: str, + service_name: str, + parameters: Optional[_models.MigrateToStv2Contract] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Upgrades an API Management service to the Stv2 platform. For details refer to + `https://aka.ms/apim-migrate-stv2 `_. This change is not + reversible. This is long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Optional parameters supplied to migrate service. Default value is None. + :type parameters: ~azure.mgmt.apimanagement.models.MigrateToStv2Contract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_migrate_to_stv2( + self, + resource_group_name: str, + service_name: str, + parameters: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Upgrades an API Management service to the Stv2 platform. For details refer to + `https://aka.ms/apim-migrate-stv2 `_. This change is not + reversible. This is long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Optional parameters supplied to migrate service. Default value is None. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_migrate_to_stv2( + self, + resource_group_name: str, + service_name: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Upgrades an API Management service to the Stv2 platform. For details refer to + `https://aka.ms/apim-migrate-stv2 `_. This change is not + reversible. This is long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Optional parameters supplied to migrate service. Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_migrate_to_stv2( + self, + resource_group_name: str, + service_name: str, + parameters: Optional[Union[_models.MigrateToStv2Contract, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Upgrades an API Management service to the Stv2 platform. For details refer to + `https://aka.ms/apim-migrate-stv2 `_. This change is not + reversible. This is long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Optional parameters supplied to migrate service. Is one of the following + types: MigrateToStv2Contract, JSON, IO[bytes] Default value is None. + :type parameters: ~azure.mgmt.apimanagement.models.MigrateToStv2Contract or JSON or IO[bytes] + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._migrate_to_stv2_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def get_sso_token( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> _models.ApiManagementServiceGetSsoTokenResult: + """Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: ApiManagementServiceGetSsoTokenResult. The ApiManagementServiceGetSsoTokenResult is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceGetSsoTokenResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementServiceGetSsoTokenResult] = kwargs.pop("cls", None) + + _request = build_api_management_service_get_sso_token_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementServiceGetSsoTokenResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _apply_network_configuration_updates_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + service_name: str, + parameters: Optional[ + Union[_models.ApiManagementServiceApplyNetworkConfigurationParameters, JSON, IO[bytes]] + ] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if parameters else None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_api_management_service_apply_network_configuration_updates_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_apply_network_configuration_updates( # pylint: disable=name-too-long + self, + resource_group_name: str, + service_name: str, + parameters: Optional[_models.ApiManagementServiceApplyNetworkConfigurationParameters] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated + DNS changes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Apply Network Configuration operation. If the + parameters are empty, all the regions in which the Api Management service is deployed will be + updated sequentially without incurring downtime in the region. Default value is None. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_apply_network_configuration_updates( # pylint: disable=name-too-long + self, + resource_group_name: str, + service_name: str, + parameters: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated + DNS changes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Apply Network Configuration operation. If the + parameters are empty, all the regions in which the Api Management service is deployed will be + updated sequentially without incurring downtime in the region. Default value is None. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_apply_network_configuration_updates( # pylint: disable=name-too-long + self, + resource_group_name: str, + service_name: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated + DNS changes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Apply Network Configuration operation. If the + parameters are empty, all the regions in which the Api Management service is deployed will be + updated sequentially without incurring downtime in the region. Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_apply_network_configuration_updates( # pylint: disable=name-too-long + self, + resource_group_name: str, + service_name: str, + parameters: Optional[ + Union[_models.ApiManagementServiceApplyNetworkConfigurationParameters, JSON, IO[bytes]] + ] = None, + **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated + DNS changes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param parameters: Parameters supplied to the Apply Network Configuration operation. If the + parameters are empty, all the regions in which the Api Management service is deployed will be + updated sequentially without incurring downtime in the region. Is one of the following types: + ApiManagementServiceApplyNetworkConfigurationParameters, JSON, IO[bytes] Default value is None. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters or + JSON or IO[bytes] + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._apply_network_configuration_updates_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _refresh_hostnames_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_management_service_refresh_hostnames_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_refresh_hostnames( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> LROPoller[_models.ApiManagementServiceResource]: + """Force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from + KeyVault on the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An instance of LROPoller that returns ApiManagementServiceResource. The + ApiManagementServiceResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementServiceResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._refresh_hostnames_initial( + resource_group_name=resource_group_name, + service_name=service_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ApiManagementServiceResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiManagementServiceResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiManagementServiceResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @overload + def check_name_availability( + self, + parameters: _models.ApiManagementServiceCheckNameAvailabilityParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiManagementServiceNameAvailabilityResult: + """Checks availability and correctness of a name for an API Management service. + + :param parameters: The request body. Required. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiManagementServiceCheckNameAvailabilityParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiManagementServiceNameAvailabilityResult. The + ApiManagementServiceNameAvailabilityResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ApiManagementServiceNameAvailabilityResult: + """Checks availability and correctness of a name for an API Management service. + + :param parameters: The request body. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiManagementServiceNameAvailabilityResult. The + ApiManagementServiceNameAvailabilityResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ApiManagementServiceNameAvailabilityResult: + """Checks availability and correctness of a name for an API Management service. + + :param parameters: The request body. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiManagementServiceNameAvailabilityResult. The + ApiManagementServiceNameAvailabilityResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, + parameters: Union[_models.ApiManagementServiceCheckNameAvailabilityParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ApiManagementServiceNameAvailabilityResult: + """Checks availability and correctness of a name for an API Management service. + + :param parameters: The request body. Is one of the following types: + ApiManagementServiceCheckNameAvailabilityParameters, JSON, IO[bytes] Required. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiManagementServiceCheckNameAvailabilityParameters or JSON or + IO[bytes] + :return: ApiManagementServiceNameAvailabilityResult. The + ApiManagementServiceNameAvailabilityResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementServiceNameAvailabilityResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_management_service_check_name_availability_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementServiceNameAvailabilityResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_domain_ownership_identifier( + self, **kwargs: Any + ) -> _models.ApiManagementServiceGetDomainOwnershipIdentifierResult: + """Get the custom domain ownership identifier for an API Management service. + + :return: ApiManagementServiceGetDomainOwnershipIdentifierResult. The + ApiManagementServiceGetDomainOwnershipIdentifierResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceGetDomainOwnershipIdentifierResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementServiceGetDomainOwnershipIdentifierResult] = kwargs.pop("cls", None) + + _request = build_api_management_service_get_domain_ownership_identifier_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementServiceGetDomainOwnershipIdentifierResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class AllPoliciesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`all_policies` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> ItemPaged["_models.AllPoliciesContract"]: + """Status of all policies of API Management services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of AllPoliciesContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.AllPoliciesContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AllPoliciesContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_all_policies_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AllPoliciesContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiManagementServiceSkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_management_service_skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_available_service_skus( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> ItemPaged["_models.ResourceSkuResult"]: + """Gets all available SKU for a given API Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of ResourceSkuResult + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ResourceSkuResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceSkuResult]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_service_skus_list_available_service_skus_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResourceSkuResult], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class NetworkStatusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`network_status` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> List[_models.NetworkStatusContractByLocation]: + """Gets the Connectivity Status to the external resources on which the Api Management service + depends from inside the Cloud Service. This also returns the DNS Servers as visible to the + CloudService. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: list of NetworkStatusContractByLocation + :rtype: list[~azure.mgmt.apimanagement.models.NetworkStatusContractByLocation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkStatusContractByLocation]] = kwargs.pop("cls", None) + + _request = build_network_status_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(List[_models.NetworkStatusContractByLocation], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_location( + self, resource_group_name: str, service_name: str, location_name: str, **kwargs: Any + ) -> _models.NetworkStatusContract: + """Gets the Connectivity Status to the external resources on which the Api Management service + depends from inside the Cloud Service. This also returns the DNS Servers as visible to the + CloudService. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param location_name: Location in which the API Management service is deployed. This is one of + the Azure Regions like West US, East US, South Central US. Required. + :type location_name: str + :return: NetworkStatusContract. The NetworkStatusContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NetworkStatusContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkStatusContract] = kwargs.pop("cls", None) + + _request = build_network_status_list_by_location_request( + resource_group_name=resource_group_name, + service_name=service_name, + location_name=location_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkStatusContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class OutboundNetworkDependenciesEndpointsOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`outbound_network_dependencies_endpoints` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> _models.OutboundEnvironmentEndpointList: + """Gets the network endpoints of all outbound dependencies of a ApiManagement service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: OutboundEnvironmentEndpointList. The OutboundEnvironmentEndpointList is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OutboundEnvironmentEndpointList + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OutboundEnvironmentEndpointList] = kwargs.pop("cls", None) + + _request = build_outbound_network_dependencies_endpoints_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OutboundEnvironmentEndpointList, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PolicyDescriptionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`policy_description` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + scope: Optional[Union[str, _models.PolicyScopeContract]] = None, + **kwargs: Any + ) -> _models.PolicyDescriptionCollection: + """Lists all policy descriptions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword scope: Policy scope. Known values are: "Tenant", "Product", "Api", "Operation", and + "All". Default value is None. + :paramtype scope: str or ~azure.mgmt.apimanagement.models.PolicyScopeContract + :return: PolicyDescriptionCollection. The PolicyDescriptionCollection is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyDescriptionCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyDescriptionCollection] = kwargs.pop("cls", None) + + _request = build_policy_description_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyDescriptionCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PolicyRestrictionValidationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`policy_restriction_validations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _by_service_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_policy_restriction_validations_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> LROPoller[_models.OperationResultContract]: + """Validate all policies of API Management services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An instance of LROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._by_service_initial( + resource_group_name=resource_group_name, + service_name=service_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.OperationResultContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationResultContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationResultContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class PortalSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`portal_settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> _models.PortalSettingsCollection: + """Lists a collection of portalsettings defined within a service instance.. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: PortalSettingsCollection. The PortalSettingsCollection is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalSettingsCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalSettingsCollection] = kwargs.pop("cls", None) + + _request = build_portal_settings_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalSettingsCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ProductOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`product` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_tags( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + include_not_tagged_products: Optional[bool] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagResourceContract"]: + """Lists a collection of products associated with tags. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| state | filter | eq | substringof, contains, startswith, endswith |
. + Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword include_not_tagged_products: Include not tagged Products. Default value is None. + :paramtype include_not_tagged_products: bool + :return: An iterator like instance of TagResourceContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagResourceContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_list_by_tags_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + include_not_tagged_products=include_not_tagged_products, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagResourceContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any + ) -> _models.ProductContract: + """Gets the details of the product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) + + _request = build_product_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: _models.ProductContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: Union[_models.ProductContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ProductContract: + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Create or update parameters. Is one of the following types: ProductContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: _models.ProductUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + parameters: Union[_models.ProductUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ProductContract: + """Update existing product details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param parameters: Update parameters. Is one of the following types: ProductUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ProductContract. The ProductContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_subscriptions: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Delete product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword delete_subscriptions: Delete existing subscriptions associated with the product or + not. Default value is None. + :paramtype delete_subscriptions: bool + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + delete_subscriptions=delete_subscriptions, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + expand_groups: Optional[bool] = None, + tags: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.ProductContract"]: + """Lists a collection of products in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| state | filter | eq | |
| groups | expand | | |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword expand_groups: When set to true, the response contains an array of groups that have + visibility to the product. The default is false. Default value is None. + :paramtype expand_groups: bool + :keyword tags: Products which are part of a specific tag. Default value is None. + :paramtype tags: str + :return: An iterator like instance of ProductContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + expand_groups=expand_groups, + tags=tags, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class QuotaByCounterKeysOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`quota_by_counter_keys` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, quota_counter_key: str, **kwargs: Any + ) -> _models.QuotaCounterCollection: + """Lists a collection of current quota counter periods associated with the counter-key configured + in the policy on the specified service instance. The api does not support paging yet. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :return: QuotaCounterCollection. The QuotaCounterCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.QuotaCounterCollection] = kwargs.pop("cls", None) + + _request = build_quota_by_counter_keys_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + quota_counter_key=quota_counter_key, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.QuotaCounterCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + parameters: _models.QuotaCounterValueUpdateContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QuotaCounterCollection: + """Updates all the quota counter values specified with the existing quota counter key to a value + in the specified service instance. This should be used for reset of the quota counter values. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param parameters: The value of the quota counter to be applied to all quota counter periods. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QuotaCounterCollection. The QuotaCounterCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QuotaCounterCollection: + """Updates all the quota counter values specified with the existing quota counter key to a value + in the specified service instance. This should be used for reset of the quota counter values. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param parameters: The value of the quota counter to be applied to all quota counter periods. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QuotaCounterCollection. The QuotaCounterCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QuotaCounterCollection: + """Updates all the quota counter values specified with the existing quota counter key to a value + in the specified service instance. This should be used for reset of the quota counter values. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param parameters: The value of the quota counter to be applied to all quota counter periods. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: QuotaCounterCollection. The QuotaCounterCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + parameters: Union[_models.QuotaCounterValueUpdateContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.QuotaCounterCollection: + """Updates all the quota counter values specified with the existing quota counter key to a value + in the specified service instance. This should be used for reset of the quota counter values. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param parameters: The value of the quota counter to be applied to all quota counter periods. + Is one of the following types: QuotaCounterValueUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract or JSON or + IO[bytes] + :return: QuotaCounterCollection. The QuotaCounterCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.QuotaCounterCollection] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_quota_by_counter_keys_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + quota_counter_key=quota_counter_key, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.QuotaCounterCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class QuotaByPeriodKeysOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`quota_by_period_keys` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, quota_counter_key: str, quota_period_key: str, **kwargs: Any + ) -> _models.QuotaCounterContract: + """Gets the value of the quota counter associated with the counter-key in the policy for the + specific period in service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param quota_period_key: Quota period key identifier. Required. + :type quota_period_key: str + :return: QuotaCounterContract. The QuotaCounterContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.QuotaCounterContract] = kwargs.pop("cls", None) + + _request = build_quota_by_period_keys_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + quota_counter_key=quota_counter_key, + quota_period_key=quota_period_key, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.QuotaCounterContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + quota_period_key: str, + parameters: _models.QuotaCounterValueUpdateContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QuotaCounterContract: + """Updates an existing quota counter value in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param quota_period_key: Quota period key identifier. Required. + :type quota_period_key: str + :param parameters: The value of the Quota counter to be applied on the specified period. + Required. + :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QuotaCounterContract. The QuotaCounterContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + quota_period_key: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QuotaCounterContract: + """Updates an existing quota counter value in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param quota_period_key: Quota period key identifier. Required. + :type quota_period_key: str + :param parameters: The value of the Quota counter to be applied on the specified period. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QuotaCounterContract. The QuotaCounterContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + quota_period_key: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QuotaCounterContract: + """Updates an existing quota counter value in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param quota_period_key: Quota period key identifier. Required. + :type quota_period_key: str + :param parameters: The value of the Quota counter to be applied on the specified period. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: QuotaCounterContract. The QuotaCounterContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + quota_counter_key: str, + quota_period_key: str, + parameters: Union[_models.QuotaCounterValueUpdateContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.QuotaCounterContract: + """Updates an existing quota counter value in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param quota_counter_key: Quota counter key identifier. This is the result of expression + defined in ``counter-key`` attribute of the quota-by-key policy. For example, if you specify + ``counter-key="boo"`` in the policy, then it’s accessible by ``"boo"`` counter key. But if it’s + defined as ``counter-key="@("b"+"a")"`` then it will be accessible by ``"ba"`` key. Required. + :type quota_counter_key: str + :param quota_period_key: Quota period key identifier. Required. + :type quota_period_key: str + :param parameters: The value of the Quota counter to be applied on the specified period. Is one + of the following types: QuotaCounterValueUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract or JSON or + IO[bytes] + :return: QuotaCounterContract. The QuotaCounterContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.QuotaCounterContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_quota_by_period_keys_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + quota_counter_key=quota_counter_key, + quota_period_key=quota_period_key, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.QuotaCounterContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class RegionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`region` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> ItemPaged["_models.RegionContract"]: + """Lists all azure regions in which the service exists. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of RegionContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.RegionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.RegionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_region_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.RegionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ReportsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`reports` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.ReportRecordContract"]: + """Lists report records by API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: The filter to apply on the operation. Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :return: An iterator like instance of ReportRecordContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + orderby=orderby, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_user( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.ReportRecordContract"]: + """Lists report records by User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter | ge, le | |
| displayName | select, orderBy | | |
| userId | + select, filter | eq | |
| apiRegion | filter | eq | |
| productId | filter | + eq | |
| subscriptionId | filter | eq | |
| apiId | filter | eq | | +
| operationId | filter | eq | |
| callCountSuccess | select, orderBy | | + |
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, + orderBy | | |
| callCountOther | select, orderBy | | |
| + callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | select | | | +
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | +
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. + Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :return: An iterator like instance of ReportRecordContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_user_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + orderby=orderby, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_operation( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.ReportRecordContract"]: + """Lists report records by API Operations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter | ge, le | |
| displayName | select, orderBy | | |
| apiRegion | + filter | eq | |
| userId | filter | eq | |
| productId | filter | eq | | +
| subscriptionId | filter | eq | |
| apiId | filter | eq | |
| + operationId | select, filter | eq | |
| callCountSuccess | select, orderBy | | + |
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, + orderBy | | |
| callCountOther | select, orderBy | | |
| + callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | select | | | +
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | +
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. + Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :return: An iterator like instance of ReportRecordContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + orderby=orderby, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.ReportRecordContract"]: + """Lists report records by Product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter | ge, le | |
| displayName | select, orderBy | | |
| apiRegion | + filter | eq | |
| userId | filter | eq | |
| productId | select, filter | eq + | |
| subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | + | |
| callCountBlocked | select, orderBy | | |
| callCountFailed | + select, orderBy | | |
| callCountOther | select, orderBy | | |
| + callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | select | | | +
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | +
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. + Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :return: An iterator like instance of ReportRecordContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + orderby=orderby, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_geo( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ReportRecordContract"]: + """Lists report records by geography. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter | ge, le | |
| country | select | | |
| region | select | | + |
| zip | select | | |
| apiRegion | filter | eq | |
| userId | + filter | eq | |
| productId | filter | eq | |
| subscriptionId | filter | eq + | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| + callCountSuccess | select | | |
| callCountBlocked | select | | |
| + callCountFailed | select | | |
| callCountOther | select | | |
| + bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| + cacheMissCount | select | | |
| apiTimeAvg | select | | |
| + apiTimeMin | select | | |
| apiTimeMax | select | | |
| + serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + serviceTimeMax | select | | |
. Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ReportRecordContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_geo_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.ReportRecordContract"]: + """Lists report records by subscription. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter | ge, le | |
| displayName | select, orderBy | | |
| apiRegion | + filter | eq | |
| userId | select, filter | eq | |
| productId | select, + filter | eq | |
| subscriptionId | select, filter | eq | |
| callCountSuccess + | select, orderBy | | |
| callCountBlocked | select, orderBy | | |
| + callCountFailed | select, orderBy | | |
| callCountOther | select, orderBy | | + |
| callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | + | |
| cacheHitsCount | select | | |
| cacheMissCount | select | | + |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | +
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. + Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :return: An iterator like instance of ReportRecordContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_subscription_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + orderby=orderby, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_time( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + interval: datetime.timedelta, + top: Optional[int] = None, + skip: Optional[int] = None, + orderby: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.ReportRecordContract"]: + """Lists report records by Time. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter, select | ge, le | |
| interval | select | | |
| apiRegion | + filter | eq | |
| userId | filter | eq | |
| productId | filter | eq | | +
| subscriptionId | filter | eq | |
| apiId | filter | eq | |
| + operationId | filter | eq | |
| callCountSuccess | select | | |
| + callCountBlocked | select | | |
| callCountFailed | select | | |
| + callCountOther | select | | |
| bandwidth | select, orderBy | | |
| + cacheHitsCount | select | | |
| cacheMissCount | select | | |
| + apiTimeAvg | select | | |
| apiTimeMin | select | | |
| apiTimeMax | + select | | |
| serviceTimeAvg | select | | |
| serviceTimeMin | + select | | |
| serviceTimeMax | select | | |
. Required. + :paramtype filter: str + :keyword interval: By time interval. Interval must be multiple of 15 minutes and may not be + zero. The value should be in ISO 8601 format + (`http://en.wikipedia.org/wiki/ISO_8601#Durations).This + `_ code can be used to convert TimeSpan + to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). + Required. + :paramtype interval: ~datetime.timedelta + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :return: An iterator like instance of ReportRecordContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_time_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + interval=interval, + top=top, + skip=skip, + orderby=orderby, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_request( + self, + resource_group_name: str, + service_name: str, + *, + filter: str, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.RequestReportRecordContract"]: + """Lists report records by Request. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| timestamp | + filter | ge, le | |
| apiId | filter | eq | |
| operationId | filter | eq | + |
| productId | filter | eq | |
| userId | filter | eq | |
| apiRegion | + filter | eq | |
| subscriptionId | filter | eq | |
. Required. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of RequestReportRecordContract + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.RequestReportRecordContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.RequestReportRecordContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_reports_list_by_request_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.RequestReportRecordContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class TagResourceOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`tag_resource` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagResourceContract"]: + """Lists a collection of resources associated with tags. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| aid | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| state | filter | eq | |
| isCurrent + | filter | eq | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagResourceContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagResourceContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_resource_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagResourceContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiReleaseOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_release` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, api_id: str, release_id: str, **kwargs: Any + ) -> _models.ApiReleaseContract: + """Returns the details of an API release. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) + + _request = build_api_release_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiReleaseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, release_id: str, **kwargs: Any + ) -> bool: + """Returns the etag of an API release. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_release_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: _models.ApiReleaseContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: Union[_models.ApiReleaseContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: Create parameters. Is one of the following types: ApiReleaseContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_release_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiReleaseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: _models.ApiReleaseContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + parameters: Union[_models.ApiReleaseContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ApiReleaseContract: + """Updates the details of the release of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :param parameters: API Release Update parameters. Is one of the following types: + ApiReleaseContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiReleaseContract. The ApiReleaseContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_release_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiReleaseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + api_id: str, + release_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified release in the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in the current API + Management service instance. Required. + :type release_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_release_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + release_id=release_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ApiReleaseContract"]: + """Lists all releases of an API. An API release is created when making an API Revision current. + Releases are also used to rollback to previous revisions. Results will be paged and can be + constrained by the $top and $skip parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| notes | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiReleaseContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiReleaseContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiReleaseContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_release_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiReleaseContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiOperationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_operation` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, **kwargs: Any + ) -> _models.OperationContract: + """Gets the details of the API Operation specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) + + _request = build_api_operation_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API operation specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_operation_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: _models.OperationContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: Union[_models.OperationContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OperationContract: + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: Create parameters. Is one of the following types: OperationContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_operation_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: _models.OperationUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + parameters: Union[_models.OperationUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.OperationContract: + """Updates the details of the operation in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param parameters: API Operation Update parameters. Is one of the following types: + OperationUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OperationContract. The OperationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_operation_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified operation in the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_operation_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + tags: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.OperationContract"]: + """Lists a collection of the operations for the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword tags: Include tags in the response. Default value is None. + :paramtype tags: str + :return: An iterator like instance of OperationContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.OperationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OperationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_operation_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + tags=tags, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OperationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiOperationPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_operation_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + format: Optional[Union[str, _models.PolicyExportFormat]] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Get the policy configuration at the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is + None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + _request = build_api_operation_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API operation policy specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_operation_policy_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: _models.PolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + parameters: Union[_models.PolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyContract: + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :param parameters: The policy contents to apply. Is one of the following types: PolicyContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyContract. The PolicyContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_operation_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + api_id: str, + operation_id: str, + policy_id: Union[str, _models.PolicyIdName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the policy configuration at the Api Operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :param policy_id: The identifier of the Policy. "policy" Required. + :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_operation_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + policy_id=policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_operation( + self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, **kwargs: Any + ) -> _models.PolicyCollection: + """Get the list of policy configuration at the API Operation level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be unique in the current API + Management service instance. Required. + :type operation_id: str + :return: PolicyCollection. The PolicyCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) + + _request = build_api_operation_policy_list_by_operation_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class GraphQLApiResolverOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`graph_ql_api_resolver` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any + ) -> _models.ResolverContract: + """Gets the details of the GraphQL API Resolver specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ResolverContract] = kwargs.pop("cls", None) + + _request = build_graph_ql_api_resolver_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ResolverContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, resolver_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_graph_ql_api_resolver_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: _models.ResolverContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ResolverContract: + """Creates a new resolver in the GraphQL API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ResolverContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ResolverContract: + """Creates a new resolver in the GraphQL API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ResolverContract: + """Creates a new resolver in the GraphQL API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: Union[_models.ResolverContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ResolverContract: + """Creates a new resolver in the GraphQL API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: Create parameters. Is one of the following types: ResolverContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ResolverContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ResolverContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_graph_ql_api_resolver_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ResolverContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: _models.ResolverUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResolverContract: + """Updates the details of the resolver in the GraphQL API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: GraphQL API Resolver Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ResolverUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResolverContract: + """Updates the details of the resolver in the GraphQL API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: GraphQL API Resolver Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResolverContract: + """Updates the details of the resolver in the GraphQL API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: GraphQL API Resolver Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + parameters: Union[_models.ResolverUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ResolverContract: + """Updates the details of the resolver in the GraphQL API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :param parameters: GraphQL API Resolver Update parameters. Is one of the following types: + ResolverUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ResolverUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ResolverContract. The ResolverContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResolverContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ResolverContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_graph_ql_api_resolver_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ResolverContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + api_id: str, + resolver_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified resolver in the GraphQL API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param resolver_id: Resolver identifier within a GraphQL API. Must be unique in the current API + Management service instance. Required. + :type resolver_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_graph_ql_api_resolver_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + resolver_id=resolver_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ResolverContract"]: + """Lists a collection of the resolvers for the specified GraphQL API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ResolverContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ResolverContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResolverContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_graph_ql_api_resolver_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResolverContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiSchemaOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_schema` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, api_id: str, schema_id: str, **kwargs: Any + ) -> _models.SchemaContract: + """Get the schema configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: SchemaContract. The SchemaContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SchemaContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) + + _request = build_api_schema_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SchemaContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, schema_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the schema specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_schema_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + parameters: Union[_models.SchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_schema_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + parameters: _models.SchemaContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns SchemaContract. The SchemaContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns SchemaContract. The SchemaContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns SchemaContract. The SchemaContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + parameters: Union[_models.SchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.SchemaContract]: + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: The schema contents to apply. Is one of the following types: SchemaContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns SchemaContract. The SchemaContract is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + schema_id=schema_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.SchemaContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.SchemaContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.SchemaContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + api_id: str, + schema_id: str, + *, + etag: str, + match_condition: MatchConditions, + force: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Deletes the schema configuration at the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword force: If true removes all references to the schema before deleting it. Default value + is None. + :paramtype force: bool + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_schema_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + force=force, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.SchemaContract"]: + """Get the schema configuration at the API level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| contentType + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of SchemaContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.SchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SchemaContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_schema_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SchemaContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiDiagnosticOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_diagnostic` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, **kwargs: Any + ) -> _models.DiagnosticContract: + """Gets the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + _request = build_api_diagnostic_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, diagnostic_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_diagnostic_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: _models.DiagnosticContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Create parameters. Is one of the following types: DiagnosticContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_diagnostic_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: _models.DiagnosticContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + parameters: Union[_models.DiagnosticContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.DiagnosticContract: + """Updates the details of the Diagnostic for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. Is one of the following types: + DiagnosticContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DiagnosticContract. The DiagnosticContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_diagnostic_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DiagnosticContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + api_id: str, + diagnostic_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Diagnostic from an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management + service instance. Required. + :type diagnostic_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_diagnostic_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + diagnostic_id=diagnostic_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.DiagnosticContract"]: + """Lists all diagnostics of an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of DiagnosticContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DiagnosticContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_diagnostic_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DiagnosticContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiIssueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_issue` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + *, + expand_comments_attachments: Optional[bool] = None, + **kwargs: Any + ) -> _models.IssueContract: + """Gets the details of the Issue for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :keyword expand_comments_attachments: Expand the comment attachments. Default value is None. + :paramtype expand_comments_attachments: bool + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) + + _request = build_api_issue_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + expand_comments_attachments=expand_comments_attachments, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the Issue for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_issue_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: _models.IssueContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueContract: + """Creates a new Issue for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueContract: + """Creates a new Issue for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueContract: + """Creates a new Issue for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: Union[_models.IssueContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueContract: + """Creates a new Issue for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Create parameters. Is one of the following types: IssueContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_issue_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: _models.IssueUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.IssueContract: + """Updates an existing issue for an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.IssueContract: + """Updates an existing issue for an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.IssueContract: + """Updates an existing issue for an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + parameters: Union[_models.IssueUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.IssueContract: + """Updates an existing issue for an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param parameters: Update parameters. Is one of the following types: IssueUpdateContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueContract. The IssueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IssueContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_issue_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Issue from an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_issue_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + expand_comments_attachments: Optional[bool] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.IssueContract"]: + """Lists all issues associated with the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | + filter | eq | |
. Default value is None. + :paramtype filter: str + :keyword expand_comments_attachments: Expand the comment attachments. Default value is None. + :paramtype expand_comments_attachments: bool + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of IssueContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.IssueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IssueContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_issue_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + expand_comments_attachments=expand_comments_attachments, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IssueContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiIssueCommentOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_issue_comment` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, comment_id: str, **kwargs: Any + ) -> _models.IssueCommentContract: + """Gets the details of the issue Comment for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :return: IssueCommentContract. The IssueCommentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IssueCommentContract] = kwargs.pop("cls", None) + + _request = build_api_issue_comment_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + comment_id=comment_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueCommentContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, comment_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the issue Comment for an API specified by its + identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_issue_comment_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + comment_id=comment_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + parameters: _models.IssueCommentContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueCommentContract: + """Creates a new Comment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueCommentContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueCommentContract. The IssueCommentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueCommentContract: + """Creates a new Comment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueCommentContract. The IssueCommentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueCommentContract: + """Creates a new Comment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueCommentContract. The IssueCommentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + parameters: Union[_models.IssueCommentContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueCommentContract: + """Creates a new Comment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :param parameters: Create parameters. Is one of the following types: IssueCommentContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueCommentContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueCommentContract. The IssueCommentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IssueCommentContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_issue_comment_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + comment_id=comment_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueCommentContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + comment_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified comment from an Issue. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique in the current Issue. + Required. + :type comment_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_issue_comment_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + comment_id=comment_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.IssueCommentContract"]: + """Lists all comments for the Issue associated with the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of IssueCommentContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.IssueCommentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IssueCommentContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_issue_comment_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IssueCommentContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiIssueAttachmentOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_issue_attachment` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, attachment_id: str, **kwargs: Any + ) -> _models.IssueAttachmentContract: + """Gets the details of the issue Attachment for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :return: IssueAttachmentContract. The IssueAttachmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IssueAttachmentContract] = kwargs.pop("cls", None) + + _request = build_api_issue_attachment_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + attachment_id=attachment_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueAttachmentContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, issue_id: str, attachment_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the issue Attachment for an API specified by its + identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_issue_attachment_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + attachment_id=attachment_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + parameters: _models.IssueAttachmentContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueAttachmentContract: + """Creates a new Attachment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueAttachmentContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueAttachmentContract. The IssueAttachmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueAttachmentContract: + """Creates a new Attachment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueAttachmentContract. The IssueAttachmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueAttachmentContract: + """Creates a new Attachment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueAttachmentContract. The IssueAttachmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + parameters: Union[_models.IssueAttachmentContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IssueAttachmentContract: + """Creates a new Attachment for the Issue in an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :param parameters: Create parameters. Is one of the following types: IssueAttachmentContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.IssueAttachmentContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IssueAttachmentContract. The IssueAttachmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IssueAttachmentContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_issue_attachment_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + attachment_id=attachment_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IssueAttachmentContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + attachment_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified comment from an Issue. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be unique in the current + Issue. Required. + :type attachment_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_issue_attachment_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + attachment_id=attachment_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + issue_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.IssueAttachmentContract"]: + """Lists all attachments for the Issue associated with the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API Management service + instance. Required. + :type issue_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of IssueAttachmentContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.IssueAttachmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IssueAttachmentContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_issue_attachment_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + issue_id=issue_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IssueAttachmentContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiTagDescriptionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_tag_description` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, api_id: str, tag_description_id: str, **kwargs: Any + ) -> _models.TagDescriptionContract: + """Get Tag description in scope of API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :return: TagDescriptionContract. The TagDescriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagDescriptionContract] = kwargs.pop("cls", None) + + _request = build_api_tag_description_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_description_id=tag_description_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagDescriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, tag_description_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_tag_description_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_description_id=tag_description_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + parameters: _models.TagDescriptionCreateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagDescriptionContract: + """Create/Update tag description in scope of the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagDescriptionCreateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagDescriptionContract. The TagDescriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagDescriptionContract: + """Create/Update tag description in scope of the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagDescriptionContract. The TagDescriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagDescriptionContract: + """Create/Update tag description in scope of the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagDescriptionContract. The TagDescriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + parameters: Union[_models.TagDescriptionCreateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.TagDescriptionContract: + """Create/Update tag description in scope of the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :param parameters: Create parameters. Is one of the following types: + TagDescriptionCreateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagDescriptionCreateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: TagDescriptionContract. The TagDescriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagDescriptionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_tag_description_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_description_id=tag_description_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagDescriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + api_id: str, + tag_description_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Delete tag description for the Api. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tag_description_id: Tag description identifier. Used when creating tagDescription for + API/Tag association. Based on API and Tag names. Required. + :type tag_description_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_tag_description_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tag_description_id=tag_description_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagDescriptionContract"]: + """Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is + defined on API level but tag may be assigned to the Operations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagDescriptionContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagDescriptionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagDescriptionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_tag_description_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagDescriptionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiWikiOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_wiki` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> _models.WikiContract: + """Gets the details of the Wiki for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) + + _request = build_api_wiki_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WikiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, api_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_wiki_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: _models.WikiContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: Union[_models.WikiContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WikiContract: + """Creates a new Wiki for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Create parameters. Is one of the following types: WikiContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_wiki_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WikiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: _models.WikiUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Wiki Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Wiki Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Wiki Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + parameters: Union[_models.WikiUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.WikiContract: + """Updates the details of the Wiki for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Wiki Update parameters. Is one of the following types: WikiUpdateContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WikiContract. The WikiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WikiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_wiki_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WikiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Wiki from an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_wiki_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class ApiWikisOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_wikis` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.WikiContract"]: + """Gets the wikis for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | eq | contains |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of WikiContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.WikiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.WikiContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_wikis_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.WikiContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ProductWikisOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`product_wikis` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.WikiContract"]: + """Gets the details of the Wiki for a Product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | eq | contains |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of WikiContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.WikiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.WikiContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_wikis_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.WikiContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiToolOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_tool` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any + ) -> _models.ToolContract: + """Gets the details of the API Tool specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) + + _request = build_api_tool_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ToolContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the API tool specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_tool_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: _models.ToolContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: Union[_models.ToolContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ToolContract: + """Creates a new tool in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: Create parameters. Is one of the following types: ToolContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract or JSON or IO[bytes] + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_tool_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ToolContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: _models.ToolContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + api_id: str, + tool_id: str, + parameters: Union[_models.ToolContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ToolContract: + """Updates the details of the tool in the API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :param parameters: API Tool Update parameters. Is one of the following types: ToolContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ToolContract or JSON or IO[bytes] + :return: ToolContract. The ToolContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ToolContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ToolContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_tool_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ToolContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, api_id: str, tool_id: str, **kwargs: Any + ) -> None: + """Deletes the specified tool in the API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :param tool_id: Tool identifier within an API. Must be unique in the current API Management + service instance. Required. + :type tool_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_tool_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + tool_id=tool_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_api( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ToolContract"]: + """Lists a collection of the MCP tools for the specified API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ToolContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ToolContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ToolContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_tool_list_by_api_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ToolContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiVersionSetOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_version_set` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, version_set_id: str, **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Gets the details of the Api Version Set specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) + + _request = build_api_version_set_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiVersionSetContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, version_set_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the Api Version Set specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_version_set_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: _models.ApiVersionSetContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: Union[_models.ApiVersionSetContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Create or update parameters. Is one of the following types: + ApiVersionSetContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_version_set_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiVersionSetContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: _models.ApiVersionSetUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + parameters: Union[_models.ApiVersionSetUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.ApiVersionSetContract: + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :param parameters: Update parameters. Is one of the following types: + ApiVersionSetUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ApiVersionSetContract. The ApiVersionSetContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_version_set_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiVersionSetContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + version_set_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Api Version Set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in the current API Management + service instance. Required. + :type version_set_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_api_version_set_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + version_set_id=version_set_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ApiVersionSetContract"]: + """Lists a collection of API Version Sets in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiVersionSetContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiVersionSetContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiVersionSetContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_version_set_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiVersionSetContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class AuthorizationProviderOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`authorization_provider` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, authorization_provider_id: str, **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Gets the details of the authorization provider specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :return: AuthorizationProviderContract. The AuthorizationProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) + + _request = build_authorization_provider_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + parameters: _models.AuthorizationProviderContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Creates or updates authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationProviderContract. The AuthorizationProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Creates or updates authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationProviderContract. The AuthorizationProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Creates or updates authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationProviderContract. The AuthorizationProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + parameters: Union[_models.AuthorizationProviderContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Creates or updates authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param parameters: Create parameters. Is one of the following types: + AuthorizationProviderContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationProviderContract. The AuthorizationProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_provider_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific authorization provider from the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_authorization_provider_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.AuthorizationProviderContract"]: + """Lists a collection of authorization providers defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of AuthorizationProviderContract + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.AuthorizationProviderContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AuthorizationProviderContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_authorization_provider_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AuthorizationProviderContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def refresh_secret( + self, resource_group_name: str, service_name: str, authorization_provider_id: str, **kwargs: Any + ) -> _models.AuthorizationProviderContract: + """Refreshes the Key Vault reference secret for the specified authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :return: AuthorizationProviderContract. The AuthorizationProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AuthorizationProviderContract] = kwargs.pop("cls", None) + + _request = build_authorization_provider_refresh_secret_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class AuthorizationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`authorization` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + **kwargs: Any + ) -> _models.AuthorizationContract: + """Gets the details of the authorization specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :return: AuthorizationContract. The AuthorizationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AuthorizationContract] = kwargs.pop("cls", None) + + _request = build_authorization_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: _models.AuthorizationContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationContract: + """Creates or updates authorization. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationContract. The AuthorizationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationContract: + """Creates or updates authorization. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationContract. The AuthorizationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationContract: + """Creates or updates authorization. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationContract. The AuthorizationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: Union[_models.AuthorizationContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationContract: + """Creates or updates authorization. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Is one of the following types: AuthorizationContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationContract. The AuthorizationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AuthorizationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Authorization from the Authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_authorization_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_authorization_provider( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.AuthorizationContract"]: + """Lists a collection of authorization providers defined within a authorization provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of AuthorizationContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.AuthorizationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AuthorizationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_authorization_list_by_authorization_provider_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AuthorizationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def confirm_consent_code( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: _models.AuthorizationConfirmConsentCodeRequestContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Confirm valid consent code to suppress Authorizations anti-phishing page. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: + ~azure.mgmt.apimanagement.models.AuthorizationConfirmConsentCodeRequestContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def confirm_consent_code( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Confirm valid consent code to suppress Authorizations anti-phishing page. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def confirm_consent_code( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Confirm valid consent code to suppress Authorizations anti-phishing page. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def confirm_consent_code( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: Union[_models.AuthorizationConfirmConsentCodeRequestContract, JSON, IO[bytes]], + **kwargs: Any + ) -> None: + """Confirm valid consent code to suppress Authorizations anti-phishing page. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Is one of the following types: + AuthorizationConfirmConsentCodeRequestContract, JSON, IO[bytes] Required. + :type parameters: + ~azure.mgmt.apimanagement.models.AuthorizationConfirmConsentCodeRequestContract or JSON or + IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_confirm_consent_code_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + + +class AuthorizationLoginLinksOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`authorization_login_links` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + def post( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: _models.AuthorizationLoginRequestContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AuthorizationLoginResponseContract: + """Gets authorization login links. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationLoginRequestContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AuthorizationLoginResponseContract. The AuthorizationLoginResponseContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def post( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AuthorizationLoginResponseContract: + """Gets authorization login links. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AuthorizationLoginResponseContract. The AuthorizationLoginResponseContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def post( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AuthorizationLoginResponseContract: + """Gets authorization login links. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: AuthorizationLoginResponseContract. The AuthorizationLoginResponseContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def post( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + parameters: Union[_models.AuthorizationLoginRequestContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.AuthorizationLoginResponseContract: + """Gets authorization login links. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param parameters: Create parameters. Is one of the following types: + AuthorizationLoginRequestContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationLoginRequestContract or JSON or + IO[bytes] + :return: AuthorizationLoginResponseContract. The AuthorizationLoginResponseContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationLoginResponseContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AuthorizationLoginResponseContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_login_links_post_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationLoginResponseContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class AuthorizationAccessPolicyOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`authorization_access_policy` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + **kwargs: Any + ) -> _models.AuthorizationAccessPolicyContract: + """Gets the details of the authorization access policy specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param authorization_access_policy_id: Identifier of the authorization access policy. Required. + :type authorization_access_policy_id: str + :return: AuthorizationAccessPolicyContract. The AuthorizationAccessPolicyContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AuthorizationAccessPolicyContract] = kwargs.pop("cls", None) + + _request = build_authorization_access_policy_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + authorization_access_policy_id=authorization_access_policy_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationAccessPolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + parameters: _models.AuthorizationAccessPolicyContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationAccessPolicyContract: + """Creates or updates Authorization Access Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param authorization_access_policy_id: Identifier of the authorization access policy. Required. + :type authorization_access_policy_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationAccessPolicyContract. The AuthorizationAccessPolicyContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationAccessPolicyContract: + """Creates or updates Authorization Access Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param authorization_access_policy_id: Identifier of the authorization access policy. Required. + :type authorization_access_policy_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationAccessPolicyContract. The AuthorizationAccessPolicyContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationAccessPolicyContract: + """Creates or updates Authorization Access Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param authorization_access_policy_id: Identifier of the authorization access policy. Required. + :type authorization_access_policy_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationAccessPolicyContract. The AuthorizationAccessPolicyContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + parameters: Union[_models.AuthorizationAccessPolicyContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationAccessPolicyContract: + """Creates or updates Authorization Access Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param authorization_access_policy_id: Identifier of the authorization access policy. Required. + :type authorization_access_policy_id: str + :param parameters: Create parameters. Is one of the following types: + AuthorizationAccessPolicyContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationAccessPolicyContract. The AuthorizationAccessPolicyContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AuthorizationAccessPolicyContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_access_policy_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + authorization_access_policy_id=authorization_access_policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationAccessPolicyContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + authorization_access_policy_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific access policy from the Authorization. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :param authorization_access_policy_id: Identifier of the authorization access policy. Required. + :type authorization_access_policy_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_authorization_access_policy_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + authorization_access_policy_id=authorization_access_policy_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_authorization( + self, + resource_group_name: str, + service_name: str, + authorization_provider_id: str, + authorization_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.AuthorizationAccessPolicyContract"]: + """Lists a collection of authorization access policy defined within a authorization. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authorization_provider_id: Identifier of the authorization provider. Required. + :type authorization_provider_id: str + :param authorization_id: Identifier of the authorization. Required. + :type authorization_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of AuthorizationAccessPolicyContract + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.AuthorizationAccessPolicyContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AuthorizationAccessPolicyContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_authorization_access_policy_list_by_authorization_request( + resource_group_name=resource_group_name, + service_name=service_name, + authorization_provider_id=authorization_provider_id, + authorization_id=authorization_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AuthorizationAccessPolicyContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class AuthorizationServerOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`authorization_server` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, authsid: str, **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Gets the details of the authorization server specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AuthorizationServerContract] = kwargs.pop("cls", None) + + _request = build_authorization_server_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + authsid=authsid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationServerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, authsid: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the authorizationServer specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_authorization_server_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + authsid=authsid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: _models.AuthorizationServerContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Creates new authorization server or updates an existing authorization server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Creates new authorization server or updates an existing authorization server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Creates new authorization server or updates an existing authorization server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: Union[_models.AuthorizationServerContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Creates new authorization server or updates an existing authorization server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: Create or update parameters. Is one of the following types: + AuthorizationServerContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AuthorizationServerContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_server_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + authsid=authsid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationServerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: _models.AuthorizationServerUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Updates the details of the authorization server specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: OAuth2 Server settings Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Updates the details of the authorization server specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: OAuth2 Server settings Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Updates the details of the authorization server specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: OAuth2 Server settings Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + authsid: str, + parameters: Union[_models.AuthorizationServerUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.AuthorizationServerContract: + """Updates the details of the authorization server specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :param parameters: OAuth2 Server settings Update parameters. Is one of the following types: + AuthorizationServerUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AuthorizationServerUpdateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AuthorizationServerContract. The AuthorizationServerContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AuthorizationServerContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorization_server_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + authsid=authsid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationServerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + authsid: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific authorization server instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_authorization_server_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + authsid=authsid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.AuthorizationServerContract"]: + """Lists a collection of authorization servers defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of AuthorizationServerContract + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.AuthorizationServerContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AuthorizationServerContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_authorization_server_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AuthorizationServerContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_secrets( + self, resource_group_name: str, service_name: str, authsid: str, **kwargs: Any + ) -> _models.AuthorizationServerSecretsContract: + """Gets the client secret details of the authorization server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param authsid: Identifier of the authorization server. Required. + :type authsid: str + :return: AuthorizationServerSecretsContract. The AuthorizationServerSecretsContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerSecretsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AuthorizationServerSecretsContract] = kwargs.pop("cls", None) + + _request = build_authorization_server_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + authsid=authsid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AuthorizationServerSecretsContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class BackendOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`backend` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, backend_id: str, **kwargs: Any + ) -> _models.BackendContract: + """Gets the details of the backend specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) + + _request = build_backend_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.BackendContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, backend_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the backend specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_backend_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: _models.BackendContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: Union[_models.BackendContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.BackendContract: + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Create parameters. Is one of the following types: BackendContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_backend_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.BackendContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: _models.BackendUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: Union[_models.BackendUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.BackendContract: + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Update parameters. Is one of the following types: BackendUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: BackendContract. The BackendContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.BackendContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_backend_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.BackendContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + backend_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_backend_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.BackendContract"]: + """Lists a collection of backends in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of BackendContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.BackendContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BackendContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_backend_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BackendContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def reconnect( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: Optional[_models.BackendReconnectContract] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Notifies the API Management gateway to create a new connection to the backend after the + specified timeout. If no timeout was specified, timeout of 2 minutes is used. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Reconnect request parameters. Default value is None. + :type parameters: ~azure.mgmt.apimanagement.models.BackendReconnectContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def reconnect( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Notifies the API Management gateway to create a new connection to the backend after the + specified timeout. If no timeout was specified, timeout of 2 minutes is used. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Reconnect request parameters. Default value is None. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def reconnect( + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Notifies the API Management gateway to create a new connection to the backend after the + specified timeout. If no timeout was specified, timeout of 2 minutes is used. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Reconnect request parameters. Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def reconnect( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + backend_id: str, + parameters: Optional[Union[_models.BackendReconnectContract, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> None: + """Notifies the API Management gateway to create a new connection to the backend after the + specified timeout. If no timeout was specified, timeout of 2 minutes is used. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in the current API + Management service instance. Required. + :type backend_id: str + :param parameters: Reconnect request parameters. Is one of the following types: + BackendReconnectContract, JSON, IO[bytes] Default value is None. + :type parameters: ~azure.mgmt.apimanagement.models.BackendReconnectContract or JSON or + IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if parameters else None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_backend_reconnect_request( + resource_group_name=resource_group_name, + service_name=service_name, + backend_id=backend_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class CacheOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`cache` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, cache_id: str, **kwargs: Any) -> _models.CacheContract: + """Gets the details of the Cache specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CacheContract] = kwargs.pop("cls", None) + + _request = build_cache_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + cache_id=cache_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CacheContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, cache_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the Cache specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_cache_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + cache_id=cache_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: _models.CacheContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CacheContract: + """Creates or updates an External Cache to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.CacheContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CacheContract: + """Creates or updates an External Cache to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CacheContract: + """Creates or updates an External Cache to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: Union[_models.CacheContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CacheContract: + """Creates or updates an External Cache to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Create or Update parameters. Is one of the following types: CacheContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.CacheContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CacheContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cache_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + cache_id=cache_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CacheContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: _models.CacheUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CacheContract: + """Updates the details of the cache specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.CacheUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CacheContract: + """Updates the details of the cache specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CacheContract: + """Updates the details of the cache specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + cache_id: str, + parameters: Union[_models.CacheUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.CacheContract: + """Updates the details of the cache specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :param parameters: Update parameters. Is one of the following types: CacheUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.CacheUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CacheContract. The CacheContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CacheContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CacheContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cache_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + cache_id=cache_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CacheContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + cache_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Cache. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier (should be either 'default' + or valid Azure region identifier). Required. + :type cache_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_cache_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + cache_id=cache_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.CacheContract"]: + """Lists a collection of all external Caches in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of CacheContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.CacheContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CacheContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_cache_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CacheContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class CertificateOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`certificate` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, certificate_id: str, **kwargs: Any + ) -> _models.CertificateContract: + """Gets the details of the certificate specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) + + _request = build_certificate_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, certificate_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the certificate specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_certificate_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + certificate_id: str, + parameters: _models.CertificateCreateOrUpdateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + certificate_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + certificate_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + certificate_id: str, + parameters: Union[_models.CertificateCreateOrUpdateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateContract: + """Creates or updates the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Create or Update parameters. Is one of the following types: + CertificateCreateOrUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters or JSON + or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_certificate_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + certificate_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_certificate_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + is_key_vault_refresh_failed: Optional[bool] = None, + **kwargs: Any + ) -> ItemPaged["_models.CertificateContract"]: + """Lists a collection of all certificates in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword is_key_vault_refresh_failed: When set to true, the response contains only certificates + entities which failed refresh. Default value is None. + :paramtype is_key_vault_refresh_failed: bool + :return: An iterator like instance of CertificateContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.CertificateContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CertificateContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_certificate_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + is_key_vault_refresh_failed=is_key_vault_refresh_failed, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CertificateContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def refresh_secret( + self, resource_group_name: str, service_name: str, certificate_id: str, **kwargs: Any + ) -> _models.CertificateContract: + """From KeyVault, Refresh the certificate being used for authentication with the backend. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: CertificateContract. The CertificateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) + + _request = build_certificate_refresh_secret_request( + resource_group_name=resource_group_name, + service_name=service_name, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class ContentTypeOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`content_type` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, content_type_id: str, **kwargs: Any + ) -> _models.ContentTypeContract: + """Gets the details of the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :return: ContentTypeContract. The ContentTypeContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ContentTypeContract] = kwargs.pop("cls", None) + + _request = build_content_type_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ContentTypeContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + parameters: _models.ContentTypeContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentTypeContract: + """Creates or updates the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Custom content types' identifiers need to start + with the ``c-`` prefix. Built-in content types can't be modified. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ContentTypeContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentTypeContract. The ContentTypeContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentTypeContract: + """Creates or updates the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Custom content types' identifiers need to start + with the ``c-`` prefix. Built-in content types can't be modified. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentTypeContract. The ContentTypeContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentTypeContract: + """Creates or updates the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Custom content types' identifiers need to start + with the ``c-`` prefix. Built-in content types can't be modified. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentTypeContract. The ContentTypeContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + parameters: Union[_models.ContentTypeContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentTypeContract: + """Creates or updates the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Custom content types' identifiers need to start + with the ``c-`` prefix. Built-in content types can't be modified. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param parameters: Create or update parameters. Is one of the following types: + ContentTypeContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ContentTypeContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentTypeContract. The ContentTypeContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentTypeContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ContentTypeContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_content_type_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ContentTypeContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Removes the specified developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Built-in content types (with identifiers + starting with the ``c-`` prefix) can't be removed. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_content_type_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> ItemPaged["_models.ContentTypeContract"]: + """Lists the developer portal's content types. Content types describe content items' properties, + validation rules, and constraints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of ContentTypeContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ContentTypeContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ContentTypeContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_content_type_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ContentTypeContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ContentItemOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`content_item` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, content_type_id: str, content_item_id: str, **kwargs: Any + ) -> _models.ContentItemContract: + """Returns the developer portal's content item specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :return: ContentItemContract. The ContentItemContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ContentItemContract] = kwargs.pop("cls", None) + + _request = build_content_item_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + content_item_id=content_item_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ContentItemContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, content_type_id: str, content_item_id: str, **kwargs: Any + ) -> bool: + """Returns the entity state (ETag) version of the developer portal's content item specified by its + identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_content_item_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + content_item_id=content_item_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + parameters: _models.ContentItemContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentItemContract: + """Creates a new developer portal's content item specified by the provided content type. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ContentItemContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentItemContract. The ContentItemContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentItemContract: + """Creates a new developer portal's content item specified by the provided content type. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentItemContract. The ContentItemContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentItemContract: + """Creates a new developer portal's content item specified by the provided content type. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentItemContract. The ContentItemContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + parameters: Union[_models.ContentItemContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ContentItemContract: + """Creates a new developer portal's content item specified by the provided content type. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :param parameters: Create or update parameters. Is one of the following types: + ContentItemContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ContentItemContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ContentItemContract. The ContentItemContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ContentItemContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ContentItemContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_content_item_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + content_item_id=content_item_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ContentItemContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + content_type_id: str, + content_item_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Removes the specified developer portal's content item. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :param content_item_id: Content item identifier. Required. + :type content_item_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_content_item_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + content_item_id=content_item_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, content_type_id: str, **kwargs: Any + ) -> ItemPaged["_models.ContentItemContract"]: + """Lists developer portal's content items specified by the provided content type. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param content_type_id: Content type identifier. Required. + :type content_type_id: str + :return: An iterator like instance of ContentItemContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ContentItemContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ContentItemContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_content_item_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + content_type_id=content_type_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ContentItemContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class DeletedServicesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`deleted_services` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get_by_name(self, location: str, service_name: str, **kwargs: Any) -> _models.DeletedServiceContract: + """Get soft-deleted Api Management Service by name. + + :param location: The name of the Azure region. Required. + :type location: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: DeletedServiceContract. The DeletedServiceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DeletedServiceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DeletedServiceContract] = kwargs.pop("cls", None) + + _request = build_deleted_services_get_by_name_request( + location=location, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DeletedServiceContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _purge_initial(self, location: str, service_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_deleted_services_purge_request( + location=location, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_purge(self, location: str, service_name: str, **kwargs: Any) -> LROPoller[_models.DeletedServiceContract]: + """Purges Api Management Service (deletes it with no option to undelete). + + :param location: The name of the Azure region. Required. + :type location: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An instance of LROPoller that returns DeletedServiceContract. The + DeletedServiceContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.DeletedServiceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DeletedServiceContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._purge_initial( + location=location, + service_name=service_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DeletedServiceContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.DeletedServiceContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.DeletedServiceContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.DeletedServiceContract"]: + """Lists all soft-deleted services available for undelete for the given subscription. + + :return: An iterator like instance of DeletedServiceContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.DeletedServiceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DeletedServiceContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_deleted_services_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DeletedServiceContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class DocumentationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`documentation` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, documentation_id: str, **kwargs: Any + ) -> _models.DocumentationContract: + """Gets the details of the Documentation specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DocumentationContract] = kwargs.pop("cls", None) + + _request = build_documentation_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + documentation_id=documentation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DocumentationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, documentation_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the Documentation by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_documentation_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + documentation_id=documentation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: _models.DocumentationContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DocumentationContract: + """Creates a new Documentation or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DocumentationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DocumentationContract: + """Creates a new Documentation or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DocumentationContract: + """Creates a new Documentation or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: Union[_models.DocumentationContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.DocumentationContract: + """Creates a new Documentation or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Create parameters. Is one of the following types: DocumentationContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DocumentationContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DocumentationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_documentation_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + documentation_id=documentation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DocumentationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: _models.DocumentationUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DocumentationContract: + """Updates the details of the Documentation for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Documentation Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DocumentationUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DocumentationContract: + """Updates the details of the Documentation for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Documentation Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DocumentationContract: + """Updates the details of the Documentation for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Documentation Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + parameters: Union[_models.DocumentationUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.DocumentationContract: + """Updates the details of the Documentation for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :param parameters: Documentation Update parameters. Is one of the following types: + DocumentationUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DocumentationUpdateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: DocumentationContract. The DocumentationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.DocumentationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DocumentationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_documentation_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + documentation_id=documentation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DocumentationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + documentation_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified Documentation from an API. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param documentation_id: Documentation identifier. Must be unique in the current API Management + service instance. Required. + :type documentation_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_documentation_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + documentation_id=documentation_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.DocumentationContract"]: + """Lists all Documentations of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | eq | contains |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of DocumentationContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.DocumentationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DocumentationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_documentation_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DocumentationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class EmailTemplateOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`email_template` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Gets the details of the email template specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.EmailTemplateContract] = kwargs.pop("cls", None) + + _request = build_email_template_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + template_name=template_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.EmailTemplateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the email template specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_email_template_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + template_name=template_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: _models.EmailTemplateUpdateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates an Email Template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: API revision identifier. Must be unique in the current API Management + service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + Known values are: "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Email Template update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates an Email Template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: API revision identifier. Must be unique in the current API Management + service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + Known values are: "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Email Template update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates an Email Template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: API revision identifier. Must be unique in the current API Management + service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + Known values are: "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Email Template update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: Union[_models.EmailTemplateUpdateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates an Email Template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: API revision identifier. Must be unique in the current API Management + service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + Known values are: "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Email Template update parameters. Is one of the following types: + EmailTemplateUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.EmailTemplateContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_email_template_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + template_name=template_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.EmailTemplateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: _models.EmailTemplateUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates API Management email template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates API Management email template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates API Management email template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + parameters: Union[_models.EmailTemplateUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.EmailTemplateContract: + """Updates API Management email template. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Update parameters. Is one of the following types: + EmailTemplateUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: EmailTemplateContract. The EmailTemplateContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.EmailTemplateContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_email_template_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + template_name=template_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.EmailTemplateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + template_name: Union[str, _models.TemplateName], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Reset the Email Template to default template provided by the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param template_name: Email Template Name Identifier. Known values are: + "applicationApprovedNotificationMessage", "accountClosedDeveloper", + "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", + "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", + "confirmSignUpIdentityDefault", "newIssueNotificationMessage", + "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", + "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", and + "requestDeveloperNotificationMessage". Required. + :type template_name: str or ~azure.mgmt.apimanagement.models.TemplateName + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_email_template_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + template_name=template_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.EmailTemplateContract"]: + """Gets all email templates. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of EmailTemplateContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.EmailTemplateContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.EmailTemplateContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_email_template_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.EmailTemplateContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiGatewayConfigConnectionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_gateway_config_connection` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, gateway_name: str, config_connection_name: str, **kwargs: Any + ) -> _models.ApiManagementGatewayConfigConnectionResource: + """Gets an API Management gateway config connection resource description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param config_connection_name: The name of the API Management gateway config connection. + Required. + :type config_connection_name: str + :return: ApiManagementGatewayConfigConnectionResource. The + ApiManagementGatewayConfigConnectionResource is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementGatewayConfigConnectionResource] = kwargs.pop("cls", None) + + _request = build_api_gateway_config_connection_get_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + config_connection_name=config_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementGatewayConfigConnectionResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + parameters: Union[_models.ApiManagementGatewayConfigConnectionResource, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_gateway_config_connection_create_or_update_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + config_connection_name=config_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + parameters: _models.ApiManagementGatewayConfigConnectionResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementGatewayConfigConnectionResource]: + """Creates or updates an API Management gateway config connection. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param config_connection_name: The name of the API Management gateway config connection. + Required. + :type config_connection_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config + connection operation. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementGatewayConfigConnectionResource. + The ApiManagementGatewayConfigConnectionResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementGatewayConfigConnectionResource]: + """Creates or updates an API Management gateway config connection. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param config_connection_name: The name of the API Management gateway config connection. + Required. + :type config_connection_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config + connection operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementGatewayConfigConnectionResource. + The ApiManagementGatewayConfigConnectionResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ApiManagementGatewayConfigConnectionResource]: + """Creates or updates an API Management gateway config connection. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param config_connection_name: The name of the API Management gateway config connection. + Required. + :type config_connection_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config + connection operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ApiManagementGatewayConfigConnectionResource. + The ApiManagementGatewayConfigConnectionResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + parameters: Union[_models.ApiManagementGatewayConfigConnectionResource, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ApiManagementGatewayConfigConnectionResource]: + """Creates or updates an API Management gateway config connection. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param config_connection_name: The name of the API Management gateway config connection. + Required. + :type config_connection_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway config + connection operation. Is one of the following types: + ApiManagementGatewayConfigConnectionResource, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource + or JSON or IO[bytes] + :return: An instance of LROPoller that returns ApiManagementGatewayConfigConnectionResource. + The ApiManagementGatewayConfigConnectionResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ApiManagementGatewayConfigConnectionResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + config_connection_name=config_connection_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ApiManagementGatewayConfigConnectionResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ApiManagementGatewayConfigConnectionResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ApiManagementGatewayConfigConnectionResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_gateway_config_connection_delete_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + config_connection_name=config_connection_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + gateway_name: str, + config_connection_name: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing API Management gateway config connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param config_connection_name: The name of the API Management gateway config connection. + Required. + :type config_connection_name: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + config_connection_name=config_connection_name, + etag=etag, + match_condition=match_condition, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_gateway( + self, resource_group_name: str, gateway_name: str, **kwargs: Any + ) -> ItemPaged["_models.ApiManagementGatewayConfigConnectionResource"]: + """List all API Management gateway config connections within a gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :return: An iterator like instance of ApiManagementGatewayConfigConnectionResource + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementGatewayConfigConnectionResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementGatewayConfigConnectionResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_gateway_config_connection_list_by_gateway_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementGatewayConfigConnectionResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiGatewayHostnameBindingOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_gateway_hostname_binding` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any + ) -> _models.GatewayHostnameBindingResource: + """Gets an API Management gateway hostname binding resource description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :return: GatewayHostnameBindingResource. The GatewayHostnameBindingResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GatewayHostnameBindingResource] = kwargs.pop("cls", None) + + _request = build_api_gateway_hostname_binding_get_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayHostnameBindingResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: Union[_models.GatewayHostnameBindingResource, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_gateway_hostname_binding_create_or_update_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: _models.GatewayHostnameBindingResource, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns GatewayHostnameBindingResource. The + GatewayHostnameBindingResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns GatewayHostnameBindingResource. The + GatewayHostnameBindingResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns GatewayHostnameBindingResource. The + GatewayHostnameBindingResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + parameters: Union[_models.GatewayHostnameBindingResource, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.GatewayHostnameBindingResource]: + """Creates or updates an API Management gateway hostname binding. This is long running operation + and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API Management gateway hostname + binding operation. Is one of the following types: GatewayHostnameBindingResource, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns GatewayHostnameBindingResource. The + GatewayHostnameBindingResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayHostnameBindingResource] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = _deserialize(_models.GatewayHostnameBindingResource, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.GatewayHostnameBindingResource].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.GatewayHostnameBindingResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_gateway_hostname_binding_delete_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + gateway_name: str, + hostname_binding_name: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing API Management gateway hostname binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + etag=etag, + match_condition=match_condition, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_gateway( + self, resource_group_name: str, gateway_name: str, **kwargs: Any + ) -> ItemPaged["_models.GatewayHostnameBindingResource"]: + """List all API Management gateway hostname bindings within a gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :return: An iterator like instance of GatewayHostnameBindingResource + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GatewayHostnameBindingResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GatewayHostnameBindingResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_gateway_hostname_binding_list_by_gateway_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GatewayHostnameBindingResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _refresh_secret_initial( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_api_gateway_hostname_binding_refresh_secret_request( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_refresh_secret( + self, resource_group_name: str, gateway_name: str, hostname_binding_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Refresh the secret for an API Management gateway hostname binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param gateway_name: The name of the API Management gateway. Required. + :type gateway_name: str + :param hostname_binding_name: Gateway hostname binding identifier. Must be unique in the scope + of parent Gateway entity. Required. + :type hostname_binding_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._refresh_secret_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + hostname_binding_name=hostname_binding_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class GatewayOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`gateway` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any + ) -> _models.GatewayContract: + """Gets the details of the Gateway specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GatewayContract] = kwargs.pop("cls", None) + + _request = build_gateway_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the Gateway specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: _models.GatewayContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayContract: + """Creates or updates a Gateway to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayContract: + """Creates or updates a Gateway to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayContract: + """Creates or updates a Gateway to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: Union[_models.GatewayContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayContract: + """Creates or updates a Gateway to be used in Api Management instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Is one of the following types: GatewayContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: _models.GatewayContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayContract: + """Updates the details of the gateway specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayContract: + """Updates the details of the gateway specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayContract: + """Updates the details of the gateway specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: Union[_models.GatewayContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.GatewayContract: + """Updates the details of the gateway specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Is one of the following types: GatewayContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayContract. The GatewayContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.GatewayContract"]: + """Lists a collection of gateways registered with service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| region | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GatewayContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GatewayContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GatewayContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_gateway_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GatewayContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_keys( + self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any + ) -> _models.GatewayKeysContract: + """Retrieves gateway keys. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :return: GatewayKeysContract. The GatewayKeysContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayKeysContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GatewayKeysContract] = kwargs.pop("cls", None) + + _request = build_gateway_list_keys_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayKeysContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def regenerate_key( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: _models.GatewayKeyRegenerationRequestContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Regenerates specified gateway key invalidating any tokens created with it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayKeyRegenerationRequestContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def regenerate_key( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Regenerates specified gateway key invalidating any tokens created with it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def regenerate_key( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """Regenerates specified gateway key invalidating any tokens created with it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def regenerate_key( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: Union[_models.GatewayKeyRegenerationRequestContract, JSON, IO[bytes]], + **kwargs: Any + ) -> None: + """Regenerates specified gateway key invalidating any tokens created with it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Is one of the following types: GatewayKeyRegenerationRequestContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayKeyRegenerationRequestContract or + JSON or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_regenerate_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @overload + def generate_token( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: _models.GatewayTokenRequestContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayTokenContract: + """Gets the Shared Access Authorization Token for the gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayTokenRequestContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayTokenContract. The GatewayTokenContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def generate_token( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayTokenContract: + """Gets the Shared Access Authorization Token for the gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayTokenContract. The GatewayTokenContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def generate_token( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayTokenContract: + """Gets the Shared Access Authorization Token for the gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayTokenContract. The GatewayTokenContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def generate_token( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: Union[_models.GatewayTokenRequestContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.GatewayTokenContract: + """Gets the Shared Access Authorization Token for the gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: Is one of the following types: GatewayTokenRequestContract, JSON, IO[bytes] + Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayTokenRequestContract or JSON or + IO[bytes] + :return: GatewayTokenContract. The GatewayTokenContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayTokenContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayTokenContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_generate_token_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayTokenContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def invalidate_debug_credentials( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, gateway_id: str, **kwargs: Any + ) -> None: + """Action is invalidating all debug credentials issued for gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_invalidate_debug_credentials_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @overload + def list_debug_credentials( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: _models.GatewayListDebugCredentialsContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayDebugCredentialsContract: + """Create new debug credentials for gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List debug credentials properties. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayDebugCredentialsContract. The GatewayDebugCredentialsContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def list_debug_credentials( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayDebugCredentialsContract: + """Create new debug credentials for gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List debug credentials properties. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayDebugCredentialsContract. The GatewayDebugCredentialsContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def list_debug_credentials( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GatewayDebugCredentialsContract: + """Create new debug credentials for gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List debug credentials properties. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: GatewayDebugCredentialsContract. The GatewayDebugCredentialsContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def list_debug_credentials( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: Union[_models.GatewayListDebugCredentialsContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.GatewayDebugCredentialsContract: + """Create new debug credentials for gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List debug credentials properties. Is one of the following types: + GatewayListDebugCredentialsContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayListDebugCredentialsContract or JSON + or IO[bytes] + :return: GatewayDebugCredentialsContract. The GatewayDebugCredentialsContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayDebugCredentialsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayDebugCredentialsContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_list_debug_credentials_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayDebugCredentialsContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def list_trace( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: _models.GatewayListTraceContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> dict[str, Any]: + """Fetches trace collected by gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List trace properties. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayListTraceContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: dict mapping str to any + :rtype: dict[str, any] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def list_trace( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> dict[str, Any]: + """Fetches trace collected by gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List trace properties. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: dict mapping str to any + :rtype: dict[str, any] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def list_trace( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> dict[str, Any]: + """Fetches trace collected by gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List trace properties. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: dict mapping str to any + :rtype: dict[str, any] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def list_trace( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + parameters: Union[_models.GatewayListTraceContract, JSON, IO[bytes]], + **kwargs: Any + ) -> dict[str, Any]: + """Fetches trace collected by gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param parameters: List trace properties. Is one of the following types: + GatewayListTraceContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayListTraceContract or JSON or + IO[bytes] + :return: dict mapping str to any + :rtype: dict[str, any] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[dict[str, Any]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_list_trace_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(dict[str, Any], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class GatewayApiOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`gateway_api` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ApiContract"]: + """Lists a collection of the APIs associated with a gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_gateway_api_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, gateway_id: str, api_id: str, **kwargs: Any + ) -> bool: + """Checks that API entity specified by identifier is associated with the Gateway entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_api_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + api_id: str, + parameters: Optional[_models.AssociationContract] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Adds an API to the specified Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Default value is None. + :type parameters: ~azure.mgmt.apimanagement.models.AssociationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + api_id: str, + parameters: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Adds an API to the specified Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Default value is None. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + api_id: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ApiContract: + """Adds an API to the specified Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + api_id: str, + parameters: Optional[Union[_models.AssociationContract, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> _models.ApiContract: + """Adds an API to the specified Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :param parameters: Is one of the following types: AssociationContract, JSON, IO[bytes] Default + value is None. + :type parameters: ~azure.mgmt.apimanagement.models.AssociationContract or JSON or IO[bytes] + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if parameters else None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_gateway_api_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, gateway_id: str, api_id: str, **kwargs: Any + ) -> None: + """Deletes the specified API from the specified Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param api_id: API identifier. Must be unique in the current API Management service instance. + Required. + :type api_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_api_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class GatewayHostnameConfigurationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`gateway_hostname_configuration` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, **kwargs: Any + ) -> _models.GatewayHostnameConfigurationContract: + """Get details of a hostname configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :return: GatewayHostnameConfigurationContract. The GatewayHostnameConfigurationContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GatewayHostnameConfigurationContract] = kwargs.pop("cls", None) + + _request = build_gateway_hostname_configuration_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + hc_id=hc_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayHostnameConfigurationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, gateway_id: str, hc_id: str, **kwargs: Any + ) -> bool: + """Checks that hostname configuration entity specified by identifier exists for specified Gateway + entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_hostname_configuration_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + hc_id=hc_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + hc_id: str, + parameters: _models.GatewayHostnameConfigurationContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayHostnameConfigurationContract: + """Creates of updates hostname configuration for a Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayHostnameConfigurationContract. The GatewayHostnameConfigurationContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + hc_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayHostnameConfigurationContract: + """Creates of updates hostname configuration for a Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayHostnameConfigurationContract. The GatewayHostnameConfigurationContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + hc_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayHostnameConfigurationContract: + """Creates of updates hostname configuration for a Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayHostnameConfigurationContract. The GatewayHostnameConfigurationContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + hc_id: str, + parameters: Union[_models.GatewayHostnameConfigurationContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayHostnameConfigurationContract: + """Creates of updates hostname configuration for a Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :param parameters: Is one of the following types: GatewayHostnameConfigurationContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract or JSON + or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayHostnameConfigurationContract. The GatewayHostnameConfigurationContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayHostnameConfigurationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_hostname_configuration_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + hc_id=hc_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayHostnameConfigurationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + hc_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified hostname configuration from the specified Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param hc_id: Gateway hostname configuration identifier. Must be unique in the scope of parent + Gateway entity. Required. + :type hc_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_hostname_configuration_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + hc_id=hc_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.GatewayHostnameConfigurationContract"]: + """Lists the collection of hostname configurations for the specified gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| hostname + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GatewayHostnameConfigurationContract + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GatewayHostnameConfigurationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GatewayHostnameConfigurationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_gateway_hostname_configuration_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GatewayHostnameConfigurationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class GatewayCertificateAuthorityOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`gateway_certificate_authority` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, gateway_id: str, certificate_id: str, **kwargs: Any + ) -> _models.GatewayCertificateAuthorityContract: + """Get assigned Gateway Certificate Authority details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: GatewayCertificateAuthorityContract. The GatewayCertificateAuthorityContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GatewayCertificateAuthorityContract] = kwargs.pop("cls", None) + + _request = build_gateway_certificate_authority_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayCertificateAuthorityContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, gateway_id: str, certificate_id: str, **kwargs: Any + ) -> bool: + """Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_certificate_authority_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + parameters: _models.GatewayCertificateAuthorityContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayCertificateAuthorityContract: + """Assign Certificate entity to Gateway entity as Certificate Authority. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayCertificateAuthorityContract. The GatewayCertificateAuthorityContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayCertificateAuthorityContract: + """Assign Certificate entity to Gateway entity as Certificate Authority. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayCertificateAuthorityContract. The GatewayCertificateAuthorityContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayCertificateAuthorityContract: + """Assign Certificate entity to Gateway entity as Certificate Authority. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayCertificateAuthorityContract. The GatewayCertificateAuthorityContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + parameters: Union[_models.GatewayCertificateAuthorityContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GatewayCertificateAuthorityContract: + """Assign Certificate entity to Gateway entity as Certificate Authority. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :param parameters: Is one of the following types: GatewayCertificateAuthorityContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract or JSON + or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GatewayCertificateAuthorityContract. The GatewayCertificateAuthorityContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GatewayCertificateAuthorityContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_gateway_certificate_authority_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GatewayCertificateAuthorityContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + certificate_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Remove relationship between Certificate Authority and Gateway entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :param certificate_id: Identifier of the certificate entity. Must be unique in the current API + Management service instance. Required. + :type certificate_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_gateway_certificate_authority_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + certificate_id=certificate_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + gateway_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.GatewayCertificateAuthorityContract"]: + """Lists the collection of Certificate Authorities for the specified Gateway entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param gateway_id: Gateway entity identifier. Must be unique in the current API Management + service instance. Must not have value 'managed'. Required. + :type gateway_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | eq, ne | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GatewayCertificateAuthorityContract + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GatewayCertificateAuthorityContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GatewayCertificateAuthorityContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_gateway_certificate_authority_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + gateway_id=gateway_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GatewayCertificateAuthorityContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class GroupOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`group` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, group_id: str, **kwargs: Any) -> _models.GroupContract: + """Gets the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + _request = build_group_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, group_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_group_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: _models.GroupCreateParameters, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: Union[_models.GroupCreateParameters, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.GroupContract: + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Create parameters. Is one of the following types: GroupCreateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_group_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: _models.GroupUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + group_id: str, + parameters: Union[_models.GroupUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.GroupContract: + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param parameters: Update parameters. Is one of the following types: GroupUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_group_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + group_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific group of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_group_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.GroupContract"]: + """Lists a collection of groups defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| externalId | filter | eq | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GroupContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GroupContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GroupContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_group_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GroupContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class GroupUserOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`group_user` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + group_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.UserContract"]: + """Lists a collection of user entities associated with the group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, + le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of UserContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.UserContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.UserContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_group_user_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.UserContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def check_entity_exists( + self, resource_group_name: str, service_name: str, group_id: str, user_id: str, **kwargs: Any + ) -> bool: + """Checks that user entity specified by identifier is associated with the group entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_group_user_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace + def create( + self, resource_group_name: str, service_name: str, group_id: str, user_id: str, **kwargs: Any + ) -> _models.UserContract: + """Add existing user to existing group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) + + _request = build_group_user_create_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, group_id: str, user_id: str, **kwargs: Any + ) -> None: + """Remove existing user from existing group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_group_user_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + group_id=group_id, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class WorkspaceGroupUserOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_group_user` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + group_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.UserContract"]: + """Lists a collection of user entities associated with the group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, + le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of UserContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.UserContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.UserContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_group_user_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.UserContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def check_entity_exists( + self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, user_id: str, **kwargs: Any + ) -> bool: + """Checks that user entity specified by identifier is associated with the group entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_group_user_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace + def create( + self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, user_id: str, **kwargs: Any + ) -> _models.UserContract: + """Add existing user to existing group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) + + _request = build_workspace_group_user_create_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, user_id: str, **kwargs: Any + ) -> None: + """Remove existing user from existing group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_group_user_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + group_id=group_id, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class IdentityProviderOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`identity_provider` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Gets the configuration details of the identity Provider configured in specified service + instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IdentityProviderContract] = kwargs.pop("cls", None) + + _request = build_identity_provider_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + identity_provider_name=identity_provider_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IdentityProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the identityProvider specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_identity_provider_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + identity_provider_name=identity_provider_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: _models.IdentityProviderCreateContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Creates or Updates the IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderCreateContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Creates or Updates the IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Creates or Updates the IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: Union[_models.IdentityProviderCreateContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Creates or Updates the IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Create parameters. Is one of the following types: + IdentityProviderCreateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderCreateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IdentityProviderContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_identity_provider_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + identity_provider_name=identity_provider_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IdentityProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: _models.IdentityProviderUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Updates an existing IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Updates an existing IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Updates an existing IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + parameters: Union[_models.IdentityProviderUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.IdentityProviderContract: + """Updates an existing IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Update parameters. Is one of the following types: + IdentityProviderUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.IdentityProviderUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: IdentityProviderContract. The IdentityProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IdentityProviderContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_identity_provider_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + identity_provider_name=identity_provider_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IdentityProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified identity provider configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_identity_provider_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + identity_provider_name=identity_provider_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> ItemPaged["_models.IdentityProviderContract"]: + """Lists a collection of Identity Provider configured in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of IdentityProviderContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.IdentityProviderContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IdentityProviderContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_identity_provider_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IdentityProviderContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_secrets( + self, + resource_group_name: str, + service_name: str, + identity_provider_name: Union[str, _models.IdentityProviderType], + **kwargs: Any + ) -> _models.ClientSecretContract: + """Gets the client secret details of the Identity Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. Known values are: "facebook", + "google", "microsoft", "twitter", "aad", and "aadB2C". Required. + :type identity_provider_name: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :return: ClientSecretContract. The ClientSecretContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientSecretContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ClientSecretContract] = kwargs.pop("cls", None) + + _request = build_identity_provider_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + identity_provider_name=identity_provider_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientSecretContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class LoggerOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`logger` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, logger_id: str, **kwargs: Any) -> _models.LoggerContract: + """Gets the details of the logger specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) + + _request = build_logger_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoggerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, logger_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the logger specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_logger_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: _models.LoggerContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: Union[_models.LoggerContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.LoggerContract: + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Create parameters. Is one of the following types: LoggerContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_logger_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoggerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: _models.LoggerUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + logger_id: str, + parameters: Union[_models.LoggerUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.LoggerContract: + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :param parameters: Update parameters. Is one of the following types: LoggerUpdateContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: LoggerContract. The LoggerContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_logger_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoggerContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + logger_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified logger. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API Management service instance. + Required. + :type logger_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_logger_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + logger_id=logger_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.LoggerContract"]: + """Lists a collection of loggers in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of LoggerContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.LoggerContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LoggerContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_logger_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LoggerContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class NamedValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`named_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any + ) -> _models.NamedValueContract: + """Gets the details of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: NamedValueContract. The NamedValueContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NamedValueContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + + _request = build_named_value_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NamedValueContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_named_value_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: Union[_models.NamedValueCreateContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_named_value_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: _models.NamedValueCreateContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: Union[_models.NamedValueCreateContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Creates or updates named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Create parameters. Is one of the following types: NamedValueCreateContract, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.NamedValueContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NamedValueContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NamedValueContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: Union[_models.NamedValueUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_named_value_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: _models.NamedValueUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + parameters: Union[_models.NamedValueUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Updates the specific named value. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :param parameters: Update parameters. Is one of the following types: + NamedValueUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.NamedValueContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NamedValueContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NamedValueContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + named_value_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific named value from the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_named_value_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + is_key_vault_refresh_failed: Optional[bool] = None, + **kwargs: Any + ) -> ItemPaged["_models.NamedValueContract"]: + """Lists a collection of named values defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| tags | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword is_key_vault_refresh_failed: When set to true, the response contains only named value + entities which failed refresh. Default value is None. + :paramtype is_key_vault_refresh_failed: bool + :return: An iterator like instance of NamedValueContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NamedValueContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_named_value_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + is_key_vault_refresh_failed=is_key_vault_refresh_failed, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NamedValueContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_value( + self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any + ) -> _models.NamedValueSecretContract: + """Gets the secret of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: NamedValueSecretContract. The NamedValueSecretContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NamedValueSecretContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NamedValueSecretContract] = kwargs.pop("cls", None) + + _request = build_named_value_list_value_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NamedValueSecretContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + def _refresh_secret_initial( + self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_named_value_refresh_secret_request( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_refresh_secret( + self, resource_group_name: str, service_name: str, named_value_id: str, **kwargs: Any + ) -> LROPoller[_models.NamedValueContract]: + """Refresh the secret of the named value specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param named_value_id: Identifier of the NamedValue. Required. + :type named_value_id: str + :return: An instance of LROPoller that returns NamedValueContract. The NamedValueContract is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._refresh_secret_initial( + resource_group_name=resource_group_name, + service_name=service_name, + named_value_id=named_value_id, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.NamedValueContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NamedValueContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NamedValueContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NotificationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`notification` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + **kwargs: Any + ) -> _models.NotificationContract: + """Gets the details of the Notification specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :return: NotificationContract. The NotificationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NotificationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) + + _request = build_notification_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NotificationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.NotificationContract: + """Create or Update API Management publisher notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: NotificationContract. The NotificationContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.NotificationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) + + _request = build_notification_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NotificationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.NotificationContract"]: + """Lists a collection of properties defined within a service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of NotificationContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.NotificationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NotificationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_notification_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NotificationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class NotificationRecipientUserOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`notification_recipient_user` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_notification( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + **kwargs: Any + ) -> _models.RecipientUserCollection: + """Gets the list of the Notification Recipient User subscribed to the notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :return: RecipientUserCollection. The RecipientUserCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientUserCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientUserCollection] = kwargs.pop("cls", None) + + _request = build_notification_recipient_user_list_by_notification_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientUserCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def check_entity_exists( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + **kwargs: Any + ) -> bool: + """Determine if the Notification Recipient User is subscribed to the notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_notification_recipient_user_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + **kwargs: Any + ) -> _models.RecipientUserContract: + """Adds the API Management User to the list of Recipients for the Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: RecipientUserContract. The RecipientUserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientUserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientUserContract] = kwargs.pop("cls", None) + + _request = build_notification_recipient_user_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientUserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + **kwargs: Any + ) -> None: + """Removes the API Management user from the list of Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_notification_recipient_user_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class NotificationRecipientEmailOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`notification_recipient_email` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_notification( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + **kwargs: Any + ) -> _models.RecipientEmailCollection: + """Gets the list of the Notification Recipient Emails subscribed to a notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :return: RecipientEmailCollection. The RecipientEmailCollection is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientEmailCollection] = kwargs.pop("cls", None) + + _request = build_notification_recipient_email_list_by_notification_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientEmailCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def check_entity_exists( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + email: str, + **kwargs: Any + ) -> bool: + """Determine if Notification Recipient Email subscribed to the notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. Required. + :type email: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_notification_recipient_email_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + email=email, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + email: str, + **kwargs: Any + ) -> _models.RecipientEmailContract: + """Adds the Email address to the list of Recipients for the Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. Required. + :type email: str + :return: RecipientEmailContract. The RecipientEmailContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientEmailContract] = kwargs.pop("cls", None) + + _request = build_notification_recipient_email_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + email=email, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientEmailContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + notification_name: Union[str, _models.NotificationName], + email: str, + **kwargs: Any + ) -> None: + """Removes the email from the list of Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. Required. + :type email: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_notification_recipient_email_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + notification_name=notification_name, + email=email, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class WorkspaceNotificationRecipientUserOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_notification_recipient_user` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_notification( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + **kwargs: Any + ) -> _models.RecipientUserCollection: + """Gets the list of the Notification Recipient User subscribed to the notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :return: RecipientUserCollection. The RecipientUserCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientUserCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientUserCollection] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_user_list_by_notification_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientUserCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def check_entity_exists( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + **kwargs: Any + ) -> bool: + """Determine if the Notification Recipient User is subscribed to the notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Workspace identifier. Must be unique in the current API Management + service instance. Known values are: "RequestPublisherNotificationMessage", + "PurchasePublisherNotificationMessage", "NewApplicationNotificationMessage", "BCC", + "NewIssuePublisherNotificationMessage", "AccountClosedPublisher", and + "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_user_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + **kwargs: Any + ) -> _models.RecipientUserContract: + """Adds the API Management User to the list of Recipients for the Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: RecipientUserContract. The RecipientUserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientUserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientUserContract] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_user_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientUserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + user_id: str, + **kwargs: Any + ) -> None: + """Removes the API Management user from the list of Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Workspace identifier. Must be unique in the current API Management + service instance. Known values are: "RequestPublisherNotificationMessage", + "PurchasePublisherNotificationMessage", "NewApplicationNotificationMessage", "BCC", + "NewIssuePublisherNotificationMessage", "AccountClosedPublisher", and + "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_user_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class WorkspaceNotificationRecipientEmailOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_notification_recipient_email` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_notification( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + **kwargs: Any + ) -> _models.RecipientEmailCollection: + """Gets the list of the Notification Recipient Emails subscribed to a notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :return: RecipientEmailCollection. The RecipientEmailCollection is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientEmailCollection] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_email_list_by_notification_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientEmailCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def check_entity_exists( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + email: str, + **kwargs: Any + ) -> bool: + """Determine if Notification Recipient Email subscribed to the notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Workspace identifier. Must be unique in the current API Management + service instance. Known values are: "RequestPublisherNotificationMessage", + "PurchasePublisherNotificationMessage", "NewApplicationNotificationMessage", "BCC", + "NewIssuePublisherNotificationMessage", "AccountClosedPublisher", and + "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. Required. + :type email: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_email_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + email=email, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + email: str, + **kwargs: Any + ) -> _models.RecipientEmailContract: + """Adds the Email address to the list of Recipients for the Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Notification Name Identifier. Known values are: + "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", + "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", + "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. Required. + :type email: str + :return: RecipientEmailContract. The RecipientEmailContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RecipientEmailContract] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_email_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + email=email, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RecipientEmailContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + notification_name: Union[str, _models.NotificationName], + email: str, + **kwargs: Any + ) -> None: + """Removes the email from the list of Notification. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param notification_name: Workspace identifier. Must be unique in the current API Management + service instance. Known values are: "RequestPublisherNotificationMessage", + "PurchasePublisherNotificationMessage", "NewApplicationNotificationMessage", "BCC", + "NewIssuePublisherNotificationMessage", "AccountClosedPublisher", and + "QuotaLimitApproachingPublisherNotificationMessage". Required. + :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. Required. + :type email: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_notification_recipient_email_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + notification_name=notification_name, + email=email, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class OpenIdConnectProviderOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`open_id_connect_provider` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, opid: str, **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Gets specific OpenID Connect Provider without secrets. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OpenidConnectProviderContract] = kwargs.pop("cls", None) + + _request = build_open_id_connect_provider_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + opid=opid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OpenidConnectProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, opid: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_open_id_connect_provider_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + opid=opid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: _models.OpenidConnectProviderContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Creates or updates the OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Creates or updates the OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Creates or updates the OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: Union[_models.OpenidConnectProviderContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Creates or updates the OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Create parameters. Is one of the following types: + OpenidConnectProviderContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OpenidConnectProviderContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_open_id_connect_provider_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + opid=opid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OpenidConnectProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: _models.OpenidConnectProviderUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Updates the specific OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Updates the specific OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Updates the specific OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + opid: str, + parameters: Union[_models.OpenidConnectProviderUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.OpenidConnectProviderContract: + """Updates the specific OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :param parameters: Update parameters. Is one of the following types: + OpenidConnectProviderUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContract or JSON + or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: OpenidConnectProviderContract. The OpenidConnectProviderContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OpenidConnectProviderContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_open_id_connect_provider_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + opid=opid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OpenidConnectProviderContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + opid: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific OpenID Connect Provider of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_open_id_connect_provider_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + opid=opid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.OpenidConnectProviderContract"]: + """Lists of all the OpenId Connect Providers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of OpenidConnectProviderContract + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.OpenidConnectProviderContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OpenidConnectProviderContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_open_id_connect_provider_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OpenidConnectProviderContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_secrets( + self, resource_group_name: str, service_name: str, opid: str, **kwargs: Any + ) -> _models.ClientSecretContract: + """Gets the client secret details of the OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. Required. + :type opid: str + :return: ClientSecretContract. The ClientSecretContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientSecretContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ClientSecretContract] = kwargs.pop("cls", None) + + _request = build_open_id_connect_provider_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + opid=opid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientSecretContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class PolicyFragmentOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`policy_fragment` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + id: str, + *, + format: Optional[Union[str, _models.PolicyFragmentContentFormat]] = None, + **kwargs: Any + ) -> _models.PolicyFragmentContract: + """Gets a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :keyword format: Policy fragment content format. Known values are: "xml" and "rawxml". Default + value is None. + :paramtype format: str or ~azure.mgmt.apimanagement.models.PolicyFragmentContentFormat + :return: PolicyFragmentContract. The PolicyFragmentContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyFragmentContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) + + _request = build_policy_fragment_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + id=id, + subscription_id=self._config.subscription_id, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyFragmentContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policy_fragment_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + id=id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + id: str, + parameters: Union[_models.PolicyFragmentContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_policy_fragment_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + id=id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + id: str, + parameters: _models.PolicyFragmentContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + id: str, + parameters: Union[_models.PolicyFragmentContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.PolicyFragmentContract]: + """Creates or updates a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :param parameters: The policy fragment contents to apply. Is one of the following types: + PolicyFragmentContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns PolicyFragmentContract. The + PolicyFragmentContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + id=id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.PolicyFragmentContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.PolicyFragmentContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.PolicyFragmentContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes a policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policy_fragment_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + id=id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + orderby: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.PolicyFragmentContract"]: + """Gets all policy fragments. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword orderby: OData order by query option. Default value is None. + :paramtype orderby: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of PolicyFragmentContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyFragmentContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyFragmentContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_policy_fragment_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + orderby=orderby, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyFragmentContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_references( + self, + resource_group_name: str, + service_name: str, + id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> _models.ResourceCollection: + """Lists policy resources that reference the policy fragment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param id: A resource identifier. Required. + :type id: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: ResourceCollection. The ResourceCollection is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ResourceCollection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ResourceCollection] = kwargs.pop("cls", None) + + _request = build_policy_fragment_list_references_request( + resource_group_name=resource_group_name, + service_name=service_name, + id=id, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ResourceCollection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PolicyRestrictionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`policy_restriction` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, policy_restriction_id: str, **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Get the policy restriction of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PolicyRestrictionContract] = kwargs.pop("cls", None) + + _request = build_policy_restriction_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_restriction_id=policy_restriction_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyRestrictionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, policy_restriction_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the policy restriction in the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policy_restriction_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_restriction_id=policy_restriction_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: _models.PolicyRestrictionContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Creates or updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Creates or updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Creates or updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: Union[_models.PolicyRestrictionContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Creates or updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Is one of the following types: + PolicyRestrictionContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyRestrictionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_policy_restriction_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_restriction_id=policy_restriction_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyRestrictionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: _models.PolicyRestrictionUpdateContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionUpdateContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + parameters: Union[_models.PolicyRestrictionUpdateContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.PolicyRestrictionContract: + """Updates the policy restriction configuration of the Api Management service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :param parameters: The policy restriction to apply. Is one of the following types: + PolicyRestrictionUpdateContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionUpdateContract or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PolicyRestrictionContract. The PolicyRestrictionContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PolicyRestrictionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_policy_restriction_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_restriction_id=policy_restriction_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PolicyRestrictionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + policy_restriction_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> None: + """Deletes the policy restriction configuration of the Api Management Service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param policy_restriction_id: Policy restrictions after an entity level. Required. + :type policy_restriction_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policy_restriction_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + policy_restriction_id=policy_restriction_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> ItemPaged["_models.PolicyRestrictionContract"]: + """Gets all policy restrictions of API Management services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of PolicyRestrictionContract + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyRestrictionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PolicyRestrictionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_policy_restriction_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PolicyRestrictionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class PortalConfigOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`portal_config` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, portal_config_id: str, **kwargs: Any + ) -> _models.PortalConfigContract: + """Get the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalConfigContract] = kwargs.pop("cls", None) + + _request = build_portal_config_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_config_id=portal_config_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalConfigContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, portal_config_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_portal_config_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_config_id=portal_config_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: _models.PortalConfigContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PortalConfigContract: + """Create or update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PortalConfigContract: + """Create or update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PortalConfigContract: + """Create or update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: Union[_models.PortalConfigContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.PortalConfigContract: + """Create or update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Is one of the following types: + PortalConfigContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalConfigContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_portal_config_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_config_id=portal_config_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalConfigContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: _models.PortalConfigContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PortalConfigContract: + """Update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PortalConfigContract: + """Update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PortalConfigContract: + """Update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + portal_config_id: str, + parameters: Union[_models.PortalConfigContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.PortalConfigContract: + """Update the developer portal configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_config_id: Portal configuration identifier. Required. + :type portal_config_id: str + :param parameters: Update the developer portal configuration. Is one of the following types: + PortalConfigContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: PortalConfigContract. The PortalConfigContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalConfigContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_portal_config_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_config_id=portal_config_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalConfigContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> ItemPaged["_models.PortalConfigContract"]: + """Lists the developer portal configurations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of PortalConfigContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PortalConfigContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PortalConfigContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_portal_config_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PortalConfigContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ClientApplicationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`client_application` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> _models.ClientApplicationContract: + """Gets the details of the client application specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: ClientApplicationContract. The ClientApplicationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ClientApplicationContract] = kwargs.pop("cls", None) + + _request = build_client_application_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientApplicationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> bool: + """Gets the entity state (Etag) version of the product specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_client_application_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: _models.ClientApplicationContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationContract. The ClientApplicationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationContract. The ClientApplicationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationContract. The ClientApplicationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + parameters: Union[_models.ClientApplicationContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ClientApplicationContract: + """Creates or Updates a client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param parameters: Create or update parameters. Is one of the following types: + ClientApplicationContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationContract or JSON or + IO[bytes] + :return: ClientApplicationContract. The ClientApplicationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ClientApplicationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_client_application_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientApplicationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> None: + """Delete client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_client_application_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ClientApplicationContract"]: + """Lists a collection of client applications in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
state | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
|. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ClientApplicationContract + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ClientApplicationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ClientApplicationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_client_application_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ClientApplicationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_secrets( + self, resource_group_name: str, service_name: str, client_application_id: str, **kwargs: Any + ) -> _models.ClientApplicationSecretsContract: + """Retrived client application secrets. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :return: ClientApplicationSecretsContract. The ClientApplicationSecretsContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationSecretsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ClientApplicationSecretsContract] = kwargs.pop("cls", None) + + _request = build_client_application_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientApplicationSecretsContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ClientApplicationProductLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`client_application_product_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Gets the product link for the client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :return: ClientApplicationProductLinkContract. The ClientApplicationProductLinkContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ClientApplicationProductLinkContract] = kwargs.pop("cls", None) + + _request = build_client_application_product_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + client_application_product_link_id=client_application_product_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientApplicationProductLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: _models.ClientApplicationProductLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationProductLinkContract. The ClientApplicationProductLinkContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationProductLinkContract. The ClientApplicationProductLinkContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ClientApplicationProductLinkContract. The ClientApplicationProductLinkContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + parameters: Union[_models.ClientApplicationProductLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ClientApplicationProductLinkContract: + """Adds an Product to the specified Client Application via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :param parameters: Create parameters. Is one of the following types: + ClientApplicationProductLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract or JSON + or IO[bytes] + :return: ClientApplicationProductLinkContract. The ClientApplicationProductLinkContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ClientApplicationProductLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_client_application_product_link_create_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + client_application_product_link_id=client_application_product_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClientApplicationProductLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + client_application_product_link_id: str, + **kwargs: Any + ) -> None: + """Deletes the specified Product from the specified client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :param client_application_product_link_id: Client Application Product Link identifier. Must be + unique in the current API Management service instance. Required. + :type client_application_product_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_client_application_product_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + client_application_product_link_id=client_application_product_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_client_applications( + self, + resource_group_name: str, + service_name: str, + client_application_id: str, + *, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ClientApplicationProductLinkContract"]: + """Lists a collection of product links associated with the specified client application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param client_application_id: Client Application identifier. Must be unique in the current API + Management service instance. Required. + :type client_application_id: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ClientApplicationProductLinkContract + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ClientApplicationProductLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ClientApplicationProductLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_client_application_product_link_list_by_client_applications_request( + resource_group_name=resource_group_name, + service_name=service_name, + client_application_id=client_application_id, + subscription_id=self._config.subscription_id, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ClientApplicationProductLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class PortalRevisionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`portal_revision` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, portal_revision_id: str, **kwargs: Any + ) -> _models.PortalRevisionContract: + """Gets the developer portal's revision specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :return: PortalRevisionContract. The PortalRevisionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PortalRevisionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PortalRevisionContract] = kwargs.pop("cls", None) + + _request = build_portal_revision_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_revision_id=portal_revision_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PortalRevisionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, portal_revision_id: str, **kwargs: Any + ) -> bool: + """Gets the developer portal revision specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_portal_revision_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_revision_id=portal_revision_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: Union[_models.PortalRevisionContract, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_portal_revision_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_revision_id=portal_revision_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: _models.PortalRevisionContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PortalRevisionContract]: + """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` + property indicates if the revision is publicly accessible. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PortalRevisionContract]: + """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` + property indicates if the revision is publicly accessible. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PortalRevisionContract]: + """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` + property indicates if the revision is publicly accessible. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: Union[_models.PortalRevisionContract, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.PortalRevisionContract]: + """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` + property indicates if the revision is publicly accessible. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Is one of the following types: PortalRevisionContract, JSON, IO[bytes] + Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract or JSON or IO[bytes] + :return: An instance of LROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalRevisionContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + portal_revision_id=portal_revision_id, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.PortalRevisionContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.PortalRevisionContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.PortalRevisionContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: Union[_models.PortalRevisionContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_portal_revision_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + portal_revision_id=portal_revision_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: _models.PortalRevisionContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PortalRevisionContract]: + """Updates the description of specified portal revision or makes it current. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PortalRevisionContract]: + """Updates the description of specified portal revision or makes it current. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PortalRevisionContract]: + """Updates the description of specified portal revision or makes it current. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + service_name: str, + portal_revision_id: str, + parameters: Union[_models.PortalRevisionContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> LROPoller[_models.PortalRevisionContract]: + """Updates the description of specified portal revision or makes it current. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param portal_revision_id: Portal revision identifier. Must be unique in the current API + Management service instance. Required. + :type portal_revision_id: str + :param parameters: Is one of the following types: PortalRevisionContract, JSON, IO[bytes] + Required. + :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns PortalRevisionContract. The + PortalRevisionContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PortalRevisionContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + portal_revision_id=portal_revision_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.PortalRevisionContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.PortalRevisionContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.PortalRevisionContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.PortalRevisionContract"]: + """Lists developer portal's revisions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Supported operators | Supported functions | + |-------------|------------------------|-----------------------------------| + + |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| + |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| + |isCurrent | eq, ne | |. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of PortalRevisionContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PortalRevisionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PortalRevisionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_portal_revision_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PortalRevisionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class PrivateEndpointConnectionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`private_endpoint_connection` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get_by_name( + self, resource_group_name: str, service_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Gets the details of the Private Endpoint Connection specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. Required. + :type private_endpoint_connection_name: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connection_get_by_name_request( + resource_group_name=resource_group_name, + service_name=service_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection_request: Union[_models.PrivateEndpointConnectionRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(private_endpoint_connection_request, (IOBase, bytes)): + _content = private_endpoint_connection_request + else: + _content = json.dumps(private_endpoint_connection_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_private_endpoint_connection_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection_request: _models.PrivateEndpointConnectionRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Creates a new Private Endpoint Connection or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_endpoint_connection_name: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection_request: Required. + :type private_endpoint_connection_request: + ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Creates a new Private Endpoint Connection or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_endpoint_connection_name: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection_request: Required. + :type private_endpoint_connection_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Creates a new Private Endpoint Connection or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_endpoint_connection_name: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection_request: Required. + :type private_endpoint_connection_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection_request: Union[_models.PrivateEndpointConnectionRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Creates a new Private Endpoint Connection or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_endpoint_connection_name: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection_request: Is one of the following types: + PrivateEndpointConnectionRequest, JSON, IO[bytes] Required. + :type private_endpoint_connection_request: + ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequest or JSON or IO[bytes] + :return: An instance of LROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_connection_request=private_endpoint_connection_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.PrivateEndpointConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.PrivateEndpointConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, service_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connection_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, service_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified Private Endpoint Connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. Required. + :type private_endpoint_connection_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> ItemPaged["_models.PrivateEndpointConnection"]: + """Lists all private endpoint connections of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_private_endpoint_connection_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PrivateEndpointConnection], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_private_link_resource( + self, resource_group_name: str, service_name: str, private_link_sub_resource_name: str, **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets the private link resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param private_link_sub_resource_name: The name of the private link associated with the Azure + resource. Required. + :type private_link_sub_resource_name: str + :return: PrivateLinkResource. The PrivateLinkResource is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connection_get_private_link_resource_request( + resource_group_name=resource_group_name, + service_name=service_name, + private_link_sub_resource_name=private_link_sub_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateLinkResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_private_link_resources( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> _models.PrivateLinkResourceListResult: + """Gets the private link resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: PrivateLinkResourceListResult. The PrivateLinkResourceListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.PrivateLinkResourceListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connection_list_private_link_resources_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateLinkResourceListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ProductApiOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`product_api` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ApiContract"]: + """Lists a collection of the APIs associated with a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ApiContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_api_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def check_entity_exists( + self, resource_group_name: str, service_name: str, product_id: str, api_id: str, **kwargs: Any + ) -> bool: + """Checks that API entity specified by identifier is associated with the Product entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_api_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace + def create_or_update( + self, resource_group_name: str, service_name: str, product_id: str, api_id: str, **kwargs: Any + ) -> _models.ApiContract: + """Adds an API to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: ApiContract. The ApiContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) + + _request = build_product_api_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, product_id: str, api_id: str, **kwargs: Any + ) -> None: + """Deletes the specified API from the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_api_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class ProductGroupOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`product_group` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.GroupContract"]: + """Lists the collection of developer groups associated with the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | |
| displayName | filter | eq, ne | |
| + description | filter | eq, ne | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GroupContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GroupContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GroupContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_group_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GroupContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def check_entity_exists( + self, resource_group_name: str, service_name: str, product_id: str, group_id: str, **kwargs: Any + ) -> bool: + """Checks that Group entity specified by identifier is associated with the Product entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_group_check_entity_exists_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + return 200 <= response.status_code <= 299 + + @distributed_trace + def create_or_update( + self, resource_group_name: str, service_name: str, product_id: str, group_id: str, **kwargs: Any + ) -> _models.GroupContract: + """Adds the association between the specified developer group with the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: GroupContract. The GroupContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GroupContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) + + _request = build_product_group_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, product_id: str, group_id: str, **kwargs: Any + ) -> None: + """Deletes the association between the specified group and product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_id: Group identifier. Must be unique in the current API Management service + instance. Required. + :type group_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_group_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class ProductSubscriptionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`product_subscriptions` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.SubscriptionContract"]: + """Lists the collection of subscriptions to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| state | filter | eq | |
| user | expand | | + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of SubscriptionContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SubscriptionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_subscriptions_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SubscriptionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ProductApiLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`product_api_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, product_id: str, api_link_id: str, **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Gets the API link for the product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) + + _request = build_product_api_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + api_link_id: str, + parameters: _models.ProductApiLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + api_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + api_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + api_link_id: str, + parameters: Union[_models.ProductApiLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ProductApiLinkContract: + """Adds an API to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + ProductApiLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract or JSON or IO[bytes] + :return: ProductApiLinkContract. The ProductApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_api_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, product_id: str, api_link_id: str, **kwargs: Any + ) -> None: + """Deletes the specified API from the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param api_link_id: Product-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_api_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ProductApiLinkContract"]: + """Lists a collection of the API links associated with a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| apiId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ProductApiLinkContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductApiLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductApiLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_api_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductApiLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ProductGroupLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`product_group_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, product_id: str, group_link_id: str, **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Gets the group link for the product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) + + _request = build_product_group_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + group_link_id=group_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductGroupLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + group_link_id: str, + parameters: _models.ProductGroupLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + group_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + group_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + product_id: str, + group_link_id: str, + parameters: Union[_models.ProductGroupLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ProductGroupLinkContract: + """Adds a group to the specified product via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + ProductGroupLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract or JSON or + IO[bytes] + :return: ProductGroupLinkContract. The ProductGroupLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_product_group_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + group_link_id=group_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ProductGroupLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, product_id: str, group_link_id: str, **kwargs: Any + ) -> None: + """Deletes the specified group from the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :param group_link_id: Product-Group link identifier. Must be unique in the current API + Management service instance. Required. + :type group_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_product_group_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + group_link_id=group_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + product_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.ProductGroupLinkContract"]: + """Lists a collection of the group links associated with a product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current API Management service + instance. Required. + :type product_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| groupId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of ProductGroupLinkContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductGroupLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProductGroupLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_product_group_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + product_id=product_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ProductGroupLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class GlobalSchemaOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`global_schema` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, schema_id: str, **kwargs: Any + ) -> _models.GlobalSchemaContract: + """Gets the details of the Schema specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: GlobalSchemaContract. The GlobalSchemaContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GlobalSchemaContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) + + _request = build_global_schema_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GlobalSchemaContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, schema_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the Schema specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_global_schema_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + schema_id: str, + parameters: Union[_models.GlobalSchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_global_schema_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + schema_id: str, + parameters: _models.GlobalSchemaContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns GlobalSchemaContract. The GlobalSchemaContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + schema_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns GlobalSchemaContract. The GlobalSchemaContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + schema_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns GlobalSchemaContract. The GlobalSchemaContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + schema_id: str, + parameters: Union[_models.GlobalSchemaContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.GlobalSchemaContract]: + """Creates new or updates existing specified Schema of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :param parameters: Create or update parameters. Is one of the following types: + GlobalSchemaContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns GlobalSchemaContract. The GlobalSchemaContract + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + schema_id=schema_id, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + deserialized = _deserialize(_models.GlobalSchemaContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.GlobalSchemaContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.GlobalSchemaContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + schema_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes specific Schema. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param schema_id: Schema id identifier. Must be unique in the current API Management service + instance. Required. + :type schema_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_global_schema_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + schema_id=schema_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.GlobalSchemaContract"]: + """Lists a collection of schemas registered with service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GlobalSchemaContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GlobalSchemaContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GlobalSchemaContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_global_schema_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GlobalSchemaContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class TenantSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`tenant_settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + settings_type: Union[str, _models.SettingsTypeName], + **kwargs: Any + ) -> _models.TenantSettingsContract: + """Get tenant settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param settings_type: The identifier of the settings. "public" Required. + :type settings_type: str or ~azure.mgmt.apimanagement.models.SettingsTypeName + :return: TenantSettingsContract. The TenantSettingsContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TenantSettingsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TenantSettingsContract] = kwargs.pop("cls", None) + + _request = build_tenant_settings_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + settings_type=settings_type, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TenantSettingsContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, *, filter: Optional[str] = None, **kwargs: Any + ) -> ItemPaged["_models.TenantSettingsContract"]: + """Public settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: Not used. Default value is None. + :paramtype filter: str + :return: An iterator like instance of TenantSettingsContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TenantSettingsContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TenantSettingsContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tenant_settings_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TenantSettingsContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class SubscriptionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`subscription` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any) -> _models.SubscriptionContract: + """Gets the specified Subscription entity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + _request = build_subscription_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the apimanagement subscription specified by its + identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_subscription_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: _models.SubscriptionCreateParameters, + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: JSON, + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: IO[bytes], + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: Union[_models.SubscriptionCreateParameters, JSON, IO[bytes]], + *, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Creates or updates the subscription of specified user to the specified product. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Create parameters. Is one of the following types: + SubscriptionCreateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters or JSON or + IO[bytes] + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_subscription_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + notify=notify, + app_type=app_type, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: _models.SubscriptionUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + sid: str, + parameters: Union[_models.SubscriptionUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any + ) -> _models.SubscriptionContract: + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :param parameters: Update parameters. Is one of the following types: + SubscriptionUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword notify: Notify change in Subscription State. + + * If false, do not send any email notification for change of state of subscription + * If true, send email notification of change of state of subscription. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :return: SubscriptionContract. The SubscriptionContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_subscription_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + notify=notify, + app_type=app_type, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + sid: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified subscription. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_subscription_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.SubscriptionContract"]: + """Lists all subscriptions of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| state | filter | eq | |
| user | expand | | + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of SubscriptionContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SubscriptionContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_subscription_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SubscriptionContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def regenerate_primary_key( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any + ) -> None: + """Regenerates primary key of existing subscription of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_subscription_regenerate_primary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def regenerate_secondary_key( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any + ) -> None: + """Regenerates secondary key of existing subscription of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_subscription_regenerate_secondary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_secrets( + self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any + ) -> _models.SubscriptionKeysContract: + """Gets the specified Subscription keys. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the association between a + user and a product in API Management. Required. + :type sid: str + :return: SubscriptionKeysContract. The SubscriptionKeysContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionKeysContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SubscriptionKeysContract] = kwargs.pop("cls", None) + + _request = build_subscription_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + sid=sid, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SubscriptionKeysContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class TagApiLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`tag_api_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, **kwargs: Any + ) -> _models.TagApiLinkContract: + """Gets the API link for the tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) + + _request = build_tag_api_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + api_link_id: str, + parameters: _models.TagApiLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + api_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + api_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + api_link_id: str, + parameters: Union[_models.TagApiLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TagApiLinkContract: + """Adds an API to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + TagApiLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract or JSON or IO[bytes] + :return: TagApiLinkContract. The TagApiLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tag_api_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagApiLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, **kwargs: Any + ) -> None: + """Deletes the specified API from the specified tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param api_link_id: Tag-API link identifier. Must be unique in the current API Management + service instance. Required. + :type api_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_api_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + api_link_id=api_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagApiLinkContract"]: + """Lists a collection of the API links associated with a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| apiId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagApiLinkContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagApiLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagApiLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_api_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagApiLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class TagOperationLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`tag_operation_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, tag_id: str, operation_link_id: str, **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Gets the operation link for the tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) + + _request = build_tag_operation_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + operation_link_id=operation_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagOperationLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + operation_link_id: str, + parameters: _models.TagOperationLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + operation_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + operation_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + operation_link_id: str, + parameters: Union[_models.TagOperationLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TagOperationLinkContract: + """Adds an operation to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + TagOperationLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract or JSON or + IO[bytes] + :return: TagOperationLinkContract. The TagOperationLinkContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tag_operation_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + operation_link_id=operation_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagOperationLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, tag_id: str, operation_link_id: str, **kwargs: Any + ) -> None: + """Deletes the specified operation from the specified tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param operation_link_id: Tag-operation link identifier. Must be unique in the current API + Management service instance. Required. + :type operation_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_operation_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + operation_link_id=operation_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagOperationLinkContract"]: + """Lists a collection of the operation links associated with a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| operationId + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagOperationLinkContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagOperationLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagOperationLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_operation_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagOperationLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class TagProductLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`tag_product_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, **kwargs: Any + ) -> _models.TagProductLinkContract: + """Gets the product link for the tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) + + _request = build_tag_product_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + product_link_id=product_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagProductLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + product_link_id: str, + parameters: _models.TagProductLinkContract, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + product_link_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + product_link_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + product_link_id: str, + parameters: Union[_models.TagProductLinkContract, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TagProductLinkContract: + """Adds a product to the specified tag via link. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :param parameters: Create or update parameters. Is one of the following types: + TagProductLinkContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract or JSON or IO[bytes] + :return: TagProductLinkContract. The TagProductLinkContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tag_product_link_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + product_link_id=product_link_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TagProductLinkContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, **kwargs: Any + ) -> None: + """Deletes the specified product from the specified tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :param product_link_id: Tag-product link identifier. Must be unique in the current API + Management service instance. Required. + :type product_link_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tag_product_link_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + product_link_id=product_link_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_product( + self, + resource_group_name: str, + service_name: str, + tag_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.TagProductLinkContract"]: + """Lists a collection of the product links associated with a tag. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API Management service instance. + Required. + :type tag_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| productId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default + value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of TagProductLinkContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagProductLinkContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TagProductLinkContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tag_product_link_list_by_product_request( + resource_group_name=resource_group_name, + service_name=service_name, + tag_id=tag_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TagProductLinkContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class TenantAccessOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`tenant_access` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> _models.AccessInformationContract: + """Get tenant access information details without secrets. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AccessInformationContract] = kwargs.pop("cls", None) + + _request = build_tenant_access_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AccessInformationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag( + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> bool: + """Tenant access metadata. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tenant_access_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: _models.AccessInformationCreateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationCreateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: Union[_models.AccessInformationCreateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Is one of the + following types: AccessInformationCreateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationCreateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AccessInformationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tenant_access_create_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AccessInformationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: _models.AccessInformationUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. + :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + access_name: Union[str, _models.AccessIdName], + parameters: Union[_models.AccessInformationUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.AccessInformationContract: + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :param parameters: Parameters supplied to retrieve the Tenant Access Information. Is one of the + following types: AccessInformationUpdateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationUpdateParameters or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: AccessInformationContract. The AccessInformationContract is compatible with + MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AccessInformationContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tenant_access_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AccessInformationContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, *, filter: Optional[str] = None, **kwargs: Any + ) -> ItemPaged["_models.AccessInformationContract"]: + """Returns list of access infos - for Git and Management endpoints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: Not used. Default value is None. + :paramtype filter: str + :return: An iterator like instance of AccessInformationContract + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.AccessInformationContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AccessInformationContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tenant_access_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AccessInformationContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def regenerate_primary_key( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> None: + """Regenerate primary access key. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tenant_access_regenerate_primary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def regenerate_secondary_key( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> None: + """Regenerate secondary access key. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tenant_access_regenerate_secondary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_secrets( + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> _models.AccessInformationSecretsContract: + """Get tenant access information details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: AccessInformationSecretsContract. The AccessInformationSecretsContract is compatible + with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationSecretsContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AccessInformationSecretsContract] = kwargs.pop("cls", None) + + _request = build_tenant_access_list_secrets_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AccessInformationSecretsContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + +class TenantAccessGitOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`tenant_access_git` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def regenerate_primary_key( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> None: + """Regenerate primary access key for GIT. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tenant_access_git_regenerate_primary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def regenerate_secondary_key( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any + ) -> None: + """Regenerate secondary access key for GIT. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param access_name: The identifier of the Access configuration. Known values are: "access" and + "gitAccess". Required. + :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_tenant_access_git_regenerate_secondary_key_request( + resource_group_name=resource_group_name, + service_name=service_name, + access_name=access_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class TenantConfigurationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`tenant_configuration` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _deploy_initial( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: Union[_models.DeployConfigurationParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tenant_configuration_deploy_request( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_deploy( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: _models.DeployConfigurationParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationResultContract]: + """This operation applies changes from the specified Git branch to the configuration database. + This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Deploy Configuration parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_deploy( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationResultContract]: + """This operation applies changes from the specified Git branch to the configuration database. + This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Deploy Configuration parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_deploy( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationResultContract]: + """This operation applies changes from the specified Git branch to the configuration database. + This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Deploy Configuration parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_deploy( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: Union[_models.DeployConfigurationParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.OperationResultContract]: + """This operation applies changes from the specified Git branch to the configuration database. + This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Deploy Configuration parameters. Is one of the following types: + DeployConfigurationParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters or JSON or + IO[bytes] + :return: An instance of LROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._deploy_initial( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationResultContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationResultContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationResultContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _save_initial( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: Union[_models.SaveConfigurationParameter, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tenant_configuration_save_request( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_save( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: _models.SaveConfigurationParameter, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationResultContract]: + """This operation creates a commit with the current configuration snapshot to the specified branch + in the repository. This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Save Configuration parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.SaveConfigurationParameter + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_save( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationResultContract]: + """This operation creates a commit with the current configuration snapshot to the specified branch + in the repository. This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Save Configuration parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_save( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationResultContract]: + """This operation creates a commit with the current configuration snapshot to the specified branch + in the repository. This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Save Configuration parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_save( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: Union[_models.SaveConfigurationParameter, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.OperationResultContract]: + """This operation creates a commit with the current configuration snapshot to the specified branch + in the repository. This is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Save Configuration parameters. Is one of the following types: + SaveConfigurationParameter, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.SaveConfigurationParameter or JSON or + IO[bytes] + :return: An instance of LROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._save_initial( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationResultContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationResultContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationResultContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _validate_initial( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: Union[_models.DeployConfigurationParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_tenant_configuration_validate_request( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_validate( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: _models.DeployConfigurationParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationResultContract]: + """This operation validates the changes in the specified Git branch. This is a long running + operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Validate Configuration parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_validate( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationResultContract]: + """This operation validates the changes in the specified Git branch. This is a long running + operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Validate Configuration parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_validate( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationResultContract]: + """This operation validates the changes in the specified Git branch. This is a long running + operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Validate Configuration parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_validate( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + parameters: Union[_models.DeployConfigurationParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.OperationResultContract]: + """This operation validates the changes in the specified Git branch. This is a long running + operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :param parameters: Validate Configuration parameters. Is one of the following types: + DeployConfigurationParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters or JSON or + IO[bytes] + :return: An instance of LROPoller that returns OperationResultContract. The + OperationResultContract is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._validate_initial( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationResultContract, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationResultContract].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationResultContract]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def get_sync_state( + self, + resource_group_name: str, + service_name: str, + configuration_name: Union[str, _models.ConfigurationIdName], + **kwargs: Any + ) -> _models.TenantConfigurationSyncStateContract: + """Gets the status of the most recent synchronization between the configuration database and the + Git repository. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param configuration_name: API revision identifier. Must be unique in the current API + Management service instance. Non-current revision has ;rev=n as a suffix where n is the + revision number. "configuration" Required. + :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName + :return: TenantConfigurationSyncStateContract. The TenantConfigurationSyncStateContract is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.TenantConfigurationSyncStateContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TenantConfigurationSyncStateContract] = kwargs.pop("cls", None) + + _request = build_tenant_configuration_get_sync_state_request( + resource_group_name=resource_group_name, + service_name=service_name, + configuration_name=configuration_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TenantConfigurationSyncStateContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class UserOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`user` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any) -> _models.UserContract: + """Gets the details of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) + + _request = build_user_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_user_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: _models.UserCreateParameters, + *, + notify: Optional[bool] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.UserContract: + """Creates or Updates a user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create or update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.UserCreateParameters + :keyword notify: Send an Email notification to the User. Default value is None. + :paramtype notify: bool + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: JSON, + *, + notify: Optional[bool] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.UserContract: + """Creates or Updates a user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create or update parameters. Required. + :type parameters: JSON + :keyword notify: Send an Email notification to the User. Default value is None. + :paramtype notify: bool + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: IO[bytes], + *, + notify: Optional[bool] = None, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.UserContract: + """Creates or Updates a user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create or update parameters. Required. + :type parameters: IO[bytes] + :keyword notify: Send an Email notification to the User. Default value is None. + :paramtype notify: bool + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: Union[_models.UserCreateParameters, JSON, IO[bytes]], + *, + notify: Optional[bool] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.UserContract: + """Creates or Updates a user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create or update parameters. Is one of the following types: + UserCreateParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.UserCreateParameters or JSON or IO[bytes] + :keyword notify: Send an Email notification to the User. Default value is None. + :paramtype notify: bool + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_user_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + notify=notify, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: _models.UserUpdateParameters, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UserContract: + """Updates the details of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.UserUpdateParameters + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UserContract: + """Updates the details of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UserContract: + """Updates the details of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: Union[_models.UserUpdateParameters, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.UserContract: + """Updates the details of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Update parameters. Is one of the following types: UserUpdateParameters, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.UserUpdateParameters or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: UserContract. The UserContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_user_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + def _delete_initial( + self, + resource_group_name: str, + service_name: str, + user_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_subscriptions: Optional[bool] = None, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_user_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + delete_subscriptions=delete_subscriptions, + notify=notify, + app_type=app_type, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + service_name: str, + user_id: str, + *, + etag: str, + match_condition: MatchConditions, + delete_subscriptions: Optional[bool] = None, + notify: Optional[bool] = None, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes specific user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword delete_subscriptions: Whether to delete user's subscription or not. Default value is + None. + :paramtype delete_subscriptions: bool + :keyword notify: Send an Account Closed Email notification to the User. Default value is None. + :paramtype notify: bool + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + etag=etag, + match_condition=match_condition, + delete_subscriptions=delete_subscriptions, + notify=notify, + app_type=app_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + expand_groups: Optional[bool] = None, + **kwargs: Any + ) -> ItemPaged["_models.UserContract"]: + """Lists a collection of registered users in the specified service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| state | filter | eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | + |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| groups | expand | | |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :keyword expand_groups: Detailed Group in response. Default value is None. + :paramtype expand_groups: bool + :return: An iterator like instance of UserContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.UserContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.UserContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_user_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + expand_groups=expand_groups, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.UserContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def generate_sso_url( + self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any + ) -> _models.GenerateSsoUrlResult: + """Retrieves a redirection URL containing an authentication token for signing a given user into + the developer portal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: GenerateSsoUrlResult. The GenerateSsoUrlResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.GenerateSsoUrlResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GenerateSsoUrlResult] = kwargs.pop("cls", None) + + _request = build_user_generate_sso_url_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GenerateSsoUrlResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def get_shared_access_token( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: _models.UserTokenParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UserTokenResult: + """Gets the Shared Access Authorization Token for the User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create Authorization Token parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.UserTokenParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: UserTokenResult. The UserTokenResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def get_shared_access_token( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UserTokenResult: + """Gets the Shared Access Authorization Token for the User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create Authorization Token parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: UserTokenResult. The UserTokenResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def get_shared_access_token( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UserTokenResult: + """Gets the Shared Access Authorization Token for the User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create Authorization Token parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: UserTokenResult. The UserTokenResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def get_shared_access_token( + self, + resource_group_name: str, + service_name: str, + user_id: str, + parameters: Union[_models.UserTokenParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.UserTokenResult: + """Gets the Shared Access Authorization Token for the User. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :param parameters: Create Authorization Token parameters. Is one of the following types: + UserTokenParameters, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.UserTokenParameters or JSON or IO[bytes] + :return: UserTokenResult. The UserTokenResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UserTokenResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_user_get_shared_access_token_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserTokenResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class UserGroupOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`user_group` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + resource_group_name: str, + service_name: str, + user_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.GroupContract"]: + """Lists all user groups. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions + |
|-------------|------------------------|-----------------------------------|
| name | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of GroupContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GroupContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GroupContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_user_group_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GroupContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class UserIdentitiesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`user_identities` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any + ) -> ItemPaged["_models.UserIdentityContract"]: + """List of all user identities. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :return: An iterator like instance of UserIdentityContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.UserIdentityContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.UserIdentityContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_user_identities_list_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.UserIdentityContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class UserConfirmationPasswordOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`user_confirmation_password` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def send( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + user_id: str, + *, + app_type: Optional[Union[str, _models.AppType]] = None, + **kwargs: Any + ) -> None: + """Sends confirmation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API Management service instance. + Required. + :type user_id: str + :keyword app_type: Determines the type of application which send the create user request. + Default is legacy publisher portal. Known values are: "portal" and "developerPortal". Default + value is None. + :paramtype app_type: str or ~azure.mgmt.apimanagement.models.AppType + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_user_confirmation_password_send_request( + resource_group_name=resource_group_name, + service_name=service_name, + user_id=user_id, + subscription_id=self._config.subscription_id, + app_type=app_type, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class ApiManagementWorkspaceLinkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_management_workspace_link` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any + ) -> _models.ApiManagementWorkspaceLinksResource: + """Gets an API Management WorkspaceLink resource description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :return: ApiManagementWorkspaceLinksResource. The ApiManagementWorkspaceLinksResource is + compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiManagementWorkspaceLinksResource] = kwargs.pop("cls", None) + + _request = build_api_management_workspace_link_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiManagementWorkspaceLinksResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ApiManagementWorkspaceLinksOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_management_workspace_links` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, resource_group_name: str, service_name: str, **kwargs: Any + ) -> ItemPaged["_models.ApiManagementWorkspaceLinksResource"]: + """List all API Management workspaceLinks for a service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :return: An iterator like instance of ApiManagementWorkspaceLinksResource + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementWorkspaceLinksResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementWorkspaceLinksResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_workspace_links_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementWorkspaceLinksResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any + ) -> _models.WorkspaceContract: + """Gets the details of the workspace specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.WorkspaceContract] = kwargs.pop("cls", None) + + _request = build_workspace_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WorkspaceContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_entity_tag(self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any) -> bool: + """Gets the entity state (Etag) version of the workspace specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :return: bool + :rtype: bool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_get_entity_tag_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + return 200 <= response.status_code <= 299 + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: _models.WorkspaceContract, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WorkspaceContract: + """Creates a new workspace or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Create parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WorkspaceContract: + """Creates a new workspace or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Create parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WorkspaceContract: + """Creates a new workspace or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Create parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: Union[_models.WorkspaceContract, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.WorkspaceContract: + """Creates a new workspace or updates an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Create parameters. Is one of the following types: WorkspaceContract, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.WorkspaceContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_create_or_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WorkspaceContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: _models.WorkspaceContract, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WorkspaceContract: + """Updates the details of the workspace specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Workspace Update parameters. Required. + :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WorkspaceContract: + """Updates the details of the workspace specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Workspace Update parameters. Required. + :type parameters: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.WorkspaceContract: + """Updates the details of the workspace specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Workspace Update parameters. Required. + :type parameters: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + parameters: Union[_models.WorkspaceContract, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.WorkspaceContract: + """Updates the details of the workspace specified by its identifier. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param parameters: Workspace Update parameters. Is one of the following types: + WorkspaceContract, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: WorkspaceContract. The WorkspaceContract is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.WorkspaceContract] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_workspace_update_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WorkspaceContract, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Deletes the specified workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_workspace_delete_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_service( + self, + resource_group_name: str, + service_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[int] = None, + **kwargs: Any + ) -> ItemPaged["_models.WorkspaceContract"]: + """Lists all workspaces of the API Management service instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :keyword filter: | Field | Usage | Supported operators | Supported + functions |
|-------------|-------------|-------------|-------------|
| displayName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |

| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
. Default value is None. + :paramtype filter: str + :keyword top: Number of records to return. Default value is None. + :paramtype top: int + :keyword skip: Number of records to skip. Default value is None. + :paramtype skip: int + :return: An iterator like instance of WorkspaceContract + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.WorkspaceContract] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.WorkspaceContract]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_workspace_list_by_service_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + filter=filter, + top=top, + skip=skip, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.WorkspaceContract], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ApiExportOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_export` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + api_id: str, + *, + format: Union[str, _models.ExportFormat], + export: Union[str, _models.ExportApi], + **kwargs: Any + ) -> _models.ApiExportResult: + """Gets the details of the API specified by its identifier in the format specified to the Storage + Blob with SAS Key valid for 5 minutes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword format: Format in which to export the Api Details to the Storage Blob with Sas Key + valid for 5 minutes. New formats can be added in the future. Known values are: "swagger-link", + "wsdl-link", "wadl-link", "openapi-link", and "openapi+json-link". Required. + :paramtype format: str or ~azure.mgmt.apimanagement.models.ExportFormat + :keyword export: Query parameter required to export the API details. "true" Required. + :paramtype export: str or ~azure.mgmt.apimanagement.models.ExportApi + :return: ApiExportResult. The ApiExportResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiExportResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiExportResult] = kwargs.pop("cls", None) + + _request = build_api_export_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + subscription_id=self._config.subscription_id, + format=format, + export=export, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiExportResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ApiManagementSkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`api_management_skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.ApiManagementSku"]: + """Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + + :return: An iterator like instance of ApiManagementSku + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiManagementSku] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ApiManagementSku]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_api_management_skus_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ApiManagementSku], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class WorkspaceApiExportOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`workspace_api_export` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + workspace_id: str, + api_id: str, + *, + format: Union[str, _models.ExportFormat], + export: Union[str, _models.ExportApi], + **kwargs: Any + ) -> _models.ApiExportResult: + """Gets the details of the API specified by its identifier in the format specified to the Storage + Blob with SAS Key valid for 5 minutes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param workspace_id: Workspace identifier. Must be unique in the current API Management service + instance. Required. + :type workspace_id: str + :param api_id: API revision identifier. Must be unique in the current API Management service + instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. + :type api_id: str + :keyword format: Format in which to export the Api Details to the Storage Blob with Sas Key + valid for 5 minutes. Known values are: "swagger-link", "wsdl-link", "wadl-link", + "openapi-link", and "openapi+json-link". Required. + :paramtype format: str or ~azure.mgmt.apimanagement.models.ExportFormat + :keyword export: Query parameter required to export the API details. "true" Required. + :paramtype export: str or ~azure.mgmt.apimanagement.models.ExportApi + :return: ApiExportResult. The ApiExportResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.ApiExportResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ApiExportResult] = kwargs.pop("cls", None) + + _request = build_workspace_api_export_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + workspace_id=workspace_id, + api_id=api_id, + subscription_id=self._config.subscription_id, + format=format, + export=export, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ApiExportResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class OperationStatusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`operation_status` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationStatusResult: + """Returns the current status of an async operation. + + :param location: The name of the Azure region. Required. + :type location: str + :param operation_id: The ID of an ongoing async operation. Required. + :type operation_id: str + :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping + :rtype: ~azure.mgmt.apimanagement.models.OperationStatusResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + + _request = build_operation_status_get_request( + location=location, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class OperationsResultsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s + :attr:`operations_results` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( # pylint: disable=inconsistent-return-statements + self, location: str, operation_id: str, **kwargs: Any + ) -> None: + """Returns operation results for long running operations executing DELETE or PATCH on the + resource. + + :param location: The name of the Azure region. Required. + :type location: str + :param operation_id: The ID of an ongoing async operation. Required. + :type operation_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_operations_results_get_request( + location=location, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore + + +class _ApiManagementClientOperationsMixin( + ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], ApiManagementClientConfiguration] +): + + def _perform_connectivity_check_async_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + service_name: str, + connectivity_check_request_params: Union[_models.ConnectivityCheckRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(connectivity_check_request_params, (IOBase, bytes)): + _content = connectivity_check_request_params + else: + _content = json.dumps(connectivity_check_request_params, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_api_management_perform_connectivity_check_async_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_perform_connectivity_check_async( + self, + resource_group_name: str, + service_name: str, + connectivity_check_request_params: _models.ConnectivityCheckRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ConnectivityCheckResponse]: + """Performs a connectivity check between the API Management service and a given destination, and + returns metrics for the connection, as well as errors encountered while trying to establish it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param connectivity_check_request_params: Connectivity Check request parameters. Required. + :type connectivity_check_request_params: + ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ConnectivityCheckResponse. The + ConnectivityCheckResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_perform_connectivity_check_async( + self, + resource_group_name: str, + service_name: str, + connectivity_check_request_params: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ConnectivityCheckResponse]: + """Performs a connectivity check between the API Management service and a given destination, and + returns metrics for the connection, as well as errors encountered while trying to establish it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param connectivity_check_request_params: Connectivity Check request parameters. Required. + :type connectivity_check_request_params: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ConnectivityCheckResponse. The + ConnectivityCheckResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_perform_connectivity_check_async( + self, + resource_group_name: str, + service_name: str, + connectivity_check_request_params: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ConnectivityCheckResponse]: + """Performs a connectivity check between the API Management service and a given destination, and + returns metrics for the connection, as well as errors encountered while trying to establish it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param connectivity_check_request_params: Connectivity Check request parameters. Required. + :type connectivity_check_request_params: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ConnectivityCheckResponse. The + ConnectivityCheckResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_perform_connectivity_check_async( + self, + resource_group_name: str, + service_name: str, + connectivity_check_request_params: Union[_models.ConnectivityCheckRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ConnectivityCheckResponse]: + """Performs a connectivity check between the API Management service and a given destination, and + returns metrics for the connection, as well as errors encountered while trying to establish it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param service_name: The name of the API Management service. Required. + :type service_name: str + :param connectivity_check_request_params: Connectivity Check request parameters. Is one of the + following types: ConnectivityCheckRequest, JSON, IO[bytes] Required. + :type connectivity_check_request_params: + ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest or JSON or IO[bytes] + :return: An instance of LROPoller that returns ConnectivityCheckResponse. The + ConnectivityCheckResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ConnectivityCheckResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._perform_connectivity_check_async_initial( + resource_group_name=resource_group_name, + service_name=service_name, + connectivity_check_request_params=connectivity_check_request_params, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.ConnectivityCheckResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ConnectivityCheckResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ConnectivityCheckResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operations_results_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operations_results_operations.py deleted file mode 100644 index f8a28cfb6526..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operations_results_operations.py +++ /dev/null @@ -1,146 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request(location: str, operation_id: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationResults/{operationId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str", min_length=1), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class OperationsResultsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`operations_results` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( # pylint: disable=inconsistent-return-statements - self, location: str, operation_id: str, **kwargs: Any - ) -> None: - """Returns operation results for long running operations executing DELETE or PATCH on the - resource. - - :param location: The name of the Azure region. Required. - :type location: str - :param operation_id: The ID of an ongoing async operation. Required. - :type operation_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_request( - location=location, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py deleted file mode 100644 index edeaed4947b3..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py +++ /dev/null @@ -1,157 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class OutboundNetworkDependenciesEndpointsOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`outbound_network_dependencies_endpoints` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> _models.OutboundEnvironmentEndpointList: - """Gets the network endpoints of all outbound dependencies of a ApiManagement service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: OutboundEnvironmentEndpointList or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OutboundEnvironmentEndpointList - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OutboundEnvironmentEndpointList] = kwargs.pop("cls", None) - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("OutboundEnvironmentEndpointList", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_patch.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_patch.py index 49900f6ab120..87676c65a8f0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_patch.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_patch.py @@ -1,15 +1,15 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py deleted file mode 100644 index 54cb29856592..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py +++ /dev/null @@ -1,172 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - scope: Optional[Union[str, _models.PolicyScopeContract]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if scope is not None: - _params["scope"] = _SERIALIZER.query("scope", scope, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class PolicyDescriptionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`policy_description` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - scope: Optional[Union[str, _models.PolicyScopeContract]] = None, - **kwargs: Any - ) -> _models.PolicyDescriptionCollection: - """Lists all policy descriptions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param scope: Policy scope. Known values are: "Tenant", "Product", "Api", "Operation", and - "All". Default value is None. - :type scope: str or ~azure.mgmt.apimanagement.models.PolicyScopeContract - :return: PolicyDescriptionCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyDescriptionCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyDescriptionCollection] = kwargs.pop("cls", None) - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PolicyDescriptionCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_fragment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_fragment_operations.py deleted file mode 100644 index ac97fb1c0019..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_fragment_operations.py +++ /dev/null @@ -1,985 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - orderby: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if orderby is not None: - _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "id": _SERIALIZER.url("id", id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - id: str, - subscription_id: str, - *, - format: Optional[Union[str, _models.PolicyFragmentContentFormat]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "id": _SERIALIZER.url("id", id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if format is not None: - _params["format"] = _SERIALIZER.query("format", format, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "id": _SERIALIZER.url("id", id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "id": _SERIALIZER.url("id", id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_references_request( - resource_group_name: str, - service_name: str, - id: str, - subscription_id: str, - *, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "id": _SERIALIZER.url("id", id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class PolicyFragmentOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`policy_fragment` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - orderby: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.PolicyFragmentContract"]: - """Gets all policy fragments. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either PolicyFragmentContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyFragmentCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - orderby=orderby, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyFragmentCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - id=id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - id: str, - format: Optional[Union[str, _models.PolicyFragmentContentFormat]] = None, - **kwargs: Any - ) -> _models.PolicyFragmentContract: - """Gets a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :param format: Policy fragment content format. Known values are: "xml" and "rawxml". Default - value is None. - :type format: str or ~azure.mgmt.apimanagement.models.PolicyFragmentContentFormat - :return: PolicyFragmentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyFragmentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - id=id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyFragmentContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - id: str, - parameters: Union[_models.PolicyFragmentContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyFragmentContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - id=id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - id: str, - parameters: _models.PolicyFragmentContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PolicyFragmentContract]: - """Creates or updates a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :param parameters: The policy fragment contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PolicyFragmentContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PolicyFragmentContract]: - """Creates or updates a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :param parameters: The policy fragment contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PolicyFragmentContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - id: str, - parameters: Union[_models.PolicyFragmentContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.PolicyFragmentContract]: - """Creates or updates a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :param parameters: The policy fragment contents to apply. Is either a PolicyFragmentContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of LROPoller that returns either PolicyFragmentContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - id=id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("PolicyFragmentContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.PolicyFragmentContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.PolicyFragmentContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - id=id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_references( - self, - resource_group_name: str, - service_name: str, - id: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> _models.ResourceCollection: - """Lists policy resources that reference the policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param id: A resource identifier. Required. - :type id: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: ResourceCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResourceCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourceCollection] = kwargs.pop("cls", None) - - _request = build_list_references_request( - resource_group_name=resource_group_name, - service_name=service_name, - id=id, - subscription_id=self._config.subscription_id, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ResourceCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py deleted file mode 100644 index 759dbf1b9bd4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py +++ /dev/null @@ -1,750 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if format is not None: - _params["format"] = _SERIALIZER.query("format", format, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class PolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> ItemPaged["_models.PolicyContract"]: - """Lists all the Global Policy definitions of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either PolicyContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, policy_id: Union[str, _models.PolicyIdName], **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Global policy definition in the Api Management - service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the Global policy definition of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates the global policy configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates the global policy configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates the global policy configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the global policy configuration of the Api Management Service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_operations.py deleted file mode 100644 index 8ec7963d8671..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_operations.py +++ /dev/null @@ -1,952 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, policy_restriction_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "policyRestrictionId": _SERIALIZER.url( - "policy_restriction_id", policy_restriction_id, "str", max_length=80, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, policy_restriction_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "policyRestrictionId": _SERIALIZER.url( - "policy_restriction_id", policy_restriction_id, "str", max_length=80, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "policyRestrictionId": _SERIALIZER.url( - "policy_restriction_id", policy_restriction_id, "str", max_length=80, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "policyRestrictionId": _SERIALIZER.url( - "policy_restriction_id", policy_restriction_id, "str", max_length=80, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "policyRestrictionId": _SERIALIZER.url( - "policy_restriction_id", policy_restriction_id, "str", max_length=80, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class PolicyRestrictionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`policy_restriction` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> ItemPaged["_models.PolicyRestrictionContract"]: - """Gets all policy restrictions of API Management services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either PolicyRestrictionContract or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyRestrictionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyRestrictionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyRestrictionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, policy_restriction_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the policy restriction in the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_restriction_id=policy_restriction_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, policy_restriction_id: str, **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Get the policy restriction of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyRestrictionContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_restriction_id=policy_restriction_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyRestrictionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - parameters: _models.PolicyRestrictionContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Creates or updates the policy restriction configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param parameters: The policy restriction to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Creates or updates the policy restriction configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param parameters: The policy restriction to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - parameters: Union[_models.PolicyRestrictionContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Creates or updates the policy restriction configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param parameters: The policy restriction to apply. Is either a PolicyRestrictionContract type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyRestrictionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyRestrictionContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_restriction_id=policy_restriction_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyRestrictionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - if_match: str, - parameters: _models.PolicyRestrictionUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Updates the policy restriction configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: The policy restriction to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Updates the policy restriction configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: The policy restriction to apply. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - if_match: str, - parameters: Union[_models.PolicyRestrictionUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.PolicyRestrictionContract: - """Updates the policy restriction configuration of the Api Management service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: The policy restriction to apply. Is either a PolicyRestrictionUpdateContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyRestrictionUpdateContract or IO[bytes] - :return: PolicyRestrictionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyRestrictionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyRestrictionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyRestrictionUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_restriction_id=policy_restriction_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyRestrictionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - policy_restriction_id: str, - if_match: Optional[str] = None, - **kwargs: Any - ) -> None: - """Deletes the policy restriction configuration of the Api Management Service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param policy_restriction_id: Policy restrictions after an entity level. Required. - :type policy_restriction_id: str - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - policy_restriction_id=policy_restriction_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_validations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_validations_operations.py deleted file mode 100644 index c2265b5c0528..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_restriction_validations_operations.py +++ /dev/null @@ -1,218 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Iterator, Optional, TypeVar, Union, cast - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/validatePolicies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class PolicyRestrictionValidationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`policy_restriction_validations` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _by_service_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> LROPoller[_models.OperationResultContract]: - """Validate all policies of API Management services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An instance of LROPoller that returns either OperationResultContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._by_service_initial( - resource_group_name=resource_group_name, - service_name=service_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationResultContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.OperationResultContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.OperationResultContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_config_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_config_operations.py deleted file mode 100644 index 7da75bd8cf29..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_config_operations.py +++ /dev/null @@ -1,814 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, portal_config_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "portalConfigId": _SERIALIZER.url("portal_config_id", portal_config_id, "str", max_length=80, min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, portal_config_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "portalConfigId": _SERIALIZER.url("portal_config_id", portal_config_id, "str", max_length=80, min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - portal_config_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "portalConfigId": _SERIALIZER.url("portal_config_id", portal_config_id, "str", max_length=80, min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - portal_config_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "portalConfigId": _SERIALIZER.url("portal_config_id", portal_config_id, "str", max_length=80, min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -class PortalConfigOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`portal_config` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> ItemPaged["_models.PortalConfigContract"]: - """Lists the developer portal configurations. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either PortalConfigContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PortalConfigContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalConfigCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PortalConfigCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, portal_config_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_config_id=portal_config_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, portal_config_id: str, **kwargs: Any - ) -> _models.PortalConfigContract: - """Get the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalConfigContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_config_id=portal_config_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PortalConfigContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - portal_config_id: str, - if_match: str, - parameters: _models.PortalConfigContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalConfigContract: - """Update the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update the developer portal configuration. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - portal_config_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalConfigContract: - """Update the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update the developer portal configuration. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - portal_config_id: str, - if_match: str, - parameters: Union[_models.PortalConfigContract, IO[bytes]], - **kwargs: Any - ) -> _models.PortalConfigContract: - """Update the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update the developer portal configuration. Is either a PortalConfigContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract or IO[bytes] - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalConfigContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalConfigContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_config_id=portal_config_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalConfigContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - portal_config_id: str, - if_match: str, - parameters: _models.PortalConfigContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalConfigContract: - """Create or update the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update the developer portal configuration. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - portal_config_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalConfigContract: - """Create or update the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update the developer portal configuration. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - portal_config_id: str, - if_match: str, - parameters: Union[_models.PortalConfigContract, IO[bytes]], - **kwargs: Any - ) -> _models.PortalConfigContract: - """Create or update the developer portal configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_config_id: Portal configuration identifier. Required. - :type portal_config_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update the developer portal configuration. Is either a PortalConfigContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalConfigContract or IO[bytes] - :return: PortalConfigContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalConfigContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalConfigContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalConfigContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_config_id=portal_config_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalConfigContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py deleted file mode 100644 index 7fb4477a0473..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py +++ /dev/null @@ -1,1019 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, portal_revision_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "portalRevisionId": _SERIALIZER.url( - "portal_revision_id", portal_revision_id, "str", max_length=256, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, portal_revision_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "portalRevisionId": _SERIALIZER.url( - "portal_revision_id", portal_revision_id, "str", max_length=256, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, service_name: str, portal_revision_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "portalRevisionId": _SERIALIZER.url( - "portal_revision_id", portal_revision_id, "str", max_length=256, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - portal_revision_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "portalRevisionId": _SERIALIZER.url( - "portal_revision_id", portal_revision_id, "str", max_length=256, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -class PortalRevisionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`portal_revision` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.PortalRevisionContract"]: - """Lists developer portal's revisions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: .. list-table:: - :header-rows: 1 - - * - Field - - Supported operators - - Supported functions - * - - - - |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - |isCurrent | eq, ne | |. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either PortalRevisionContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalRevisionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PortalRevisionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, portal_revision_id: str, **kwargs: Any - ) -> bool: - """Gets the developer portal revision specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_revision_id=portal_revision_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, portal_revision_id: str, **kwargs: Any - ) -> _models.PortalRevisionContract: - """Gets the developer portal's revision specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :return: PortalRevisionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalRevisionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalRevisionContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_revision_id=portal_revision_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PortalRevisionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - parameters: Union[_models.PortalRevisionContract, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalRevisionContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_revision_id=portal_revision_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - parameters: _models.PortalRevisionContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PortalRevisionContract]: - """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` - property indicates if the revision is publicly accessible. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PortalRevisionContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PortalRevisionContract]: - """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` - property indicates if the revision is publicly accessible. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :param parameters: Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PortalRevisionContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - parameters: Union[_models.PortalRevisionContract, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.PortalRevisionContract]: - """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` - property indicates if the revision is publicly accessible. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :param parameters: Is either a PortalRevisionContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract or IO[bytes] - :return: An instance of LROPoller that returns either PortalRevisionContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalRevisionContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - portal_revision_id=portal_revision_id, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("PortalRevisionContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.PortalRevisionContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.PortalRevisionContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - if_match: str, - parameters: Union[_models.PortalRevisionContract, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalRevisionContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - portal_revision_id=portal_revision_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 200: - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - if_match: str, - parameters: _models.PortalRevisionContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PortalRevisionContract]: - """Updates the description of specified portal revision or makes it current. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PortalRevisionContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PortalRevisionContract]: - """Updates the description of specified portal revision or makes it current. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PortalRevisionContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - service_name: str, - portal_revision_id: str, - if_match: str, - parameters: Union[_models.PortalRevisionContract, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.PortalRevisionContract]: - """Updates the description of specified portal revision or makes it current. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param portal_revision_id: Portal revision identifier. Must be unique in the current API - Management service instance. Required. - :type portal_revision_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Is either a PortalRevisionContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract or IO[bytes] - :return: An instance of LROPoller that returns either PortalRevisionContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PortalRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalRevisionContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - portal_revision_id=portal_revision_id, - if_match=if_match, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PortalRevisionContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.PortalRevisionContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.PortalRevisionContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py deleted file mode 100644 index 382d74575383..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py +++ /dev/null @@ -1,157 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class PortalSettingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`portal_settings` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> _models.PortalSettingsCollection: - """Lists a collection of portalsettings defined within a service instance.. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: PortalSettingsCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSettingsCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalSettingsCollection] = kwargs.pop("cls", None) - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalSettingsCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_private_endpoint_connection_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_private_endpoint_connection_operations.py deleted file mode 100644 index 11bc90fdb516..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_private_endpoint_connection_operations.py +++ /dev/null @@ -1,946 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_by_name_request( - resource_group_name: str, - service_name: str, - private_endpoint_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "privateEndpointConnectionName": _SERIALIZER.url( - "private_endpoint_connection_name", private_endpoint_connection_name, "str" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - private_endpoint_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "privateEndpointConnectionName": _SERIALIZER.url( - "private_endpoint_connection_name", private_endpoint_connection_name, "str" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - private_endpoint_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "privateEndpointConnectionName": _SERIALIZER.url( - "private_endpoint_connection_name", private_endpoint_connection_name, "str" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_private_link_resources_request( # pylint: disable=name-too-long - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_private_link_resource_request( - resource_group_name: str, - service_name: str, - private_link_sub_resource_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "privateLinkSubResourceName": _SERIALIZER.url( - "private_link_sub_resource_name", private_link_sub_resource_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class PrivateEndpointConnectionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`private_endpoint_connection` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> ItemPaged["_models.PrivateEndpointConnection"]: - """Lists all private endpoint connections of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either PrivateEndpointConnection or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_by_name( - self, resource_group_name: str, service_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Gets the details of the Private Endpoint Connection specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param private_endpoint_connection_name: Name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - - _request = build_get_by_name_request( - resource_group_name=resource_group_name, - service_name=service_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection_request: Union[_models.PrivateEndpointConnectionRequest, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(private_endpoint_connection_request, (IOBase, bytes)): - _content = private_endpoint_connection_request - else: - _json = self._serialize.body(private_endpoint_connection_request, "PrivateEndpointConnectionRequest") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection_request: _models.PrivateEndpointConnectionRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PrivateEndpointConnection]: - """Creates a new Private Endpoint Connection or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param private_endpoint_connection_name: Name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection_request: Required. - :type private_endpoint_connection_request: - ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result - of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PrivateEndpointConnection]: - """Creates a new Private Endpoint Connection or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param private_endpoint_connection_name: Name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection_request: Required. - :type private_endpoint_connection_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result - of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection_request: Union[_models.PrivateEndpointConnectionRequest, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.PrivateEndpointConnection]: - """Creates a new Private Endpoint Connection or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param private_endpoint_connection_name: Name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection_request: Is either a PrivateEndpointConnectionRequest type - or a IO[bytes] type. Required. - :type private_endpoint_connection_request: - ~azure.mgmt.apimanagement.models.PrivateEndpointConnectionRequest or IO[bytes] - :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result - of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - private_endpoint_connection_name=private_endpoint_connection_name, - private_endpoint_connection_request=private_endpoint_connection_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.PrivateEndpointConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.PrivateEndpointConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, service_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, service_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes the specified Private Endpoint Connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param private_endpoint_connection_name: Name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - service_name=service_name, - private_endpoint_connection_name=private_endpoint_connection_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_private_link_resources( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> _models.PrivateLinkResourceListResult: - """Gets the private link resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: PrivateLinkResourceListResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PrivateLinkResourceListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) - - _request = build_list_private_link_resources_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateLinkResourceListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_private_link_resource( - self, resource_group_name: str, service_name: str, private_link_sub_resource_name: str, **kwargs: Any - ) -> _models.PrivateLinkResource: - """Gets the private link resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param private_link_sub_resource_name: Name of the private link resource. Required. - :type private_link_sub_resource_name: str - :return: PrivateLinkResource or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PrivateLinkResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) - - _request = build_get_private_link_resource_request( - resource_group_name=resource_group_name, - service_name=service_name, - private_link_sub_resource_name=private_link_sub_resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_link_operations.py deleted file mode 100644 index 6a5ffe923a34..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_link_operations.py +++ /dev/null @@ -1,657 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - product_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, product_id: str, api_link_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "apiLinkId": _SERIALIZER.url( - "api_link_id", api_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, service_name: str, product_id: str, api_link_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "apiLinkId": _SERIALIZER.url( - "api_link_id", api_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, product_id: str, api_link_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "apiLinkId": _SERIALIZER.url( - "api_link_id", api_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ProductApiLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`product_api_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ProductApiLinkContract"]: - """Lists a collection of the API links associated with a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| apiId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ProductApiLinkContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductApiLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductApiLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ProductApiLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, product_id: str, api_link_id: str, **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Gets the API link for the product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - api_link_id: str, - parameters: _models.ProductApiLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Adds an API to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - api_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Adds an API to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - api_link_id: str, - parameters: Union[_models.ProductApiLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Adds an API to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Is either a ProductApiLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract or IO[bytes] - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductApiLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ProductApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, product_id: str, api_link_id: str, **kwargs: Any - ) -> None: - """Deletes the specified API from the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py deleted file mode 100644 index 70b9348238d8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py +++ /dev/null @@ -1,553 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - product_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_entity_exists_request( - resource_group_name: str, service_name: str, product_id: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, service_name: str, product_id: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, product_id: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ProductApiOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`product_api` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ApiContract"]: - """Lists a collection of the APIs associated with a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def check_entity_exists( - self, resource_group_name: str, service_name: str, product_id: str, api_id: str, **kwargs: Any - ) -> bool: - """Checks that API entity specified by identifier is associated with the Product entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def create_or_update( - self, resource_group_name: str, service_name: str, product_id: str, api_id: str, **kwargs: Any - ) -> _models.ApiContract: - """Adds an API to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, product_id: str, api_id: str, **kwargs: Any - ) -> None: - """Deletes the specified API from the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_link_operations.py deleted file mode 100644 index 39027fa15546..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_link_operations.py +++ /dev/null @@ -1,672 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - product_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - product_id: str, - group_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "groupLinkId": _SERIALIZER.url( - "group_link_id", group_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - product_id: str, - group_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "groupLinkId": _SERIALIZER.url( - "group_link_id", group_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - product_id: str, - group_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "groupLinkId": _SERIALIZER.url( - "group_link_id", group_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ProductGroupLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`product_group_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ProductGroupLinkContract"]: - """Lists a collection of the group links associated with a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| groupId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ProductGroupLinkContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductGroupLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductGroupLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ProductGroupLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, product_id: str, group_link_id: str, **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Gets the group link for the product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - group_link_id=group_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductGroupLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - group_link_id: str, - parameters: _models.ProductGroupLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Adds a group to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - group_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Adds a group to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - group_link_id: str, - parameters: Union[_models.ProductGroupLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Adds a group to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :param parameters: Create or update parameters. Is either a ProductGroupLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract or IO[bytes] - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductGroupLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - group_link_id=group_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ProductGroupLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, product_id: str, group_link_id: str, **kwargs: Any - ) -> None: - """Deletes the specified group from the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - group_link_id=group_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py deleted file mode 100644 index ad0f5cba9e41..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py +++ /dev/null @@ -1,549 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - product_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_entity_exists_request( - resource_group_name: str, service_name: str, product_id: str, group_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, service_name: str, product_id: str, group_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, product_id: str, group_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ProductGroupOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`product_group` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.GroupContract"]: - """Lists the collection of developer groups associated with the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | |
| displayName | filter | eq, ne | |
| - description | filter | eq, ne | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GroupContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GroupContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("GroupCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def check_entity_exists( - self, resource_group_name: str, service_name: str, product_id: str, group_id: str, **kwargs: Any - ) -> bool: - """Checks that Group entity specified by identifier is associated with the Product entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def create_or_update( - self, resource_group_name: str, service_name: str, product_id: str, group_id: str, **kwargs: Any - ) -> _models.GroupContract: - """Adds the association between the specified developer group with the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, product_id: str, group_id: str, **kwargs: Any - ) -> None: - """Deletes the association between the specified group and product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py deleted file mode 100644 index c5060d386ae6..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py +++ /dev/null @@ -1,1169 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - expand_groups: Optional[bool] = None, - tags: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if expand_groups is not None: - _params["expandGroups"] = _SERIALIZER.query("expand_groups", expand_groups, "bool") - if tags is not None: - _params["tags"] = _SERIALIZER.query("tags", tags, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, product_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, product_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - product_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, product_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - product_id: str, - subscription_id: str, - *, - if_match: str, - delete_subscriptions: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if delete_subscriptions is not None: - _params["deleteSubscriptions"] = _SERIALIZER.query("delete_subscriptions", delete_subscriptions, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_tags_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - include_not_tagged_products: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if include_not_tagged_products is not None: - _params["includeNotTaggedProducts"] = _SERIALIZER.query( - "include_not_tagged_products", include_not_tagged_products, "bool" - ) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ProductOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`product` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - expand_groups: Optional[bool] = None, - tags: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.ProductContract"]: - """Lists a collection of products in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| state | filter | eq | |
| groups | expand | | |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param expand_groups: When set to true, the response contains an array of groups that have - visibility to the product. The default is false. Default value is None. - :type expand_groups: bool - :param tags: Products which are part of a specific tag. Default value is None. - :type tags: str - :return: An iterator like instance of either ProductContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - expand_groups=expand_groups, - tags=tags, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ProductCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any - ) -> _models.ProductContract: - """Gets the details of the product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - parameters: _models.ProductContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Creates or Updates a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Creates or Updates a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - parameters: Union[_models.ProductContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ProductContract: - """Creates or Updates a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create or update parameters. Is either a ProductContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - parameters: _models.ProductUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Update existing product details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Update existing product details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - parameters: Union[_models.ProductUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.ProductContract: - """Update existing product details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a ProductUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters or IO[bytes] - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - delete_subscriptions: Optional[bool] = None, - **kwargs: Any - ) -> None: - """Delete product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param delete_subscriptions: Delete existing subscriptions associated with the product or not. - Default value is None. - :type delete_subscriptions: bool - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - delete_subscriptions=delete_subscriptions, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_by_tags( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - include_not_tagged_products: Optional[bool] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagResourceContract"]: - """Lists a collection of products associated with tags. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| state | filter | eq | substringof, contains, startswith, endswith |
. - Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param include_not_tagged_products: Include not tagged Products. Default value is None. - :type include_not_tagged_products: bool - :return: An iterator like instance of either TagResourceContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagResourceCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_tags_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - include_not_tagged_products=include_not_tagged_products, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagResourceCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py deleted file mode 100644 index 63bb678ad92e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py +++ /dev/null @@ -1,794 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, service_name: str, product_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if format is not None: - _params["format"] = _SERIALIZER.query("format", format, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ProductPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`product_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any - ) -> ItemPaged["_models.PolicyContract"]: - """Get the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: An iterator like instance of either PolicyContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Get the ETag of the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py deleted file mode 100644 index 039eb46ca17a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py +++ /dev/null @@ -1,231 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - resource_group_name: str, - service_name: str, - product_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ProductSubscriptionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`product_subscriptions` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.SubscriptionContract"]: - """Lists the collection of subscriptions to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| state | filter | eq | |
| user | expand | | - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either SubscriptionContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SubscriptionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wiki_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wiki_operations.py deleted file mode 100644 index dafffb0fdd30..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wiki_operations.py +++ /dev/null @@ -1,798 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, product_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, product_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - product_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, product_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, product_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ProductWikiOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`product_wiki` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, product_id: str, **kwargs: Any) -> _models.WikiContract: - """Gets the details of the Wiki for a Product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WikiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - parameters: _models.WikiContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Creates a new Wiki for a Product or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Creates a new Wiki for a Product or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - parameters: Union[_models.WikiContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.WikiContract: - """Creates a new Wiki for a Product or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create parameters. Is either a WikiContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "WikiContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WikiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - parameters: _models.WikiUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Updates the details of the Wiki for a Product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Wiki Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WikiContract: - """Updates the details of the Wiki for a Product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Wiki Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - product_id: str, - if_match: str, - parameters: Union[_models.WikiUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.WikiContract: - """Updates the details of the Wiki for a Product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Wiki Update parameters. Is either a WikiUpdateContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WikiUpdateContract or IO[bytes] - :return: WikiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WikiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.WikiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "WikiUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WikiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, product_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified Wiki from a Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wikis_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wikis_operations.py deleted file mode 100644 index c1ea48fd82d6..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_wikis_operations.py +++ /dev/null @@ -1,222 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - resource_group_name: str, - service_name: str, - product_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ProductWikisOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`product_wikis` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.WikiContract"]: - """Gets the details of the Wiki for a Product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | eq | contains |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either WikiContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.WikiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WikiCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("WikiCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py deleted file mode 100644 index 49599158728b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py +++ /dev/null @@ -1,372 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, quota_counter_key: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "quotaCounterKey": _SERIALIZER.url("quota_counter_key", quota_counter_key, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, quota_counter_key: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "quotaCounterKey": _SERIALIZER.url("quota_counter_key", quota_counter_key, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -class QuotaByCounterKeysOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`quota_by_counter_keys` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, quota_counter_key: str, **kwargs: Any - ) -> _models.QuotaCounterCollection: - """Lists a collection of current quota counter periods associated with the counter-key configured - in the policy on the specified service instance. The api does not support paging yet. - - .. seealso:: - - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-product-with-rules#a-namepolicies-ato-configure-call-rate-limit-and-quota-policies - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :return: QuotaCounterCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.QuotaCounterCollection] = kwargs.pop("cls", None) - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - quota_counter_key=quota_counter_key, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("QuotaCounterCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - quota_counter_key: str, - parameters: _models.QuotaCounterValueUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.QuotaCounterCollection: - """Updates all the quota counter values specified with the existing quota counter key to a value - in the specified service instance. This should be used for reset of the quota counter values. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param parameters: The value of the quota counter to be applied to all quota counter periods. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: QuotaCounterCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - quota_counter_key: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.QuotaCounterCollection: - """Updates all the quota counter values specified with the existing quota counter key to a value - in the specified service instance. This should be used for reset of the quota counter values. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param parameters: The value of the quota counter to be applied to all quota counter periods. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: QuotaCounterCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - quota_counter_key: str, - parameters: Union[_models.QuotaCounterValueUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.QuotaCounterCollection: - """Updates all the quota counter values specified with the existing quota counter key to a value - in the specified service instance. This should be used for reset of the quota counter values. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param parameters: The value of the quota counter to be applied to all quota counter periods. - Is either a QuotaCounterValueUpdateContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract or IO[bytes] - :return: QuotaCounterCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.QuotaCounterCollection] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "QuotaCounterValueUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - quota_counter_key=quota_counter_key, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("QuotaCounterCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py deleted file mode 100644 index f242ccd0e83f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py +++ /dev/null @@ -1,394 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request( - resource_group_name: str, - service_name: str, - quota_counter_key: str, - quota_period_key: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "quotaCounterKey": _SERIALIZER.url("quota_counter_key", quota_counter_key, "str"), - "quotaPeriodKey": _SERIALIZER.url("quota_period_key", quota_period_key, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - quota_counter_key: str, - quota_period_key: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "quotaCounterKey": _SERIALIZER.url("quota_counter_key", quota_counter_key, "str"), - "quotaPeriodKey": _SERIALIZER.url("quota_period_key", quota_period_key, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -class QuotaByPeriodKeysOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`quota_by_period_keys` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, quota_counter_key: str, quota_period_key: str, **kwargs: Any - ) -> _models.QuotaCounterContract: - """Gets the value of the quota counter associated with the counter-key in the policy for the - specific period in service instance. - - .. seealso:: - - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-product-with-rules#a-namepolicies-ato-configure-call-rate-limit-and-quota-policies - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param quota_period_key: Quota period key identifier. Required. - :type quota_period_key: str - :return: QuotaCounterContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.QuotaCounterContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - quota_counter_key=quota_counter_key, - quota_period_key=quota_period_key, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("QuotaCounterContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - quota_counter_key: str, - quota_period_key: str, - parameters: _models.QuotaCounterValueUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.QuotaCounterContract: - """Updates an existing quota counter value in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param quota_period_key: Quota period key identifier. Required. - :type quota_period_key: str - :param parameters: The value of the Quota counter to be applied on the specified period. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: QuotaCounterContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - quota_counter_key: str, - quota_period_key: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.QuotaCounterContract: - """Updates an existing quota counter value in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param quota_period_key: Quota period key identifier. Required. - :type quota_period_key: str - :param parameters: The value of the Quota counter to be applied on the specified period. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: QuotaCounterContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - quota_counter_key: str, - quota_period_key: str, - parameters: Union[_models.QuotaCounterValueUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.QuotaCounterContract: - """Updates an existing quota counter value in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify - counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined - as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. - :type quota_counter_key: str - :param quota_period_key: Quota period key identifier. Required. - :type quota_period_key: str - :param parameters: The value of the Quota counter to be applied on the specified period. Is - either a QuotaCounterValueUpdateContract type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract or IO[bytes] - :return: QuotaCounterContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.QuotaCounterContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "QuotaCounterValueUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - quota_counter_key=quota_counter_key, - quota_period_key=quota_period_key, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("QuotaCounterContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py deleted file mode 100644 index eb758509f725..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py +++ /dev/null @@ -1,185 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class RegionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`region` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, **kwargs: Any - ) -> ItemPaged["_models.RegionContract"]: - """Lists all azure regions in which the service exists. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: An iterator like instance of either RegionContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.RegionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RegionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("RegionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py deleted file mode 100644 index ec434a1354a5..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py +++ /dev/null @@ -1,1428 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -import datetime -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_api_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if orderby is not None: - _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_user_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if orderby is not None: - _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_operation_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if orderby is not None: - _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if orderby is not None: - _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_geo_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if orderby is not None: - _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_time_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: str, - interval: datetime.timedelta, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if orderby is not None: - _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") - _params["interval"] = _SERIALIZER.query("interval", interval, "duration") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_request_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ReportsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`reports` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.ReportRecordContract"]: - """Lists report records by API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: The filter to apply on the operation. Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - orderby=orderby, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_user( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.ReportRecordContract"]: - """Lists report records by User. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter | ge, le | |
| displayName | select, orderBy | | |
| userId | - select, filter | eq | |
| apiRegion | filter | eq | |
| productId | filter | - eq | |
| subscriptionId | filter | eq | |
| apiId | filter | eq | | -
| operationId | filter | eq | |
| callCountSuccess | select, orderBy | | - |
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, - orderBy | | |
| callCountOther | select, orderBy | | |
| - callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | | -
| cacheHitsCount | select | | |
| cacheMissCount | select | | | -
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | -
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. - Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_user_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - orderby=orderby, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_operation( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.ReportRecordContract"]: - """Lists report records by API Operations. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter | ge, le | |
| displayName | select, orderBy | | |
| apiRegion | - filter | eq | |
| userId | filter | eq | |
| productId | filter | eq | | -
| subscriptionId | filter | eq | |
| apiId | filter | eq | |
| - operationId | select, filter | eq | |
| callCountSuccess | select, orderBy | | - |
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, - orderBy | | |
| callCountOther | select, orderBy | | |
| - callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | | -
| cacheHitsCount | select | | |
| cacheMissCount | select | | | -
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | -
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. - Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - orderby=orderby, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.ReportRecordContract"]: - """Lists report records by Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter | ge, le | |
| displayName | select, orderBy | | |
| apiRegion | - filter | eq | |
| userId | filter | eq | |
| productId | select, filter | eq - | |
| subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | - | |
| callCountBlocked | select, orderBy | | |
| callCountFailed | - select, orderBy | | |
| callCountOther | select, orderBy | | |
| - callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | | -
| cacheHitsCount | select | | |
| cacheMissCount | select | | | -
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | -
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. - Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - orderby=orderby, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_geo( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ReportRecordContract"]: - """Lists report records by geography. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter | ge, le | |
| country | select | | |
| region | select | | - |
| zip | select | | |
| apiRegion | filter | eq | |
| userId | - filter | eq | |
| productId | filter | eq | |
| subscriptionId | filter | eq - | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| - callCountSuccess | select | | |
| callCountBlocked | select | | |
| - callCountFailed | select | | |
| callCountOther | select | | |
| - bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| - cacheMissCount | select | | |
| apiTimeAvg | select | | |
| - apiTimeMin | select | | |
| apiTimeMax | select | | |
| - serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - serviceTimeMax | select | | |
. Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_geo_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.ReportRecordContract"]: - """Lists report records by subscription. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter | ge, le | |
| displayName | select, orderBy | | |
| apiRegion | - filter | eq | |
| userId | select, filter | eq | |
| productId | select, - filter | eq | |
| subscriptionId | select, filter | eq | |
| callCountSuccess - | select, orderBy | | |
| callCountBlocked | select, orderBy | | |
| - callCountFailed | select, orderBy | | |
| callCountOther | select, orderBy | | - |
| callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | - | |
| cacheHitsCount | select | | |
| cacheMissCount | select | | - |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | | -
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - serviceTimeMin | select | | |
| serviceTimeMax | select | | |
. - Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - orderby=orderby, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_time( - self, - resource_group_name: str, - service_name: str, - filter: str, - interval: datetime.timedelta, - top: Optional[int] = None, - skip: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.ReportRecordContract"]: - """Lists report records by Time. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter, select | ge, le | |
| interval | select | | |
| apiRegion | - filter | eq | |
| userId | filter | eq | |
| productId | filter | eq | | -
| subscriptionId | filter | eq | |
| apiId | filter | eq | |
| - operationId | filter | eq | |
| callCountSuccess | select | | |
| - callCountBlocked | select | | |
| callCountFailed | select | | |
| - callCountOther | select | | |
| bandwidth | select, orderBy | | |
| - cacheHitsCount | select | | |
| cacheMissCount | select | | |
| - apiTimeAvg | select | | |
| apiTimeMin | select | | |
| apiTimeMax | - select | | |
| serviceTimeAvg | select | | |
| serviceTimeMin | - select | | |
| serviceTimeMax | select | | |
. Required. - :type filter: str - :param interval: By time interval. Interval must be multiple of 15 minutes and may not be zero. - The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This - code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new - TimeSpan(hours, minutes, seconds)). Required. - :type interval: ~datetime.timedelta - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :return: An iterator like instance of either ReportRecordContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_time_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - interval=interval, - top=top, - skip=skip, - orderby=orderby, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_request( - self, - resource_group_name: str, - service_name: str, - filter: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.RequestReportRecordContract"]: - """Lists report records by Request. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| timestamp | - filter | ge, le | |
| apiId | filter | eq | |
| operationId | filter | eq | - |
| productId | filter | eq | |
| userId | filter | eq | |
| apiRegion | - filter | eq | |
| subscriptionId | filter | eq | |
. Required. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either RequestReportRecordContract or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.RequestReportRecordContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RequestReportCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_request_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("RequestReportCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py deleted file mode 100644 index 8c23ebd3dfd8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py +++ /dev/null @@ -1,635 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, service_name: str, subscription_id: str, *, if_match: Optional[str] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -class SignInSettingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`sign_in_settings` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the SignInSettings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.PortalSigninSettings: - """Get Sign In Settings for the Portal. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: PortalSigninSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalSigninSettings] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PortalSigninSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: _models.PortalSigninSettings, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Update Sign-In settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Sign-In settings. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Update Sign-In settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Sign-In settings. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: Union[_models.PortalSigninSettings, IO[bytes]], - **kwargs: Any - ) -> None: - """Update Sign-In settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Sign-In settings. Is either a PortalSigninSettings type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings or IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalSigninSettings") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: _models.PortalSigninSettings, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalSigninSettings: - """Create or Update Sign-In settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalSigninSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalSigninSettings: - """Create or Update Sign-In settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalSigninSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.PortalSigninSettings, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PortalSigninSettings: - """Create or Update Sign-In settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Is either a PortalSigninSettings type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSigninSettings or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PortalSigninSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalSigninSettings] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalSigninSettings") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalSigninSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py deleted file mode 100644 index c40559dc5e87..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py +++ /dev/null @@ -1,635 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, service_name: str, subscription_id: str, *, if_match: Optional[str] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -class SignUpSettingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`sign_up_settings` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the SignUpSettings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.PortalSignupSettings: - """Get Sign Up Settings for the Portal. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :return: PortalSignupSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PortalSignupSettings] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PortalSignupSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: _models.PortalSignupSettings, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Sign-Up settings. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Sign-Up settings. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - if_match: str, - parameters: Union[_models.PortalSignupSettings, IO[bytes]], - **kwargs: Any - ) -> None: - """Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update Sign-Up settings. Is either a PortalSignupSettings type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings or IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalSignupSettings") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: _models.PortalSignupSettings, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalSignupSettings: - """Create or Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalSignupSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PortalSignupSettings: - """Create or Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PortalSignupSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - parameters: Union[_models.PortalSignupSettings, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PortalSignupSettings: - """Create or Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param parameters: Create or update parameters. Is either a PortalSignupSettings type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PortalSignupSettings or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PortalSignupSettings or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PortalSignupSettings] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PortalSignupSettings") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PortalSignupSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py deleted file mode 100644 index eaa5e898bfff..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py +++ /dev/null @@ -1,1374 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, sid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, sid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - sid: str, - subscription_id: str, - *, - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if notify is not None: - _params["notify"] = _SERIALIZER.query("notify", notify, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if app_type is not None: - _params["appType"] = _SERIALIZER.query("app_type", app_type, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - sid: str, - subscription_id: str, - *, - if_match: str, - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if notify is not None: - _params["notify"] = _SERIALIZER.query("notify", notify, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if app_type is not None: - _params["appType"] = _SERIALIZER.query("app_type", app_type, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, sid: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_regenerate_primary_key_request( - resource_group_name: str, service_name: str, sid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_regenerate_secondary_key_request( - resource_group_name: str, service_name: str, sid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_secrets_request( - resource_group_name: str, service_name: str, sid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/listSecrets", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class SubscriptionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`subscription` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.SubscriptionContract"]: - """Lists all subscriptions of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| state | filter | eq | |
| user | expand | | - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either SubscriptionContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SubscriptionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the apimanagement subscription specified by its - identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any) -> _models.SubscriptionContract: - """Gets the specified Subscription entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - sid: str, - parameters: _models.SubscriptionCreateParameters, - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Creates or updates the subscription of specified user to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - sid: str, - parameters: IO[bytes], - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Creates or updates the subscription of specified user to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - sid: str, - parameters: Union[_models.SubscriptionCreateParameters, IO[bytes]], - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> _models.SubscriptionContract: - """Creates or updates the subscription of specified user to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param parameters: Create parameters. Is either a SubscriptionCreateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters or IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SubscriptionCreateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - notify=notify, - if_match=if_match, - app_type=app_type, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - sid: str, - if_match: str, - parameters: _models.SubscriptionUpdateParameters, - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Updates the details of a subscription specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - sid: str, - if_match: str, - parameters: IO[bytes], - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Updates the details of a subscription specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - sid: str, - if_match: str, - parameters: Union[_models.SubscriptionUpdateParameters, IO[bytes]], - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> _models.SubscriptionContract: - """Updates the details of a subscription specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a SubscriptionUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters or IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SubscriptionUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - if_match=if_match, - notify=notify, - app_type=app_type, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, sid: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified subscription. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def regenerate_primary_key( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any - ) -> None: - """Regenerates primary key of existing subscription of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_primary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def regenerate_secondary_key( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any - ) -> None: - """Regenerates secondary key of existing subscription of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_secondary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_secrets( - self, resource_group_name: str, service_name: str, sid: str, **kwargs: Any - ) -> _models.SubscriptionKeysContract: - """Gets the specified Subscription keys. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: SubscriptionKeysContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionKeysContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionKeysContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionKeysContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_api_link_operations.py deleted file mode 100644 index f63b5b85ab7d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_api_link_operations.py +++ /dev/null @@ -1,656 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - tag_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "apiLinkId": _SERIALIZER.url( - "api_link_id", api_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "apiLinkId": _SERIALIZER.url( - "api_link_id", api_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "apiLinkId": _SERIALIZER.url( - "api_link_id", api_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class TagApiLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`tag_api_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagApiLinkContract"]: - """Lists a collection of the API links associated with a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| apiId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagApiLinkContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagApiLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagApiLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagApiLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, **kwargs: Any - ) -> _models.TagApiLinkContract: - """Gets the API link for the tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - api_link_id: str, - parameters: _models.TagApiLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Adds an API to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - api_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Adds an API to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - api_link_id: str, - parameters: Union[_models.TagApiLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Adds an API to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Is either a TagApiLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract or IO[bytes] - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagApiLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, tag_id: str, api_link_id: str, **kwargs: Any - ) -> None: - """Deletes the specified API from the specified tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operation_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operation_link_operations.py deleted file mode 100644 index d3f1c2c9f899..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operation_link_operations.py +++ /dev/null @@ -1,672 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - tag_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - tag_id: str, - operation_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationLinkId": _SERIALIZER.url( - "operation_link_id", operation_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - tag_id: str, - operation_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationLinkId": _SERIALIZER.url( - "operation_link_id", operation_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - tag_id: str, - operation_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationLinkId": _SERIALIZER.url( - "operation_link_id", operation_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class TagOperationLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`tag_operation_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagOperationLinkContract"]: - """Lists a collection of the operation links associated with a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| operationId - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagOperationLinkContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagOperationLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagOperationLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagOperationLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, tag_id: str, operation_link_id: str, **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Gets the operation link for the tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - operation_link_id=operation_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagOperationLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - operation_link_id: str, - parameters: _models.TagOperationLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Adds an operation to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - operation_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Adds an operation to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - operation_link_id: str, - parameters: Union[_models.TagOperationLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Adds an operation to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :param parameters: Create or update parameters. Is either a TagOperationLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract or IO[bytes] - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagOperationLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - operation_link_id=operation_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagOperationLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, tag_id: str, operation_link_id: str, **kwargs: Any - ) -> None: - """Deletes the specified operation from the specified tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - operation_link_id=operation_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py deleted file mode 100644 index 93c3eb012b92..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py +++ /dev/null @@ -1,2847 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_operation_request( - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_state_by_operation_request( # pylint: disable=name-too-long - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - tag_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_by_operation_request( - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - tag_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_assign_to_operation_request( - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - tag_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_detach_from_operation_request( - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - tag_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_api_request( - resource_group_name: str, - service_name: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_state_by_api_request( - resource_group_name: str, service_name: str, api_id: str, tag_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_by_api_request( - resource_group_name: str, service_name: str, api_id: str, tag_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_assign_to_api_request( - resource_group_name: str, service_name: str, api_id: str, tag_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_detach_from_api_request( - resource_group_name: str, service_name: str, api_id: str, tag_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - product_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_state_by_product_request( # pylint: disable=name-too-long - resource_group_name: str, service_name: str, product_id: str, tag_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_by_product_request( - resource_group_name: str, service_name: str, product_id: str, tag_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_assign_to_product_request( - resource_group_name: str, service_name: str, product_id: str, tag_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_detach_from_product_request( - resource_group_name: str, service_name: str, product_id: str, tag_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - scope: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if scope is not None: - _params["scope"] = _SERIALIZER.query("scope", scope, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_state_request( - resource_group_name: str, service_name: str, tag_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, tag_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - tag_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, tag_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, tag_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class TagOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`tag` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_operation( - self, - resource_group_name: str, - service_name: str, - api_id: str, - operation_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagContract"]: - """Lists all Tags associated with the Operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_state_by_operation( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_state_by_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get_by_operation( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Get tag associated with the Operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_get_by_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def assign_to_operation( - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Assign tag to the Operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_assign_to_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def detach_from_operation( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, api_id: str, operation_id: str, tag_id: str, **kwargs: Any - ) -> None: - """Detach the tag from the Operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_detach_from_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - operation_id=operation_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagContract"]: - """Lists all Tags associated with the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_state_by_api( - self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_state_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get_by_api( - self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Get tag associated with the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_get_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def assign_to_api( - self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Assign tag to the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_assign_to_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def detach_from_api( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, api_id: str, tag_id: str, **kwargs: Any - ) -> None: - """Detach the tag from the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_detach_from_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagContract"]: - """Lists all Tags associated with the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_state_by_product( - self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_state_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get_by_product( - self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Get tag associated with the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_get_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def assign_to_product( - self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Assign tag to the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_assign_to_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def detach_from_product( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, product_id: str, tag_id: str, **kwargs: Any - ) -> None: - """Detach the tag from the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_detach_from_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - product_id=product_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - scope: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagContract"]: - """Lists a collection of tags defined within a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param scope: Scope like 'apis', 'products' or 'apis/{apiId}. Default value is None. - :type scope: str - :return: An iterator like instance of either TagContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_state(self, resource_group_name: str, service_name: str, tag_id: str, **kwargs: Any) -> bool: - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_state_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, tag_id: str, **kwargs: Any) -> _models.TagContract: - """Gets the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - parameters: _models.TagCreateUpdateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Creates a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Creates a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - parameters: Union[_models.TagCreateUpdateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.TagContract: - """Creates a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param parameters: Create parameters. Is either a TagCreateUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagCreateUpdateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - if_match: str, - parameters: _models.TagCreateUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Updates the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Updates the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - if_match: str, - parameters: Union[_models.TagCreateUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.TagContract: - """Updates the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a TagCreateUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or IO[bytes] - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagCreateUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, tag_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific tag of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_product_link_operations.py deleted file mode 100644 index 01170ac7942d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_product_link_operations.py +++ /dev/null @@ -1,657 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - tag_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "productLinkId": _SERIALIZER.url( - "product_link_id", product_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "productLinkId": _SERIALIZER.url( - "product_link_id", product_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "productLinkId": _SERIALIZER.url( - "product_link_id", product_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class TagProductLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`tag_product_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagProductLinkContract"]: - """Lists a collection of the product links associated with a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| productId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagProductLinkContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagProductLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagProductLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagProductLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, **kwargs: Any - ) -> _models.TagProductLinkContract: - """Gets the product link for the tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - product_link_id=product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagProductLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - product_link_id: str, - parameters: _models.TagProductLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Adds a product to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - product_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Adds a product to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - tag_id: str, - product_link_id: str, - parameters: Union[_models.TagProductLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Adds a product to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :param parameters: Create or update parameters. Is either a TagProductLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract or IO[bytes] - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagProductLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - product_link_id=product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagProductLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, tag_id: str, product_link_id: str, **kwargs: Any - ) -> None: - """Deletes the specified product from the specified tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - tag_id=tag_id, - product_link_id=product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py deleted file mode 100644 index 68c60dc4ed40..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py +++ /dev/null @@ -1,227 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class TagResourceOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`tag_resource` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagResourceContract"]: - """Lists a collection of resources associated with tags. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| aid | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| state | filter | eq | |
| isCurrent - | filter | eq | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagResourceContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagResourceCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagResourceCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py deleted file mode 100644 index cc7b72fa17f3..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py +++ /dev/null @@ -1,268 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_regenerate_primary_key_request( - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "accessName": _SERIALIZER.url("access_name", access_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_regenerate_secondary_key_request( - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "accessName": _SERIALIZER.url("access_name", access_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class TenantAccessGitOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`tenant_access_git` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def regenerate_primary_key( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> None: - """Regenerate primary access key for GIT. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_primary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def regenerate_secondary_key( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> None: - """Regenerate secondary access key for GIT. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_secondary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py deleted file mode 100644 index 514678e44d5f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py +++ /dev/null @@ -1,1171 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "accessName": _SERIALIZER.url("access_name", access_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "accessName": _SERIALIZER.url("access_name", access_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "accessName": _SERIALIZER.url("access_name", access_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "accessName": _SERIALIZER.url("access_name", access_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_regenerate_primary_key_request( - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "accessName": _SERIALIZER.url("access_name", access_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_regenerate_secondary_key_request( - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "accessName": _SERIALIZER.url("access_name", access_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_secrets_request( - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "accessName": _SERIALIZER.url("access_name", access_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class TenantAccessOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`tenant_access` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, filter: Optional[str] = None, **kwargs: Any - ) -> ItemPaged["_models.AccessInformationContract"]: - """Returns list of access infos - for Git and Management endpoints. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: Not used. Default value is None. - :type filter: str - :return: An iterator like instance of either AccessInformationContract or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.AccessInformationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AccessInformationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AccessInformationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> bool: - """Tenant access metadata. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> _models.AccessInformationContract: - """Get tenant access information details without secrets. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AccessInformationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AccessInformationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create( - self, - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - if_match: str, - parameters: _models.AccessInformationCreateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AccessInformationContract: - """Update tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationCreateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create( - self, - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AccessInformationContract: - """Update tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create( - self, - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - if_match: str, - parameters: Union[_models.AccessInformationCreateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.AccessInformationContract: - """Update tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Parameters supplied to retrieve the Tenant Access Information. Is either a - AccessInformationCreateParameters type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationCreateParameters or - IO[bytes] - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AccessInformationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AccessInformationCreateParameters") - - _request = build_create_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AccessInformationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - if_match: str, - parameters: _models.AccessInformationUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AccessInformationContract: - """Update tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.AccessInformationContract: - """Update tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Parameters supplied to retrieve the Tenant Access Information. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - access_name: Union[str, _models.AccessIdName], - if_match: str, - parameters: Union[_models.AccessInformationUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.AccessInformationContract: - """Update tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Parameters supplied to retrieve the Tenant Access Information. Is either a - AccessInformationUpdateParameters type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.AccessInformationUpdateParameters or - IO[bytes] - :return: AccessInformationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AccessInformationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AccessInformationUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AccessInformationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def regenerate_primary_key( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> None: - """Regenerate primary access key. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_primary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def regenerate_secondary_key( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> None: - """Regenerate secondary access key. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_secondary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_secrets( - self, resource_group_name: str, service_name: str, access_name: Union[str, _models.AccessIdName], **kwargs: Any - ) -> _models.AccessInformationSecretsContract: - """Get tenant access information details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param access_name: The identifier of the Access configuration. Known values are: "access" and - "gitAccess". Required. - :type access_name: str or ~azure.mgmt.apimanagement.models.AccessIdName - :return: AccessInformationSecretsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationSecretsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AccessInformationSecretsContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - access_name=access_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("AccessInformationSecretsContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py deleted file mode 100644 index 1775e42af1d9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py +++ /dev/null @@ -1,1004 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_deploy_request( - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_save_request( - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_validate_request( - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_sync_state_request( - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class TenantConfigurationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`tenant_configuration` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _deploy_initial( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: Union[_models.DeployConfigurationParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DeployConfigurationParameters") - - _request = build_deploy_request( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_deploy( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: _models.DeployConfigurationParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.OperationResultContract]: - """This operation applies changes from the specified Git branch to the configuration database. - This is a long running operation and could take several minutes to complete. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-deploy-any-service-configuration-changes-to-the-api-management-service-instance - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Deploy Configuration parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either OperationResultContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_deploy( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.OperationResultContract]: - """This operation applies changes from the specified Git branch to the configuration database. - This is a long running operation and could take several minutes to complete. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-deploy-any-service-configuration-changes-to-the-api-management-service-instance - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Deploy Configuration parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either OperationResultContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_deploy( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: Union[_models.DeployConfigurationParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.OperationResultContract]: - """This operation applies changes from the specified Git branch to the configuration database. - This is a long running operation and could take several minutes to complete. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-deploy-any-service-configuration-changes-to-the-api-management-service-instance - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Deploy Configuration parameters. Is either a DeployConfigurationParameters - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters or IO[bytes] - :return: An instance of LROPoller that returns either OperationResultContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._deploy_initial( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationResultContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.OperationResultContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.OperationResultContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _save_initial( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: Union[_models.SaveConfigurationParameter, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SaveConfigurationParameter") - - _request = build_save_request( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_save( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: _models.SaveConfigurationParameter, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.OperationResultContract]: - """This operation creates a commit with the current configuration snapshot to the specified branch - in the repository. This is a long running operation and could take several minutes to complete. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-save-the-service-configuration-to-the-git-repository - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Save Configuration parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SaveConfigurationParameter - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either OperationResultContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_save( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.OperationResultContract]: - """This operation creates a commit with the current configuration snapshot to the specified branch - in the repository. This is a long running operation and could take several minutes to complete. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-save-the-service-configuration-to-the-git-repository - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Save Configuration parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either OperationResultContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_save( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: Union[_models.SaveConfigurationParameter, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.OperationResultContract]: - """This operation creates a commit with the current configuration snapshot to the specified branch - in the repository. This is a long running operation and could take several minutes to complete. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-save-the-service-configuration-to-the-git-repository - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Save Configuration parameters. Is either a SaveConfigurationParameter type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SaveConfigurationParameter or IO[bytes] - :return: An instance of LROPoller that returns either OperationResultContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._save_initial( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationResultContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.OperationResultContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.OperationResultContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _validate_initial( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: Union[_models.DeployConfigurationParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DeployConfigurationParameters") - - _request = build_validate_request( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_validate( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: _models.DeployConfigurationParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.OperationResultContract]: - """This operation validates the changes in the specified Git branch. This is a long running - operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Validate Configuration parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either OperationResultContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_validate( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.OperationResultContract]: - """This operation validates the changes in the specified Git branch. This is a long running - operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Validate Configuration parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either OperationResultContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_validate( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - parameters: Union[_models.DeployConfigurationParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.OperationResultContract]: - """This operation validates the changes in the specified Git branch. This is a long running - operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :param parameters: Validate Configuration parameters. Is either a DeployConfigurationParameters - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters or IO[bytes] - :return: An instance of LROPoller that returns either OperationResultContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationResultContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._validate_initial( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationResultContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.OperationResultContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.OperationResultContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get_sync_state( - self, - resource_group_name: str, - service_name: str, - configuration_name: Union[str, _models.ConfigurationIdName], - **kwargs: Any - ) -> _models.TenantConfigurationSyncStateContract: - """Gets the status of the most recent synchronization between the configuration database and the - Git repository. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param configuration_name: The identifier of the Git Configuration Operation. "configuration" - Required. - :type configuration_name: str or ~azure.mgmt.apimanagement.models.ConfigurationIdName - :return: TenantConfigurationSyncStateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TenantConfigurationSyncStateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TenantConfigurationSyncStateContract] = kwargs.pop("cls", None) - - _request = build_get_sync_state_request( - resource_group_name=resource_group_name, - service_name=service_name, - configuration_name=configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TenantConfigurationSyncStateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py deleted file mode 100644 index 74ebb4a9f25b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py +++ /dev/null @@ -1,307 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, service_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - settings_type: Union[str, _models.SettingsTypeName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "settingsType": _SERIALIZER.url("settings_type", settings_type, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class TenantSettingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`tenant_settings` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, resource_group_name: str, service_name: str, filter: Optional[str] = None, **kwargs: Any - ) -> ItemPaged["_models.TenantSettingsContract"]: - """Public settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: Not used. Default value is None. - :type filter: str - :return: An iterator like instance of either TenantSettingsContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TenantSettingsContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TenantSettingsCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TenantSettingsCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - settings_type: Union[str, _models.SettingsTypeName], - **kwargs: Any - ) -> _models.TenantSettingsContract: - """Get tenant settings. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param settings_type: The identifier of the settings. "public" Required. - :type settings_type: str or ~azure.mgmt.apimanagement.models.SettingsTypeName - :return: TenantSettingsContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TenantSettingsContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TenantSettingsContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - settings_type=settings_type, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TenantSettingsContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py deleted file mode 100644 index 263ef6598299..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py +++ /dev/null @@ -1,176 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_send_request( - resource_group_name: str, - service_name: str, - user_id: str, - subscription_id: str, - *, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if app_type is not None: - _params["appType"] = _SERIALIZER.query("app_type", app_type, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class UserConfirmationPasswordOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`user_confirmation_password` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def send( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - user_id: str, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> None: - """Sends confirmation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_send_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - app_type=app_type, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py deleted file mode 100644 index baa8436b95d0..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py +++ /dev/null @@ -1,226 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - resource_group_name: str, - service_name: str, - user_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class UserGroupOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`user_group` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - user_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.GroupContract"]: - """Lists all user groups. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions - |
|-------------|------------------------|-----------------------------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GroupContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GroupContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("GroupCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py deleted file mode 100644 index 0ff41207ddc1..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py +++ /dev/null @@ -1,191 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - resource_group_name: str, service_name: str, user_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class UserIdentitiesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`user_identities` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any - ) -> ItemPaged["_models.UserIdentityContract"]: - """List of all user identities. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: An iterator like instance of either UserIdentityContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.UserIdentityContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserIdentityCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("UserIdentityCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py deleted file mode 100644 index abec0b433f50..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py +++ /dev/null @@ -1,1394 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - expand_groups: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if expand_groups is not None: - _params["expandGroups"] = _SERIALIZER.query("expand_groups", expand_groups, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, user_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, user_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - user_id: str, - subscription_id: str, - *, - notify: Optional[bool] = None, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if notify is not None: - _params["notify"] = _SERIALIZER.query("notify", notify, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, service_name: str, user_id: str, subscription_id: str, *, if_match: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - user_id: str, - subscription_id: str, - *, - if_match: str, - delete_subscriptions: Optional[bool] = None, - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if delete_subscriptions is not None: - _params["deleteSubscriptions"] = _SERIALIZER.query("delete_subscriptions", delete_subscriptions, "bool") - if notify is not None: - _params["notify"] = _SERIALIZER.query("notify", notify, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if app_type is not None: - _params["appType"] = _SERIALIZER.query("app_type", app_type, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_generate_sso_url_request( - resource_group_name: str, service_name: str, user_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_shared_access_token_request( - resource_group_name: str, service_name: str, user_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class UserOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`user` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - expand_groups: Optional[bool] = None, - **kwargs: Any - ) -> ItemPaged["_models.UserContract"]: - """Lists a collection of registered users in the specified service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| state | filter | eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | - |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| groups | expand | | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param expand_groups: Detailed Group in response. Default value is None. - :type expand_groups: bool - :return: An iterator like instance of either UserContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.UserContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - expand_groups=expand_groups, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("UserCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the user specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get(self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any) -> _models.UserContract: - """Gets the details of the user specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("UserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - user_id: str, - parameters: _models.UserCreateParameters, - notify: Optional[bool] = None, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UserContract: - """Creates or Updates a user. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.UserCreateParameters - :param notify: Send an Email notification to the User. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - user_id: str, - parameters: IO[bytes], - notify: Optional[bool] = None, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UserContract: - """Creates or Updates a user. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param notify: Send an Email notification to the User. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - user_id: str, - parameters: Union[_models.UserCreateParameters, IO[bytes]], - notify: Optional[bool] = None, - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.UserContract: - """Creates or Updates a user. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param parameters: Create or update parameters. Is either a UserCreateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.UserCreateParameters or IO[bytes] - :param notify: Send an Email notification to the User. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "UserCreateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - notify=notify, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("UserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - user_id: str, - if_match: str, - parameters: _models.UserUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UserContract: - """Updates the details of the user specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.UserUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - user_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UserContract: - """Updates the details of the user specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - user_id: str, - if_match: str, - parameters: Union[_models.UserUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.UserContract: - """Updates the details of the user specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a UserUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.UserUpdateParameters or IO[bytes] - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "UserUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("UserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _delete_initial( - self, - resource_group_name: str, - service_name: str, - user_id: str, - if_match: str, - delete_subscriptions: Optional[bool] = None, - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - delete_subscriptions=delete_subscriptions, - notify=notify, - app_type=app_type, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - service_name: str, - user_id: str, - if_match: str, - delete_subscriptions: Optional[bool] = None, - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> LROPoller[None]: - """Deletes specific user. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param delete_subscriptions: Whether to delete user's subscription or not. Default value is - None. - :type delete_subscriptions: bool - :param notify: Send an Account Closed Email notification to the User. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - if_match=if_match, - delete_subscriptions=delete_subscriptions, - notify=notify, - app_type=app_type, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def generate_sso_url( - self, resource_group_name: str, service_name: str, user_id: str, **kwargs: Any - ) -> _models.GenerateSsoUrlResult: - """Retrieves a redirection URL containing an authentication token for signing a given user into - the developer portal. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: GenerateSsoUrlResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GenerateSsoUrlResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GenerateSsoUrlResult] = kwargs.pop("cls", None) - - _request = build_generate_sso_url_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GenerateSsoUrlResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def get_shared_access_token( - self, - resource_group_name: str, - service_name: str, - user_id: str, - parameters: _models.UserTokenParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UserTokenResult: - """Gets the Shared Access Authorization Token for the User. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param parameters: Create Authorization Token parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.UserTokenParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: UserTokenResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def get_shared_access_token( - self, - resource_group_name: str, - service_name: str, - user_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UserTokenResult: - """Gets the Shared Access Authorization Token for the User. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param parameters: Create Authorization Token parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: UserTokenResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def get_shared_access_token( - self, - resource_group_name: str, - service_name: str, - user_id: str, - parameters: Union[_models.UserTokenParameters, IO[bytes]], - **kwargs: Any - ) -> _models.UserTokenResult: - """Gets the Shared Access Authorization Token for the User. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param parameters: Create Authorization Token parameters. Is either a UserTokenParameters type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.UserTokenParameters or IO[bytes] - :return: UserTokenResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.UserTokenResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "UserTokenParameters") - - _request = build_get_shared_access_token_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("UserTokenResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py deleted file mode 100644 index 3bff9d09f0b9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py +++ /dev/null @@ -1,344 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - resource_group_name: str, - service_name: str, - user_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, user_id: str, sid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class UserSubscriptionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`user_subscription` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - user_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.SubscriptionContract"]: - """Lists the collection of subscriptions of the specified user. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param filter: | Field | Usage | Supported operators | Supported functions - |
|-------------|------------------------|-----------------------------------|
|name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
|productId | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either SubscriptionContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SubscriptionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, user_id: str, sid: str, **kwargs: Any - ) -> _models.SubscriptionContract: - """Gets the specified Subscription entity associated with a particular user. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - user_id=user_id, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_diagnostic_operations.py deleted file mode 100644 index 7250e4ac75db..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_diagnostic_operations.py +++ /dev/null @@ -1,1133 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_workspace_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceApiDiagnosticOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_api_diagnostic` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_workspace( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.DiagnosticContract"]: - """Lists all diagnostics of an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either DiagnosticContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_workspace_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DiagnosticCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - **kwargs: Any - ) -> _models.DiagnosticContract: - """Gets the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - parameters: _models.DiagnosticContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - parameters: Union[_models.DiagnosticContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Is either a DiagnosticContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - if_match: str, - parameters: _models.DiagnosticUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - if_match: str, - parameters: Union[_models.DiagnosticUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Is either a DiagnosticUpdateContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract or IO[bytes] - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - diagnostic_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified Diagnostic from an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_export_operations.py deleted file mode 100644 index c6e52e38affb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_export_operations.py +++ /dev/null @@ -1,195 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - subscription_id: str, - *, - format: Union[str, _models.ExportFormat], - export: Union[str, _models.ExportApi], - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["format"] = _SERIALIZER.query("format", format, "str") - _params["export"] = _SERIALIZER.query("export", export, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceApiExportOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_api_export` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - format: Union[str, _models.ExportFormat], - export: Union[str, _models.ExportApi], - **kwargs: Any - ) -> _models.ApiExportResult: - """Gets the details of the API specified by its identifier in the format specified to the Storage - Blob with SAS Key valid for 5 minutes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param format: Format in which to export the Api Details to the Storage Blob with Sas Key valid - for 5 minutes. Known values are: "swagger-link", "wsdl-link", "wadl-link", "openapi-link", and - "openapi+json-link". Required. - :type format: str or ~azure.mgmt.apimanagement.models.ExportFormat - :param export: Query parameter required to export the API details. "true" Required. - :type export: str or ~azure.mgmt.apimanagement.models.ExportApi - :return: ApiExportResult or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiExportResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiExportResult] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - format=format, - export=export, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ApiExportResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_operations.py deleted file mode 100644 index a426553ff6d5..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_operations.py +++ /dev/null @@ -1,1134 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_api_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - tags: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if tags is not None: - _params["tags"] = _SERIALIZER.query("tags", tags, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceApiOperationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_api_operation` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - tags: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.OperationContract"]: - """Lists a collection of the operations for the specified API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param tags: Include tags in the response. Default value is None. - :type tags: str - :return: An iterator like instance of either OperationContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.OperationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - tags=tags, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("OperationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API operation specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - **kwargs: Any - ) -> _models.OperationContract: - """Gets the details of the API Operation specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OperationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - parameters: _models.OperationContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Creates a new operation in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Creates a new operation in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - parameters: Union[_models.OperationContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.OperationContract: - """Creates a new operation in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param parameters: Create parameters. Is either a OperationContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "OperationContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OperationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - if_match: str, - parameters: _models.OperationUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Updates the details of the operation in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Operation Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.OperationContract: - """Updates the details of the operation in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Operation Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - if_match: str, - parameters: Union[_models.OperationUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.OperationContract: - """Updates the details of the operation in the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Operation Update parameters. Is either a OperationUpdateContract type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.OperationUpdateContract or IO[bytes] - :return: OperationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.OperationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OperationContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "OperationUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("OperationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified operation in the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_policy_operations.py deleted file mode 100644 index 9ffe3355058b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operation_policy_operations.py +++ /dev/null @@ -1,898 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_operation_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if format is not None: - _params["format"] = _SERIALIZER.query("format", format, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", max_length=80, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceApiOperationPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_api_operation_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_operation( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - **kwargs: Any - ) -> ItemPaged["_models.PolicyContract"]: - """Get the list of policy configuration at the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :return: An iterator like instance of either PolicyContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_operation_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API operation policy specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API Operation level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - operation_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the Api Operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be unique in the current API - Management service instance. Required. - :type operation_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - operation_id=operation_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operations.py deleted file mode 100644 index a8c04787d189..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_operations.py +++ /dev/null @@ -1,1163 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - tags: Optional[str] = None, - expand_api_version_set: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if tags is not None: - _params["tags"] = _SERIALIZER.query("tags", tags, "str") - if expand_api_version_set is not None: - _params["expandApiVersionSet"] = _SERIALIZER.query("expand_api_version_set", expand_api_version_set, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, workspace_id: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, workspace_id: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - subscription_id: str, - *, - if_match: str, - delete_revisions: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if delete_revisions is not None: - _params["deleteRevisions"] = _SERIALIZER.query("delete_revisions", delete_revisions, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceApiOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_api` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - tags: Optional[str] = None, - expand_api_version_set: Optional[bool] = None, - **kwargs: Any - ) -> ItemPaged["_models.ApiContract"]: - """Lists all APIs of the workspace in an API Management service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-apis - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| isCurrent | filter | eq, ne | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param tags: Include tags in the response. Default value is None. - :type tags: str - :param expand_api_version_set: Include full ApiVersionSet resource in response. Default value - is None. - :type expand_api_version_set: bool - :return: An iterator like instance of either ApiContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - tags=tags, - expand_api_version_set=expand_api_version_set, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any - ) -> _models.ApiContract: - """Gets the details of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - parameters: Union[_models.ApiCreateOrUpdateParameter, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiCreateOrUpdateParameter") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - parameters: _models.ApiCreateOrUpdateParameter, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiContract]: - """Creates new or updates existing specified API of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ApiContract]: - """Creates new or updates existing specified API of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ApiContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - parameters: Union[_models.ApiCreateOrUpdateParameter, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.ApiContract]: - """Creates new or updates existing specified API of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param parameters: Create or update parameters. Is either a ApiCreateOrUpdateParameter type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of LROPoller that returns either ApiContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ApiContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ApiContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ApiContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - if_match: str, - parameters: _models.ApiUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiContract: - """Updates the specified API of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Update Contract parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiContract: - """Updates the specified API of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Update Contract parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - if_match: str, - parameters: Union[_models.ApiUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.ApiContract: - """Updates the specified API of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Update Contract parameters. Is either a ApiUpdateContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract or IO[bytes] - :return: ApiContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - if_match: str, - delete_revisions: Optional[bool] = None, - **kwargs: Any - ) -> None: - """Deletes the specified API of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param delete_revisions: Delete all revisions of the Api. Default value is None. - :type delete_revisions: bool - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - delete_revisions=delete_revisions, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_policy_operations.py deleted file mode 100644 index 5e3d6698354e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_policy_operations.py +++ /dev/null @@ -1,845 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_api_request( - resource_group_name: str, service_name: str, workspace_id: str, api_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if format is not None: - _params["format"] = _SERIALIZER.query("format", format, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceApiPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_api_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, **kwargs: Any - ) -> ItemPaged["_models.PolicyContract"]: - """Get the policy configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :return: An iterator like instance of either PolicyContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the API policy specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_release_operations.py deleted file mode 100644 index 533585f21f90..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_release_operations.py +++ /dev/null @@ -1,1135 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "releaseId": _SERIALIZER.url( - "release_id", release_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "releaseId": _SERIALIZER.url( - "release_id", release_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "releaseId": _SERIALIZER.url( - "release_id", release_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "releaseId": _SERIALIZER.url( - "release_id", release_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "releaseId": _SERIALIZER.url( - "release_id", release_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceApiReleaseOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_api_release` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ApiReleaseContract"]: - """Lists all releases of an API. An API release is created when making an API Revision current. - Releases are also used to rollback to previous revisions. Results will be paged and can be - constrained by the $top and $skip parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| notes | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiReleaseContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiReleaseContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiReleaseCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiReleaseCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - **kwargs: Any - ) -> bool: - """Returns the etag of an API release. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Returns the details of an API release. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiReleaseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - parameters: _models.ApiReleaseContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Creates a new Release for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Creates a new Release for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - parameters: Union[_models.ApiReleaseContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Creates a new Release for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param parameters: Create parameters. Is either a ApiReleaseContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiReleaseContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiReleaseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - if_match: str, - parameters: _models.ApiReleaseContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Updates the details of the release of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Release Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Updates the details of the release of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Release Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - if_match: str, - parameters: Union[_models.ApiReleaseContract, IO[bytes]], - **kwargs: Any - ) -> _models.ApiReleaseContract: - """Updates the details of the release of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: API Release Update parameters. Is either a ApiReleaseContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiReleaseContract or IO[bytes] - :return: ApiReleaseContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiReleaseContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiReleaseContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiReleaseContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - release_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified release in the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in the current API - Management service instance. Required. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - release_id=release_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_revision_operations.py deleted file mode 100644 index 969c3fe7bed5..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_revision_operations.py +++ /dev/null @@ -1,232 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/revisions", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceApiRevisionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_api_revision` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ApiRevisionContract"]: - """Lists all revisions of an API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API identifier. Must be unique in the current API Management service instance. - Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| apiRevision - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiRevisionContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiRevisionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiRevisionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiRevisionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_schema_operations.py deleted file mode 100644 index 49ffef730129..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_schema_operations.py +++ /dev/null @@ -1,961 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_api_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - subscription_id: str, - *, - if_match: str, - force: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "apiId": _SERIALIZER.url("api_id", api_id, "str", max_length=256, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if force is not None: - _params["force"] = _SERIALIZER.query("force", force, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceApiSchemaOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_api_schema` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.SchemaContract"]: - """Get the schema configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| contentType - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either SchemaContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SchemaCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SchemaCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, schema_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the schema specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, api_id: str, schema_id: str, **kwargs: Any - ) -> _models.SchemaContract: - """Get the schema configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: SchemaContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SchemaContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SchemaContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - parameters: Union[_models.SchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SchemaContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - parameters: _models.SchemaContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.SchemaContract]: - """Creates or updates schema configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: The schema contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.SchemaContract]: - """Creates or updates schema configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: The schema contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - parameters: Union[_models.SchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.SchemaContract]: - """Creates or updates schema configuration for the API. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: The schema contents to apply. Is either a SchemaContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SchemaContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of LROPoller that returns either SchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.SchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SchemaContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - schema_id=schema_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("SchemaContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.SchemaContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.SchemaContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - api_id: str, - schema_id: str, - if_match: str, - force: Optional[bool] = None, - **kwargs: Any - ) -> None: - """Deletes the schema configuration at the Api. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param api_id: API revision identifier. Must be unique in the current API Management service - instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. - :type api_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param force: If true removes all references to the schema before deleting it. Default value is - None. - :type force: bool - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - api_id=api_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - force=force, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_version_set_operations.py deleted file mode 100644 index c801889b4e00..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_api_version_set_operations.py +++ /dev/null @@ -1,1065 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "versionSetId": _SERIALIZER.url( - "version_set_id", version_set_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "versionSetId": _SERIALIZER.url( - "version_set_id", version_set_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "versionSetId": _SERIALIZER.url( - "version_set_id", version_set_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "versionSetId": _SERIALIZER.url( - "version_set_id", version_set_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "versionSetId": _SERIALIZER.url( - "version_set_id", version_set_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceApiVersionSetOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_api_version_set` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ApiVersionSetContract"]: - """Lists a collection of API Version Sets in the specified workspace with a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ApiVersionSetContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ApiVersionSetContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiVersionSetCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ApiVersionSetCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, version_set_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, version_set_id: str, **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Gets the details of the Api Version Set specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiVersionSetContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - parameters: _models.ApiVersionSetContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Creates or Updates a Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Creates or Updates a Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - parameters: Union[_models.ApiVersionSetContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Creates or Updates a Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param parameters: Create or update parameters. Is either a ApiVersionSetContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiVersionSetContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiVersionSetContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - if_match: str, - parameters: _models.ApiVersionSetUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Updates the details of the Api VersionSet specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Updates the details of the Api VersionSet specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - if_match: str, - parameters: Union[_models.ApiVersionSetUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.ApiVersionSetContract: - """Updates the details of the Api VersionSet specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a ApiVersionSetUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters or IO[bytes] - :return: ApiVersionSetContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ApiVersionSetContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ApiVersionSetUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ApiVersionSetContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - version_set_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific Api Version Set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param version_set_id: Api Version Set identifier. Must be unique in the current API Management - service instance. Required. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - version_set_id=version_set_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_backend_operations.py deleted file mode 100644 index 3fb32fcf2917..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_backend_operations.py +++ /dev/null @@ -1,1047 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_workspace_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, workspace_id: str, backend_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "backendId": _SERIALIZER.url("backend_id", backend_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, workspace_id: str, backend_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "backendId": _SERIALIZER.url("backend_id", backend_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "backendId": _SERIALIZER.url("backend_id", backend_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "backendId": _SERIALIZER.url("backend_id", backend_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "backendId": _SERIALIZER.url("backend_id", backend_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceBackendOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_backend` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_workspace( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.BackendContract"]: - """Lists a collection of backends in the specified workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either BackendContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.BackendContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BackendCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_workspace_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("BackendCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, backend_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the backend specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, backend_id: str, **kwargs: Any - ) -> _models.BackendContract: - """Gets the details of the backend specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("BackendContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - parameters: _models.BackendContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Creates or Updates a backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Creates or Updates a backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - parameters: Union[_models.BackendContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.BackendContract: - """Creates or Updates a backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param parameters: Create parameters. Is either a BackendContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "BackendContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("BackendContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - if_match: str, - parameters: _models.BackendUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Updates an existing backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.BackendContract: - """Updates an existing backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - if_match: str, - parameters: Union[_models.BackendUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.BackendContract: - """Updates an existing backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a BackendUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.BackendUpdateParameters or IO[bytes] - :return: BackendContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.BackendContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BackendContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "BackendUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("BackendContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - backend_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified backend. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param backend_id: Identifier of the Backend entity. Must be unique in the current API - Management service instance. Required. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - backend_id=backend_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_certificate_operations.py deleted file mode 100644 index a22f12115e43..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_certificate_operations.py +++ /dev/null @@ -1,984 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_workspace_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - is_key_vault_refresh_failed: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if is_key_vault_refresh_failed is not None: - _params["isKeyVaultRefreshFailed"] = _SERIALIZER.query( - "is_key_vault_refresh_failed", is_key_vault_refresh_failed, "bool" - ) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - certificate_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - certificate_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - certificate_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - certificate_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_refresh_secret_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - certificate_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}/refreshSecret", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "certificateId": _SERIALIZER.url( - "certificate_id", certificate_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceCertificateOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_certificate` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_workspace( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - is_key_vault_refresh_failed: Optional[bool] = None, - **kwargs: Any - ) -> ItemPaged["_models.CertificateContract"]: - """Lists a collection of all certificates in the specified workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param is_key_vault_refresh_failed: When set to true, the response contains only certificates - entities which failed refresh. Default value is None. - :type is_key_vault_refresh_failed: bool - :return: An iterator like instance of either CertificateContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.CertificateContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_workspace_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - is_key_vault_refresh_failed=is_key_vault_refresh_failed, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("CertificateCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, certificate_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the certificate specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, certificate_id: str, **kwargs: Any - ) -> _models.CertificateContract: - """Gets the details of the certificate specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CertificateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - certificate_id: str, - parameters: _models.CertificateCreateOrUpdateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateContract: - """Creates or updates the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Create or Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - certificate_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateContract: - """Creates or updates the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Create or Update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - certificate_id: str, - parameters: Union[_models.CertificateCreateOrUpdateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.CertificateContract: - """Creates or updates the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param parameters: Create or Update parameters. Is either a CertificateCreateOrUpdateParameters - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.CertificateCreateOrUpdateParameters or - IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "CertificateCreateOrUpdateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CertificateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - certificate_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific certificate. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def refresh_secret( - self, resource_group_name: str, service_name: str, workspace_id: str, certificate_id: str, **kwargs: Any - ) -> _models.CertificateContract: - """From KeyVault, Refresh the certificate being used for authentication with the backend. - - .. seealso:: - - - https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/ - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param certificate_id: Identifier of the certificate entity. Must be unique in the current API - Management service instance. Required. - :type certificate_id: str - :return: CertificateContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateContract] = kwargs.pop("cls", None) - - _request = build_refresh_secret_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - certificate_id=certificate_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("CertificateContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_diagnostic_operations.py deleted file mode 100644 index 1db6004dee2b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_diagnostic_operations.py +++ /dev/null @@ -1,1065 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_workspace_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "diagnosticId": _SERIALIZER.url( - "diagnostic_id", diagnostic_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceDiagnosticOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_diagnostic` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_workspace( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.DiagnosticContract"]: - """Lists all diagnostics in the specified workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either DiagnosticContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_workspace_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DiagnosticCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, diagnostic_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, diagnostic_id: str, **kwargs: Any - ) -> _models.DiagnosticContract: - """Gets the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - parameters: _models.DiagnosticContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - parameters: Union[_models.DiagnosticContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.DiagnosticContract: - """Creates a new Diagnostic or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param parameters: Create parameters. Is either a DiagnosticContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - if_match: str, - parameters: _models.DiagnosticUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - if_match: str, - parameters: Union[_models.DiagnosticUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.DiagnosticContract: - """Updates the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Diagnostic Update parameters. Is either a DiagnosticUpdateContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticUpdateContract or IO[bytes] - :return: DiagnosticContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DiagnosticContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DiagnosticUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("DiagnosticContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - diagnostic_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified Diagnostic. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the current API Management - service instance. Required. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - diagnostic_id=diagnostic_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_global_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_global_schema_operations.py deleted file mode 100644 index 8bd209addea3..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_global_schema_operations.py +++ /dev/null @@ -1,904 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, workspace_id: str, schema_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, workspace_id: str, schema_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - schema_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - schema_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "schemaId": _SERIALIZER.url("schema_id", schema_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceGlobalSchemaOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_global_schema` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.GlobalSchemaContract"]: - """Lists a collection of schemas registered with workspace in a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GlobalSchemaContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GlobalSchemaCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("GlobalSchemaCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, schema_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the Schema specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, schema_id: str, **kwargs: Any - ) -> _models.GlobalSchemaContract: - """Gets the details of the Schema specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :return: GlobalSchemaContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GlobalSchemaContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GlobalSchemaContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - schema_id: str, - parameters: Union[_models.GlobalSchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GlobalSchemaContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - schema_id: str, - parameters: _models.GlobalSchemaContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.GlobalSchemaContract]: - """Creates new or updates existing specified Schema of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either GlobalSchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - schema_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.GlobalSchemaContract]: - """Creates new or updates existing specified Schema of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either GlobalSchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - schema_id: str, - parameters: Union[_models.GlobalSchemaContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.GlobalSchemaContract]: - """Creates new or updates existing specified Schema of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param parameters: Create or update parameters. Is either a GlobalSchemaContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GlobalSchemaContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of LROPoller that returns either GlobalSchemaContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.GlobalSchemaContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GlobalSchemaContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - schema_id=schema_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("GlobalSchemaContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.GlobalSchemaContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.GlobalSchemaContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - schema_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific Schema. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param schema_id: Schema id identifier. Must be unique in the current API Management service - instance. Required. - :type schema_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - schema_id=schema_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_operations.py deleted file mode 100644 index 09b3c8bf7f7d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_operations.py +++ /dev/null @@ -1,1050 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, workspace_id: str, group_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, workspace_id: str, group_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceGroupOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_group` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.GroupContract"]: - """Lists a collection of groups defined within a workspace in a service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-groups - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| externalId | filter | eq | |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either GroupContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.GroupContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("GroupCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, **kwargs: Any - ) -> _models.GroupContract: - """Gets the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - parameters: _models.GroupCreateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Creates or Updates a group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Creates or Updates a group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - parameters: Union[_models.GroupCreateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.GroupContract: - """Creates or Updates a group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param parameters: Create parameters. Is either a GroupCreateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupCreateParameters or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GroupCreateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - if_match: str, - parameters: _models.GroupUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Updates the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.GroupContract: - """Updates the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - if_match: str, - parameters: Union[_models.GroupUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.GroupContract: - """Updates the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a GroupUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.GroupUpdateParameters or IO[bytes] - :return: GroupContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.GroupContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GroupContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GroupUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("GroupContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific group of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_user_operations.py deleted file mode 100644 index f6c4ce9cf347..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_group_user_operations.py +++ /dev/null @@ -1,601 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_entity_exists_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - user_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - user_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - user_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "groupId": _SERIALIZER.url("group_id", group_id, "str", max_length=256, min_length=1), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceGroupUserOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_group_user` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - group_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.UserContract"]: - """Lists a collection of user entities associated with the group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, - le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either UserContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.UserContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("UserCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def check_entity_exists( - self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, user_id: str, **kwargs: Any - ) -> bool: - """Checks that user entity specified by identifier is associated with the group entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def create( - self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, user_id: str, **kwargs: Any - ) -> _models.UserContract: - """Add existing user to existing group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: UserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.UserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserContract] = kwargs.pop("cls", None) - - _request = build_create_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("UserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, workspace_id: str, group_id: str, user_id: str, **kwargs: Any - ) -> None: - """Remove existing user from existing group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param group_id: Group identifier. Must be unique in the current API Management service - instance. Required. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - group_id=group_id, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_logger_operations.py deleted file mode 100644 index 93912403be0b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_logger_operations.py +++ /dev/null @@ -1,1050 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_workspace_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, workspace_id: str, logger_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "loggerId": _SERIALIZER.url("logger_id", logger_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, workspace_id: str, logger_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "loggerId": _SERIALIZER.url("logger_id", logger_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "loggerId": _SERIALIZER.url("logger_id", logger_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "loggerId": _SERIALIZER.url("logger_id", logger_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "loggerId": _SERIALIZER.url("logger_id", logger_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceLoggerOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_logger` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_workspace( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.LoggerContract"]: - """Lists a collection of loggers in the specified workspace. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-log-event-hubs - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either LoggerContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.LoggerContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LoggerCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_workspace_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("LoggerCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, logger_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the logger specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, logger_id: str, **kwargs: Any - ) -> _models.LoggerContract: - """Gets the details of the logger specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("LoggerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - parameters: _models.LoggerContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Creates or Updates a logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Creates or Updates a logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - parameters: Union[_models.LoggerContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.LoggerContract: - """Creates or Updates a logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param parameters: Create parameters. Is either a LoggerContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "LoggerContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("LoggerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - if_match: str, - parameters: _models.LoggerUpdateContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Updates an existing logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoggerContract: - """Updates an existing logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - if_match: str, - parameters: Union[_models.LoggerUpdateContract, IO[bytes]], - **kwargs: Any - ) -> _models.LoggerContract: - """Updates an existing logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a LoggerUpdateContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerUpdateContract or IO[bytes] - :return: LoggerContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoggerContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "LoggerUpdateContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("LoggerContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - logger_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the specified logger. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param logger_id: Logger identifier. Must be unique in the API Management service instance. - Required. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - logger_id=logger_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_named_value_operations.py deleted file mode 100644 index c0a1aff2bfea..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_named_value_operations.py +++ /dev/null @@ -1,1549 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - is_key_vault_refresh_failed: Optional[Union[str, _models.KeyVaultRefreshState]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if is_key_vault_refresh_failed is not None: - _params["isKeyVaultRefreshFailed"] = _SERIALIZER.query( - "is_key_vault_refresh_failed", is_key_vault_refresh_failed, "str" - ) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_value_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}/listValue", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_refresh_secret_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}/refreshSecret", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "namedValueId": _SERIALIZER.url( - "named_value_id", named_value_id, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceNamedValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_named_value` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - is_key_vault_refresh_failed: Optional[Union[str, _models.KeyVaultRefreshState]] = None, - **kwargs: Any - ) -> ItemPaged["_models.NamedValueContract"]: - """Lists a collection of named values defined within a workspace in a service instance. - - .. seealso:: - - https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-properties - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| tags | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param is_key_vault_refresh_failed: Query parameter to fetch named value entities based on - refresh status. Known values are: "true" and "false". Default value is None. - :type is_key_vault_refresh_failed: str or ~azure.mgmt.apimanagement.models.KeyVaultRefreshState - :return: An iterator like instance of either NamedValueContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - is_key_vault_refresh_failed=is_key_vault_refresh_failed, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NamedValueCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any - ) -> _models.NamedValueContract: - """Gets the details of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: NamedValueContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NamedValueContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - parameters: Union[_models.NamedValueCreateContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NamedValueCreateContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - parameters: _models.NamedValueCreateContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Creates or updates named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Creates or updates named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - parameters: Union[_models.NamedValueCreateContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Creates or updates named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param parameters: Create parameters. Is either a NamedValueCreateContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueCreateContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NamedValueContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NamedValueContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - if_match: str, - parameters: Union[_models.NamedValueUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "NamedValueUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 200: - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - if_match: str, - parameters: _models.NamedValueUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Updates the specific named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Updates the specific named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - if_match: str, - parameters: Union[_models.NamedValueUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Updates the specific named value. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a NamedValueUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - if_match=if_match, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NamedValueContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NamedValueContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - named_value_id: str, - if_match: str, - **kwargs: Any - ) -> None: - """Deletes specific named value from the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_value( - self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any - ) -> _models.NamedValueSecretContract: - """Gets the secret of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: NamedValueSecretContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NamedValueSecretContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueSecretContract] = kwargs.pop("cls", None) - - _request = build_list_value_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueSecretContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _refresh_secret_initial( - self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_secret_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 200: - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_refresh_secret( - self, resource_group_name: str, service_name: str, workspace_id: str, named_value_id: str, **kwargs: Any - ) -> LROPoller[_models.NamedValueContract]: - """Refresh the secret of the named value specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param named_value_id: Identifier of the NamedValue. Required. - :type named_value_id: str - :return: An instance of LROPoller that returns either NamedValueContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.NamedValueContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NamedValueContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._refresh_secret_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - named_value_id=named_value_id, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("NamedValueContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NamedValueContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NamedValueContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_operations.py deleted file mode 100644 index 5638dd9b38ac..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_operations.py +++ /dev/null @@ -1,475 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceNotificationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_notification` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.NotificationContract"]: - """Lists a collection of properties defined within a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either NotificationContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.NotificationContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NotificationCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NotificationCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - **kwargs: Any - ) -> _models.NotificationContract: - """Gets the details of the Notification specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :return: NotificationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NotificationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.NotificationContract: - """Create or Update API Management publisher notification for the workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: NotificationContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.NotificationContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NotificationContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NotificationContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_email_operations.py deleted file mode 100644 index 83a608e8a985..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_email_operations.py +++ /dev/null @@ -1,567 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_notification_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_entity_exists_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - email: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "email": _SERIALIZER.url("email", email, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - email: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "email": _SERIALIZER.url("email", email, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - email: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "email": _SERIALIZER.url("email", email, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceNotificationRecipientEmailOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_notification_recipient_email` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_notification( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - **kwargs: Any - ) -> _models.RecipientEmailCollection: - """Gets the list of the Notification Recipient Emails subscribed to a notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :return: RecipientEmailCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientEmailCollection] = kwargs.pop("cls", None) - - _request = build_list_by_notification_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientEmailCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def check_entity_exists( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - email: str, - **kwargs: Any - ) -> bool: - """Determine if Notification Recipient Email subscribed to the notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. Required. - :type email: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - email=email, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - email: str, - **kwargs: Any - ) -> _models.RecipientEmailContract: - """Adds the Email address to the list of Recipients for the Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. Required. - :type email: str - :return: RecipientEmailContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientEmailContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - email=email, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientEmailContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - email: str, - **kwargs: Any - ) -> None: - """Removes the email from the list of Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. Required. - :type email: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - email=email, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_user_operations.py deleted file mode 100644 index 6ef4c356a599..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_notification_recipient_user_operations.py +++ /dev/null @@ -1,570 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_notification_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_entity_exists_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "notificationName": _SERIALIZER.url("notification_name", notification_name, "str"), - "userId": _SERIALIZER.url("user_id", user_id, "str", max_length=80, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceNotificationRecipientUserOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_notification_recipient_user` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_notification( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - **kwargs: Any - ) -> _models.RecipientUserCollection: - """Gets the list of the Notification Recipient User subscribed to the notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :return: RecipientUserCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientUserCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientUserCollection] = kwargs.pop("cls", None) - - _request = build_list_by_notification_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientUserCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def check_entity_exists( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - **kwargs: Any - ) -> bool: - """Determine if the Notification Recipient User is subscribed to the notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_check_entity_exists_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - **kwargs: Any - ) -> _models.RecipientUserContract: - """Adds the API Management User to the list of Recipients for the Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: RecipientUserContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.RecipientUserContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RecipientUserContract] = kwargs.pop("cls", None) - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RecipientUserContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - notification_name: Union[str, _models.NotificationName], - user_id: str, - **kwargs: Any - ) -> None: - """Removes the API Management user from the list of Notification. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param notification_name: Notification Name Identifier. Known values are: - "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", - "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", - "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required. - :type notification_name: str or ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API Management service instance. - Required. - :type user_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - notification_name=notification_name, - user_id=user_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_operations.py deleted file mode 100644 index a32073739632..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_operations.py +++ /dev/null @@ -1,983 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, workspace_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, workspace_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.WorkspaceContract"]: - """Lists all workspaces of the API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| displayName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |

| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either WorkspaceContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.WorkspaceContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WorkspaceCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("WorkspaceCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag(self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any) -> bool: - """Gets the entity state (Etag) version of the workspace specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any - ) -> _models.WorkspaceContract: - """Gets the details of the workspace specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WorkspaceContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WorkspaceContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - parameters: _models.WorkspaceContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WorkspaceContract: - """Creates a new workspace or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WorkspaceContract: - """Creates a new workspace or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - parameters: Union[_models.WorkspaceContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.WorkspaceContract: - """Creates a new workspace or updates an existing one. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param parameters: Create parameters. Is either a WorkspaceContract type or a IO[bytes] type. - Required. - :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.WorkspaceContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "WorkspaceContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WorkspaceContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - if_match: str, - parameters: _models.WorkspaceContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WorkspaceContract: - """Updates the details of the workspace specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Workspace Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.WorkspaceContract: - """Updates the details of the workspace specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Workspace Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - if_match: str, - parameters: Union[_models.WorkspaceContract, IO[bytes]], - **kwargs: Any - ) -> _models.WorkspaceContract: - """Updates the details of the workspace specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Workspace Update parameters. Is either a WorkspaceContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.WorkspaceContract or IO[bytes] - :return: WorkspaceContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.WorkspaceContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.WorkspaceContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "WorkspaceContract") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("WorkspaceContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, workspace_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_fragment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_fragment_operations.py deleted file mode 100644 index b82fca6cfbf3..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_fragment_operations.py +++ /dev/null @@ -1,1054 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - orderby: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if orderby is not None: - _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, workspace_id: str, id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "id": _SERIALIZER.url("id", id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - subscription_id: str, - *, - format: Optional[Union[str, _models.PolicyFragmentContentFormat]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "id": _SERIALIZER.url("id", id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if format is not None: - _params["format"] = _SERIALIZER.query("format", format, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "id": _SERIALIZER.url("id", id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "id": _SERIALIZER.url("id", id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_references_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - subscription_id: str, - *, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}/listReferences", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "id": _SERIALIZER.url("id", id, "str", max_length=80, min_length=1, pattern=r"(^[\w]+$)|(^[\w][\w\-]+[\w]$)"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspacePolicyFragmentOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_policy_fragment` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - orderby: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.PolicyFragmentContract"]: - """Gets all policy fragments defined within a workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param orderby: OData order by query option. Default value is None. - :type orderby: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either PolicyFragmentContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyFragmentCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - orderby=orderby, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyFragmentCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - id=id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - format: Optional[Union[str, _models.PolicyFragmentContentFormat]] = None, - **kwargs: Any - ) -> _models.PolicyFragmentContract: - """Gets a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :param format: Policy fragment content format. Known values are: "xml" and "rawxml". Default - value is None. - :type format: str or ~azure.mgmt.apimanagement.models.PolicyFragmentContentFormat - :return: PolicyFragmentContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyFragmentContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - id=id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyFragmentContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - parameters: Union[_models.PolicyFragmentContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyFragmentContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - id=id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - parameters: _models.PolicyFragmentContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PolicyFragmentContract]: - """Creates or updates a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :param parameters: The policy fragment contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PolicyFragmentContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PolicyFragmentContract]: - """Creates or updates a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :param parameters: The policy fragment contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PolicyFragmentContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - parameters: Union[_models.PolicyFragmentContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.PolicyFragmentContract]: - """Creates or updates a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :param parameters: The policy fragment contents to apply. Is either a PolicyFragmentContract - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyFragmentContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: An instance of LROPoller that returns either PolicyFragmentContract or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.PolicyFragmentContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyFragmentContract] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - id=id, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("PolicyFragmentContract", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.PolicyFragmentContract].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.PolicyFragmentContract]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, workspace_id: str, id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes a policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - id=id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_references( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - id: str, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> _models.ResourceCollection: - """Lists policy resources that reference the policy fragment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param id: A resource identifier. Required. - :type id: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: ResourceCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ResourceCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourceCollection] = kwargs.pop("cls", None) - - _request = build_list_references_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - id=id, - subscription_id=self._config.subscription_id, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ResourceCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_operations.py deleted file mode 100644 index 25b010e2fdad..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_policy_operations.py +++ /dev/null @@ -1,804 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_api_request( - resource_group_name: str, service_name: str, workspace_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if format is not None: - _params["format"] = _SERIALIZER.query("format", format, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspacePolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_api( - self, resource_group_name: str, service_name: str, workspace_id: str, **kwargs: Any - ) -> ItemPaged["_models.PolicyContract"]: - """Get the policy configuration at the workspace level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :return: An iterator like instance of either PolicyContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.PolicyContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_api_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PolicyCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the workspace policy specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the API level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the workspace. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_api_link_operations.py deleted file mode 100644 index 0d8f4d19906d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_api_link_operations.py +++ /dev/null @@ -1,726 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - api_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "apiLinkId": _SERIALIZER.url( - "api_link_id", api_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - api_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "apiLinkId": _SERIALIZER.url( - "api_link_id", api_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - api_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "apiLinkId": _SERIALIZER.url( - "api_link_id", api_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceProductApiLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_product_api_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ProductApiLinkContract"]: - """Lists a collection of the API links associated with a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| apiId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ProductApiLinkContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductApiLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductApiLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ProductApiLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - api_link_id: str, - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Gets the API link for the product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - api_link_id: str, - parameters: _models.ProductApiLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Adds an API to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - api_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Adds an API to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - api_link_id: str, - parameters: Union[_models.ProductApiLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.ProductApiLinkContract: - """Adds an API to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Is either a ProductApiLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductApiLinkContract or IO[bytes] - :return: ProductApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductApiLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductApiLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ProductApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - api_link_id: str, - **kwargs: Any - ) -> None: - """Deletes the specified API from the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param api_link_id: Product-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_group_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_group_link_operations.py deleted file mode 100644 index b6f9feb091d1..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_group_link_operations.py +++ /dev/null @@ -1,726 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - group_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "groupLinkId": _SERIALIZER.url( - "group_link_id", group_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - group_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "groupLinkId": _SERIALIZER.url( - "group_link_id", group_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - group_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "groupLinkId": _SERIALIZER.url( - "group_link_id", group_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceProductGroupLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_product_group_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.ProductGroupLinkContract"]: - """Lists a collection of the group links associated with a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| groupId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either ProductGroupLinkContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductGroupLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductGroupLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ProductGroupLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - group_link_id: str, - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Gets the group link for the product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - group_link_id=group_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductGroupLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - group_link_id: str, - parameters: _models.ProductGroupLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Adds a group to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - group_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Adds a group to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - group_link_id: str, - parameters: Union[_models.ProductGroupLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.ProductGroupLinkContract: - """Adds a group to the specified product via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :param parameters: Create or update parameters. Is either a ProductGroupLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract or IO[bytes] - :return: ProductGroupLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductGroupLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductGroupLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductGroupLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - group_link_id=group_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ProductGroupLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - group_link_id: str, - **kwargs: Any - ) -> None: - """Deletes the specified group from the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param group_link_id: Product-Group link identifier. Must be unique in the current API - Management service instance. Required. - :type group_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - group_link_id=group_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_operations.py deleted file mode 100644 index 0763d920173d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_operations.py +++ /dev/null @@ -1,1072 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - expand_groups: Optional[bool] = None, - tags: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if expand_groups is not None: - _params["expandGroups"] = _SERIALIZER.query("expand_groups", expand_groups, "bool") - if tags is not None: - _params["tags"] = _SERIALIZER.query("tags", tags, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, workspace_id: str, product_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, workspace_id: str, product_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - subscription_id: str, - *, - if_match: str, - delete_subscriptions: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if delete_subscriptions is not None: - _params["deleteSubscriptions"] = _SERIALIZER.query("delete_subscriptions", delete_subscriptions, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceProductOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_product` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - expand_groups: Optional[bool] = None, - tags: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.ProductContract"]: - """Lists a collection of products in the specified workspace in a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| state | filter | eq | |
| groups | expand | | |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param expand_groups: When set to true, the response contains an array of groups that have - visibility to the product. The default is false. Default value is None. - :type expand_groups: bool - :param tags: Products which are part of a specific tag. Default value is None. - :type tags: str - :return: An iterator like instance of either ProductContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.ProductContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - expand_groups=expand_groups, - tags=tags, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ProductCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, product_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, product_id: str, **kwargs: Any - ) -> _models.ProductContract: - """Gets the details of the product specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - parameters: _models.ProductContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Creates or Updates a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Creates or Updates a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - parameters: Union[_models.ProductContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ProductContract: - """Creates or Updates a product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param parameters: Create or update parameters. Is either a ProductContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - if_match: str, - parameters: _models.ProductUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Update existing product details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ProductContract: - """Update existing product details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - if_match: str, - parameters: Union[_models.ProductUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.ProductContract: - """Update existing product details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a ProductUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.ProductUpdateParameters or IO[bytes] - :return: ProductContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.ProductContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ProductContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ProductUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("ProductContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - if_match: str, - delete_subscriptions: Optional[bool] = None, - **kwargs: Any - ) -> None: - """Delete product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param delete_subscriptions: Delete existing subscriptions associated with the product or not. - Default value is None. - :type delete_subscriptions: bool - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - delete_subscriptions=delete_subscriptions, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_policy_operations.py deleted file mode 100644 index 46dc74e9bced..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_product_policy_operations.py +++ /dev/null @@ -1,817 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, service_name: str, workspace_id: str, product_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if format is not None: - _params["format"] = _SERIALIZER.query("format", format, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "productId": _SERIALIZER.url("product_id", product_id, "str", max_length=256, min_length=1), - "policyId": _SERIALIZER.url("policy_id", policy_id, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceProductPolicyOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_product_policy` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, resource_group_name: str, service_name: str, workspace_id: str, product_id: str, **kwargs: Any - ) -> _models.PolicyCollection: - """Get the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :return: PolicyCollection or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PolicyCollection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_entity_tag( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - **kwargs: Any - ) -> bool: - """Get the ETag of the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - format: Union[str, _models.PolicyExportFormat] = "xml", - **kwargs: Any - ) -> _models.PolicyContract: - """Get the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param format: Policy Export Format. Known values are: "xml" and "rawxml". Default value is - "xml". - :type format: str or ~azure.mgmt.apimanagement.models.PolicyExportFormat - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - format=format, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: _models.PolicyContract, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - parameters: Union[_models.PolicyContract, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.PolicyContract: - """Creates or updates policy configuration for the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param parameters: The policy contents to apply. Is either a PolicyContract type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.PolicyContract or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: PolicyContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PolicyContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PolicyContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("PolicyContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - product_id: str, - policy_id: Union[str, _models.PolicyIdName], - if_match: str, - **kwargs: Any - ) -> None: - """Deletes the policy configuration at the Product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param product_id: Product identifier. Must be unique in the current API Management service - instance. Required. - :type product_id: str - :param policy_id: The identifier of the Policy. "policy" Required. - :type policy_id: str or ~azure.mgmt.apimanagement.models.PolicyIdName - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - product_id=product_id, - policy_id=policy_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_subscription_operations.py deleted file mode 100644 index 09e1c8fea60a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_subscription_operations.py +++ /dev/null @@ -1,1472 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_tag_request( - resource_group_name: str, service_name: str, workspace_id: str, sid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, workspace_id: str, sid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - subscription_id: str, - *, - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if notify is not None: - _params["notify"] = _SERIALIZER.query("notify", notify, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if app_type is not None: - _params["appType"] = _SERIALIZER.query("app_type", app_type, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - subscription_id: str, - *, - if_match: str, - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if notify is not None: - _params["notify"] = _SERIALIZER.query("notify", notify, "bool") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if app_type is not None: - _params["appType"] = _SERIALIZER.query("app_type", app_type, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_regenerate_primary_key_request( - resource_group_name: str, service_name: str, workspace_id: str, sid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/regeneratePrimaryKey", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_regenerate_secondary_key_request( - resource_group_name: str, service_name: str, workspace_id: str, sid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/regenerateSecondaryKey", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_secrets_request( - resource_group_name: str, service_name: str, workspace_id: str, sid: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/listSecrets", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "sid": _SERIALIZER.url("sid", sid, "str", max_length=256, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceSubscriptionOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_subscription` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.SubscriptionContract"]: - """Lists all subscriptions of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| state | filter | eq | |
| user | expand | | - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either SubscriptionContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SubscriptionCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_tag( - self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any - ) -> bool: - """Gets the entity state (Etag) version of the apimanagement subscription specified by its - identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_tag_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any - ) -> _models.SubscriptionContract: - """Gets the specified Subscription entity. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - parameters: _models.SubscriptionCreateParameters, - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Creates or updates the subscription of specified user to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - parameters: IO[bytes], - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Creates or updates the subscription of specified user to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - parameters: Union[_models.SubscriptionCreateParameters, IO[bytes]], - notify: Optional[bool] = None, - if_match: Optional[str] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> _models.SubscriptionContract: - """Creates or updates the subscription of specified user to the specified product. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param parameters: Create parameters. Is either a SubscriptionCreateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters or IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SubscriptionCreateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - notify=notify, - if_match=if_match, - app_type=app_type, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - if_match: str, - parameters: _models.SubscriptionUpdateParameters, - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Updates the details of a subscription specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - if_match: str, - parameters: IO[bytes], - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.SubscriptionContract: - """Updates the details of a subscription specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - sid: str, - if_match: str, - parameters: Union[_models.SubscriptionUpdateParameters, IO[bytes]], - notify: Optional[bool] = None, - app_type: Optional[Union[str, _models.AppType]] = None, - **kwargs: Any - ) -> _models.SubscriptionContract: - """Updates the details of a subscription specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a SubscriptionUpdateParameters type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters or IO[bytes] - :param notify: Notify change in Subscription State. - - - * If false, do not send any email notification for change of state of subscription - * If true, send email notification of change of state of subscription. Default value is None. - :type notify: bool - :param app_type: Determines the type of application which send the create user request. Default - is legacy publisher portal. Known values are: "portal" and "developerPortal". Default value is - None. - :type app_type: str or ~azure.mgmt.apimanagement.models.AppType - :return: SubscriptionContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SubscriptionContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SubscriptionUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - if_match=if_match, - notify=notify, - app_type=app_type, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes the specified subscription. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def regenerate_primary_key( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any - ) -> None: - """Regenerates primary key of existing subscription of the workspace in an API Management service - instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_primary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def regenerate_secondary_key( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any - ) -> None: - """Regenerates secondary key of existing subscription of the workspace in an API Management - service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_regenerate_secondary_key_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_secrets( - self, resource_group_name: str, service_name: str, workspace_id: str, sid: str, **kwargs: Any - ) -> _models.SubscriptionKeysContract: - """Gets the specified Subscription keys. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param sid: Subscription entity Identifier. The entity represents the association between a - user and a product in API Management. Required. - :type sid: str - :return: SubscriptionKeysContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionKeysContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SubscriptionKeysContract] = kwargs.pop("cls", None) - - _request = build_list_secrets_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - sid=sid, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("SubscriptionKeysContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_api_link_operations.py deleted file mode 100644 index 776ed820a6be..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_api_link_operations.py +++ /dev/null @@ -1,725 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - api_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "apiLinkId": _SERIALIZER.url( - "api_link_id", api_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - api_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "apiLinkId": _SERIALIZER.url( - "api_link_id", api_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - api_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "apiLinkId": _SERIALIZER.url( - "api_link_id", api_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceTagApiLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_tag_api_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagApiLinkContract"]: - """Lists a collection of the API links associated with a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| apiId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagApiLinkContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagApiLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagApiLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagApiLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - api_link_id: str, - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Gets the API link for the tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - api_link_id: str, - parameters: _models.TagApiLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Adds an API to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - api_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Adds an API to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - api_link_id: str, - parameters: Union[_models.TagApiLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.TagApiLinkContract: - """Adds an API to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :param parameters: Create or update parameters. Is either a TagApiLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagApiLinkContract or IO[bytes] - :return: TagApiLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagApiLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagApiLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagApiLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagApiLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - api_link_id: str, - **kwargs: Any - ) -> None: - """Deletes the specified API from the specified tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param api_link_id: Tag-API link identifier. Must be unique in the current API Management - service instance. Required. - :type api_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - api_link_id=api_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operation_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operation_link_operations.py deleted file mode 100644 index 0afa8a09601f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operation_link_operations.py +++ /dev/null @@ -1,726 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - operation_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationLinkId": _SERIALIZER.url( - "operation_link_id", operation_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - operation_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationLinkId": _SERIALIZER.url( - "operation_link_id", operation_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - operation_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "operationLinkId": _SERIALIZER.url( - "operation_link_id", operation_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceTagOperationLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_tag_operation_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagOperationLinkContract"]: - """Lists a collection of the operation links associated with a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| operationId - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagOperationLinkContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagOperationLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagOperationLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagOperationLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - operation_link_id: str, - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Gets the operation link for the tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - operation_link_id=operation_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagOperationLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - operation_link_id: str, - parameters: _models.TagOperationLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Adds an operation to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - operation_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Adds an operation to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - operation_link_id: str, - parameters: Union[_models.TagOperationLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.TagOperationLinkContract: - """Adds an operation to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :param parameters: Create or update parameters. Is either a TagOperationLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagOperationLinkContract or IO[bytes] - :return: TagOperationLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagOperationLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagOperationLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagOperationLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - operation_link_id=operation_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagOperationLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - operation_link_id: str, - **kwargs: Any - ) -> None: - """Deletes the specified operation from the specified tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param operation_link_id: Tag-operation link identifier. Must be unique in the current API - Management service instance. Required. - :type operation_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - operation_link_id=operation_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operations.py deleted file mode 100644 index 9d06e078d263..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_operations.py +++ /dev/null @@ -1,1047 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_service_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - scope: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - if scope is not None: - _params["scope"] = _SERIALIZER.query("scope", scope, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_entity_state_request( - resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceTagOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_tag` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_service( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - scope: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagContract"]: - """Lists a collection of tags defined within a workspace in a service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| name | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
. Default value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :param scope: Scope like 'apis', 'products' or 'apis/{apiId}. Default value is None. - :type scope: str - :return: An iterator like instance of either TagContract or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_service_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_entity_state( - self, resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, **kwargs: Any - ) -> bool: - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: bool or the result of cls(response) - :rtype: bool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_entity_state_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore - return 200 <= response.status_code <= 299 - - @distributed_trace - def get( - self, resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, **kwargs: Any - ) -> _models.TagContract: - """Gets the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - parameters: _models.TagCreateUpdateParameters, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Creates a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param parameters: Create parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Creates a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param parameters: Create parameters. Required. - :type parameters: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - parameters: Union[_models.TagCreateUpdateParameters, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.TagContract: - """Creates a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param parameters: Create parameters. Is either a TagCreateUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity, but required when - updating an entity. Default value is None. - :type if_match: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagCreateUpdateParameters") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - if_match: str, - parameters: _models.TagCreateUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Updates the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - if_match: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagContract: - """Updates the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - if_match: str, - parameters: Union[_models.TagCreateUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.TagContract: - """Updates the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :param parameters: Update parameters. Is either a TagCreateUpdateParameters type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagCreateUpdateParameters or IO[bytes] - :return: TagContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagCreateUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, service_name: str, workspace_id: str, tag_id: str, if_match: str, **kwargs: Any - ) -> None: - """Deletes specific tag of the workspace in an API Management service instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current entity state from the header - response of the GET request or it should be * for unconditional update. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_product_link_operations.py deleted file mode 100644 index f3b8bf7d0a91..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_workspace_tag_product_link_operations.py +++ /dev/null @@ -1,726 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ApiManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_product_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", minimum=1) - if skip is not None: - _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - product_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "productLinkId": _SERIALIZER.url( - "product_link_id", product_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - product_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "productLinkId": _SERIALIZER.url( - "product_link_id", product_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - product_link_id: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "serviceName": _SERIALIZER.url( - "service_name", - service_name, - "str", - max_length=50, - min_length=1, - pattern=r"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", - ), - "workspaceId": _SERIALIZER.url( - "workspace_id", workspace_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "tagId": _SERIALIZER.url("tag_id", tag_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$"), - "productLinkId": _SERIALIZER.url( - "product_link_id", product_link_id, "str", max_length=80, min_length=1, pattern=r"^[^*#&+:<>?]+$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class WorkspaceTagProductLinkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.apimanagement.ApiManagementClient`'s - :attr:`workspace_tag_product_link` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ApiManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_product( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - filter: Optional[str] = None, - top: Optional[int] = None, - skip: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.TagProductLinkContract"]: - """Lists a collection of the product links associated with a tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param filter: | Field | Usage | Supported operators | Supported - functions |
|-------------|-------------|-------------|-------------|
| productId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
. Default - value is None. - :type filter: str - :param top: Number of records to return. Default value is None. - :type top: int - :param skip: Number of records to skip. Default value is None. - :type skip: int - :return: An iterator like instance of either TagProductLinkContract or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.apimanagement.models.TagProductLinkContract] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagProductLinkCollection] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_product_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - subscription_id=self._config.subscription_id, - filter=filter, - top=top, - skip=skip, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TagProductLinkCollection", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - product_link_id: str, - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Gets the product link for the tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - product_link_id=product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["ETag"] = self._deserialize("str", response.headers.get("ETag")) - - deserialized = self._deserialize("TagProductLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - product_link_id: str, - parameters: _models.TagProductLinkContract, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Adds a product to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - product_link_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Adds a product to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :param parameters: Create or update parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - product_link_id: str, - parameters: Union[_models.TagProductLinkContract, IO[bytes]], - **kwargs: Any - ) -> _models.TagProductLinkContract: - """Adds a product to the specified tag via link. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :param parameters: Create or update parameters. Is either a TagProductLinkContract type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.apimanagement.models.TagProductLinkContract or IO[bytes] - :return: TagProductLinkContract or the result of cls(response) - :rtype: ~azure.mgmt.apimanagement.models.TagProductLinkContract - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TagProductLinkContract] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagProductLinkContract") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - product_link_id=product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TagProductLinkContract", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - service_name: str, - workspace_id: str, - tag_id: str, - product_link_id: str, - **kwargs: Any - ) -> None: - """Deletes the specified product from the specified tag. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param service_name: The name of the API Management service. Required. - :type service_name: str - :param workspace_id: Workspace identifier. Must be unique in the current API Management service - instance. Required. - :type workspace_id: str - :param tag_id: Tag identifier. Must be unique in the current API Management service instance. - Required. - :type tag_id: str - :param product_link_id: Tag-product link identifier. Must be unique in the current API - Management service instance. Required. - :type product_link_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - service_name=service_name, - workspace_id=workspace_id, - tag_id=tag_id, - product_link_id=product_link_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/code_report_typespec.json b/sdk/apimanagement/azure-mgmt-apimanagement/code_report_typespec.json new file mode 100644 index 000000000000..658c77d10705 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/code_report_typespec.json @@ -0,0 +1,192296 @@ +{ + "azure.mgmt.apimanagement": { + "class_nodes": { + "ApiManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_perform_connectivity_check_async": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "type": "ConnectivityCheckRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "workspace_api": { + "attr_type": "WorkspaceApiOperations" + }, + "workspace_api_release": { + "attr_type": "WorkspaceApiReleaseOperations" + }, + "workspace_api_operation": { + "attr_type": "WorkspaceApiOperationOperations" + }, + "graph_ql_api_resolver_policy": { + "attr_type": "GraphQLApiResolverPolicyOperations" + }, + "api_policy": { + "attr_type": "ApiPolicyOperations" + }, + "policy": { + "attr_type": "PolicyOperations" + }, + "product_policy": { + "attr_type": "ProductPolicyOperations" + }, + "workspace_policy": { + "attr_type": "WorkspacePolicyOperations" + }, + "workspace_api_operation_policy": { + "attr_type": "WorkspaceApiOperationPolicyOperations" + }, + "workspace_api_policy": { + "attr_type": "WorkspaceApiPolicyOperations" + }, + "workspace_product_policy": { + "attr_type": "WorkspaceProductPolicyOperations" + }, + "tag": { + "attr_type": "TagOperations" + }, + "workspace_tag": { + "attr_type": "WorkspaceTagOperations" + }, + "workspace_api_schema": { + "attr_type": "WorkspaceApiSchemaOperations" + }, + "diagnostic": { + "attr_type": "DiagnosticOperations" + }, + "workspace_diagnostic": { + "attr_type": "WorkspaceDiagnosticOperations" + }, + "workspace_api_diagnostic": { + "attr_type": "WorkspaceApiDiagnosticOperations" + }, + "issue": { + "attr_type": "IssueOperations" + }, + "product_wiki": { + "attr_type": "ProductWikiOperations" + }, + "workspace_api_version_set": { + "attr_type": "WorkspaceApiVersionSetOperations" + }, + "workspace_backend": { + "attr_type": "WorkspaceBackendOperations" + }, + "workspace_certificate": { + "attr_type": "WorkspaceCertificateOperations" + }, + "workspace_group": { + "attr_type": "WorkspaceGroupOperations" + }, + "workspace_logger": { + "attr_type": "WorkspaceLoggerOperations" + }, + "workspace_named_value": { + "attr_type": "WorkspaceNamedValueOperations" + }, + "workspace_notification": { + "attr_type": "WorkspaceNotificationOperations" + }, + "workspace_policy_fragment": { + "attr_type": "WorkspacePolicyFragmentOperations" + }, + "sign_in_settings": { + "attr_type": "SignInSettingsOperations" + }, + "sign_up_settings": { + "attr_type": "SignUpSettingsOperations" + }, + "delegation_settings": { + "attr_type": "DelegationSettingsOperations" + }, + "workspace_product": { + "attr_type": "WorkspaceProductOperations" + }, + "workspace_product_api_link": { + "attr_type": "WorkspaceProductApiLinkOperations" + }, + "workspace_product_group_link": { + "attr_type": "WorkspaceProductGroupLinkOperations" + }, + "workspace_global_schema": { + "attr_type": "WorkspaceGlobalSchemaOperations" + }, + "user_subscription": { + "attr_type": "UserSubscriptionOperations" + }, + "workspace_subscription": { + "attr_type": "WorkspaceSubscriptionOperations" + }, + "workspace_tag_api_link": { + "attr_type": "WorkspaceTagApiLinkOperations" + }, + "workspace_tag_operation_link": { + "attr_type": "WorkspaceTagOperationLinkOperations" + }, + "workspace_tag_product_link": { + "attr_type": "WorkspaceTagProductLinkOperations" + }, + "api_management_operations": { + "attr_type": "ApiManagementOperationsOperations" + }, + "api_gateway": { + "attr_type": "ApiGatewayOperations" + }, + "api_management_gateway_skus": { + "attr_type": "ApiManagementGatewaySkusOperations" + }, + "api": { + "attr_type": "ApiOperations" + }, + "api_revision": { + "attr_type": "ApiRevisionOperations" + }, + "api_product": { + "attr_type": "ApiProductOperations" + }, + "operation": { + "attr_type": "OperationOperations" + }, + "workspace_api_revision": { + "attr_type": "WorkspaceApiRevisionOperations" + }, + "api_management_service": { + "attr_type": "ApiManagementServiceOperations" + }, + "all_policies": { + "attr_type": "AllPoliciesOperations" + }, + "api_management_service_skus": { + "attr_type": "ApiManagementServiceSkusOperations" + }, + "network_status": { + "attr_type": "NetworkStatusOperations" + }, + "outbound_network_dependencies_endpoints": { + "attr_type": "OutboundNetworkDependenciesEndpointsOperations" + }, + "policy_description": { + "attr_type": "PolicyDescriptionOperations" + }, + "policy_restriction_validations": { + "attr_type": "PolicyRestrictionValidationsOperations" + }, + "portal_settings": { + "attr_type": "PortalSettingsOperations" + }, + "product": { + "attr_type": "ProductOperations" + }, + "quota_by_counter_keys": { + "attr_type": "QuotaByCounterKeysOperations" + }, + "quota_by_period_keys": { + "attr_type": "QuotaByPeriodKeysOperations" + }, + "region": { + "attr_type": "RegionOperations" + }, + "reports": { + "attr_type": "ReportsOperations" + }, + "tag_resource": { + "attr_type": "TagResourceOperations" + }, + "api_release": { + "attr_type": "ApiReleaseOperations" + }, + "api_operation": { + "attr_type": "ApiOperationOperations" + }, + "api_operation_policy": { + "attr_type": "ApiOperationPolicyOperations" + }, + "graph_ql_api_resolver": { + "attr_type": "GraphQLApiResolverOperations" + }, + "api_schema": { + "attr_type": "ApiSchemaOperations" + }, + "api_diagnostic": { + "attr_type": "ApiDiagnosticOperations" + }, + "api_issue": { + "attr_type": "ApiIssueOperations" + }, + "api_issue_comment": { + "attr_type": "ApiIssueCommentOperations" + }, + "api_issue_attachment": { + "attr_type": "ApiIssueAttachmentOperations" + }, + "api_tag_description": { + "attr_type": "ApiTagDescriptionOperations" + }, + "api_wiki": { + "attr_type": "ApiWikiOperations" + }, + "api_wikis": { + "attr_type": "ApiWikisOperations" + }, + "product_wikis": { + "attr_type": "ProductWikisOperations" + }, + "api_tool": { + "attr_type": "ApiToolOperations" + }, + "api_version_set": { + "attr_type": "ApiVersionSetOperations" + }, + "authorization_provider": { + "attr_type": "AuthorizationProviderOperations" + }, + "authorization": { + "attr_type": "AuthorizationOperations" + }, + "authorization_login_links": { + "attr_type": "AuthorizationLoginLinksOperations" + }, + "authorization_access_policy": { + "attr_type": "AuthorizationAccessPolicyOperations" + }, + "authorization_server": { + "attr_type": "AuthorizationServerOperations" + }, + "backend": { + "attr_type": "BackendOperations" + }, + "cache": { + "attr_type": "CacheOperations" + }, + "certificate": { + "attr_type": "CertificateOperations" + }, + "content_type": { + "attr_type": "ContentTypeOperations" + }, + "content_item": { + "attr_type": "ContentItemOperations" + }, + "deleted_services": { + "attr_type": "DeletedServicesOperations" + }, + "documentation": { + "attr_type": "DocumentationOperations" + }, + "email_template": { + "attr_type": "EmailTemplateOperations" + }, + "api_gateway_config_connection": { + "attr_type": "ApiGatewayConfigConnectionOperations" + }, + "api_gateway_hostname_binding": { + "attr_type": "ApiGatewayHostnameBindingOperations" + }, + "gateway": { + "attr_type": "GatewayOperations" + }, + "gateway_api": { + "attr_type": "GatewayApiOperations" + }, + "gateway_hostname_configuration": { + "attr_type": "GatewayHostnameConfigurationOperations" + }, + "gateway_certificate_authority": { + "attr_type": "GatewayCertificateAuthorityOperations" + }, + "group": { + "attr_type": "GroupOperations" + }, + "group_user": { + "attr_type": "GroupUserOperations" + }, + "workspace_group_user": { + "attr_type": "WorkspaceGroupUserOperations" + }, + "identity_provider": { + "attr_type": "IdentityProviderOperations" + }, + "logger": { + "attr_type": "LoggerOperations" + }, + "named_value": { + "attr_type": "NamedValueOperations" + }, + "notification": { + "attr_type": "NotificationOperations" + }, + "notification_recipient_user": { + "attr_type": "NotificationRecipientUserOperations" + }, + "notification_recipient_email": { + "attr_type": "NotificationRecipientEmailOperations" + }, + "workspace_notification_recipient_user": { + "attr_type": "WorkspaceNotificationRecipientUserOperations" + }, + "workspace_notification_recipient_email": { + "attr_type": "WorkspaceNotificationRecipientEmailOperations" + }, + "open_id_connect_provider": { + "attr_type": "OpenIdConnectProviderOperations" + }, + "policy_fragment": { + "attr_type": "PolicyFragmentOperations" + }, + "policy_restriction": { + "attr_type": "PolicyRestrictionOperations" + }, + "portal_config": { + "attr_type": "PortalConfigOperations" + }, + "client_application": { + "attr_type": "ClientApplicationOperations" + }, + "client_application_product_link": { + "attr_type": "ClientApplicationProductLinkOperations" + }, + "portal_revision": { + "attr_type": "PortalRevisionOperations" + }, + "private_endpoint_connection": { + "attr_type": "PrivateEndpointConnectionOperations" + }, + "product_api": { + "attr_type": "ProductApiOperations" + }, + "product_group": { + "attr_type": "ProductGroupOperations" + }, + "product_subscriptions": { + "attr_type": "ProductSubscriptionsOperations" + }, + "product_api_link": { + "attr_type": "ProductApiLinkOperations" + }, + "product_group_link": { + "attr_type": "ProductGroupLinkOperations" + }, + "global_schema": { + "attr_type": "GlobalSchemaOperations" + }, + "tenant_settings": { + "attr_type": "TenantSettingsOperations" + }, + "subscription": { + "attr_type": "SubscriptionOperations" + }, + "tag_api_link": { + "attr_type": "TagApiLinkOperations" + }, + "tag_operation_link": { + "attr_type": "TagOperationLinkOperations" + }, + "tag_product_link": { + "attr_type": "TagProductLinkOperations" + }, + "tenant_access": { + "attr_type": "TenantAccessOperations" + }, + "tenant_access_git": { + "attr_type": "TenantAccessGitOperations" + }, + "tenant_configuration": { + "attr_type": "TenantConfigurationOperations" + }, + "user": { + "attr_type": "UserOperations" + }, + "user_group": { + "attr_type": "UserGroupOperations" + }, + "user_identities": { + "attr_type": "UserIdentitiesOperations" + }, + "user_confirmation_password": { + "attr_type": "UserConfirmationPasswordOperations" + }, + "api_management_workspace_link": { + "attr_type": "ApiManagementWorkspaceLinkOperations" + }, + "api_management_workspace_links": { + "attr_type": "ApiManagementWorkspaceLinksOperations" + }, + "workspace": { + "attr_type": "WorkspaceOperations" + }, + "api_export": { + "attr_type": "ApiExportOperations" + }, + "api_management_skus": { + "attr_type": "ApiManagementSkusOperations" + }, + "workspace_api_export": { + "attr_type": "WorkspaceApiExportOperations" + }, + "operation_status": { + "attr_type": "OperationStatusOperations" + }, + "operations_results": { + "attr_type": "OperationsResultsOperations" + }, + "url": { + "attr_type": "format_url" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.apimanagement.aio": { + "class_nodes": { + "ApiManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_perform_connectivity_check_async": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "type": "ConnectivityCheckRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "connectivity_check_request_params": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "workspace_api": { + "attr_type": "WorkspaceApiOperations" + }, + "workspace_api_release": { + "attr_type": "WorkspaceApiReleaseOperations" + }, + "workspace_api_operation": { + "attr_type": "WorkspaceApiOperationOperations" + }, + "graph_ql_api_resolver_policy": { + "attr_type": "GraphQLApiResolverPolicyOperations" + }, + "api_policy": { + "attr_type": "ApiPolicyOperations" + }, + "policy": { + "attr_type": "PolicyOperations" + }, + "product_policy": { + "attr_type": "ProductPolicyOperations" + }, + "workspace_policy": { + "attr_type": "WorkspacePolicyOperations" + }, + "workspace_api_operation_policy": { + "attr_type": "WorkspaceApiOperationPolicyOperations" + }, + "workspace_api_policy": { + "attr_type": "WorkspaceApiPolicyOperations" + }, + "workspace_product_policy": { + "attr_type": "WorkspaceProductPolicyOperations" + }, + "tag": { + "attr_type": "TagOperations" + }, + "workspace_tag": { + "attr_type": "WorkspaceTagOperations" + }, + "workspace_api_schema": { + "attr_type": "WorkspaceApiSchemaOperations" + }, + "diagnostic": { + "attr_type": "DiagnosticOperations" + }, + "workspace_diagnostic": { + "attr_type": "WorkspaceDiagnosticOperations" + }, + "workspace_api_diagnostic": { + "attr_type": "WorkspaceApiDiagnosticOperations" + }, + "issue": { + "attr_type": "IssueOperations" + }, + "product_wiki": { + "attr_type": "ProductWikiOperations" + }, + "workspace_api_version_set": { + "attr_type": "WorkspaceApiVersionSetOperations" + }, + "workspace_backend": { + "attr_type": "WorkspaceBackendOperations" + }, + "workspace_certificate": { + "attr_type": "WorkspaceCertificateOperations" + }, + "workspace_group": { + "attr_type": "WorkspaceGroupOperations" + }, + "workspace_logger": { + "attr_type": "WorkspaceLoggerOperations" + }, + "workspace_named_value": { + "attr_type": "WorkspaceNamedValueOperations" + }, + "workspace_notification": { + "attr_type": "WorkspaceNotificationOperations" + }, + "workspace_policy_fragment": { + "attr_type": "WorkspacePolicyFragmentOperations" + }, + "sign_in_settings": { + "attr_type": "SignInSettingsOperations" + }, + "sign_up_settings": { + "attr_type": "SignUpSettingsOperations" + }, + "delegation_settings": { + "attr_type": "DelegationSettingsOperations" + }, + "workspace_product": { + "attr_type": "WorkspaceProductOperations" + }, + "workspace_product_api_link": { + "attr_type": "WorkspaceProductApiLinkOperations" + }, + "workspace_product_group_link": { + "attr_type": "WorkspaceProductGroupLinkOperations" + }, + "workspace_global_schema": { + "attr_type": "WorkspaceGlobalSchemaOperations" + }, + "user_subscription": { + "attr_type": "UserSubscriptionOperations" + }, + "workspace_subscription": { + "attr_type": "WorkspaceSubscriptionOperations" + }, + "workspace_tag_api_link": { + "attr_type": "WorkspaceTagApiLinkOperations" + }, + "workspace_tag_operation_link": { + "attr_type": "WorkspaceTagOperationLinkOperations" + }, + "workspace_tag_product_link": { + "attr_type": "WorkspaceTagProductLinkOperations" + }, + "api_management_operations": { + "attr_type": "ApiManagementOperationsOperations" + }, + "api_gateway": { + "attr_type": "ApiGatewayOperations" + }, + "api_management_gateway_skus": { + "attr_type": "ApiManagementGatewaySkusOperations" + }, + "api": { + "attr_type": "ApiOperations" + }, + "api_revision": { + "attr_type": "ApiRevisionOperations" + }, + "api_product": { + "attr_type": "ApiProductOperations" + }, + "operation": { + "attr_type": "OperationOperations" + }, + "workspace_api_revision": { + "attr_type": "WorkspaceApiRevisionOperations" + }, + "api_management_service": { + "attr_type": "ApiManagementServiceOperations" + }, + "all_policies": { + "attr_type": "AllPoliciesOperations" + }, + "api_management_service_skus": { + "attr_type": "ApiManagementServiceSkusOperations" + }, + "network_status": { + "attr_type": "NetworkStatusOperations" + }, + "outbound_network_dependencies_endpoints": { + "attr_type": "OutboundNetworkDependenciesEndpointsOperations" + }, + "policy_description": { + "attr_type": "PolicyDescriptionOperations" + }, + "policy_restriction_validations": { + "attr_type": "PolicyRestrictionValidationsOperations" + }, + "portal_settings": { + "attr_type": "PortalSettingsOperations" + }, + "product": { + "attr_type": "ProductOperations" + }, + "quota_by_counter_keys": { + "attr_type": "QuotaByCounterKeysOperations" + }, + "quota_by_period_keys": { + "attr_type": "QuotaByPeriodKeysOperations" + }, + "region": { + "attr_type": "RegionOperations" + }, + "reports": { + "attr_type": "ReportsOperations" + }, + "tag_resource": { + "attr_type": "TagResourceOperations" + }, + "api_release": { + "attr_type": "ApiReleaseOperations" + }, + "api_operation": { + "attr_type": "ApiOperationOperations" + }, + "api_operation_policy": { + "attr_type": "ApiOperationPolicyOperations" + }, + "graph_ql_api_resolver": { + "attr_type": "GraphQLApiResolverOperations" + }, + "api_schema": { + "attr_type": "ApiSchemaOperations" + }, + "api_diagnostic": { + "attr_type": "ApiDiagnosticOperations" + }, + "api_issue": { + "attr_type": "ApiIssueOperations" + }, + "api_issue_comment": { + "attr_type": "ApiIssueCommentOperations" + }, + "api_issue_attachment": { + "attr_type": "ApiIssueAttachmentOperations" + }, + "api_tag_description": { + "attr_type": "ApiTagDescriptionOperations" + }, + "api_wiki": { + "attr_type": "ApiWikiOperations" + }, + "api_wikis": { + "attr_type": "ApiWikisOperations" + }, + "product_wikis": { + "attr_type": "ProductWikisOperations" + }, + "api_tool": { + "attr_type": "ApiToolOperations" + }, + "api_version_set": { + "attr_type": "ApiVersionSetOperations" + }, + "authorization_provider": { + "attr_type": "AuthorizationProviderOperations" + }, + "authorization": { + "attr_type": "AuthorizationOperations" + }, + "authorization_login_links": { + "attr_type": "AuthorizationLoginLinksOperations" + }, + "authorization_access_policy": { + "attr_type": "AuthorizationAccessPolicyOperations" + }, + "authorization_server": { + "attr_type": "AuthorizationServerOperations" + }, + "backend": { + "attr_type": "BackendOperations" + }, + "cache": { + "attr_type": "CacheOperations" + }, + "certificate": { + "attr_type": "CertificateOperations" + }, + "content_type": { + "attr_type": "ContentTypeOperations" + }, + "content_item": { + "attr_type": "ContentItemOperations" + }, + "deleted_services": { + "attr_type": "DeletedServicesOperations" + }, + "documentation": { + "attr_type": "DocumentationOperations" + }, + "email_template": { + "attr_type": "EmailTemplateOperations" + }, + "api_gateway_config_connection": { + "attr_type": "ApiGatewayConfigConnectionOperations" + }, + "api_gateway_hostname_binding": { + "attr_type": "ApiGatewayHostnameBindingOperations" + }, + "gateway": { + "attr_type": "GatewayOperations" + }, + "gateway_api": { + "attr_type": "GatewayApiOperations" + }, + "gateway_hostname_configuration": { + "attr_type": "GatewayHostnameConfigurationOperations" + }, + "gateway_certificate_authority": { + "attr_type": "GatewayCertificateAuthorityOperations" + }, + "group": { + "attr_type": "GroupOperations" + }, + "group_user": { + "attr_type": "GroupUserOperations" + }, + "workspace_group_user": { + "attr_type": "WorkspaceGroupUserOperations" + }, + "identity_provider": { + "attr_type": "IdentityProviderOperations" + }, + "logger": { + "attr_type": "LoggerOperations" + }, + "named_value": { + "attr_type": "NamedValueOperations" + }, + "notification": { + "attr_type": "NotificationOperations" + }, + "notification_recipient_user": { + "attr_type": "NotificationRecipientUserOperations" + }, + "notification_recipient_email": { + "attr_type": "NotificationRecipientEmailOperations" + }, + "workspace_notification_recipient_user": { + "attr_type": "WorkspaceNotificationRecipientUserOperations" + }, + "workspace_notification_recipient_email": { + "attr_type": "WorkspaceNotificationRecipientEmailOperations" + }, + "open_id_connect_provider": { + "attr_type": "OpenIdConnectProviderOperations" + }, + "policy_fragment": { + "attr_type": "PolicyFragmentOperations" + }, + "policy_restriction": { + "attr_type": "PolicyRestrictionOperations" + }, + "portal_config": { + "attr_type": "PortalConfigOperations" + }, + "client_application": { + "attr_type": "ClientApplicationOperations" + }, + "client_application_product_link": { + "attr_type": "ClientApplicationProductLinkOperations" + }, + "portal_revision": { + "attr_type": "PortalRevisionOperations" + }, + "private_endpoint_connection": { + "attr_type": "PrivateEndpointConnectionOperations" + }, + "product_api": { + "attr_type": "ProductApiOperations" + }, + "product_group": { + "attr_type": "ProductGroupOperations" + }, + "product_subscriptions": { + "attr_type": "ProductSubscriptionsOperations" + }, + "product_api_link": { + "attr_type": "ProductApiLinkOperations" + }, + "product_group_link": { + "attr_type": "ProductGroupLinkOperations" + }, + "global_schema": { + "attr_type": "GlobalSchemaOperations" + }, + "tenant_settings": { + "attr_type": "TenantSettingsOperations" + }, + "subscription": { + "attr_type": "SubscriptionOperations" + }, + "tag_api_link": { + "attr_type": "TagApiLinkOperations" + }, + "tag_operation_link": { + "attr_type": "TagOperationLinkOperations" + }, + "tag_product_link": { + "attr_type": "TagProductLinkOperations" + }, + "tenant_access": { + "attr_type": "TenantAccessOperations" + }, + "tenant_access_git": { + "attr_type": "TenantAccessGitOperations" + }, + "tenant_configuration": { + "attr_type": "TenantConfigurationOperations" + }, + "user": { + "attr_type": "UserOperations" + }, + "user_group": { + "attr_type": "UserGroupOperations" + }, + "user_identities": { + "attr_type": "UserIdentitiesOperations" + }, + "user_confirmation_password": { + "attr_type": "UserConfirmationPasswordOperations" + }, + "api_management_workspace_link": { + "attr_type": "ApiManagementWorkspaceLinkOperations" + }, + "api_management_workspace_links": { + "attr_type": "ApiManagementWorkspaceLinksOperations" + }, + "workspace": { + "attr_type": "WorkspaceOperations" + }, + "api_export": { + "attr_type": "ApiExportOperations" + }, + "api_management_skus": { + "attr_type": "ApiManagementSkusOperations" + }, + "workspace_api_export": { + "attr_type": "WorkspaceApiExportOperations" + }, + "operation_status": { + "attr_type": "OperationStatusOperations" + }, + "operations_results": { + "attr_type": "OperationsResultsOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.apimanagement.aio.operations": { + "class_nodes": { + "AllPoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiDiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiExportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": null, + "param_type": "keyword_only" + }, + "export": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ApiGatewayConfigConnectionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementGatewayConfigConnectionResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_gateway": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiGatewayHostnameBindingOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayHostnameBindingResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_gateway": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiGatewayOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementGatewayResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementGatewayUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiIssueAttachmentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueAttachmentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiIssueCommentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueCommentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiIssueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand_comments_attachments": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "expand_comments_attachments": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiManagementGatewaySkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_available_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementOperationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementServiceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_apply_network_configuration_updates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[ApiManagementServiceApplyNetworkConfigurationParameters]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_backup": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceBackupRestoreParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_migrate_to_stv2": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[MigrateToStv2Contract]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_refresh_hostnames": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_restore": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceBackupRestoreParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceCheckNameAvailabilityParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_domain_ownership_identifier": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_sso_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementServiceSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_available_service_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementWorkspaceLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementWorkspaceLinksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiOperationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiOperationPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiCreateOrUpdateParameter", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "delete_revisions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "expand_api_version_set": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_tags": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "include_not_tagged_apis": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ApiProductOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_apis": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiReleaseOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiRevisionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "force": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiTagDescriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagDescriptionCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiToolOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ToolContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ToolContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiVersionSetOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiWikiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiWikisOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationAccessPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationAccessPolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_authorization": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationLoginLinksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "post": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationLoginRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "AuthorizationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "confirm_consent_code": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationConfirmConsentCodeRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_authorization_provider": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationProviderOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationProviderContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationServerOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationServerContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationServerUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "BackendOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "reconnect": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[BackendReconnectContract]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "CacheOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CacheContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CacheUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "CertificateOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CertificateCreateOrUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ClientApplicationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClientApplicationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ClientApplicationProductLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClientApplicationProductLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_client_applications": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ContentItemOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ContentItemContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ContentTypeOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ContentTypeContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "DelegationSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalDelegationSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalDelegationSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "DeletedServicesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_purge": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_by_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "DiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "DocumentationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DocumentationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DocumentationUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "EmailTemplateOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "EmailTemplateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "EmailTemplateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GatewayApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[AssociationContract]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GatewayCertificateAuthorityOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayCertificateAuthorityContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GatewayHostnameConfigurationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayHostnameConfigurationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GatewayOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "generate_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayTokenRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "invalidate_debug_credentials": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_debug_credentials": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayListDebugCredentialsContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "list_keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_trace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayListTraceContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "regenerate_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayKeyRegenerationRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GlobalSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GlobalSchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GraphQLApiResolverOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ResolverContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ResolverUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GraphQLApiResolverPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_resolver": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GroupUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "IdentityProviderOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IdentityProviderCreateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IdentityProviderUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "IssueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "LoggerOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "NamedValueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueCreateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_value": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "NetworkStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_location": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "NotificationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "NotificationRecipientEmailOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "NotificationRecipientUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "OpenIdConnectProviderOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OpenidConnectProviderContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OpenidConnectProviderUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "OperationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_tags": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "include_not_tagged_operations": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "OperationStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "OperationsResultsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "OutboundNetworkDependenciesEndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyDescriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyFragmentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyFragmentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_references": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyRestrictionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyRestrictionContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyRestrictionUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "PolicyRestrictionValidationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "PortalConfigOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalConfigContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalConfigContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "PortalRevisionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalRevisionContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalRevisionContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PortalSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "PrivateEndpointConnectionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "type": "PrivateEndpointConnectionRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_by_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_private_link_resource": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_sub_resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_private_link_resources": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ProductApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductGroupLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductGroupLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductGroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "delete_subscriptions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "expand_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_tags": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "include_not_tagged_products": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ProductPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductSubscriptionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductWikiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ProductWikisOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "QuotaByCounterKeysOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QuotaCounterValueUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "QuotaByPeriodKeysOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QuotaCounterValueUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "RegionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ReportsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_geo": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_time": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "interval": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_user": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "SignInSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSigninSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSigninSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "SignUpSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSignupSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSignupSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "SubscriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "keyword_only" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "default": "none", + "param_type": "keyword_only" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TagApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TagOperationLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagOperationLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TagOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "assign_to_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "assign_to_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "assign_to_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "detach_from_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "detach_from_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "detach_from_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_state_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_state_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_state_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TagProductLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagProductLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TagResourceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TenantAccessGitOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "TenantAccessOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AccessInformationCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AccessInformationUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TenantConfigurationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_deploy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DeployConfigurationParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_save": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SaveConfigurationParameter", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_validate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DeployConfigurationParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get_sync_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "TenantSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "settings_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserConfirmationPasswordOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "send": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "UserGroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserIdentitiesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "delete_subscriptions": { + "default": "none", + "param_type": "keyword_only" + }, + "notify": { + "default": "none", + "param_type": "keyword_only" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "keyword_only" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UserCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "generate_sso_url": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_shared_access_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UserTokenParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "expand_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UserUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "UserSubscriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiDiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiExportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": null, + "param_type": "keyword_only" + }, + "export": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiOperationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiOperationPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiCreateOrUpdateParameter", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "delete_revisions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "expand_api_version_set": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiReleaseOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiRevisionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "force": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiVersionSetOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceBackendOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceCertificateOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CertificateCreateOrUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceDiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceGlobalSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GlobalSchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceGroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceGroupUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceLoggerOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceNamedValueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueCreateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_value": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceNotificationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceNotificationRecipientEmailOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceNotificationRecipientUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WorkspaceContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WorkspaceContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspacePolicyFragmentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyFragmentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_references": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspacePolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceProductApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceProductGroupLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductGroupLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceProductOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "delete_subscriptions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "expand_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceProductPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceSubscriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "keyword_only" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "default": "none", + "param_type": "keyword_only" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceTagApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceTagOperationLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagOperationLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceTagOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_entity_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceTagProductLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagProductLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.mgmt.apimanagement.models": { + "class_nodes": { + "AccessIdName": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCESS": "ACCESS", + "GIT_ACCESS": "GIT_ACCESS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AccessInformationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AccessInformationContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AccessInformationContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "principal_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "principal_id": "Optional", + "enabled": "Optional" + } + }, + "AccessInformationCreateParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "principal_id": "Optional", + "primary_key": "Optional", + "secondary_key": "Optional", + "enabled": "Optional" + } + }, + "AccessInformationCreateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AccessInformationCreateParameterProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "AccessInformationSecretsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "principal_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "principal_id": "Optional", + "primary_key": "Optional", + "secondary_key": "Optional", + "enabled": "Optional" + } + }, + "AccessInformationUpdateParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enabled": "Optional" + } + }, + "AccessInformationUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AccessInformationUpdateParameterProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "AccessType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCESS_KEY": "ACCESS_KEY", + "SYSTEM_ASSIGNED_MANAGED_IDENTITY": "SYSTEM_ASSIGNED_MANAGED_IDENTITY", + "USER_ASSIGNED_MANAGED_IDENTITY": "USER_ASSIGNED_MANAGED_IDENTITY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AdditionalLocation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "type": "_models.ApiManagementServiceSkuProperties", + "default": null, + "param_type": "keyword_only" + }, + "zones": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "public_ip_address_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "type": "Optional[_models.VirtualNetworkConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "nat_gateway_state": { + "type": "Optional[Union[str, _models.NatGatewayState]]", + "default": null, + "param_type": "keyword_only" + }, + "disable_gateway": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "location": null, + "sku": null, + "zones": "Optional", + "public_ip_addresses": "Optional", + "private_ip_addresses": "Optional", + "public_ip_address_id": "Optional", + "virtual_network_configuration": "Optional", + "gateway_regional_url": "Optional", + "nat_gateway_state": "Optional", + "outbound_public_ip_addresses": "Optional", + "disable_gateway": "Optional", + "platform_version": "Optional" + } + }, + "AllPoliciesContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AllPoliciesContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AllPoliciesContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reference_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "compliance_state": { + "type": "Optional[Union[str, _models.PolicyComplianceState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "reference_policy_id": "Optional", + "compliance_state": "Optional" + } + }, + "AlwaysLog": { + "type": "Enum", + "methods": {}, + "properties": { + "ALL_ERRORS": "ALL_ERRORS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApiContactInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "email": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "url": "Optional", + "email": "Optional" + } + }, + "ApiContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ApiContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ApiContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "path": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_settings": { + "type": "Optional[_models.AuthenticationSettingsContract]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "type": "Optional[_models.SubscriptionKeyParameterNamesContract]", + "default": null, + "param_type": "keyword_only" + }, + "api_type": { + "type": "Optional[Union[str, _models.ApiType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_current": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_set_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "contact": { + "type": "Optional[_models.ApiContactInformation]", + "default": null, + "param_type": "keyword_only" + }, + "license": { + "type": "Optional[_models.ApiLicenseInformation]", + "default": null, + "param_type": "keyword_only" + }, + "source_api_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "protocols": { + "type": "Optional[list[Union[str, _models.Protocol]]]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_set": { + "type": "Optional[_models.ApiVersionSetContractDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_settings": { + "type": "Optional[_models.AuthenticationSettingsContract]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "type": "Optional[_models.SubscriptionKeyParameterNamesContract]", + "default": null, + "param_type": "keyword_only" + }, + "api_type": { + "type": "Optional[Union[str, _models.ApiType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_current": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_set_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "contact": { + "type": "Optional[_models.ApiContactInformation]", + "default": null, + "param_type": "keyword_only" + }, + "license": { + "type": "Optional[_models.ApiLicenseInformation]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "source_api_id": "Optional", + "display_name": "Optional", + "service_url": "Optional", + "path": null, + "protocols": "Optional", + "api_version_set": "Optional", + "provisioning_state": "Optional", + "description": "Optional", + "authentication_settings": "Optional", + "subscription_key_parameter_names": "Optional", + "api_type": "Optional", + "api_revision": "Optional", + "api_version": "Optional", + "is_current": "Optional", + "is_online": "Optional", + "api_revision_description": "Optional", + "api_version_description": "Optional", + "api_version_set_id": "Optional", + "subscription_required": "Optional", + "terms_of_service_url": "Optional", + "contact": "Optional", + "license": "Optional" + } + }, + "ApiContractUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_settings": { + "type": "Optional[_models.AuthenticationSettingsContract]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "type": "Optional[_models.SubscriptionKeyParameterNamesContract]", + "default": null, + "param_type": "keyword_only" + }, + "api_type": { + "type": "Optional[Union[str, _models.ApiType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_current": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_set_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "contact": { + "type": "Optional[_models.ApiContactInformation]", + "default": null, + "param_type": "keyword_only" + }, + "license": { + "type": "Optional[_models.ApiLicenseInformation]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "protocols": { + "type": "Optional[list[Union[str, _models.Protocol]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_settings": { + "type": "Optional[_models.AuthenticationSettingsContract]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "type": "Optional[_models.SubscriptionKeyParameterNamesContract]", + "default": null, + "param_type": "keyword_only" + }, + "api_type": { + "type": "Optional[Union[str, _models.ApiType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_current": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_set_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "contact": { + "type": "Optional[_models.ApiContactInformation]", + "default": null, + "param_type": "keyword_only" + }, + "license": { + "type": "Optional[_models.ApiLicenseInformation]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": "Optional", + "service_url": "Optional", + "path": "Optional", + "protocols": "Optional", + "description": "Optional", + "authentication_settings": "Optional", + "subscription_key_parameter_names": "Optional", + "api_type": "Optional", + "api_revision": "Optional", + "api_version": "Optional", + "is_current": "Optional", + "is_online": "Optional", + "api_revision_description": "Optional", + "api_version_description": "Optional", + "api_version_set_id": "Optional", + "subscription_required": "Optional", + "terms_of_service_url": "Optional", + "contact": "Optional", + "license": "Optional" + } + }, + "ApiCreateOrUpdateParameter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ApiCreateOrUpdateProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "ApiCreateOrUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "path": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_settings": { + "type": "Optional[_models.AuthenticationSettingsContract]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "type": "Optional[_models.SubscriptionKeyParameterNamesContract]", + "default": null, + "param_type": "keyword_only" + }, + "api_type": { + "type": "Optional[Union[str, _models.ApiType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_current": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_set_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "contact": { + "type": "Optional[_models.ApiContactInformation]", + "default": null, + "param_type": "keyword_only" + }, + "license": { + "type": "Optional[_models.ApiLicenseInformation]", + "default": null, + "param_type": "keyword_only" + }, + "source_api_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "protocols": { + "type": "Optional[list[Union[str, _models.Protocol]]]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_set": { + "type": "Optional[_models.ApiVersionSetContractDetails]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "format": { + "type": "Optional[Union[str, _models.ContentFormat]]", + "default": null, + "param_type": "keyword_only" + }, + "wsdl_selector": { + "type": "Optional[_models.ApiCreateOrUpdatePropertiesWsdlSelector]", + "default": null, + "param_type": "keyword_only" + }, + "soap_api_type": { + "type": "Optional[Union[str, _models.SoapApiType]]", + "default": null, + "param_type": "keyword_only" + }, + "translate_required_query_parameters_conduct": { + "type": "Optional[Union[str, _models.TranslateRequiredQueryParametersConduct]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "path": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_settings": { + "type": "Optional[_models.AuthenticationSettingsContract]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "type": "Optional[_models.SubscriptionKeyParameterNamesContract]", + "default": null, + "param_type": "keyword_only" + }, + "api_type": { + "type": "Optional[Union[str, _models.ApiType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_current": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_set_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "contact": { + "type": "Optional[_models.ApiContactInformation]", + "default": null, + "param_type": "keyword_only" + }, + "license": { + "type": "Optional[_models.ApiLicenseInformation]", + "default": null, + "param_type": "keyword_only" + }, + "source_api_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "protocols": { + "type": "Optional[list[Union[str, _models.Protocol]]]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_set": { + "type": "Optional[_models.ApiVersionSetContractDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_settings": { + "type": "Optional[_models.AuthenticationSettingsContract]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "type": "Optional[_models.SubscriptionKeyParameterNamesContract]", + "default": null, + "param_type": "keyword_only" + }, + "api_type": { + "type": "Optional[Union[str, _models.ApiType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_current": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_set_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "contact": { + "type": "Optional[_models.ApiContactInformation]", + "default": null, + "param_type": "keyword_only" + }, + "license": { + "type": "Optional[_models.ApiLicenseInformation]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "format": "Optional", + "wsdl_selector": "Optional", + "soap_api_type": "Optional", + "translate_required_query_parameters_conduct": "Optional", + "source_api_id": "Optional", + "display_name": "Optional", + "service_url": "Optional", + "path": null, + "protocols": "Optional", + "api_version_set": "Optional", + "provisioning_state": "Optional", + "description": "Optional", + "authentication_settings": "Optional", + "subscription_key_parameter_names": "Optional", + "api_type": "Optional", + "api_revision": "Optional", + "api_version": "Optional", + "is_current": "Optional", + "is_online": "Optional", + "api_revision_description": "Optional", + "api_version_description": "Optional", + "api_version_set_id": "Optional", + "subscription_required": "Optional", + "terms_of_service_url": "Optional", + "contact": "Optional", + "license": "Optional" + } + }, + "ApiCreateOrUpdatePropertiesWsdlSelector": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "wsdl_service_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "wsdl_endpoint_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "wsdl_service_name": "Optional", + "wsdl_endpoint_name": "Optional" + } + }, + "ApiEntityBaseContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_settings": { + "type": "Optional[_models.AuthenticationSettingsContract]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "type": "Optional[_models.SubscriptionKeyParameterNamesContract]", + "default": null, + "param_type": "keyword_only" + }, + "api_type": { + "type": "Optional[Union[str, _models.ApiType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_current": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_set_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "contact": { + "type": "Optional[_models.ApiContactInformation]", + "default": null, + "param_type": "keyword_only" + }, + "license": { + "type": "Optional[_models.ApiLicenseInformation]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "authentication_settings": "Optional", + "subscription_key_parameter_names": "Optional", + "api_type": "Optional", + "api_revision": "Optional", + "api_version": "Optional", + "is_current": "Optional", + "is_online": "Optional", + "api_revision_description": "Optional", + "api_version_description": "Optional", + "api_version_set_id": "Optional", + "subscription_required": "Optional", + "terms_of_service_url": "Optional", + "contact": "Optional", + "license": "Optional" + } + }, + "ApiExportResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "export_result_format": { + "type": "Optional[Union[str, _models.ExportResultFormat]]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[_models.ApiExportResultValue]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "export_result_format": "Optional", + "value": "Optional" + } + }, + "ApiExportResultValue": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "link": "Optional" + } + }, + "ApiGatewaySkuType": { + "type": "Enum", + "methods": {}, + "properties": { + "STANDARD": "STANDARD", + "WORKSPACE_GATEWAY_PREMIUM": "WORKSPACE_GATEWAY_PREMIUM", + "WORKSPACE_GATEWAY_STANDARD": "WORKSPACE_GATEWAY_STANDARD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApiLicenseInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "url": "Optional" + } + }, + "ApiManagementGatewayBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "frontend": { + "type": "Optional[_models.FrontendConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "backend": { + "type": "Optional[_models.BackendConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "configuration_api": { + "type": "Optional[_models.GatewayConfigurationApi]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_type": { + "type": "Optional[Union[str, _models.VirtualNetworkType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provisioning_state": "Optional", + "target_provisioning_state": "Optional", + "created_at_utc": "Optional", + "frontend": "Optional", + "backend": "Optional", + "configuration_api": "Optional", + "virtual_network_type": "Optional" + } + }, + "ApiManagementGatewayConfigConnectionResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.GatewayConfigConnectionBaseProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "etag": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ApiManagementGatewayProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "frontend": { + "type": "Optional[_models.FrontendConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "backend": { + "type": "Optional[_models.BackendConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "configuration_api": { + "type": "Optional[_models.GatewayConfigurationApi]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_type": { + "type": "Optional[Union[str, _models.VirtualNetworkType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "frontend": { + "type": "Optional[_models.FrontendConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "backend": { + "type": "Optional[_models.BackendConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "configuration_api": { + "type": "Optional[_models.GatewayConfigurationApi]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_type": { + "type": "Optional[Union[str, _models.VirtualNetworkType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provisioning_state": "Optional", + "target_provisioning_state": "Optional", + "created_at_utc": "Optional", + "frontend": "Optional", + "backend": "Optional", + "configuration_api": "Optional", + "virtual_network_type": "Optional" + } + }, + "ApiManagementGatewayResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.ApiManagementGatewayProperties", + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "type": "_models.ApiManagementGatewaySkuProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "sku": null, + "etag": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ApiManagementGatewaySkuProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Union[str, _models.ApiGatewaySkuType]", + "default": null, + "param_type": "keyword_only" + }, + "capacity": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Union", + "capacity": "Optional" + } + }, + "ApiManagementGatewaySkuPropertiesForPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[Union[str, _models.ApiGatewaySkuType]]", + "default": null, + "param_type": "keyword_only" + }, + "capacity": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "capacity": "Optional" + } + }, + "ApiManagementGatewayUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.ApiManagementGatewayUpdateProperties]", + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "type": "Optional[_models.ApiManagementGatewaySkuPropertiesForPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "sku": "Optional", + "etag": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "tags": "Optional" + } + }, + "ApiManagementGatewayUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "frontend": { + "type": "Optional[_models.FrontendConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "backend": { + "type": "Optional[_models.BackendConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "configuration_api": { + "type": "Optional[_models.GatewayConfigurationApi]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_type": { + "type": "Optional[Union[str, _models.VirtualNetworkType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "frontend": { + "type": "Optional[_models.FrontendConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "backend": { + "type": "Optional[_models.BackendConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "configuration_api": { + "type": "Optional[_models.GatewayConfigurationApi]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_type": { + "type": "Optional[Union[str, _models.VirtualNetworkType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provisioning_state": "Optional", + "target_provisioning_state": "Optional", + "created_at_utc": "Optional", + "frontend": "Optional", + "backend": "Optional", + "configuration_api": "Optional", + "virtual_network_type": "Optional" + } + }, + "ApiManagementServiceApplyNetworkConfigurationParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "location": "Optional" + } + }, + "ApiManagementServiceBackupRestoreParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "container_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "backup_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "access_type": { + "type": "Optional[Union[str, _models.AccessType]]", + "default": null, + "param_type": "keyword_only" + }, + "access_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "storage_account": null, + "container_name": null, + "backup_name": null, + "access_type": "Optional", + "access_key": "Optional", + "client_id": "Optional" + } + }, + "ApiManagementServiceBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_sender_email": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "hostname_configurations": { + "type": "Optional[list[_models.HostnameConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "public_ip_address_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "public_network_access": { + "type": "Optional[Union[str, _models.PublicNetworkAccess]]", + "default": null, + "param_type": "keyword_only" + }, + "configuration_api": { + "type": "Optional[_models.ConfigurationApi]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "type": "Optional[_models.VirtualNetworkConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "additional_locations": { + "type": "Optional[list[_models.AdditionalLocation]]", + "default": null, + "param_type": "keyword_only" + }, + "custom_properties": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "certificates": { + "type": "Optional[list[_models.CertificateConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "enable_client_certificate": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "nat_gateway_state": { + "type": "Optional[Union[str, _models.NatGatewayState]]", + "default": null, + "param_type": "keyword_only" + }, + "disable_gateway": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_type": { + "type": "Optional[Union[str, _models.VirtualNetworkType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_constraint": { + "type": "Optional[_models.ApiVersionConstraint]", + "default": null, + "param_type": "keyword_only" + }, + "restore": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "private_endpoint_connections": { + "type": "Optional[list[_models.RemotePrivateEndpointConnectionWrapper]]", + "default": null, + "param_type": "keyword_only" + }, + "legacy_portal_status": { + "type": "Optional[Union[str, _models.LegacyPortalStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "developer_portal_status": { + "type": "Optional[Union[str, _models.DeveloperPortalStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "release_channel": { + "type": "Optional[Union[str, _models.ReleaseChannel]]", + "default": null, + "param_type": "keyword_only" + }, + "zone_redundant": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "notification_sender_email": "Optional", + "provisioning_state": "Optional", + "target_provisioning_state": "Optional", + "created_at_utc": "Optional", + "gateway_url": "Optional", + "gateway_regional_url": "Optional", + "portal_url": "Optional", + "management_api_url": "Optional", + "scm_url": "Optional", + "developer_portal_url": "Optional", + "hostname_configurations": "Optional", + "public_ip_addresses": "Optional", + "private_ip_addresses": "Optional", + "public_ip_address_id": "Optional", + "public_network_access": "Optional", + "configuration_api": "Optional", + "virtual_network_configuration": "Optional", + "additional_locations": "Optional", + "custom_properties": "Optional", + "certificates": "Optional", + "enable_client_certificate": "Optional", + "nat_gateway_state": "Optional", + "outbound_public_ip_addresses": "Optional", + "disable_gateway": "Optional", + "virtual_network_type": "Optional", + "api_version_constraint": "Optional", + "restore": "Optional", + "private_endpoint_connections": "Optional", + "platform_version": "Optional", + "legacy_portal_status": "Optional", + "developer_portal_status": "Optional", + "release_channel": "Optional", + "zone_redundant": "Optional" + } + }, + "ApiManagementServiceCheckNameAvailabilityParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": null + } + }, + "ApiManagementServiceGetDomainOwnershipIdentifierResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "domain_ownership_identifier": "Optional" + } + }, + "ApiManagementServiceGetSsoTokenResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "redirect_uri": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "redirect_uri": "Optional" + } + }, + "ApiManagementServiceIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, _models.ApimIdentityType]", + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identities": { + "type": "Optional[dict[str, _models.UserIdentityProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": "Union", + "principal_id": "Optional", + "tenant_id": "Optional", + "user_assigned_identities": "Optional" + } + }, + "ApiManagementServiceNameAvailabilityResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reason": { + "type": "Optional[Union[str, _models.NameAvailabilityReason]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name_available": "Optional", + "message": "Optional", + "reason": "Optional" + } + }, + "ApiManagementServiceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "publisher_email": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "publisher_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "notification_sender_email": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "hostname_configurations": { + "type": "Optional[list[_models.HostnameConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "public_ip_address_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "public_network_access": { + "type": "Optional[Union[str, _models.PublicNetworkAccess]]", + "default": null, + "param_type": "keyword_only" + }, + "configuration_api": { + "type": "Optional[_models.ConfigurationApi]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "type": "Optional[_models.VirtualNetworkConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "additional_locations": { + "type": "Optional[list[_models.AdditionalLocation]]", + "default": null, + "param_type": "keyword_only" + }, + "custom_properties": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "certificates": { + "type": "Optional[list[_models.CertificateConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "enable_client_certificate": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "nat_gateway_state": { + "type": "Optional[Union[str, _models.NatGatewayState]]", + "default": null, + "param_type": "keyword_only" + }, + "disable_gateway": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_type": { + "type": "Optional[Union[str, _models.VirtualNetworkType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_constraint": { + "type": "Optional[_models.ApiVersionConstraint]", + "default": null, + "param_type": "keyword_only" + }, + "restore": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "private_endpoint_connections": { + "type": "Optional[list[_models.RemotePrivateEndpointConnectionWrapper]]", + "default": null, + "param_type": "keyword_only" + }, + "legacy_portal_status": { + "type": "Optional[Union[str, _models.LegacyPortalStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "developer_portal_status": { + "type": "Optional[Union[str, _models.DeveloperPortalStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "release_channel": { + "type": "Optional[Union[str, _models.ReleaseChannel]]", + "default": null, + "param_type": "keyword_only" + }, + "zone_redundant": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_sender_email": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "hostname_configurations": { + "type": "Optional[list[_models.HostnameConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "public_ip_address_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "public_network_access": { + "type": "Optional[Union[str, _models.PublicNetworkAccess]]", + "default": null, + "param_type": "keyword_only" + }, + "configuration_api": { + "type": "Optional[_models.ConfigurationApi]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "type": "Optional[_models.VirtualNetworkConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "additional_locations": { + "type": "Optional[list[_models.AdditionalLocation]]", + "default": null, + "param_type": "keyword_only" + }, + "custom_properties": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "certificates": { + "type": "Optional[list[_models.CertificateConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "enable_client_certificate": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "nat_gateway_state": { + "type": "Optional[Union[str, _models.NatGatewayState]]", + "default": null, + "param_type": "keyword_only" + }, + "disable_gateway": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_type": { + "type": "Optional[Union[str, _models.VirtualNetworkType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_constraint": { + "type": "Optional[_models.ApiVersionConstraint]", + "default": null, + "param_type": "keyword_only" + }, + "restore": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "private_endpoint_connections": { + "type": "Optional[list[_models.RemotePrivateEndpointConnectionWrapper]]", + "default": null, + "param_type": "keyword_only" + }, + "legacy_portal_status": { + "type": "Optional[Union[str, _models.LegacyPortalStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "developer_portal_status": { + "type": "Optional[Union[str, _models.DeveloperPortalStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "release_channel": { + "type": "Optional[Union[str, _models.ReleaseChannel]]", + "default": null, + "param_type": "keyword_only" + }, + "zone_redundant": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "publisher_email": null, + "publisher_name": null, + "notification_sender_email": "Optional", + "provisioning_state": "Optional", + "target_provisioning_state": "Optional", + "created_at_utc": "Optional", + "gateway_url": "Optional", + "gateway_regional_url": "Optional", + "portal_url": "Optional", + "management_api_url": "Optional", + "scm_url": "Optional", + "developer_portal_url": "Optional", + "hostname_configurations": "Optional", + "public_ip_addresses": "Optional", + "private_ip_addresses": "Optional", + "public_ip_address_id": "Optional", + "public_network_access": "Optional", + "configuration_api": "Optional", + "virtual_network_configuration": "Optional", + "additional_locations": "Optional", + "custom_properties": "Optional", + "certificates": "Optional", + "enable_client_certificate": "Optional", + "nat_gateway_state": "Optional", + "outbound_public_ip_addresses": "Optional", + "disable_gateway": "Optional", + "virtual_network_type": "Optional", + "api_version_constraint": "Optional", + "restore": "Optional", + "private_endpoint_connections": "Optional", + "platform_version": "Optional", + "legacy_portal_status": "Optional", + "developer_portal_status": "Optional", + "release_channel": "Optional", + "zone_redundant": "Optional" + } + }, + "ApiManagementServiceResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.ApiManagementServiceProperties", + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "type": "_models.ApiManagementServiceSkuProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ApiManagementServiceIdentity]", + "default": null, + "param_type": "keyword_only" + }, + "zones": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "sku": null, + "identity": "Optional", + "etag": "Optional", + "zones": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ApiManagementServiceSkuProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Union[str, _models.SkuType]", + "default": null, + "param_type": "keyword_only" + }, + "capacity": { + "type": "int", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Union", + "capacity": null + } + }, + "ApiManagementServiceUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.ApiManagementServiceUpdateProperties]", + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "type": "Optional[_models.ApiManagementServiceSkuProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ApiManagementServiceIdentity]", + "default": null, + "param_type": "keyword_only" + }, + "zones": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "sku": "Optional", + "identity": "Optional", + "etag": "Optional", + "zones": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "tags": "Optional" + } + }, + "ApiManagementServiceUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_sender_email": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "hostname_configurations": { + "type": "Optional[list[_models.HostnameConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "public_ip_address_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "public_network_access": { + "type": "Optional[Union[str, _models.PublicNetworkAccess]]", + "default": null, + "param_type": "keyword_only" + }, + "configuration_api": { + "type": "Optional[_models.ConfigurationApi]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "type": "Optional[_models.VirtualNetworkConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "additional_locations": { + "type": "Optional[list[_models.AdditionalLocation]]", + "default": null, + "param_type": "keyword_only" + }, + "custom_properties": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "certificates": { + "type": "Optional[list[_models.CertificateConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "enable_client_certificate": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "nat_gateway_state": { + "type": "Optional[Union[str, _models.NatGatewayState]]", + "default": null, + "param_type": "keyword_only" + }, + "disable_gateway": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_type": { + "type": "Optional[Union[str, _models.VirtualNetworkType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_constraint": { + "type": "Optional[_models.ApiVersionConstraint]", + "default": null, + "param_type": "keyword_only" + }, + "restore": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "private_endpoint_connections": { + "type": "Optional[list[_models.RemotePrivateEndpointConnectionWrapper]]", + "default": null, + "param_type": "keyword_only" + }, + "legacy_portal_status": { + "type": "Optional[Union[str, _models.LegacyPortalStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "developer_portal_status": { + "type": "Optional[Union[str, _models.DeveloperPortalStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "release_channel": { + "type": "Optional[Union[str, _models.ReleaseChannel]]", + "default": null, + "param_type": "keyword_only" + }, + "zone_redundant": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "publisher_email": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "publisher_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_sender_email": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "hostname_configurations": { + "type": "Optional[list[_models.HostnameConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "public_ip_address_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "public_network_access": { + "type": "Optional[Union[str, _models.PublicNetworkAccess]]", + "default": null, + "param_type": "keyword_only" + }, + "configuration_api": { + "type": "Optional[_models.ConfigurationApi]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "type": "Optional[_models.VirtualNetworkConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "additional_locations": { + "type": "Optional[list[_models.AdditionalLocation]]", + "default": null, + "param_type": "keyword_only" + }, + "custom_properties": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "certificates": { + "type": "Optional[list[_models.CertificateConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "enable_client_certificate": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "nat_gateway_state": { + "type": "Optional[Union[str, _models.NatGatewayState]]", + "default": null, + "param_type": "keyword_only" + }, + "disable_gateway": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_type": { + "type": "Optional[Union[str, _models.VirtualNetworkType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_constraint": { + "type": "Optional[_models.ApiVersionConstraint]", + "default": null, + "param_type": "keyword_only" + }, + "restore": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "private_endpoint_connections": { + "type": "Optional[list[_models.RemotePrivateEndpointConnectionWrapper]]", + "default": null, + "param_type": "keyword_only" + }, + "legacy_portal_status": { + "type": "Optional[Union[str, _models.LegacyPortalStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "developer_portal_status": { + "type": "Optional[Union[str, _models.DeveloperPortalStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "release_channel": { + "type": "Optional[Union[str, _models.ReleaseChannel]]", + "default": null, + "param_type": "keyword_only" + }, + "zone_redundant": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "publisher_email": "Optional", + "publisher_name": "Optional", + "notification_sender_email": "Optional", + "provisioning_state": "Optional", + "target_provisioning_state": "Optional", + "created_at_utc": "Optional", + "gateway_url": "Optional", + "gateway_regional_url": "Optional", + "portal_url": "Optional", + "management_api_url": "Optional", + "scm_url": "Optional", + "developer_portal_url": "Optional", + "hostname_configurations": "Optional", + "public_ip_addresses": "Optional", + "private_ip_addresses": "Optional", + "public_ip_address_id": "Optional", + "public_network_access": "Optional", + "configuration_api": "Optional", + "virtual_network_configuration": "Optional", + "additional_locations": "Optional", + "custom_properties": "Optional", + "certificates": "Optional", + "enable_client_certificate": "Optional", + "nat_gateway_state": "Optional", + "outbound_public_ip_addresses": "Optional", + "disable_gateway": "Optional", + "virtual_network_type": "Optional", + "api_version_constraint": "Optional", + "restore": "Optional", + "private_endpoint_connections": "Optional", + "platform_version": "Optional", + "legacy_portal_status": "Optional", + "developer_portal_status": "Optional", + "release_channel": "Optional", + "zone_redundant": "Optional" + } + }, + "ApiManagementSku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "resource_type": "Optional", + "name": "Optional", + "tier": "Optional", + "size": "Optional", + "family": "Optional", + "kind": "Optional", + "capacity": "Optional", + "locations": "Optional", + "location_info": "Optional", + "api_versions": "Optional", + "costs": "Optional", + "capabilities": "Optional", + "restrictions": "Optional" + } + }, + "ApiManagementSkuCapabilities": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "value": "Optional" + } + }, + "ApiManagementSkuCapacity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "minimum": "Optional", + "maximum": "Optional", + "default": "Optional", + "scale_type": "Optional" + } + }, + "ApiManagementSkuCapacityScaleType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTOMATIC": "AUTOMATIC", + "MANUAL": "MANUAL", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApiManagementSkuCosts": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "meter_id": "Optional", + "quantity": "Optional", + "extended_unit": "Optional" + } + }, + "ApiManagementSkuLocationInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "location": "Optional", + "zones": "Optional", + "zone_details": "Optional" + } + }, + "ApiManagementSkuRestrictionInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "locations": "Optional", + "zones": "Optional" + } + }, + "ApiManagementSkuRestrictions": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "values_property": "Optional", + "restriction_info": "Optional", + "reason_code": "Optional" + } + }, + "ApiManagementSkuRestrictionsReasonCode": { + "type": "Enum", + "methods": {}, + "properties": { + "NOT_AVAILABLE_FOR_SUBSCRIPTION": "NOT_AVAILABLE_FOR_SUBSCRIPTION", + "QUOTA_ID": "QUOTA_ID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApiManagementSkuRestrictionsType": { + "type": "Enum", + "methods": {}, + "properties": { + "LOCATION": "LOCATION", + "ZONE": "ZONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApiManagementSkuZoneDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "capabilities": "Optional" + } + }, + "ApiManagementWorkspaceLinksProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "gateways": { + "type": "Optional[list[_models.WorkspaceLinksGateway]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "gateways": { + "type": "Optional[list[_models.WorkspaceLinksGateway]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "workspace_id": "Optional", + "gateways": "Optional" + } + }, + "ApiManagementWorkspaceLinksResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.ApiManagementWorkspaceLinksProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "etag": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ApiReleaseContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ApiReleaseContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ApiReleaseContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "notes": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "api_id": "Optional", + "created_date_time": "Optional", + "updated_date_time": "Optional", + "notes": "Optional" + } + }, + "ApiRevisionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "api_id": "Optional", + "api_revision": "Optional", + "created_date_time": "Optional", + "updated_date_time": "Optional", + "description": "Optional", + "private_url": "Optional", + "is_online": "Optional", + "is_current": "Optional" + } + }, + "ApiTagResourceContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_settings": { + "type": "Optional[_models.AuthenticationSettingsContract]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "type": "Optional[_models.SubscriptionKeyParameterNamesContract]", + "default": null, + "param_type": "keyword_only" + }, + "api_type": { + "type": "Optional[Union[str, _models.ApiType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_current": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_set_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "contact": { + "type": "Optional[_models.ApiContactInformation]", + "default": null, + "param_type": "keyword_only" + }, + "license": { + "type": "Optional[_models.ApiLicenseInformation]", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "protocols": { + "type": "Optional[list[Union[str, _models.Protocol]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_settings": { + "type": "Optional[_models.AuthenticationSettingsContract]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_key_parameter_names": { + "type": "Optional[_models.SubscriptionKeyParameterNamesContract]", + "default": null, + "param_type": "keyword_only" + }, + "api_type": { + "type": "Optional[Union[str, _models.ApiType]]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_current": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "api_revision_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_version_set_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "terms_of_service_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "contact": { + "type": "Optional[_models.ApiContactInformation]", + "default": null, + "param_type": "keyword_only" + }, + "license": { + "type": "Optional[_models.ApiLicenseInformation]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "service_url": "Optional", + "path": "Optional", + "protocols": "Optional", + "description": "Optional", + "authentication_settings": "Optional", + "subscription_key_parameter_names": "Optional", + "api_type": "Optional", + "api_revision": "Optional", + "api_version": "Optional", + "is_current": "Optional", + "is_online": "Optional", + "api_revision_description": "Optional", + "api_version_description": "Optional", + "api_version_set_id": "Optional", + "subscription_required": "Optional", + "terms_of_service_url": "Optional", + "contact": "Optional", + "license": "Optional" + } + }, + "ApiType": { + "type": "Enum", + "methods": {}, + "properties": { + "GRAPHQL": "GRAPHQL", + "GRPC": "GRPC", + "HTTP": "HTTP", + "ODATA": "ODATA", + "SOAP": "SOAP", + "WEBSOCKET": "WEBSOCKET", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApiUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ApiContractUpdateProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "ApiVersionConstraint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "min_api_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "min_api_version": "Optional" + } + }, + "ApiVersionSetContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ApiVersionSetContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ApiVersionSetContractDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "versioning_scheme": { + "type": "Optional[Union[str, _models.VersioningScheme]]", + "default": null, + "param_type": "keyword_only" + }, + "version_query_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "version_header_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "description": "Optional", + "versioning_scheme": "Optional", + "version_query_name": "Optional", + "version_header_name": "Optional" + } + }, + "ApiVersionSetContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "versioning_scheme": { + "type": "Union[str, _models.VersioningScheme]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "version_query_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "version_header_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "version_query_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "version_header_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": null, + "versioning_scheme": "Union", + "description": "Optional", + "version_query_name": "Optional", + "version_header_name": "Optional" + } + }, + "ApiVersionSetEntityBase": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "version_query_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "version_header_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "version_query_name": "Optional", + "version_header_name": "Optional" + } + }, + "ApiVersionSetUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ApiVersionSetUpdateParametersProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "ApiVersionSetUpdateParametersProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "version_query_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "version_header_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "versioning_scheme": { + "type": "Optional[Union[str, _models.VersioningScheme]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "version_query_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "version_header_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": "Optional", + "versioning_scheme": "Optional", + "description": "Optional", + "version_query_name": "Optional", + "version_header_name": "Optional" + } + }, + "ApimIdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "SYSTEM_ASSIGNED_USER_ASSIGNED": "SYSTEM_ASSIGNED_USER_ASSIGNED", + "USER_ASSIGNED": "USER_ASSIGNED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ApimResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "tags": "Optional" + } + }, + "AppType": { + "type": "Enum", + "methods": {}, + "properties": { + "DEVELOPER_PORTAL": "DEVELOPER_PORTAL", + "PORTAL": "PORTAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ArmIdWrapper": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional" + } + }, + "AssociationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AssociationContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AssociationContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "provisioning_state": { + "type": "Optional[Literal[created]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provisioning_state": "Optional" + } + }, + "AsyncOperationStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "FAILED": "FAILED", + "IN_PROGRESS": "IN_PROGRESS", + "STARTED": "STARTED", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AuthenticationSettingsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "o_auth2": { + "type": "Optional[_models.OAuth2AuthenticationSettingsContract]", + "default": null, + "param_type": "keyword_only" + }, + "openid": { + "type": "Optional[_models.OpenIdAuthenticationSettingsContract]", + "default": null, + "param_type": "keyword_only" + }, + "o_auth2_authentication_settings": { + "type": "Optional[list[_models.OAuth2AuthenticationSettingsContract]]", + "default": null, + "param_type": "keyword_only" + }, + "openid_authentication_settings": { + "type": "Optional[list[_models.OpenIdAuthenticationSettingsContract]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "o_auth2": "Optional", + "openid": "Optional", + "o_auth2_authentication_settings": "Optional", + "openid_authentication_settings": "Optional" + } + }, + "AuthorizationAccessPolicyContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AuthorizationAccessPolicyContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AuthorizationAccessPolicyContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "app_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "tenant_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "object_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "app_ids": "Optional", + "tenant_id": "Optional", + "object_id": "Optional" + } + }, + "AuthorizationConfirmConsentCodeRequestContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "consent_code": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "consent_code": "Optional" + } + }, + "AuthorizationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AuthorizationContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AuthorizationContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_type": { + "type": "Optional[Union[str, _models.AuthorizationType]]", + "default": null, + "param_type": "keyword_only" + }, + "o_auth2_grant_type": { + "type": "Optional[Union[str, _models.OAuth2GrantType]]", + "default": null, + "param_type": "keyword_only" + }, + "parameters": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.AuthorizationError]", + "default": null, + "param_type": "keyword_only" + }, + "status": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "authorization_type": "Optional", + "o_auth2_grant_type": "Optional", + "parameters": "Optional", + "error": "Optional", + "status": "Optional" + } + }, + "AuthorizationError": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "code": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "message": "Optional" + } + }, + "AuthorizationLoginRequestContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "post_login_redirect_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "post_login_redirect_url": "Optional" + } + }, + "AuthorizationLoginResponseContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "login_link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "login_link": "Optional" + } + }, + "AuthorizationMethod": { + "type": "Enum", + "methods": {}, + "properties": { + "DELETE": "DELETE", + "GET": "GET", + "HEAD": "HEAD", + "OPTIONS": "OPTIONS", + "PATCH": "PATCH", + "POST": "POST", + "PUT": "PUT", + "TRACE": "TRACE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AuthorizationProviderContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AuthorizationProviderContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AuthorizationProviderContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identity_provider": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "oauth2": { + "type": "Optional[_models.AuthorizationProviderOAuth2Settings]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": "Optional", + "identity_provider": "Optional", + "oauth2": "Optional" + } + }, + "AuthorizationProviderKeyVaultContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_identifier": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_identifier": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "updated": "Optional", + "last_status": "Optional", + "secret_identifier": "Optional" + } + }, + "AuthorizationProviderKeyVaultCreateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_identifier": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "secret_identifier": "Optional" + } + }, + "AuthorizationProviderOAuth2GrantTypes": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_code": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "client_credentials": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "authorization_code": "Optional", + "client_credentials": "Optional" + } + }, + "AuthorizationProviderOAuth2Settings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "redirect_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "grant_types": { + "type": "Optional[_models.AuthorizationProviderOAuth2GrantTypes]", + "default": null, + "param_type": "keyword_only" + }, + "key_vault": { + "type": "Optional[_models.AuthorizationProviderKeyVaultContract]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "redirect_url": "Optional", + "grant_types": "Optional", + "key_vault": "Optional" + } + }, + "AuthorizationServerContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AuthorizationServerContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AuthorizationServerContractBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authorization_methods": { + "type": "Optional[list[Union[str, _models.AuthorizationMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "client_authentication_method": { + "type": "Optional[list[Union[str, _models.ClientAuthenticationMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "token_body_parameters": { + "type": "Optional[list[_models.TokenBodyParameterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "token_endpoint": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "support_state": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "default_scope": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "bearer_token_sending_methods": { + "type": "Optional[list[Union[str, _models.BearerTokenSendingMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "resource_owner_username": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_owner_password": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "authorization_methods": "Optional", + "client_authentication_method": "Optional", + "token_body_parameters": "Optional", + "token_endpoint": "Optional", + "support_state": "Optional", + "default_scope": "Optional", + "bearer_token_sending_methods": "Optional", + "resource_owner_username": "Optional", + "resource_owner_password": "Optional" + } + }, + "AuthorizationServerContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "client_registration_endpoint": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "authorization_endpoint": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "grant_types": { + "type": "list[Union[str, _models.GrantType]]", + "default": null, + "param_type": "keyword_only" + }, + "client_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authorization_methods": { + "type": "Optional[list[Union[str, _models.AuthorizationMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "client_authentication_method": { + "type": "Optional[list[Union[str, _models.ClientAuthenticationMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "token_body_parameters": { + "type": "Optional[list[_models.TokenBodyParameterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "token_endpoint": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "support_state": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "default_scope": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "bearer_token_sending_methods": { + "type": "Optional[list[Union[str, _models.BearerTokenSendingMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "resource_owner_username": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_owner_password": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "use_in_test_console": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "use_in_api_documentation": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "client_secret": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authorization_methods": { + "type": "Optional[list[Union[str, _models.AuthorizationMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "client_authentication_method": { + "type": "Optional[list[Union[str, _models.ClientAuthenticationMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "token_body_parameters": { + "type": "Optional[list[_models.TokenBodyParameterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "token_endpoint": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "support_state": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "default_scope": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "bearer_token_sending_methods": { + "type": "Optional[list[Union[str, _models.BearerTokenSendingMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "resource_owner_username": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_owner_password": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": null, + "use_in_test_console": "Optional", + "use_in_api_documentation": "Optional", + "client_registration_endpoint": null, + "authorization_endpoint": null, + "grant_types": "list", + "client_id": null, + "client_secret": "Optional", + "description": "Optional", + "authorization_methods": "Optional", + "client_authentication_method": "Optional", + "token_body_parameters": "Optional", + "token_endpoint": "Optional", + "support_state": "Optional", + "default_scope": "Optional", + "bearer_token_sending_methods": "Optional", + "resource_owner_username": "Optional", + "resource_owner_password": "Optional" + } + }, + "AuthorizationServerSecretsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "client_secret": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_owner_username": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_owner_password": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_secret": "Optional", + "resource_owner_username": "Optional", + "resource_owner_password": "Optional" + } + }, + "AuthorizationServerUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AuthorizationServerUpdateContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AuthorizationServerUpdateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authorization_methods": { + "type": "Optional[list[Union[str, _models.AuthorizationMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "client_authentication_method": { + "type": "Optional[list[Union[str, _models.ClientAuthenticationMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "token_body_parameters": { + "type": "Optional[list[_models.TokenBodyParameterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "token_endpoint": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "support_state": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "default_scope": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "bearer_token_sending_methods": { + "type": "Optional[list[Union[str, _models.BearerTokenSendingMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "resource_owner_username": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_owner_password": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "use_in_test_console": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "use_in_api_documentation": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "client_registration_endpoint": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authorization_endpoint": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "grant_types": { + "type": "Optional[list[Union[str, _models.GrantType]]]", + "default": null, + "param_type": "keyword_only" + }, + "client_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_secret": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authorization_methods": { + "type": "Optional[list[Union[str, _models.AuthorizationMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "client_authentication_method": { + "type": "Optional[list[Union[str, _models.ClientAuthenticationMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "token_body_parameters": { + "type": "Optional[list[_models.TokenBodyParameterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "token_endpoint": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "support_state": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "default_scope": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "bearer_token_sending_methods": { + "type": "Optional[list[Union[str, _models.BearerTokenSendingMethod]]]", + "default": null, + "param_type": "keyword_only" + }, + "resource_owner_username": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_owner_password": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": "Optional", + "use_in_test_console": "Optional", + "use_in_api_documentation": "Optional", + "client_registration_endpoint": "Optional", + "authorization_endpoint": "Optional", + "grant_types": "Optional", + "client_id": "Optional", + "client_secret": "Optional", + "description": "Optional", + "authorization_methods": "Optional", + "client_authentication_method": "Optional", + "token_body_parameters": "Optional", + "token_endpoint": "Optional", + "support_state": "Optional", + "default_scope": "Optional", + "bearer_token_sending_methods": "Optional", + "resource_owner_username": "Optional", + "resource_owner_password": "Optional" + } + }, + "AuthorizationType": { + "type": "Enum", + "methods": {}, + "properties": { + "O_AUTH2": "O_AUTH2", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BackendAuthorizationHeaderCredentials": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scheme": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "parameter": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "scheme": null, + "parameter": null + } + }, + "BackendBaseParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.BackendProperties]", + "default": null, + "param_type": "keyword_only" + }, + "credentials": { + "type": "Optional[_models.BackendCredentialsContract]", + "default": null, + "param_type": "keyword_only" + }, + "proxy": { + "type": "Optional[_models.BackendProxyContract]", + "default": null, + "param_type": "keyword_only" + }, + "tls": { + "type": "Optional[_models.BackendTlsProperties]", + "default": null, + "param_type": "keyword_only" + }, + "circuit_breaker": { + "type": "Optional[_models.BackendCircuitBreaker]", + "default": null, + "param_type": "keyword_only" + }, + "azure_region": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "pool": { + "type": "Optional[_models.BackendBaseParametersPool]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.BackendType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": "Optional", + "description": "Optional", + "resource_id": "Optional", + "properties": "Optional", + "credentials": "Optional", + "proxy": "Optional", + "tls": "Optional", + "circuit_breaker": "Optional", + "azure_region": "Optional", + "pool": "Optional", + "type": "Optional" + } + }, + "BackendBaseParametersPool": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "services": { + "type": "Optional[list[_models.BackendPoolItem]]", + "default": null, + "param_type": "keyword_only" + }, + "failure_response": { + "type": "Optional[_models.BackendFailureResponse]", + "default": null, + "param_type": "keyword_only" + }, + "session_affinity": { + "type": "Optional[_models.BackendSessionAffinity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "services": { + "type": "Optional[list[_models.BackendPoolItem]]", + "default": null, + "param_type": "keyword_only" + }, + "failure_response": { + "type": "Optional[_models.BackendFailureResponse]", + "default": null, + "param_type": "keyword_only" + }, + "session_affinity": { + "type": "Optional[_models.BackendSessionAffinity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "services": "Optional", + "failure_response": "Optional", + "session_affinity": "Optional" + } + }, + "BackendCircuitBreaker": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "rules": { + "type": "Optional[list[_models.CircuitBreakerRule]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "rules": "Optional" + } + }, + "BackendConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "subnet": { + "type": "Optional[_models.BackendSubnetConfiguration]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subnet": "Optional" + } + }, + "BackendContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.BackendContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "BackendContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.BackendProperties]", + "default": null, + "param_type": "keyword_only" + }, + "credentials": { + "type": "Optional[_models.BackendCredentialsContract]", + "default": null, + "param_type": "keyword_only" + }, + "proxy": { + "type": "Optional[_models.BackendProxyContract]", + "default": null, + "param_type": "keyword_only" + }, + "tls": { + "type": "Optional[_models.BackendTlsProperties]", + "default": null, + "param_type": "keyword_only" + }, + "circuit_breaker": { + "type": "Optional[_models.BackendCircuitBreaker]", + "default": null, + "param_type": "keyword_only" + }, + "azure_region": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "pool": { + "type": "Optional[_models.BackendBaseParametersPool]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.BackendType]]", + "default": null, + "param_type": "keyword_only" + }, + "url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "protocol": { + "type": "Optional[Union[str, _models.BackendProtocol]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.BackendProperties]", + "default": null, + "param_type": "keyword_only" + }, + "credentials": { + "type": "Optional[_models.BackendCredentialsContract]", + "default": null, + "param_type": "keyword_only" + }, + "proxy": { + "type": "Optional[_models.BackendProxyContract]", + "default": null, + "param_type": "keyword_only" + }, + "tls": { + "type": "Optional[_models.BackendTlsProperties]", + "default": null, + "param_type": "keyword_only" + }, + "circuit_breaker": { + "type": "Optional[_models.BackendCircuitBreaker]", + "default": null, + "param_type": "keyword_only" + }, + "azure_region": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "pool": { + "type": "Optional[_models.BackendBaseParametersPool]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.BackendType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "url": "Optional", + "protocol": "Optional", + "title": "Optional", + "description": "Optional", + "resource_id": "Optional", + "properties": "Optional", + "credentials": "Optional", + "proxy": "Optional", + "tls": "Optional", + "circuit_breaker": "Optional", + "azure_region": "Optional", + "pool": "Optional", + "type": "Optional" + } + }, + "BackendCredentialsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "certificate": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "query": { + "type": "Optional[dict[str, list[str]]]", + "default": null, + "param_type": "keyword_only" + }, + "header": { + "type": "Optional[dict[str, list[str]]]", + "default": null, + "param_type": "keyword_only" + }, + "authorization": { + "type": "Optional[_models.BackendAuthorizationHeaderCredentials]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "certificate_ids": "Optional", + "certificate": "Optional", + "query": "Optional", + "header": "Optional", + "authorization": "Optional" + } + }, + "BackendFailureResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status_code": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "status_code": "Optional" + } + }, + "BackendPool": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "services": { + "type": "Optional[list[_models.BackendPoolItem]]", + "default": null, + "param_type": "keyword_only" + }, + "failure_response": { + "type": "Optional[_models.BackendFailureResponse]", + "default": null, + "param_type": "keyword_only" + }, + "session_affinity": { + "type": "Optional[_models.BackendSessionAffinity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "services": "Optional", + "failure_response": "Optional", + "session_affinity": "Optional" + } + }, + "BackendPoolItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "weight": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "priority": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "preferred_carbon_emission": { + "type": "Optional[Union[str, _models.CarbonEmissionCategory]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": null, + "weight": "Optional", + "priority": "Optional", + "preferred_carbon_emission": "Optional" + } + }, + "BackendProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "service_fabric_cluster": { + "type": "Optional[_models.BackendServiceFabricClusterProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "service_fabric_cluster": "Optional" + } + }, + "BackendProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "SOAP": "SOAP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BackendProxyContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "url": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "username": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "password": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "url": null, + "username": "Optional", + "password": "Optional" + } + }, + "BackendReconnectContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.BackendReconnectProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "BackendReconnectProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "after": { + "type": "Optional[timedelta]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "after": "Optional" + } + }, + "BackendServiceFabricClusterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "management_endpoints": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_certificate_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_certificatethumbprint": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "max_partition_resolution_retries": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "server_certificate_thumbprints": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "server_x509_names": { + "type": "Optional[list[_models.X509CertificateName]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_certificate_id": "Optional", + "client_certificatethumbprint": "Optional", + "max_partition_resolution_retries": "Optional", + "management_endpoints": "list", + "server_certificate_thumbprints": "Optional", + "server_x509_names": "Optional" + } + }, + "BackendSessionAffinity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "session_id": { + "type": "Optional[_models.BackendSessionId]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "session_id": "Optional" + } + }, + "BackendSessionId": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "source": { + "type": "Optional[Union[str, _models.BackendSessionIdSource]]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "source": "Optional", + "name": "Optional" + } + }, + "BackendSessionIdSource": { + "type": "Enum", + "methods": {}, + "properties": { + "COOKIE": "COOKIE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BackendSubnetConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional" + } + }, + "BackendTlsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_certificate_chain": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "validate_certificate_name": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "server_certificate_thumbprints": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "server_x509_names": { + "type": "Optional[list[_models.X509CertificateName]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "validate_certificate_chain": "Optional", + "validate_certificate_name": "Optional", + "server_certificate_thumbprints": "Optional", + "server_x509_names": "Optional" + } + }, + "BackendType": { + "type": "Enum", + "methods": {}, + "properties": { + "POOL": "POOL", + "SINGLE": "SINGLE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BackendUpdateParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.BackendProperties]", + "default": null, + "param_type": "keyword_only" + }, + "credentials": { + "type": "Optional[_models.BackendCredentialsContract]", + "default": null, + "param_type": "keyword_only" + }, + "proxy": { + "type": "Optional[_models.BackendProxyContract]", + "default": null, + "param_type": "keyword_only" + }, + "tls": { + "type": "Optional[_models.BackendTlsProperties]", + "default": null, + "param_type": "keyword_only" + }, + "circuit_breaker": { + "type": "Optional[_models.BackendCircuitBreaker]", + "default": null, + "param_type": "keyword_only" + }, + "azure_region": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "pool": { + "type": "Optional[_models.BackendBaseParametersPool]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.BackendType]]", + "default": null, + "param_type": "keyword_only" + }, + "url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "protocol": { + "type": "Optional[Union[str, _models.BackendProtocol]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.BackendProperties]", + "default": null, + "param_type": "keyword_only" + }, + "credentials": { + "type": "Optional[_models.BackendCredentialsContract]", + "default": null, + "param_type": "keyword_only" + }, + "proxy": { + "type": "Optional[_models.BackendProxyContract]", + "default": null, + "param_type": "keyword_only" + }, + "tls": { + "type": "Optional[_models.BackendTlsProperties]", + "default": null, + "param_type": "keyword_only" + }, + "circuit_breaker": { + "type": "Optional[_models.BackendCircuitBreaker]", + "default": null, + "param_type": "keyword_only" + }, + "azure_region": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "pool": { + "type": "Optional[_models.BackendBaseParametersPool]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.BackendType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "url": "Optional", + "protocol": "Optional", + "title": "Optional", + "description": "Optional", + "resource_id": "Optional", + "properties": "Optional", + "credentials": "Optional", + "proxy": "Optional", + "tls": "Optional", + "circuit_breaker": "Optional", + "azure_region": "Optional", + "pool": "Optional", + "type": "Optional" + } + }, + "BackendUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.BackendUpdateParameterProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "BearerTokenSendingMethod": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTHORIZATION_HEADER": "AUTHORIZATION_HEADER", + "QUERY": "QUERY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BearerTokenSendingMethods": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTHORIZATION_HEADER": "AUTHORIZATION_HEADER", + "QUERY": "QUERY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BodyDiagnosticSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "bytes": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "bytes": "Optional" + } + }, + "CacheContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.CacheContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "CacheContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "connection_string": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "use_from_location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "connection_string": null, + "use_from_location": null, + "resource_id": "Optional" + } + }, + "CacheUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.CacheUpdateProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "CacheUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "connection_string": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "use_from_location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "connection_string": "Optional", + "use_from_location": "Optional", + "resource_id": "Optional" + } + }, + "CarbonEmissionCategory": { + "type": "Enum", + "methods": {}, + "properties": { + "HIGH": "HIGH", + "LOW": "LOW", + "MEDIUM": "MEDIUM", + "VERY_HIGH": "VERY_HIGH", + "VERY_LOW": "VERY_LOW", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CertificateConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "store_name": { + "type": "Union[str, _models.CertificateConfigurationStoreName]", + "default": null, + "param_type": "keyword_only" + }, + "encoded_certificate": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "certificate_password": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "certificate": { + "type": "Optional[_models.CertificateInformation]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "encoded_certificate": "Optional", + "certificate_password": "Optional", + "store_name": "Union", + "certificate": "Optional" + } + }, + "CertificateConfigurationStoreName": { + "type": "Enum", + "methods": {}, + "properties": { + "CERTIFICATE_AUTHORITY": "CERTIFICATE_AUTHORITY", + "ROOT": "ROOT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CertificateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.CertificateContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "CertificateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "subject": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "thumbprint": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "expiration_date": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "key_vault": { + "type": "Optional[_models.KeyVaultContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subject": null, + "thumbprint": null, + "expiration_date": "datetime", + "key_vault": "Optional" + } + }, + "CertificateCreateOrUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.CertificateCreateOrUpdateProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "CertificateCreateOrUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "data": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "password": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "key_vault": { + "type": "Optional[_models.KeyVaultContractCreateProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "data": "Optional", + "password": "Optional", + "key_vault": "Optional" + } + }, + "CertificateInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "expiry": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "thumbprint": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "subject": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "expiry": "datetime", + "thumbprint": null, + "subject": null + } + }, + "CertificateSource": { + "type": "Enum", + "methods": {}, + "properties": { + "BUILT_IN": "BUILT_IN", + "CUSTOM": "CUSTOM", + "KEY_VAULT": "KEY_VAULT", + "MANAGED": "MANAGED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CertificateStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETED": "COMPLETED", + "FAILED": "FAILED", + "IN_PROGRESS": "IN_PROGRESS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CircuitBreakerFailureCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "percentage": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "interval": { + "type": "Optional[timedelta]", + "default": null, + "param_type": "keyword_only" + }, + "status_code_ranges": { + "type": "Optional[list[_models.FailureStatusCodeRange]]", + "default": null, + "param_type": "keyword_only" + }, + "error_reasons": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "count": "Optional", + "percentage": "Optional", + "interval": "Optional", + "status_code_ranges": "Optional", + "error_reasons": "Optional" + } + }, + "CircuitBreakerRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "failure_condition": { + "type": "Optional[_models.CircuitBreakerFailureCondition]", + "default": null, + "param_type": "keyword_only" + }, + "trip_duration": { + "type": "Optional[timedelta]", + "default": null, + "param_type": "keyword_only" + }, + "accept_retry_after": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "failure_response": { + "type": "Optional[_models.BackendFailureResponse]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "failure_condition": "Optional", + "trip_duration": "Optional", + "accept_retry_after": "Optional", + "failure_response": "Optional" + } + }, + "ClientApplicationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ClientApplicationContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ClientApplicationContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "owner_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": null, + "description": "Optional", + "owner_id": null, + "entra_application_id": "Optional", + "entra_tenant_id": "Optional", + "state": "Optional" + } + }, + "ClientApplicationProductLinkContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ClientApplicationProductLinkContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ClientApplicationProductLinkContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "product_id": null + } + }, + "ClientApplicationSecretsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "entra": { + "type": "Optional[_models.ClientApplicationSecretsContractEntra]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "entra": "Optional" + } + }, + "ClientApplicationSecretsContractEntra": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "client_secret": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_secret": "Optional", + "expires_at": "Optional" + } + }, + "ClientApplicationState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "APPROVED": "APPROVED", + "PENDING": "PENDING", + "REJECTED": "REJECTED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ClientAuthenticationMethod": { + "type": "Enum", + "methods": {}, + "properties": { + "BASIC": "BASIC", + "BODY": "BODY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ClientSecretContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "client_secret": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_secret": "Optional" + } + }, + "ConfigurationApi": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "legacy_api": { + "type": "Optional[Union[str, _models.LegacyApiState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "legacy_api": "Optional" + } + }, + "ConfigurationIdName": { + "type": "Enum", + "methods": {}, + "properties": { + "CONFIGURATION": "CONFIGURATION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Confirmation": { + "type": "Enum", + "methods": {}, + "properties": { + "INVITE": "INVITE", + "SIGNUP": "SIGNUP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ConnectionStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "CONNECTED": "CONNECTED", + "DEGRADED": "DEGRADED", + "DISCONNECTED": "DISCONNECTED", + "UNKNOWN": "UNKNOWN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ConnectivityCheckProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "HTTPS": "HTTPS", + "TCP": "TCP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ConnectivityCheckRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "source": { + "type": "_models.ConnectivityCheckRequestSource", + "default": null, + "param_type": "keyword_only" + }, + "destination": { + "type": "_models.ConnectivityCheckRequestDestination", + "default": null, + "param_type": "keyword_only" + }, + "preferred_ip_version": { + "type": "Optional[Union[str, _models.PreferredIPVersion]]", + "default": null, + "param_type": "keyword_only" + }, + "protocol": { + "type": "Optional[Union[str, _models.ConnectivityCheckProtocol]]", + "default": null, + "param_type": "keyword_only" + }, + "protocol_configuration": { + "type": "Optional[_models.ConnectivityCheckRequestProtocolConfiguration]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "source": null, + "destination": null, + "preferred_ip_version": "Optional", + "protocol": "Optional", + "protocol_configuration": "Optional" + } + }, + "ConnectivityCheckRequestDestination": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "address": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "port": { + "type": "int", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "address": null, + "port": null + } + }, + "ConnectivityCheckRequestProtocolConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "http_configuration": { + "type": "Optional[_models.ConnectivityCheckRequestProtocolConfigurationHttpConfiguration]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "http_configuration": "Optional" + } + }, + "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "method": { + "type": "Optional[Union[str, _models.Method]]", + "default": null, + "param_type": "keyword_only" + }, + "valid_status_codes": { + "type": "Optional[list[int]]", + "default": null, + "param_type": "keyword_only" + }, + "headers": { + "type": "Optional[list[_models.HTTPHeader]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "method": "Optional", + "valid_status_codes": "Optional", + "headers": "Optional" + } + }, + "ConnectivityCheckRequestSource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "region": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "instance": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "region": null, + "instance": "Optional" + } + }, + "ConnectivityCheckResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "hops": "Optional", + "connection_status": "Optional", + "avg_latency_in_ms": "Optional", + "min_latency_in_ms": "Optional", + "max_latency_in_ms": "Optional", + "probes_sent": "Optional", + "probes_failed": "Optional" + } + }, + "ConnectivityHop": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "id": "Optional", + "address": "Optional", + "resource_id": "Optional", + "next_hop_ids": "Optional", + "issues": "Optional" + } + }, + "ConnectivityIssue": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "origin": "Optional", + "severity": "Optional", + "type": "Optional", + "context": "Optional" + } + }, + "ConnectivityStatusContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "status": { + "type": "Union[str, _models.ConnectivityStatusType]", + "default": null, + "param_type": "keyword_only" + }, + "last_updated": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "last_status_change": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "resource_type": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "is_optional": { + "type": "bool", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": null, + "status": "Union", + "error": "Optional", + "last_updated": "datetime", + "last_status_change": "datetime", + "resource_type": null, + "is_optional": null + } + }, + "ConnectivityStatusType": { + "type": "Enum", + "methods": {}, + "properties": { + "FAILURE": "FAILURE", + "INITIALIZING": "INITIALIZING", + "SUCCESS": "SUCCESS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ContentFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "GRAPHQL_LINK": "GRAPHQL_LINK", + "GRPC": "GRPC", + "GRPC_LINK": "GRPC_LINK", + "ODATA": "ODATA", + "ODATA_LINK": "ODATA_LINK", + "OPENAPI": "OPENAPI", + "OPENAPI_JSON": "OPENAPI_JSON", + "OPENAPI_JSON_LINK": "OPENAPI_JSON_LINK", + "OPENAPI_LINK": "OPENAPI_LINK", + "SWAGGER_JSON": "SWAGGER_JSON", + "SWAGGER_LINK_JSON": "SWAGGER_LINK_JSON", + "WADL_LINK_JSON": "WADL_LINK_JSON", + "WADL_XML": "WADL_XML", + "WSDL": "WSDL", + "WSDL_LINK": "WSDL_LINK", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ContentItemContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[dict[str, Any]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ContentTypeContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ContentTypeContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ContentTypeContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "schema": { + "type": "Optional[Any]", + "default": null, + "param_type": "keyword_only" + }, + "version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "description": "Optional", + "schema": "Optional", + "version": "Optional" + } + }, + "CreatedByType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION": "APPLICATION", + "KEY": "KEY", + "MANAGED_IDENTITY": "MANAGED_IDENTITY", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DataMasking": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "query_params": { + "type": "Optional[list[_models.DataMaskingEntity]]", + "default": null, + "param_type": "keyword_only" + }, + "headers": { + "type": "Optional[list[_models.DataMaskingEntity]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "query_params": "Optional", + "headers": "Optional" + } + }, + "DataMaskingEntity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "mode": { + "type": "Optional[Union[str, _models.DataMaskingMode]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "mode": "Optional" + } + }, + "DataMaskingMode": { + "type": "Enum", + "methods": {}, + "properties": { + "HIDE": "HIDE", + "MASK": "MASK", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeletedServiceContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.DeletedServiceContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "location": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "DeletedServiceContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "service_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "scheduled_purge_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "deletion_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "service_id": "Optional", + "scheduled_purge_date": "Optional", + "deletion_date": "Optional" + } + }, + "DeployConfigurationParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "branch": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "force": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "branch": null, + "force": "Optional" + } + }, + "DeployConfigurationParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.DeployConfigurationParameterProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "DeveloperPortalStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DiagnosticContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.DiagnosticContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "DiagnosticContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "always_log": { + "type": "Optional[Union[str, _models.AlwaysLog]]", + "default": null, + "param_type": "keyword_only" + }, + "sampling": { + "type": "Optional[_models.SamplingSettings]", + "default": null, + "param_type": "keyword_only" + }, + "frontend": { + "type": "Optional[_models.PipelineDiagnosticSettings]", + "default": null, + "param_type": "keyword_only" + }, + "backend": { + "type": "Optional[_models.PipelineDiagnosticSettings]", + "default": null, + "param_type": "keyword_only" + }, + "large_language_model": { + "type": "Optional[_models.LLMDiagnosticSettings]", + "default": null, + "param_type": "keyword_only" + }, + "log_client_ip": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "http_correlation_protocol": { + "type": "Optional[Union[str, _models.HttpCorrelationProtocol]]", + "default": null, + "param_type": "keyword_only" + }, + "verbosity": { + "type": "Optional[Union[str, _models.Verbosity]]", + "default": null, + "param_type": "keyword_only" + }, + "operation_name_format": { + "type": "Optional[Union[str, _models.OperationNameFormat]]", + "default": null, + "param_type": "keyword_only" + }, + "metrics": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "always_log": "Optional", + "logger_id": null, + "sampling": "Optional", + "frontend": "Optional", + "backend": "Optional", + "large_language_model": "Optional", + "log_client_ip": "Optional", + "http_correlation_protocol": "Optional", + "verbosity": "Optional", + "operation_name_format": "Optional", + "metrics": "Optional" + } + }, + "DiagnosticContractUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "always_log": { + "type": "Optional[Union[str, _models.AlwaysLog]]", + "default": null, + "param_type": "keyword_only" + }, + "logger_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "sampling": { + "type": "Optional[_models.SamplingSettings]", + "default": null, + "param_type": "keyword_only" + }, + "frontend": { + "type": "Optional[_models.PipelineDiagnosticSettings]", + "default": null, + "param_type": "keyword_only" + }, + "backend": { + "type": "Optional[_models.PipelineDiagnosticSettings]", + "default": null, + "param_type": "keyword_only" + }, + "log_client_ip": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "http_correlation_protocol": { + "type": "Optional[Union[str, _models.HttpCorrelationProtocol]]", + "default": null, + "param_type": "keyword_only" + }, + "verbosity": { + "type": "Optional[Union[str, _models.Verbosity]]", + "default": null, + "param_type": "keyword_only" + }, + "operation_name_format": { + "type": "Optional[Union[str, _models.OperationNameFormat]]", + "default": null, + "param_type": "keyword_only" + }, + "metrics": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "always_log": "Optional", + "logger_id": "Optional", + "sampling": "Optional", + "frontend": "Optional", + "backend": "Optional", + "log_client_ip": "Optional", + "http_correlation_protocol": "Optional", + "verbosity": "Optional", + "operation_name_format": "Optional", + "metrics": "Optional" + } + }, + "DiagnosticUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.DiagnosticContractUpdateProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "DocumentationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.DocumentationContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "DocumentationContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": "Optional", + "content": "Optional" + } + }, + "DocumentationUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.DocumentationContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "EmailTemplateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.EmailTemplateContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "EmailTemplateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "subject": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "body": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "title": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "parameters": { + "type": "Optional[list[_models.EmailTemplateParametersContractProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subject": null, + "body": null, + "title": "Optional", + "description": "Optional", + "is_default": "Optional", + "parameters": "Optional" + } + }, + "EmailTemplateParametersContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "title": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "title": "Optional", + "description": "Optional" + } + }, + "EmailTemplateUpdateParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "subject": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "title": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "body": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "parameters": { + "type": "Optional[list[_models.EmailTemplateParametersContractProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subject": "Optional", + "title": "Optional", + "description": "Optional", + "body": "Optional", + "parameters": "Optional" + } + }, + "EmailTemplateUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.EmailTemplateUpdateParameterProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "EndpointDependency": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "domain_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "endpoint_details": { + "type": "Optional[list[_models.EndpointDetail]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "domain_name": "Optional", + "endpoint_details": "Optional" + } + }, + "EndpointDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "region": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "port": "Optional", + "region": "Optional" + } + }, + "ErrorAdditionalInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "info": "Optional" + } + }, + "ErrorDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "message": "Optional", + "target": "Optional", + "details": "Optional", + "additional_info": "Optional" + } + }, + "ErrorFieldContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "code": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "target": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "message": "Optional", + "target": "Optional" + } + }, + "ErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "error": "Optional" + } + }, + "ErrorResponseBody": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "code": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "details": { + "type": "Optional[list[_models.ErrorFieldContract]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "message": "Optional", + "details": "Optional" + } + }, + "ExportApi": { + "type": "Enum", + "methods": {}, + "properties": { + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ExportFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "OPENAPI": "OPENAPI", + "OPENAPI_JSON": "OPENAPI_JSON", + "SWAGGER": "SWAGGER", + "WADL": "WADL", + "WSDL": "WSDL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ExportResultFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "OPEN_API": "OPEN_API", + "SWAGGER": "SWAGGER", + "WADL": "WADL", + "WSDL": "WSDL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FailureStatusCodeRange": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "min": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "max": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "min": "Optional", + "max": "Optional" + } + }, + "FrontendConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "default_hostname": "Optional" + } + }, + "GatewayCertificateAuthorityContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.GatewayCertificateAuthorityContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "GatewayCertificateAuthorityContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "is_trusted": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "is_trusted": "Optional" + } + }, + "GatewayConfigConnectionBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "source_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "hostnames": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provisioning_state": "Optional", + "source_id": "Optional", + "default_hostname": "Optional", + "hostnames": "Optional" + } + }, + "GatewayConfigurationApi": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "hostname": "Optional" + } + }, + "GatewayContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.GatewayContractProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "identity": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "GatewayContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location_data": { + "type": "Optional[_models.ResourceLocationDataContract]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "location_data": "Optional", + "description": "Optional" + } + }, + "GatewayDebugCredentialsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "token": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "token": "Optional" + } + }, + "GatewayHostnameBindingBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "key_vault": { + "type": "_models.GatewayHostnameBindingKeyVault", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provisioning_state": "Optional", + "hostname": null, + "key_vault": null, + "certificate": "Optional" + } + }, + "GatewayHostnameBindingCertificate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "thumbprint": "Optional", + "subject": "Optional", + "expiry": "Optional" + } + }, + "GatewayHostnameBindingKeyVault": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "identity_client_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_status": { + "type": "Optional[_models.GatewayHostnameBindingKeyVaultLastStatus]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "secret_id": null, + "identity_client_id": "Optional", + "last_status": "Optional" + } + }, + "GatewayHostnameBindingKeyVaultLastStatus": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "time_stamp_utc": "Optional", + "last_success_time_stamp_utc": "Optional" + } + }, + "GatewayHostnameBindingResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.GatewayHostnameBindingBaseProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "e_tag": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "GatewayHostnameConfigurationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.GatewayHostnameConfigurationContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "GatewayHostnameConfigurationContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "certificate_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "negotiate_client_certificate": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "tls10_enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "tls11_enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "http2_enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "hostname": "Optional", + "certificate_id": "Optional", + "negotiate_client_certificate": "Optional", + "tls10_enabled": "Optional", + "tls11_enabled": "Optional", + "http2_enabled": "Optional" + } + }, + "GatewayKeyRegenerationRequestContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key_type": { + "type": "Union[str, _models.KeyType]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key_type": "Union" + } + }, + "GatewayKeysContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "primary": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "primary": "Optional", + "secondary": "Optional" + } + }, + "GatewayListDebugCredentialsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "purposes": { + "type": "list[Union[str, _models.GatewayListDebugCredentialsContractPurpose]]", + "default": null, + "param_type": "keyword_only" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "credentials_expire_after": { + "type": "Optional[timedelta]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "credentials_expire_after": "Optional", + "purposes": "list", + "api_id": null + } + }, + "GatewayListDebugCredentialsContractPurpose": { + "type": "Enum", + "methods": {}, + "properties": { + "TRACING": "TRACING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GatewayListTraceContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "trace_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "trace_id": "Optional" + } + }, + "GatewayResourceSkuResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "resource_type": "Optional", + "sku": "Optional", + "capacity": "Optional" + } + }, + "GatewaySku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[Union[str, _models.ApiGatewaySkuType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional" + } + }, + "GatewaySkuCapacity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "minimum": "Optional", + "maximum": "Optional", + "default": "Optional", + "scale_type": "Optional" + } + }, + "GatewaySkuCapacityScaleType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTOMATIC": "AUTOMATIC", + "MANUAL": "MANUAL", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GatewayTokenContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional" + } + }, + "GatewayTokenRequestContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key_type": { + "type": "Union[str, _models.KeyType]", + "default": null, + "param_type": "keyword_only" + }, + "expiry": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key_type": "Union", + "expiry": "datetime" + } + }, + "GenerateSsoUrlResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional" + } + }, + "GlobalSchemaContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.GlobalSchemaContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "GlobalSchemaContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_type": { + "type": "Union[str, _models.SchemaType]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[Any]", + "default": null, + "param_type": "keyword_only" + }, + "document": { + "type": "Optional[Any]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "schema_type": "Union", + "description": "Optional", + "value": "Optional", + "document": "Optional", + "provisioning_state": "Optional" + } + }, + "GrantType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTHORIZATION_CODE": "AUTHORIZATION_CODE", + "CLIENT_CREDENTIALS": "CLIENT_CREDENTIALS", + "IMPLICIT": "IMPLICIT", + "RESOURCE_OWNER_PASSWORD": "RESOURCE_OWNER_PASSWORD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GroupContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.GroupContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "GroupContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.GroupType]]", + "default": null, + "param_type": "keyword_only" + }, + "external_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": null, + "description": "Optional", + "built_in": "Optional", + "type": "Optional", + "external_id": "Optional" + } + }, + "GroupCreateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.GroupCreateParametersProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "GroupCreateParametersProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.GroupType]]", + "default": null, + "param_type": "keyword_only" + }, + "external_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": null, + "description": "Optional", + "type": "Optional", + "external_id": "Optional" + } + }, + "GroupType": { + "type": "Enum", + "methods": {}, + "properties": { + "CUSTOM": "CUSTOM", + "EXTERNAL": "EXTERNAL", + "SYSTEM": "SYSTEM", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GroupUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.GroupUpdateParametersProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "GroupUpdateParametersProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.GroupType]]", + "default": null, + "param_type": "keyword_only" + }, + "external_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": "Optional", + "description": "Optional", + "type": "Optional", + "external_id": "Optional" + } + }, + "HTTPHeader": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": null, + "value": null + } + }, + "HostnameConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, _models.HostnameType]", + "default": null, + "param_type": "keyword_only" + }, + "host_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "key_vault_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identity_client_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "encoded_certificate": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "certificate_password": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "default_ssl_binding": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "negotiate_client_certificate": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "certificate": { + "type": "Optional[_models.CertificateInformation]", + "default": null, + "param_type": "keyword_only" + }, + "certificate_source": { + "type": "Optional[Union[str, _models.CertificateSource]]", + "default": null, + "param_type": "keyword_only" + }, + "certificate_status": { + "type": "Optional[Union[str, _models.CertificateStatus]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": "Union", + "host_name": null, + "key_vault_id": "Optional", + "identity_client_id": "Optional", + "encoded_certificate": "Optional", + "certificate_password": "Optional", + "default_ssl_binding": "Optional", + "negotiate_client_certificate": "Optional", + "certificate": "Optional", + "certificate_source": "Optional", + "certificate_status": "Optional" + } + }, + "HostnameType": { + "type": "Enum", + "methods": {}, + "properties": { + "CONFIGURATION_API": "CONFIGURATION_API", + "DEVELOPER_PORTAL": "DEVELOPER_PORTAL", + "MANAGEMENT": "MANAGEMENT", + "PORTAL": "PORTAL", + "PROXY": "PROXY", + "SCM": "SCM", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HttpCorrelationProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "LEGACY": "LEGACY", + "NONE": "NONE", + "W3_C": "W3_C", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HttpMessageDiagnostic": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "headers": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "body": { + "type": "Optional[_models.BodyDiagnosticSettings]", + "default": null, + "param_type": "keyword_only" + }, + "data_masking": { + "type": "Optional[_models.DataMasking]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "headers": "Optional", + "body": "Optional", + "data_masking": "Optional" + } + }, + "IdentityProviderBaseParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.IdentityProviderType]]", + "default": null, + "param_type": "keyword_only" + }, + "signin_tenant": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "allowed_tenants": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "authority": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signup_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signin_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_library": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "signin_tenant": "Optional", + "allowed_tenants": "Optional", + "authority": "Optional", + "signup_policy_name": "Optional", + "signin_policy_name": "Optional", + "profile_editing_policy_name": "Optional", + "password_reset_policy_name": "Optional", + "client_library": "Optional" + } + }, + "IdentityProviderContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.IdentityProviderContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "IdentityProviderContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "client_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.IdentityProviderType]]", + "default": null, + "param_type": "keyword_only" + }, + "signin_tenant": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "allowed_tenants": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "authority": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signup_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signin_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_library": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_secret": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "certificate_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.IdentityProviderType]]", + "default": null, + "param_type": "keyword_only" + }, + "signin_tenant": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "allowed_tenants": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "authority": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signup_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signin_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_library": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_id": null, + "client_secret": "Optional", + "certificate_id": "Optional", + "type": "Optional", + "signin_tenant": "Optional", + "allowed_tenants": "Optional", + "authority": "Optional", + "signup_policy_name": "Optional", + "signin_policy_name": "Optional", + "profile_editing_policy_name": "Optional", + "password_reset_policy_name": "Optional", + "client_library": "Optional" + } + }, + "IdentityProviderCreateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.IdentityProviderCreateContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "IdentityProviderCreateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "client_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "client_secret": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.IdentityProviderType]]", + "default": null, + "param_type": "keyword_only" + }, + "signin_tenant": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "allowed_tenants": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "authority": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signup_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signin_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_library": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "certificate_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.IdentityProviderType]]", + "default": null, + "param_type": "keyword_only" + }, + "signin_tenant": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "allowed_tenants": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "authority": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signup_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signin_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_library": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_id": null, + "client_secret": null, + "certificate_id": "Optional", + "type": "Optional", + "signin_tenant": "Optional", + "allowed_tenants": "Optional", + "authority": "Optional", + "signup_policy_name": "Optional", + "signin_policy_name": "Optional", + "profile_editing_policy_name": "Optional", + "password_reset_policy_name": "Optional", + "client_library": "Optional" + } + }, + "IdentityProviderType": { + "type": "Enum", + "methods": {}, + "properties": { + "AAD": "AAD", + "AAD_B2_C": "AAD_B2_C", + "FACEBOOK": "FACEBOOK", + "GOOGLE": "GOOGLE", + "MICROSOFT": "MICROSOFT", + "TWITTER": "TWITTER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IdentityProviderUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.IdentityProviderUpdateProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "IdentityProviderUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.IdentityProviderType]]", + "default": null, + "param_type": "keyword_only" + }, + "signin_tenant": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "allowed_tenants": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "authority": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signup_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signin_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_library": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_secret": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "certificate_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.IdentityProviderType]]", + "default": null, + "param_type": "keyword_only" + }, + "signin_tenant": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "allowed_tenants": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "authority": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signup_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "signin_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "profile_editing_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "password_reset_policy_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_library": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_id": "Optional", + "client_secret": "Optional", + "certificate_id": "Optional", + "type": "Optional", + "signin_tenant": "Optional", + "allowed_tenants": "Optional", + "authority": "Optional", + "signup_policy_name": "Optional", + "signin_policy_name": "Optional", + "profile_editing_policy_name": "Optional", + "password_reset_policy_name": "Optional", + "client_library": "Optional" + } + }, + "IssueAttachmentContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.IssueAttachmentContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "IssueAttachmentContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "content_format": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "content": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": null, + "content_format": null, + "content": null + } + }, + "IssueCommentContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.IssueCommentContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "IssueCommentContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "text": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "created_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "text": null, + "created_date": "Optional", + "user_id": null + } + }, + "IssueContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.IssueContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "IssueContractBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "created_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.State]]", + "default": null, + "param_type": "keyword_only" + }, + "api_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "created_date": "Optional", + "state": "Optional", + "api_id": "Optional" + } + }, + "IssueContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "created_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.State]]", + "default": null, + "param_type": "keyword_only" + }, + "api_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "created_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.State]]", + "default": null, + "param_type": "keyword_only" + }, + "api_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": null, + "description": null, + "user_id": null, + "created_date": "Optional", + "state": "Optional", + "api_id": "Optional" + } + }, + "IssueType": { + "type": "Enum", + "methods": {}, + "properties": { + "AGENT_STOPPED": "AGENT_STOPPED", + "DNS_RESOLUTION": "DNS_RESOLUTION", + "GUEST_FIREWALL": "GUEST_FIREWALL", + "NETWORK_SECURITY_RULE": "NETWORK_SECURITY_RULE", + "PLATFORM": "PLATFORM", + "PORT_THROTTLED": "PORT_THROTTLED", + "SOCKET_BIND": "SOCKET_BIND", + "UNKNOWN": "UNKNOWN", + "USER_DEFINED_ROUTE": "USER_DEFINED_ROUTE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IssueUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.IssueUpdateContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "IssueUpdateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "created_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.State]]", + "default": null, + "param_type": "keyword_only" + }, + "api_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "title": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "user_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "created_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.State]]", + "default": null, + "param_type": "keyword_only" + }, + "api_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": "Optional", + "description": "Optional", + "user_id": "Optional", + "created_date": "Optional", + "state": "Optional", + "api_id": "Optional" + } + }, + "KeyType": { + "type": "Enum", + "methods": {}, + "properties": { + "PRIMARY": "PRIMARY", + "SECONDARY": "SECONDARY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "KeyVaultContractCreateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_identifier": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identity_client_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "secret_identifier": "Optional", + "identity_client_id": "Optional" + } + }, + "KeyVaultContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_identifier": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identity_client_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_status": { + "type": "Optional[_models.KeyVaultLastAccessStatusContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_identifier": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identity_client_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "last_status": "Optional", + "secret_identifier": "Optional", + "identity_client_id": "Optional" + } + }, + "KeyVaultFetchCode": { + "type": "Enum", + "methods": {}, + "properties": { + "FAILED": "FAILED", + "SUCCESS": "SUCCESS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "KeyVaultLastAccessStatusContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "code": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "time_stamp_utc": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "message": "Optional", + "time_stamp_utc": "Optional" + } + }, + "KeyVaultRefreshState": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LLMDiagnosticSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "logs": { + "type": "Optional[Union[str, _models.LlmDiagnosticSettings]]", + "default": null, + "param_type": "keyword_only" + }, + "requests": { + "type": "Optional[_models.LLMMessageDiagnosticSettings]", + "default": null, + "param_type": "keyword_only" + }, + "responses": { + "type": "Optional[_models.LLMMessageDiagnosticSettings]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "logs": "Optional", + "requests": "Optional", + "responses": "Optional" + } + }, + "LLMMessageDiagnosticSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "messages": { + "type": "Optional[Union[str, _models.LlmMessageLogTypes]]", + "default": null, + "param_type": "keyword_only" + }, + "max_size_in_bytes": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "messages": "Optional", + "max_size_in_bytes": "Optional" + } + }, + "LegacyApiState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LegacyPortalStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LlmDiagnosticSettings": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LlmMessageLogTypes": { + "type": "Enum", + "methods": {}, + "properties": { + "ALL": "ALL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LoggerContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.LoggerContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "LoggerContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_type": { + "type": "Union[str, _models.LoggerType]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "credentials": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "is_buffered": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "logger_type": "Union", + "description": "Optional", + "credentials": "Optional", + "is_buffered": "Optional", + "resource_id": "Optional" + } + }, + "LoggerType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION_INSIGHTS": "APPLICATION_INSIGHTS", + "AZURE_EVENT_HUB": "AZURE_EVENT_HUB", + "AZURE_MONITOR": "AZURE_MONITOR", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LoggerUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.LoggerUpdateParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "LoggerUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_type": { + "type": "Optional[Union[str, _models.LoggerType]]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "credentials": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "is_buffered": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "logger_type": "Optional", + "description": "Optional", + "credentials": "Optional", + "is_buffered": "Optional" + } + }, + "ManagedServiceIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, _models.ManagedServiceIdentityType]", + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identities": { + "type": "Optional[dict[str, _models.UserAssignedIdentity]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "principal_id": "Optional", + "tenant_id": "Optional", + "type": "Union", + "user_assigned_identities": "Optional" + } + }, + "ManagedServiceIdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "SYSTEM_ASSIGNED_USER_ASSIGNED": "SYSTEM_ASSIGNED_USER_ASSIGNED", + "USER_ASSIGNED": "USER_ASSIGNED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Method": { + "type": "Enum", + "methods": {}, + "properties": { + "GET": "GET", + "POST": "POST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MigrateToStv2Contract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mode": { + "type": "Optional[Union[str, _models.MigrateToStv2Mode]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "mode": "Optional" + } + }, + "MigrateToStv2Mode": { + "type": "Enum", + "methods": {}, + "properties": { + "NEW_IP": "NEW_IP", + "PRESERVE_IP": "PRESERVE_IP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NameAvailabilityReason": { + "type": "Enum", + "methods": {}, + "properties": { + "ALREADY_EXISTS": "ALREADY_EXISTS", + "INVALID": "INVALID", + "VALID": "VALID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NamedValueContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.NamedValueContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NamedValueContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "secret": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "key_vault": { + "type": "Optional[_models.KeyVaultContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "secret": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": null, + "value": "Optional", + "key_vault": "Optional", + "provisioning_state": "Optional", + "tags": "Optional", + "secret": "Optional" + } + }, + "NamedValueCreateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.NamedValueCreateContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NamedValueCreateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "secret": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "key_vault": { + "type": "Optional[_models.KeyVaultContractCreateProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "secret": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": null, + "value": "Optional", + "key_vault": "Optional", + "tags": "Optional", + "secret": "Optional" + } + }, + "NamedValueEntityBaseParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "secret": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tags": "Optional", + "secret": "Optional" + } + }, + "NamedValueSecretContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional" + } + }, + "NamedValueUpdateParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "secret": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "key_vault": { + "type": "Optional[_models.KeyVaultContractCreateProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "secret": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": "Optional", + "value": "Optional", + "key_vault": "Optional", + "tags": "Optional", + "secret": "Optional" + } + }, + "NamedValueUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.NamedValueUpdateParameterProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "NatGatewayState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkStatusContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "dns_servers": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + }, + "connectivity_status": { + "type": "list[_models.ConnectivityStatusContract]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "dns_servers": "list", + "connectivity_status": "list" + } + }, + "NetworkStatusContractByLocation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "network_status": { + "type": "Optional[_models.NetworkStatusContract]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "location": "Optional", + "network_status": "Optional" + } + }, + "NotificationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.NotificationContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NotificationContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "title": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "recipients": { + "type": "Optional[_models.RecipientsContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": null, + "description": "Optional", + "recipients": "Optional" + } + }, + "NotificationName": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCOUNT_CLOSED_PUBLISHER": "ACCOUNT_CLOSED_PUBLISHER", + "BCC": "BCC", + "NEW_APPLICATION_NOTIFICATION_MESSAGE": "NEW_APPLICATION_NOTIFICATION_MESSAGE", + "NEW_ISSUE_PUBLISHER_NOTIFICATION_MESSAGE": "NEW_ISSUE_PUBLISHER_NOTIFICATION_MESSAGE", + "PURCHASE_PUBLISHER_NOTIFICATION_MESSAGE": "PURCHASE_PUBLISHER_NOTIFICATION_MESSAGE", + "QUOTA_LIMIT_APPROACHING_PUBLISHER_NOTIFICATION_MESSAGE": "QUOTA_LIMIT_APPROACHING_PUBLISHER_NOTIFICATION_MESSAGE", + "REQUEST_PUBLISHER_NOTIFICATION_MESSAGE": "REQUEST_PUBLISHER_NOTIFICATION_MESSAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OAuth2AuthenticationSettingsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_server_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "scope": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "authorization_server_id": "Optional", + "scope": "Optional" + } + }, + "OAuth2GrantType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTHORIZATION_CODE": "AUTHORIZATION_CODE", + "CLIENT_CREDENTIALS": "CLIENT_CREDENTIALS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OpenIdAuthenticationSettingsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "openid_provider_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "bearer_token_sending_methods": { + "type": "Optional[list[Union[str, _models.BearerTokenSendingMethods]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "openid_provider_id": "Optional", + "bearer_token_sending_methods": "Optional" + } + }, + "OpenidConnectProviderContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.OpenidConnectProviderContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "OpenidConnectProviderContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "metadata_endpoint": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "client_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_secret": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "use_in_test_console": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "use_in_api_documentation": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": null, + "description": "Optional", + "metadata_endpoint": null, + "client_id": null, + "client_secret": "Optional", + "use_in_test_console": "Optional", + "use_in_api_documentation": "Optional" + } + }, + "OpenidConnectProviderUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.OpenidConnectProviderUpdateContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "OpenidConnectProviderUpdateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "metadata_endpoint": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_secret": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "use_in_test_console": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "use_in_api_documentation": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": "Optional", + "description": "Optional", + "metadata_endpoint": "Optional", + "client_id": "Optional", + "client_secret": "Optional", + "use_in_test_console": "Optional", + "use_in_api_documentation": "Optional" + } + }, + "Operation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display": { + "type": "Optional[_models.OperationDisplay]", + "default": null, + "param_type": "keyword_only" + }, + "origin": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[Any]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "display": "Optional", + "origin": "Optional", + "properties": "Optional" + } + }, + "OperationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.OperationContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "OperationContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "method": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "url_template": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "template_parameters": { + "type": "Optional[list[_models.ParameterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "request": { + "type": "Optional[_models.RequestContract]", + "default": null, + "param_type": "keyword_only" + }, + "responses": { + "type": "Optional[list[_models.ResponseContract]]", + "default": null, + "param_type": "keyword_only" + }, + "policies": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "template_parameters": { + "type": "Optional[list[_models.ParameterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "request": { + "type": "Optional[_models.RequestContract]", + "default": null, + "param_type": "keyword_only" + }, + "responses": { + "type": "Optional[list[_models.ResponseContract]]", + "default": null, + "param_type": "keyword_only" + }, + "policies": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": null, + "method": null, + "url_template": null, + "template_parameters": "Optional", + "description": "Optional", + "request": "Optional", + "responses": "Optional", + "policies": "Optional" + } + }, + "OperationDisplay": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "provider": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "operation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provider": "Optional", + "operation": "Optional", + "resource": "Optional", + "description": "Optional" + } + }, + "OperationEntityBaseContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "template_parameters": { + "type": "Optional[list[_models.ParameterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "request": { + "type": "Optional[_models.RequestContract]", + "default": null, + "param_type": "keyword_only" + }, + "responses": { + "type": "Optional[list[_models.ResponseContract]]", + "default": null, + "param_type": "keyword_only" + }, + "policies": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "template_parameters": "Optional", + "description": "Optional", + "request": "Optional", + "responses": "Optional", + "policies": "Optional" + } + }, + "OperationNameFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "NAME": "NAME", + "URL": "URL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OperationResultContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.OperationResultContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "OperationResultContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "status": { + "type": "Optional[Union[str, _models.AsyncOperationStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "started": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "updated": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "result_info": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorResponseBody]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "status": "Optional", + "started": "Optional", + "updated": "Optional", + "result_info": "Optional", + "error": "Optional", + "action_log": "Optional" + } + }, + "OperationResultLogItemContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "object_type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "object_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "object_type": "Optional", + "action": "Optional", + "object_key": "Optional" + } + }, + "OperationStatusResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional" + } + }, + "OperationTagResourceContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "api_name": "Optional", + "api_revision": "Optional", + "api_version": "Optional", + "description": "Optional", + "method": "Optional", + "url_template": "Optional" + } + }, + "OperationUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.OperationUpdateContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "OperationUpdateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "template_parameters": { + "type": "Optional[list[_models.ParameterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "request": { + "type": "Optional[_models.RequestContract]", + "default": null, + "param_type": "keyword_only" + }, + "responses": { + "type": "Optional[list[_models.ResponseContract]]", + "default": null, + "param_type": "keyword_only" + }, + "policies": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "method": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "url_template": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "template_parameters": { + "type": "Optional[list[_models.ParameterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "request": { + "type": "Optional[_models.RequestContract]", + "default": null, + "param_type": "keyword_only" + }, + "responses": { + "type": "Optional[list[_models.ResponseContract]]", + "default": null, + "param_type": "keyword_only" + }, + "policies": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": "Optional", + "method": "Optional", + "url_template": "Optional", + "template_parameters": "Optional", + "description": "Optional", + "request": "Optional", + "responses": "Optional", + "policies": "Optional" + } + }, + "Origin": { + "type": "Enum", + "methods": {}, + "properties": { + "INBOUND": "INBOUND", + "LOCAL": "LOCAL", + "OUTBOUND": "OUTBOUND", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OutboundEnvironmentEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "category": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "endpoints": { + "type": "Optional[list[_models.EndpointDependency]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "category": "Optional", + "endpoints": "Optional" + } + }, + "OutboundEnvironmentEndpointList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "list[_models.OutboundEnvironmentEndpoint]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "list", + "next_link": "Optional" + } + }, + "ParameterContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "default_value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "values_property": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "schema_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "type_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "examples": { + "type": "Optional[dict[str, _models.ParameterExampleContract]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": null, + "description": "Optional", + "type": null, + "default_value": "Optional", + "required": "Optional", + "values_property": "Optional", + "schema_id": "Optional", + "type_name": "Optional", + "examples": "Optional" + } + }, + "ParameterExampleContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "summary": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[Any]", + "default": null, + "param_type": "keyword_only" + }, + "external_value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "summary": "Optional", + "description": "Optional", + "value": "Optional", + "external_value": "Optional" + } + }, + "PipelineDiagnosticSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "type": "Optional[_models.HttpMessageDiagnostic]", + "default": null, + "param_type": "keyword_only" + }, + "response": { + "type": "Optional[_models.HttpMessageDiagnostic]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "request": "Optional", + "response": "Optional" + } + }, + "PlatformVersion": { + "type": "Enum", + "methods": {}, + "properties": { + "MTV1": "MTV1", + "STV1": "STV1", + "STV2": "STV2", + "STV2_1": "STV2_1", + "UNDETERMINED": "UNDETERMINED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.PolicyContract]]", + "default": null, + "param_type": "keyword_only" + }, + "count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "count": "Optional", + "next_link": "Optional" + } + }, + "PolicyComplianceState": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLIANT": "COMPLIANT", + "NON_COMPLIANT": "NON_COMPLIANT", + "PENDING": "PENDING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyContentFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "RAWXML": "RAWXML", + "RAWXML_LINK": "RAWXML_LINK", + "XML": "XML", + "XML_LINK": "XML_LINK", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PolicyContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PolicyContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "format": { + "type": "Optional[Union[str, _models.PolicyContentFormat]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": null, + "format": "Optional" + } + }, + "PolicyDescriptionCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.PolicyDescriptionContract]]", + "default": null, + "param_type": "keyword_only" + }, + "count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "count": "Optional" + } + }, + "PolicyDescriptionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PolicyDescriptionContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PolicyDescriptionContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "scope": "Optional" + } + }, + "PolicyExportFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "RAWXML": "RAWXML", + "XML": "XML", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyFragmentContentFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "RAWXML": "RAWXML", + "XML": "XML", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyFragmentContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PolicyFragmentContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PolicyFragmentContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "format": { + "type": "Optional[Union[str, _models.PolicyFragmentContentFormat]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": null, + "description": "Optional", + "format": "Optional", + "provisioning_state": "Optional" + } + }, + "PolicyIdName": { + "type": "Enum", + "methods": {}, + "properties": { + "POLICY": "POLICY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyRestrictionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PolicyRestrictionContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PolicyRestrictionContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "require_base": { + "type": "Optional[Union[str, _models.PolicyRestrictionRequireBase]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "scope": "Optional", + "require_base": "Optional" + } + }, + "PolicyRestrictionRequireBase": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyRestrictionUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PolicyRestrictionContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "PolicyScopeContract": { + "type": "Enum", + "methods": {}, + "properties": { + "ALL": "ALL", + "API": "API", + "OPERATION": "OPERATION", + "PRODUCT": "PRODUCT", + "TENANT": "TENANT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PortalConfigContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PortalConfigProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PortalConfigCorsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "allowed_origins": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "allowed_origins": "Optional" + } + }, + "PortalConfigCspProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mode": { + "type": "Optional[Union[str, _models.PortalSettingsCspMode]]", + "default": null, + "param_type": "keyword_only" + }, + "report_uri": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "allowed_sources": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "mode": "Optional", + "report_uri": "Optional", + "allowed_sources": "Optional" + } + }, + "PortalConfigDelegationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "delegate_registration": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "delegate_subscription": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "delegation_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "validation_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "delegate_registration": "Optional", + "delegate_subscription": "Optional", + "delegation_url": "Optional", + "validation_key": "Optional" + } + }, + "PortalConfigProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enable_basic_auth": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "signin": { + "type": "Optional[_models.PortalConfigPropertiesSignin]", + "default": null, + "param_type": "keyword_only" + }, + "signup": { + "type": "Optional[_models.PortalConfigPropertiesSignup]", + "default": null, + "param_type": "keyword_only" + }, + "delegation": { + "type": "Optional[_models.PortalConfigDelegationProperties]", + "default": null, + "param_type": "keyword_only" + }, + "cors": { + "type": "Optional[_models.PortalConfigCorsProperties]", + "default": null, + "param_type": "keyword_only" + }, + "csp": { + "type": "Optional[_models.PortalConfigCspProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enable_basic_auth": "Optional", + "signin": "Optional", + "signup": "Optional", + "delegation": "Optional", + "cors": "Optional", + "csp": "Optional" + } + }, + "PortalConfigPropertiesSignin": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "require": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "require": "Optional" + } + }, + "PortalConfigPropertiesSignup": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "terms_of_service": { + "type": "Optional[_models.PortalConfigTermsOfServiceProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "terms_of_service": "Optional" + } + }, + "PortalConfigTermsOfServiceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "text": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "require_consent": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "text": "Optional", + "require_consent": "Optional" + } + }, + "PortalDelegationSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PortalDelegationSettingsProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PortalDelegationSettingsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "validation_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscriptions": { + "type": "Optional[_models.SubscriptionsDelegationSettingsProperties]", + "default": null, + "param_type": "keyword_only" + }, + "user_registration": { + "type": "Optional[_models.RegistrationDelegationSettingsProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "url": "Optional", + "validation_key": "Optional", + "subscriptions": "Optional", + "user_registration": "Optional" + } + }, + "PortalRevisionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PortalRevisionContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PortalRevisionContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_current": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "status_details": "Optional", + "status": "Optional", + "is_current": "Optional", + "created_date_time": "Optional", + "updated_date_time": "Optional", + "provisioning_state": "Optional" + } + }, + "PortalRevisionStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETED": "COMPLETED", + "FAILED": "FAILED", + "PENDING": "PENDING", + "PUBLISHING": "PUBLISHING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PortalSettingValidationKeyContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "validation_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "validation_key": "Optional" + } + }, + "PortalSettingsCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.PortalSettingsContract]]", + "default": null, + "param_type": "keyword_only" + }, + "count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "count": "Optional" + } + }, + "PortalSettingsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PortalSettingsContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PortalSettingsContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "validation_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscriptions": { + "type": "Optional[_models.SubscriptionsDelegationSettingsProperties]", + "default": null, + "param_type": "keyword_only" + }, + "user_registration": { + "type": "Optional[_models.RegistrationDelegationSettingsProperties]", + "default": null, + "param_type": "keyword_only" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "terms_of_service": { + "type": "Optional[_models.TermsOfServiceProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "url": "Optional", + "validation_key": "Optional", + "subscriptions": "Optional", + "user_registration": "Optional", + "enabled": "Optional", + "terms_of_service": "Optional" + } + }, + "PortalSettingsCspMode": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "REPORT_ONLY": "REPORT_ONLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PortalSigninSettingProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enabled": "Optional" + } + }, + "PortalSigninSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PortalSigninSettingProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PortalSignupSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PortalSignupSettingsProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PortalSignupSettingsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "terms_of_service": { + "type": "Optional[_models.TermsOfServiceProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enabled": "Optional", + "terms_of_service": "Optional" + } + }, + "PreferredIPVersion": { + "type": "Enum", + "methods": {}, + "properties": { + "I_PV4": "I_PV4", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrivateEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional" + } + }, + "PrivateEndpointConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PrivateEndpointConnectionProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PrivateEndpointConnectionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_service_connection_state": { + "type": "_models.PrivateLinkServiceConnectionState", + "default": null, + "param_type": "keyword_only" + }, + "private_endpoint": { + "type": "Optional[_models.PrivateEndpoint]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "private_endpoint": "Optional", + "private_link_service_connection_state": null, + "provisioning_state": "Optional" + } + }, + "PrivateEndpointConnectionProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrivateEndpointConnectionRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.PrivateEndpointConnectionRequestProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "properties": "Optional" + } + }, + "PrivateEndpointConnectionRequestProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_service_connection_state": { + "type": "Optional[_models.PrivateLinkServiceConnectionState]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "private_link_service_connection_state": "Optional" + } + }, + "PrivateEndpointConnectionWrapperProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_service_connection_state": { + "type": "_models.PrivateLinkServiceConnectionState", + "default": null, + "param_type": "keyword_only" + }, + "private_endpoint": { + "type": "Optional[_models.ArmIdWrapper]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "private_endpoint": "Optional", + "private_link_service_connection_state": null, + "provisioning_state": "Optional", + "group_ids": "Optional" + } + }, + "PrivateEndpointServiceConnectionStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "APPROVED": "APPROVED", + "PENDING": "PENDING", + "REJECTED": "REJECTED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrivateLinkResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PrivateLinkResourceProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PrivateLinkResourceListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "list[_models.PrivateLinkResource]", + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "list", + "next_link": "Optional" + } + }, + "PrivateLinkResourceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "required_zone_names": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "group_id": "Optional", + "required_members": "Optional", + "required_zone_names": "Optional" + } + }, + "PrivateLinkServiceConnectionState": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "Optional[Union[str, _models.PrivateEndpointServiceConnectionStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "actions_required": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "status": "Optional", + "description": "Optional", + "actions_required": "Optional" + } + }, + "ProductApiLinkContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ProductApiLinkContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ProductApiLinkContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "api_id": null + } + }, + "ProductApplicationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "entra": { + "type": "Optional[_models.ProductApplicationContractEntra]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "entra": "Optional" + } + }, + "ProductApplicationContractEntra": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "application_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "audience": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "application_id": "Optional", + "audience": "Optional" + } + }, + "ProductAuthType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION_TOKEN": "APPLICATION_TOKEN", + "SUBSCRIPTION_KEY": "SUBSCRIPTION_KEY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProductContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ProductContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ProductContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "terms": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "approval_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "subscriptions_limit": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[list[Union[str, _models.ProductAuthType]]]", + "default": null, + "param_type": "keyword_only" + }, + "application": { + "type": "Optional[_models.ProductEntityBaseParametersApplication]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.ProductState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "terms": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "approval_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "subscriptions_limit": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[list[Union[str, _models.ProductAuthType]]]", + "default": null, + "param_type": "keyword_only" + }, + "application": { + "type": "Optional[_models.ProductEntityBaseParametersApplication]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.ProductState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": null, + "description": "Optional", + "terms": "Optional", + "subscription_required": "Optional", + "approval_required": "Optional", + "subscriptions_limit": "Optional", + "authentication_type": "Optional", + "application": "Optional", + "state": "Optional" + } + }, + "ProductEntityBaseParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "terms": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "approval_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "subscriptions_limit": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[list[Union[str, _models.ProductAuthType]]]", + "default": null, + "param_type": "keyword_only" + }, + "application": { + "type": "Optional[_models.ProductEntityBaseParametersApplication]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.ProductState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "terms": "Optional", + "subscription_required": "Optional", + "approval_required": "Optional", + "subscriptions_limit": "Optional", + "authentication_type": "Optional", + "application": "Optional", + "state": "Optional" + } + }, + "ProductEntityBaseParametersApplication": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "entra": { + "type": "Optional[_models.ProductApplicationContractEntra]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "entra": { + "type": "Optional[_models.ProductApplicationContractEntra]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "entra": "Optional" + } + }, + "ProductGroupLinkContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ProductGroupLinkContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ProductGroupLinkContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "group_id": null + } + }, + "ProductState": { + "type": "Enum", + "methods": {}, + "properties": { + "NOT_PUBLISHED": "NOT_PUBLISHED", + "PUBLISHED": "PUBLISHED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProductTagResourceContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "terms": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "approval_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "subscriptions_limit": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[list[Union[str, _models.ProductAuthType]]]", + "default": null, + "param_type": "keyword_only" + }, + "application": { + "type": "Optional[_models.ProductEntityBaseParametersApplication]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.ProductState]]", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "terms": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "approval_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "subscriptions_limit": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[list[Union[str, _models.ProductAuthType]]]", + "default": null, + "param_type": "keyword_only" + }, + "application": { + "type": "Optional[_models.ProductEntityBaseParametersApplication]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.ProductState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": null, + "description": "Optional", + "terms": "Optional", + "subscription_required": "Optional", + "approval_required": "Optional", + "subscriptions_limit": "Optional", + "authentication_type": "Optional", + "application": "Optional", + "state": "Optional" + } + }, + "ProductUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ProductUpdateProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "ProductUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "terms": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "approval_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "subscriptions_limit": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[list[Union[str, _models.ProductAuthType]]]", + "default": null, + "param_type": "keyword_only" + }, + "application": { + "type": "Optional[_models.ProductEntityBaseParametersApplication]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.ProductState]]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "terms": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "approval_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "subscriptions_limit": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[list[Union[str, _models.ProductAuthType]]]", + "default": null, + "param_type": "keyword_only" + }, + "application": { + "type": "Optional[_models.ProductEntityBaseParametersApplication]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.ProductState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": "Optional", + "description": "Optional", + "terms": "Optional", + "subscription_required": "Optional", + "approval_required": "Optional", + "subscriptions_limit": "Optional", + "authentication_type": "Optional", + "application": "Optional", + "state": "Optional" + } + }, + "Protocol": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "HTTPS": "HTTPS", + "WS": "WS", + "WSS": "WSS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PublicNetworkAccess": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "QuotaCounterCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.QuotaCounterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "count": "Optional", + "next_link": "Optional" + } + }, + "QuotaCounterContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "counter_key": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "period_key": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "period_start_time": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "period_end_time": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[_models.QuotaCounterValueContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "counter_key": null, + "period_key": null, + "period_start_time": "datetime", + "period_end_time": "datetime", + "value": "Optional" + } + }, + "QuotaCounterValueContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "calls_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "kb_transferred": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "calls_count": "Optional", + "kb_transferred": "Optional" + } + }, + "QuotaCounterValueUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.QuotaCounterValueContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "RecipientEmailCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.RecipientEmailContract]]", + "default": null, + "param_type": "keyword_only" + }, + "count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "count": "Optional", + "next_link": "Optional" + } + }, + "RecipientEmailContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.RecipientEmailContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "RecipientEmailContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "email": "Optional" + } + }, + "RecipientUserCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.RecipientUserContract]]", + "default": null, + "param_type": "keyword_only" + }, + "count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "count": "Optional", + "next_link": "Optional" + } + }, + "RecipientUserContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.RecipientUsersContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "RecipientUsersContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "user_id": "Optional" + } + }, + "RecipientsContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "emails": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "users": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "emails": "Optional", + "users": "Optional" + } + }, + "RegionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "is_master_region": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "is_deleted": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "is_master_region": "Optional", + "is_deleted": "Optional" + } + }, + "RegistrationDelegationSettingsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enabled": "Optional" + } + }, + "ReleaseChannel": { + "type": "Enum", + "methods": {}, + "properties": { + "DEFAULT": "DEFAULT", + "PREVIEW": "PREVIEW", + "STABLE": "STABLE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RemotePrivateEndpointConnectionWrapper": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.PrivateEndpointConnectionWrapperProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "properties": "Optional" + } + }, + "ReportRecordContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "timestamp": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "interval": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "country": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "region": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "zip": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "operation_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_region": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "call_count_success": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "call_count_blocked": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "call_count_failed": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "call_count_other": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "call_count_total": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "bandwidth": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "cache_hit_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "cache_miss_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "api_time_avg": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "api_time_min": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "api_time_max": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "service_time_avg": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "service_time_min": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "service_time_max": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "timestamp": "Optional", + "interval": "Optional", + "country": "Optional", + "region": "Optional", + "zip": "Optional", + "user_id": "Optional", + "product_id": "Optional", + "api_id": "Optional", + "operation_id": "Optional", + "api_region": "Optional", + "subscription_id": "Optional", + "call_count_success": "Optional", + "call_count_blocked": "Optional", + "call_count_failed": "Optional", + "call_count_other": "Optional", + "call_count_total": "Optional", + "bandwidth": "Optional", + "cache_hit_count": "Optional", + "cache_miss_count": "Optional", + "api_time_avg": "Optional", + "api_time_min": "Optional", + "api_time_max": "Optional", + "service_time_avg": "Optional", + "service_time_min": "Optional", + "service_time_max": "Optional" + } + }, + "RepresentationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "schema_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "type_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "form_parameters": { + "type": "Optional[list[_models.ParameterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "examples": { + "type": "Optional[dict[str, _models.ParameterExampleContract]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "content_type": null, + "schema_id": "Optional", + "type_name": "Optional", + "form_parameters": "Optional", + "examples": "Optional" + } + }, + "RequestContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "query_parameters": { + "type": "Optional[list[_models.ParameterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "headers": { + "type": "Optional[list[_models.ParameterContract]]", + "default": null, + "param_type": "keyword_only" + }, + "representations": { + "type": "Optional[list[_models.RepresentationContract]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "query_parameters": "Optional", + "headers": "Optional", + "representations": "Optional" + } + }, + "RequestReportRecordContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "operation_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "method": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ip_address": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "backend_response_code": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "response_code": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "response_size": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "timestamp": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "cache": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "api_time": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "service_time": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "api_region": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "request_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "request_size": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "api_id": "Optional", + "operation_id": "Optional", + "product_id": "Optional", + "user_id": "Optional", + "method": "Optional", + "url": "Optional", + "ip_address": "Optional", + "backend_response_code": "Optional", + "response_code": "Optional", + "response_size": "Optional", + "timestamp": "Optional", + "cache": "Optional", + "api_time": "Optional", + "service_time": "Optional", + "api_region": "Optional", + "subscription_id": "Optional", + "request_id": "Optional", + "request_size": "Optional" + } + }, + "ResolverContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ResolverEntityBaseContract]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ResolverEntityBaseContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": "Optional", + "path": "Optional", + "description": "Optional" + } + }, + "ResolverUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ResolverUpdateContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "ResolverUpdateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": "Optional", + "path": "Optional", + "description": "Optional" + } + }, + "Resource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ResourceCollection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.ResourceCollectionValueItem]]", + "default": null, + "param_type": "keyword_only" + }, + "count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "count": "Optional", + "next_link": "Optional" + } + }, + "ResourceCollectionValueItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ResourceLocationDataContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "city": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "district": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "country_or_region": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": null, + "city": "Optional", + "district": "Optional", + "country_or_region": "Optional" + } + }, + "ResourceSku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[Union[str, _models.SkuType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional" + } + }, + "ResourceSkuCapacity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "minimum": "Optional", + "maximum": "Optional", + "default": "Optional", + "scale_type": "Optional" + } + }, + "ResourceSkuCapacityScaleType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTOMATIC": "AUTOMATIC", + "MANUAL": "MANUAL", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ResourceSkuResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "resource_type": "Optional", + "sku": "Optional", + "capacity": "Optional" + } + }, + "ResponseContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status_code": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "representations": { + "type": "Optional[list[_models.RepresentationContract]]", + "default": null, + "param_type": "keyword_only" + }, + "headers": { + "type": "Optional[list[_models.ParameterContract]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "status_code": null, + "description": "Optional", + "representations": "Optional", + "headers": "Optional" + } + }, + "SamplingSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "sampling_type": { + "type": "Optional[Union[str, _models.SamplingType]]", + "default": null, + "param_type": "keyword_only" + }, + "percentage": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "sampling_type": "Optional", + "percentage": "Optional" + } + }, + "SamplingType": { + "type": "Enum", + "methods": {}, + "properties": { + "FIXED": "FIXED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SaveConfigurationParameter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.SaveConfigurationParameterProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "SaveConfigurationParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "branch": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "force": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "branch": null, + "force": "Optional" + } + }, + "SchemaContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.SchemaContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "SchemaContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "document": { + "type": "_models.SchemaDocumentProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "content_type": null, + "document": null, + "provisioning_state": "Optional" + } + }, + "SchemaDocumentProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "definitions": { + "type": "Optional[Any]", + "default": null, + "param_type": "keyword_only" + }, + "components": { + "type": "Optional[Any]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "definitions": "Optional", + "components": "Optional" + } + }, + "SchemaType": { + "type": "Enum", + "methods": {}, + "properties": { + "JSON": "JSON", + "XML": "XML", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SettingsTypeName": { + "type": "Enum", + "methods": {}, + "properties": { + "PUBLIC": "PUBLIC", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Severity": { + "type": "Enum", + "methods": {}, + "properties": { + "ERROR": "ERROR", + "WARNING": "WARNING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SkuType": { + "type": "Enum", + "methods": {}, + "properties": { + "BASIC": "BASIC", + "BASIC_V2": "BASIC_V2", + "CONSUMPTION": "CONSUMPTION", + "DEVELOPER": "DEVELOPER", + "ISOLATED": "ISOLATED", + "PREMIUM": "PREMIUM", + "PREMIUM_V2": "PREMIUM_V2", + "STANDARD": "STANDARD", + "STANDARD_V2": "STANDARD_V2", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SoapApiType": { + "type": "Enum", + "methods": {}, + "properties": { + "GRAPH_QL": "GRAPH_QL", + "G_RPC": "G_RPC", + "O_DATA": "O_DATA", + "SOAP_PASS_THROUGH": "SOAP_PASS_THROUGH", + "SOAP_TO_REST": "SOAP_TO_REST", + "WEB_SOCKET": "WEB_SOCKET", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "State": { + "type": "Enum", + "methods": {}, + "properties": { + "CLOSED": "CLOSED", + "OPEN": "OPEN", + "PROPOSED": "PROPOSED", + "REMOVED": "REMOVED", + "RESOLVED": "RESOLVED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SubscriptionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.SubscriptionContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "SubscriptionContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Union[str, _models.SubscriptionState]", + "default": null, + "param_type": "keyword_only" + }, + "owner_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "start_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "expiration_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "notification_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "primary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "state_comment": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "allow_tracing": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "owner_id": "Optional", + "scope": null, + "display_name": "Optional", + "state": "Union", + "created_date": "Optional", + "start_date": "Optional", + "expiration_date": "Optional", + "end_date": "Optional", + "notification_date": "Optional", + "primary_key": "Optional", + "secondary_key": "Optional", + "state_comment": "Optional", + "allow_tracing": "Optional" + } + }, + "SubscriptionCreateParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "owner_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.SubscriptionState]]", + "default": null, + "param_type": "keyword_only" + }, + "allow_tracing": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "owner_id": "Optional", + "scope": null, + "display_name": null, + "primary_key": "Optional", + "secondary_key": "Optional", + "state": "Optional", + "allow_tracing": "Optional" + } + }, + "SubscriptionCreateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.SubscriptionCreateParameterProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "SubscriptionKeyParameterNamesContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "header": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "query": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "header": "Optional", + "query": "Optional" + } + }, + "SubscriptionKeysContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "primary_key": "Optional", + "secondary_key": "Optional" + } + }, + "SubscriptionState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "CANCELLED": "CANCELLED", + "EXPIRED": "EXPIRED", + "REJECTED": "REJECTED", + "SUBMITTED": "SUBMITTED", + "SUSPENDED": "SUSPENDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SubscriptionUpdateParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "owner_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "scope": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "expiration_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.SubscriptionState]]", + "default": null, + "param_type": "keyword_only" + }, + "state_comment": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "allow_tracing": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "owner_id": "Optional", + "scope": "Optional", + "expiration_date": "Optional", + "display_name": "Optional", + "primary_key": "Optional", + "secondary_key": "Optional", + "state": "Optional", + "state_comment": "Optional", + "allow_tracing": "Optional" + } + }, + "SubscriptionUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.SubscriptionUpdateParameterProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "SubscriptionsDelegationSettingsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enabled": "Optional" + } + }, + "SystemData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "created_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "created_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "created_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "created_by": "Optional", + "created_by_type": "Optional", + "created_at": "Optional", + "last_modified_by": "Optional", + "last_modified_by_type": "Optional", + "last_modified_at": "Optional" + } + }, + "TagApiLinkContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.TagApiLinkContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "TagApiLinkContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "api_id": null + } + }, + "TagContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.TagContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "TagContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": null + } + }, + "TagCreateUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.TagContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "TagDescriptionBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "external_docs_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "external_docs_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "external_docs_url": "Optional", + "external_docs_description": "Optional" + } + }, + "TagDescriptionContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.TagDescriptionContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "TagDescriptionContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "external_docs_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "external_docs_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "tag_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "external_docs_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "external_docs_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tag_id": "Optional", + "display_name": "Optional", + "description": "Optional", + "external_docs_url": "Optional", + "external_docs_description": "Optional" + } + }, + "TagDescriptionCreateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.TagDescriptionBaseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "TagOperationLinkContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.TagOperationLinkContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "TagOperationLinkContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "operation_id": null + } + }, + "TagProductLinkContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.TagProductLinkContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "TagProductLinkContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "product_id": null + } + }, + "TagResourceContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tag": { + "type": "_models.TagResourceContractProperties", + "default": null, + "param_type": "keyword_only" + }, + "api": { + "type": "Optional[_models.ApiTagResourceContractProperties]", + "default": null, + "param_type": "keyword_only" + }, + "operation": { + "type": "Optional[_models.OperationTagResourceContractProperties]", + "default": null, + "param_type": "keyword_only" + }, + "product": { + "type": "Optional[_models.ProductTagResourceContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tag": null, + "api": "Optional", + "operation": "Optional", + "product": "Optional" + } + }, + "TagResourceContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional" + } + }, + "TemplateName": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCOUNT_CLOSED_DEVELOPER": "ACCOUNT_CLOSED_DEVELOPER", + "APPLICATION_APPROVED_NOTIFICATION_MESSAGE": "APPLICATION_APPROVED_NOTIFICATION_MESSAGE", + "CONFIRM_SIGN_UP_IDENTITY_DEFAULT": "CONFIRM_SIGN_UP_IDENTITY_DEFAULT", + "EMAIL_CHANGE_IDENTITY_DEFAULT": "EMAIL_CHANGE_IDENTITY_DEFAULT", + "INVITE_USER_NOTIFICATION_MESSAGE": "INVITE_USER_NOTIFICATION_MESSAGE", + "NEW_COMMENT_NOTIFICATION_MESSAGE": "NEW_COMMENT_NOTIFICATION_MESSAGE", + "NEW_DEVELOPER_NOTIFICATION_MESSAGE": "NEW_DEVELOPER_NOTIFICATION_MESSAGE", + "NEW_ISSUE_NOTIFICATION_MESSAGE": "NEW_ISSUE_NOTIFICATION_MESSAGE", + "PASSWORD_RESET_BY_ADMIN_NOTIFICATION_MESSAGE": "PASSWORD_RESET_BY_ADMIN_NOTIFICATION_MESSAGE", + "PASSWORD_RESET_IDENTITY_DEFAULT": "PASSWORD_RESET_IDENTITY_DEFAULT", + "PURCHASE_DEVELOPER_NOTIFICATION_MESSAGE": "PURCHASE_DEVELOPER_NOTIFICATION_MESSAGE", + "QUOTA_LIMIT_APPROACHING_DEVELOPER_NOTIFICATION_MESSAGE": "QUOTA_LIMIT_APPROACHING_DEVELOPER_NOTIFICATION_MESSAGE", + "REJECT_DEVELOPER_NOTIFICATION_MESSAGE": "REJECT_DEVELOPER_NOTIFICATION_MESSAGE", + "REQUEST_DEVELOPER_NOTIFICATION_MESSAGE": "REQUEST_DEVELOPER_NOTIFICATION_MESSAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "TenantConfigurationSyncStateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.TenantConfigurationSyncStateContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "TenantConfigurationSyncStateContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "branch": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "commit_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_export": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "is_synced": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "is_git_enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "sync_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "configuration_change_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "last_operation_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "branch": "Optional", + "commit_id": "Optional", + "is_export": "Optional", + "is_synced": "Optional", + "is_git_enabled": "Optional", + "sync_date": "Optional", + "configuration_change_date": "Optional", + "last_operation_id": "Optional" + } + }, + "TenantSettingsContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.TenantSettingsContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "TenantSettingsContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "settings": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "settings": "Optional" + } + }, + "TermsOfServiceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "text": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "consent_required": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "text": "Optional", + "enabled": "Optional", + "consent_required": "Optional" + } + }, + "TokenBodyParameterContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": null, + "value": null + } + }, + "ToolContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ToolContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ToolContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "operation_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": "Optional", + "description": "Optional", + "operation_id": "Optional" + } + }, + "TrackedResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "TranslateRequiredQueryParametersConduct": { + "type": "Enum", + "methods": {}, + "properties": { + "QUERY": "QUERY", + "TEMPLATE": "TEMPLATE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UserAssignedIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "principal_id": "Optional", + "client_id": "Optional" + } + }, + "UserContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.UserContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "UserContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "type": "Optional[Union[str, _models.UserState]]", + "default": null, + "param_type": "keyword_only" + }, + "note": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identities": { + "type": "Optional[list[_models.UserIdentityContract]]", + "default": null, + "param_type": "keyword_only" + }, + "first_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "email": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "registration_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "type": "Optional[Union[str, _models.UserState]]", + "default": null, + "param_type": "keyword_only" + }, + "note": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identities": { + "type": "Optional[list[_models.UserIdentityContract]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "first_name": "Optional", + "last_name": "Optional", + "email": "Optional", + "registration_date": "Optional", + "groups": "Optional", + "state": "Optional", + "note": "Optional", + "identities": "Optional" + } + }, + "UserCreateParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "first_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "last_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.UserState]]", + "default": null, + "param_type": "keyword_only" + }, + "note": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identities": { + "type": "Optional[list[_models.UserIdentityContract]]", + "default": null, + "param_type": "keyword_only" + }, + "password": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, _models.AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "confirmation": { + "type": "Optional[Union[str, _models.Confirmation]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "type": "Optional[Union[str, _models.UserState]]", + "default": null, + "param_type": "keyword_only" + }, + "note": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identities": { + "type": "Optional[list[_models.UserIdentityContract]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "email": null, + "first_name": null, + "last_name": null, + "password": "Optional", + "app_type": "Optional", + "confirmation": "Optional", + "state": "Optional", + "note": "Optional", + "identities": "Optional" + } + }, + "UserCreateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.UserCreateParameterProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "UserEntityBaseParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "type": "Optional[Union[str, _models.UserState]]", + "default": null, + "param_type": "keyword_only" + }, + "note": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identities": { + "type": "Optional[list[_models.UserIdentityContract]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "state": "Optional", + "note": "Optional", + "identities": "Optional" + } + }, + "UserIdentityContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "provider": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provider": "Optional", + "id": "Optional" + } + }, + "UserIdentityProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "principal_id": "Optional", + "client_id": "Optional" + } + }, + "UserState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "BLOCKED": "BLOCKED", + "DELETED": "DELETED", + "PENDING": "PENDING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UserTokenParameterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key_type": { + "type": "Union[str, _models.KeyType]", + "default": null, + "param_type": "keyword_only" + }, + "expiry": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key_type": "Union", + "expiry": "datetime" + } + }, + "UserTokenParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.UserTokenParameterProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "UserTokenResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional" + } + }, + "UserUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.UserUpdateParametersProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "UserUpdateParametersProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "type": "Optional[Union[str, _models.UserState]]", + "default": null, + "param_type": "keyword_only" + }, + "note": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identities": { + "type": "Optional[list[_models.UserIdentityContract]]", + "default": null, + "param_type": "keyword_only" + }, + "email": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "password": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "first_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "type": "Optional[Union[str, _models.UserState]]", + "default": null, + "param_type": "keyword_only" + }, + "note": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identities": { + "type": "Optional[list[_models.UserIdentityContract]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "email": "Optional", + "password": "Optional", + "first_name": "Optional", + "last_name": "Optional", + "state": "Optional", + "note": "Optional", + "identities": "Optional" + } + }, + "Verbosity": { + "type": "Enum", + "methods": {}, + "properties": { + "ERROR": "ERROR", + "INFORMATION": "INFORMATION", + "VERBOSE": "VERBOSE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "VersioningScheme": { + "type": "Enum", + "methods": {}, + "properties": { + "HEADER": "HEADER", + "QUERY": "QUERY", + "SEGMENT": "SEGMENT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "VirtualNetworkConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "subnet_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "vnetid": "Optional", + "subnetname": "Optional", + "subnet_resource_id": "Optional" + } + }, + "VirtualNetworkType": { + "type": "Enum", + "methods": {}, + "properties": { + "EXTERNAL": "EXTERNAL", + "INTERNAL": "INTERNAL", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WikiContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.WikiContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "WikiContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "documents": { + "type": "Optional[list[_models.WikiDocumentationContract]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "documents": "Optional" + } + }, + "WikiDocumentationContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "documentation_id": "Optional" + } + }, + "WikiUpdateContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.WikiContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "WorkspaceContract": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.WorkspaceContractProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "WorkspaceContractProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "display_name": null, + "description": "Optional" + } + }, + "WorkspaceLinksBaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "gateways": { + "type": "Optional[list[_models.WorkspaceLinksGateway]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "workspace_id": "Optional", + "gateways": "Optional" + } + }, + "WorkspaceLinksGateway": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional" + } + }, + "X509CertificateName": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "issuer_certificate_thumbprint": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "issuer_certificate_thumbprint": "Optional" + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.apimanagement.operations": { + "class_nodes": { + "AllPoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiDiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiExportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": null, + "param_type": "keyword_only" + }, + "export": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiGatewayConfigConnectionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementGatewayConfigConnectionResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "config_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_gateway": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiGatewayHostnameBindingOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayHostnameBindingResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hostname_binding_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_gateway": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiGatewayOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementGatewayResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementGatewayUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiIssueAttachmentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueAttachmentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attachment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiIssueCommentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueCommentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "comment_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiIssueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand_comments_attachments": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "expand_comments_attachments": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IssueUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiManagementGatewaySkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_available_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementOperationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementServiceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_apply_network_configuration_updates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[ApiManagementServiceApplyNetworkConfigurationParameters]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_backup": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceBackupRestoreParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_migrate_to_stv2": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[MigrateToStv2Contract]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_refresh_hostnames": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_restore": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceBackupRestoreParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiManagementServiceCheckNameAvailabilityParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_domain_ownership_identifier": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_sso_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementServiceSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_available_service_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementWorkspaceLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiManagementWorkspaceLinksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiOperationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiOperationPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiCreateOrUpdateParameter", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "delete_revisions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "expand_api_version_set": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_tags": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "include_not_tagged_apis": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiProductOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_apis": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiReleaseOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiRevisionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "force": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiTagDescriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagDescriptionCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_description_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ApiToolOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ToolContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ToolContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tool_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiVersionSetOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiWikiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ApiWikisOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationAccessPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationAccessPolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_access_policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_authorization": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationLoginLinksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "post": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationLoginRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "AuthorizationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "confirm_consent_code": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationConfirmConsentCodeRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_authorization_provider": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationProviderOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationProviderContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AuthorizationServerOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationServerContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AuthorizationServerUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "authsid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "BackendOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "reconnect": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[BackendReconnectContract]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "CacheOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CacheContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CacheUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "CertificateOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CertificateCreateOrUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ClientApplicationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClientApplicationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ClientApplicationProductLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClientApplicationProductLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_client_applications": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "client_application_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ContentItemOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ContentItemContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ContentTypeOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ContentTypeContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "DelegationSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalDelegationSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalDelegationSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "DeletedServicesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_purge": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_by_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "DiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "DocumentationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DocumentationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DocumentationUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "documentation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "EmailTemplateOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "EmailTemplateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "EmailTemplateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "template_name": { + "type": "Union[str, TemplateName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GatewayApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[AssociationContract]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GatewayCertificateAuthorityOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayCertificateAuthorityContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GatewayHostnameConfigurationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayHostnameConfigurationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "hc_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GatewayOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "generate_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayTokenRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "invalidate_debug_credentials": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_debug_credentials": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayListDebugCredentialsContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "list_keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_trace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayListTraceContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "regenerate_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayKeyRegenerationRequestContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GatewayContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "gateway_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GlobalSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GlobalSchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GraphQLApiResolverOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ResolverContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ResolverUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GraphQLApiResolverPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_resolver": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resolver_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "GroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "GroupUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "IdentityProviderOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IdentityProviderCreateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IdentityProviderUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_provider_name": { + "type": "Union[str, IdentityProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "IssueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "LoggerOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "NamedValueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueCreateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_value": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "NetworkStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_location": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "NotificationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "NotificationRecipientEmailOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "NotificationRecipientUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "OpenIdConnectProviderOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OpenidConnectProviderContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OpenidConnectProviderUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "opid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "OperationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_tags": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "include_not_tagged_operations": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "OperationStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "OperationsResultsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "OutboundNetworkDependenciesEndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyDescriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyFragmentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyFragmentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_references": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PolicyRestrictionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyRestrictionContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyRestrictionUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_restriction_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "PolicyRestrictionValidationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PortalConfigOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalConfigContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalConfigContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_config_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "PortalRevisionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalRevisionContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalRevisionContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "portal_revision_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PortalSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PrivateEndpointConnectionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "type": "PrivateEndpointConnectionRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_by_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_private_link_resource": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_sub_resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_private_link_resources": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductGroupLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductGroupLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductGroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "delete_subscriptions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "expand_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_tags": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "include_not_tagged_products": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ProductPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductSubscriptionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ProductWikiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WikiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "ProductWikisOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "QuotaByCounterKeysOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QuotaCounterValueUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "QuotaByPeriodKeysOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QuotaCounterValueUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_counter_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "quota_period_key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "RegionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ReportsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_geo": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_time": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "interval": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_user": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": null, + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "SignInSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSigninSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSigninSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "SignUpSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSignupSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PortalSignupSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "SubscriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "keyword_only" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "default": "none", + "param_type": "keyword_only" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TagApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TagOperationLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagOperationLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TagOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "assign_to_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "assign_to_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "assign_to_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "detach_from_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "detach_from_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "detach_from_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_state_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_state_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_state_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TagProductLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagProductLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TagResourceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TenantAccessGitOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TenantAccessOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AccessInformationCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AccessInformationUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_name": { + "type": "Union[str, AccessIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TenantConfigurationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_deploy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DeployConfigurationParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_save": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SaveConfigurationParameter", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_validate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DeployConfigurationParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "type": "Union[str, ConfigurationIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get_sync_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "TenantSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "settings_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserConfirmationPasswordOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "send": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserGroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserIdentitiesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "delete_subscriptions": { + "default": "none", + "param_type": "keyword_only" + }, + "notify": { + "default": "none", + "param_type": "keyword_only" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "keyword_only" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UserCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "generate_sso_url": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_shared_access_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UserTokenParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "expand_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UserUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "UserSubscriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiDiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiExportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": null, + "param_type": "keyword_only" + }, + "export": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiOperationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "OperationUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiOperationPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiCreateOrUpdateParameter", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "delete_revisions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "expand_api_version_set": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiReleaseOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiReleaseContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "release_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceApiRevisionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "force": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceApiVersionSetOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ApiVersionSetUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "version_set_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceBackendOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BackendUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "backend_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceCertificateOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "CertificateCreateOrUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceDiagnosticOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DiagnosticUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceGlobalSchemaOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GlobalSchemaContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "schema_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceGroupOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceGroupUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceLoggerOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_workspace": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "LoggerUpdateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "logger_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceNamedValueOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueCreateContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_refresh_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "NamedValueUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "is_key_vault_refresh_failed": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_value": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "named_value_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceNotificationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceNotificationRecipientEmailOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "email": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceNotificationRecipientUserOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "check_entity_exists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_notification": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notification_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WorkspaceContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "WorkspaceContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspacePolicyFragmentOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyFragmentContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_references": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspacePolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_api": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceProductApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceProductGroupLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductGroupLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceProductOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "delete_subscriptions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "expand_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ProductUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceProductPolicyOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PolicyContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "type": "Union[str, PolicyIdName]", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceSubscriptionOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "default": "none", + "param_type": "keyword_only" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionCreateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_tag": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_secrets": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_primary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "regenerate_secondary_key": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "default": "none", + "param_type": "keyword_only" + }, + "app_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SubscriptionUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sid": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "notify": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "app_type": { + "type": "Optional[Union[str, AppType]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceTagApiLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagApiLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "api_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceTagOperationLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagOperationLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "WorkspaceTagOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_entity_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_service": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagCreateUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "WorkspaceTagProductLinkOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "TagProductLinkContract", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "product_link_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_product": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "workspace_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tag_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_managament_create_backend_with_custom_assigned_certificate_thumbprints.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_managament_create_backend_with_custom_assigned_certificate_thumbprints.py index 70ca2973f47c..339bbe93b5ee 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_managament_create_backend_with_custom_assigned_certificate_thumbprints.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_managament_create_backend_with_custom_assigned_certificate_thumbprints.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.backend.create_or_update( @@ -51,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagamentCreateBackendWithCustomAssignedCertificate_Thumbprints.json +# x-ms-original-file: 2025-03-01-preview/ApiManagamentCreateBackendWithCustomAssignedCertificate_Thumbprints.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_all_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_all_policies.py index e901f10fdfb6..0e7ed12b4f4c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_all_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_all_policies.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.all_policies.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementAllPolicies.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementAllPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_apply_network_configuration_updates.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_apply_network_configuration_updates.py index 474f8cd7d235..46558e5691c8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_apply_network_configuration_updates.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_apply_network_configuration_updates.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_apply_network_configuration_updates( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementApplyNetworkConfigurationUpdates.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementApplyNetworkConfigurationUpdates.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_approve_or_reject_private_endpoint_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_approve_or_reject_private_endpoint_connection.py index e33f8014fd6d..b5db8adeaae8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_approve_or_reject_private_endpoint_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_approve_or_reject_private_endpoint_connection.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_endpoint_connection.begin_create_or_update( @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementApproveOrRejectPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_authorization_server_list_secrets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_authorization_server_list_secrets.py index 926943ce2238..0f377c4248f1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_authorization_server_list_secrets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_authorization_server_list_secrets.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_server.list_secrets( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementAuthorizationServerListSecrets.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementAuthorizationServerListSecrets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backend_reconnect.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backend_reconnect.py index 1e1e238a8aa0..cb597f0f76a1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backend_reconnect.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backend_reconnect.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.backend.reconnect( @@ -38,6 +37,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementBackendReconnect.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementBackendReconnect.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_access_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_access_key.py index a75e8b022afc..fd6ca9948834 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_access_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_access_key.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_backup( @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementBackupWithAccessKey.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementBackupWithAccessKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_system_managed_identity.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_system_managed_identity.py index 5d5520a13c09..8d0f59570dcd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_system_managed_identity.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_system_managed_identity.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_backup( @@ -44,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementBackupWithSystemManagedIdentity.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementBackupWithSystemManagedIdentity.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_user_assigned_managed_identity.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_user_assigned_managed_identity.py index 00a100a504a6..623712f4879b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_user_assigned_managed_identity.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_backup_with_user_assigned_managed_identity.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_backup( @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementBackupWithUserAssignedManagedIdentity.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_ai_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_ai_logger.py index 54b06a0bbdfe..650b6f93ed69 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_ai_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_ai_logger.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.logger.create_or_update( @@ -46,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAILogger.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateAILogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api.py index 233da8564a26..5396a56de1a0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -52,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_clone.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_clone.py index 88b0bab9f6f9..f7361444d537 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_clone.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_clone.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiClone.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiClone.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_diagnostic.py index 4d02ac5dfdd3..7913f1c067c6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_diagnostic.create_or_update( @@ -55,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue.py index 2a83457f2b1e..08990f034c04 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_issue.create_or_update( @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiIssue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiIssue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_attachment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_attachment.py index ffe42a85aab3..8fc15e045f40 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_attachment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_attachment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_issue_attachment.create_or_update( @@ -44,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiIssueAttachment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiIssueAttachment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_comment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_comment.py index f4b9a8bda010..09fcf2cf24fc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_comment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_issue_comment.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_issue_comment.create_or_update( @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiIssueComment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiIssueComment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_new_version_using_existing_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_new_version_using_existing_api.py index ab7b6fbaf003..d2c4fde31e2b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_new_version_using_existing_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_new_version_using_existing_api.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -53,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiNewVersionUsingExistingApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation.py index 7315b9985f21..e934a0cdeb2d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_operation.create_or_update( @@ -65,6 +64,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiOperation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_policy.py index 596f4d137f6e..0d93449abc0e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_operation_policy.create_or_update( @@ -47,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiOperationPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_tag.py index aaef0dd11326..2e2ca56ed2b7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_operation_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.assign_to_operation( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiOperationTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiOperationTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy.py index 8f5634b3e02a..fa44693d5de3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_policy.create_or_update( @@ -46,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy_non_xml_encoded.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy_non_xml_encoded.py index 1d6d41956e68..e6e72a239fe1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy_non_xml_encoded.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_policy_non_xml_encoded.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_policy.create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiPolicyNonXmlEncoded.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_release.py index 9ee5c38e4b81..1c137ebb8509 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_release.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_release.create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiRelease.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_revision_from_existing_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_revision_from_existing_api.py index 009b8fedae07..23ef8e65e4a4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_revision_from_existing_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_revision_from_existing_api.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiRevisionFromExistingApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiRevisionFromExistingApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_schema.py index 0889dcd8fa67..9f6d6a33f520 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_schema.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_schema.begin_create_or_update( @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag.py index eca34f0233fe..1537d56fab05 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.assign_to_api( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag_description.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag_description.py index 676aba24f33a..672065f7f1d0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag_description.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tag_description.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_tag_description.create_or_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiTagDescription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiTagDescription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tool.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tool.py index 4af25a27306c..1fd13ce82c17 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tool.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_tool.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_tool.create_or_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiTool.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiTool.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_import_override_service_url.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_import_override_service_url.py index c44fd7a687e2..6f9f2c0df0a5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_import_override_service_url.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_import_override_service_url.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -47,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiUsingImportOverrideServiceUrl.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import.py index 2675de390e04..f1324cc75b75 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiUsingOai3Import.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiUsingOai3Import.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import_with_translate_required_query_parameters_conduct.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import_with_translate_required_query_parameters_conduct.py index db1dfc7995f3..7b210d5064e6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import_with_translate_required_query_parameters_conduct.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_oai3_import_with_translate_required_query_parameters_conduct.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_swagger_import.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_swagger_import.py index 4317aacd3d40..e895486a4cca 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_swagger_import.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_swagger_import.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -46,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiUsingSwaggerImport.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiUsingSwaggerImport.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_wadl_import.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_wadl_import.py index 6c6ae6874632..45c0a859d8c9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_wadl_import.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_using_wadl_import.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiUsingWadlImport.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiUsingWadlImport.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_version_set.py index 4129ddae85b9..f292b2824d21 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_version_set.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_version_set.create_or_update( @@ -46,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiVersionSet.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_wiki.py index 375e52d2ee1a..291be3943bea 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_wiki.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_wiki.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiWiki.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_auth_servers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_auth_servers.py index 1522dc5cc79f..ea3877c5d396 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_auth_servers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_auth_servers.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -55,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiWithMultipleAuthServers.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiWithMultipleAuthServers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_open_id_connect_providers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_open_id_connect_providers.py index 77e93ceb3be2..5eb75c91a1cc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_open_id_connect_providers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_multiple_open_id_connect_providers.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -61,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_open_id_connect.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_open_id_connect.py index 7807480e285b..04597cc51b5d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_open_id_connect.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_api_with_open_id_connect.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateApiWithOpenIdConnect.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateApiWithOpenIdConnect.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_auth_code.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_auth_code.py index 15507e68eeae..f259fc176097 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_auth_code.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_auth_code.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization.create_or_update( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationAADAuthCode.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateAuthorizationAADAuthCode.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_client_cred.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_client_cred.py index 0cb7c70c18be..241c21d3f1a0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_client_cred.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_aad_client_cred.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization.create_or_update( @@ -47,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationAADClientCred.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateAuthorizationAADClientCred.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_access_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_access_policy.py index 8e8037ab18a3..4a1842676ce8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_access_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_access_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_access_policy.create_or_update( @@ -48,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationAccessPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateAuthorizationAccessPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code.py index 84e5cd8c8a45..e9975c722f1f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_provider.create_or_update( @@ -56,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateAuthorizationProviderAADAuthCode.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code_with_key_vault.py index 4517e169d955..d91f1d3372ab 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_auth_code_with_key_vault.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_provider.create_or_update( @@ -56,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationProviderAADAuthCodeWithKeyVault.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateAuthorizationProviderAADAuthCodeWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_client_cred.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_client_cred.py index c35fce765307..a4cd85d35d59 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_client_cred.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_aad_client_cred.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_provider.create_or_update( @@ -54,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateAuthorizationProviderAADClientCred.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_generic_oauth2.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_generic_oauth2.py index 0d0e29c427ab..6d921a78afb9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_generic_oauth2.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_generic_oauth2.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_provider.create_or_update( @@ -58,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateAuthorizationProviderGenericOAuth2.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_oob_google.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_oob_google.py index 94d2b5060e18..96556484b26c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_oob_google.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_provider_oob_google.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_provider.create_or_update( @@ -55,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateAuthorizationProviderOOBGoogle.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_server.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_server.py index f16ea1923fa0..606e3daa0d5e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_server.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_authorization_server.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_server.create_or_update( @@ -59,6 +58,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateAuthorizationServer.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateAuthorizationServer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_proxy_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_proxy_backend.py index 9e9b7abf9f61..ff6792970008 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_proxy_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_proxy_backend.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.backend.create_or_update( @@ -53,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendProxyBackend.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateBackendProxyBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_service_fabric.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_service_fabric.py index eb80d618b0fd..4c8afcb5d50c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_service_fabric.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_service_fabric.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.backend.create_or_update( @@ -56,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendServiceFabric.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateBackendServiceFabric.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_azure_region.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_azure_region.py index c31ca630526b..431c07f1e77c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_azure_region.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_azure_region.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.backend.create_or_update( @@ -42,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendWithAzureRegion.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateBackendWithAzureRegion.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_carbon_aware_load_balancer.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_carbon_aware_load_balancer.py index 4962c8433197..1155d0d81abd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_carbon_aware_load_balancer.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_carbon_aware_load_balancer.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.backend.create_or_update( @@ -59,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendWithCarbonAwareLoadBalancer.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateBackendWithCarbonAwareLoadBalancer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_custom_assigned_certificate_x509_names.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_custom_assigned_certificate_x509_names.py index 76ef93878fc6..a268f7d33014 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_custom_assigned_certificate_x509_names.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_custom_assigned_certificate_x509_names.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.backend.create_or_update( @@ -51,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendWithCustomAssignedCertificate_X509Names.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateBackendWithCustomAssignedCertificate_X509Names.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_priority_based_load_balancer.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_priority_based_load_balancer.py index 872a5f39e3fc..9090a9741fb2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_priority_based_load_balancer.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_priority_based_load_balancer.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.backend.create_or_update( @@ -64,6 +64,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendWithPriorityBasedLoadBalancer.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateBackendWithPriorityBasedLoadBalancer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_simple_load_balancer.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_simple_load_balancer.py index 779dea0214d1..3d27c90a9884 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_simple_load_balancer.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_simple_load_balancer.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.backend.create_or_update( @@ -54,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendWithSimpleLoadBalancer.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateBackendWithSimpleLoadBalancer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_weighted_load_balancer.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_weighted_load_balancer.py index 996fb2e9a767..276c13dea4fe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_weighted_load_balancer.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_backend_with_weighted_load_balancer.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.backend.create_or_update( @@ -56,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateBackendWithWeightedLoadBalancer.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateBackendWithWeightedLoadBalancer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_cache.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_cache.py index c8251bb3a432..2e35b55a6d71 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_cache.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_cache.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.cache.create_or_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateCache.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateCache.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate.py index 47836f30524a..57f3b075bf12 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.certificate.create_or_update( @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateCertificate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate_with_key_vault.py index b05f8beea92b..24a387828a8e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_certificate_with_key_vault.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.certificate.create_or_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateCertificateWithKeyVault.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateCertificateWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application.py index 63ddcd38ef6d..6d52cb98677c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.client_application.create_or_update( @@ -46,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateClientApplication.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateClientApplication.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application_product_link.py index 5e2585462264..8698ebb43f32 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_client_application_product_link.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.client_application_product_link.create( @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateClientApplicationProductLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateClientApplicationProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type.py index e04a11223c60..3982078a17e2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.content_type.create_or_update( @@ -87,6 +86,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateContentType.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateContentType.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type_content_item.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type_content_item.py index 4c3ce0943589..1481eee3f7d0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type_content_item.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_content_type_content_item.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.content_item.create_or_update( @@ -51,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateContentTypeContentItem.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateContentTypeContentItem.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_diagnostic.py index 71e44cc8b6c7..628db0392205 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.diagnostic.create_or_update( @@ -54,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_documentation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_documentation.py index 5976dc45ab6e..eead33719251 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_documentation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_documentation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.documentation.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateDocumentation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateDocumentation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_eh_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_eh_logger.py index 0b3087927d9c..ee039e17e237 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_eh_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_eh_logger.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.logger.create_or_update( @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateEHLogger.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateEHLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway.py index f09571416af3..599eadbbe207 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGateway.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_api.py index 45104649e9d8..2428d93efb46 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway_api.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGatewayApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGatewayApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_certificate_authority.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_certificate_authority.py index 2c797c767dec..8104149e0d0e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_certificate_authority.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_certificate_authority.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway_certificate_authority.create_or_update( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGatewayCertificateAuthority.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGatewayCertificateAuthority.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_config_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_config_connection.py index a057fa1e448a..91f52ab574c0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_config_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_config_connection.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_gateway_config_connection.begin_create_or_update( @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGatewayConfigConnection.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGatewayConfigConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_binding.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_binding.py index 2f920d02cad1..9aae97e63039 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_binding.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_binding.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_gateway_hostname_binding.begin_create_or_update( @@ -48,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGatewayHostnameBinding.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGatewayHostnameBinding.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_configuration.py index ba19ffb896c0..145c6c9149d6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_gateway_hostname_configuration.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway_hostname_configuration.create_or_update( @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGatewayHostnameConfiguration.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGatewayHostnameConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema1.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema1.py index d90292376d7f..9648c26a7f6b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema1.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema1.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.global_schema.begin_create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGlobalSchema1.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGlobalSchema1.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema2.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema2.py index 89f72080239c..055d07bb7c7b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema2.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_global_schema2.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.global_schema.begin_create_or_update( @@ -60,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGlobalSchema2.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGlobalSchema2.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api.py index c10f716066af..88cadee21b8d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -49,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGraphQLApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGraphQLApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver.py index 3602f635110f..cb19e2c4ee77 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.graph_ql_api_resolver.create_or_update( @@ -47,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGraphQLApiResolver.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGraphQLApiResolver.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver_policy.py index 1496b3ef04cb..6d98539598ae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_graph_ql_api_resolver_policy.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.graph_ql_api_resolver_policy.create_or_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGraphQLApiResolverPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGraphQLApiResolverPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group.py index ce45c7167532..8c7ce1bbf4d5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.group.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_external.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_external.py index 23956e1b24ce..451ebb61ff20 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_external.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_external.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.group.create_or_update( @@ -47,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGroupExternal.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGroupExternal.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_user.py index cb45128ab0c9..1fb4143325e1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_group_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.group_user.create( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGroupUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGroupUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_grpc_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_grpc_api.py index e7bf3fe08f3a..b2b742668b40 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_grpc_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_grpc_api.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateGrpcApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateGrpcApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_identity_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_identity_provider.py index f02e4a9a7f2d..f4d63cf17f89 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_identity_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_identity_provider.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.identity_provider.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateIdentityProvider.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateIdentityProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_multi_region_service_with_custom_hostname.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_multi_region_service_with_custom_hostname.py index e5ac36f21154..460e9af9040c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_multi_region_service_with_custom_hostname.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_multi_region_service_with_custom_hostname.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_create_or_update( @@ -79,6 +78,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateMultiRegionServiceWithCustomHostname.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value.py index 4d66176f6275..d29ec368236f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.named_value.begin_create_or_update( @@ -42,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateNamedValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value_with_key_vault.py index 87eb5735e381..9ed32149ab5d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_named_value_with_key_vault.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.named_value.begin_create_or_update( @@ -50,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateNamedValueWithKeyVault.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateNamedValueWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification.py index 658a837bc23c..42010b3869b4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.notification.create_or_update( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateNotification.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateNotification.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_email.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_email.py index cb0e72f780cd..3e4180077f83 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_email.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_email.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.notification_recipient_email.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateNotificationRecipientEmail.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateNotificationRecipientEmail.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_user.py index e0b50effff67..3d10e3d8fd0e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_notification_recipient_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.notification_recipient_user.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateNotificationRecipientUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateNotificationRecipientUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_odata_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_odata_api.py index 465fcc695775..6899119258fe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_odata_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_odata_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -51,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateODataApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateODataApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_open_id_connect_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_open_id_connect_provider.py index 2713a8179e7e..68b981e1ce97 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_open_id_connect_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_open_id_connect_provider.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.open_id_connect_provider.create_or_update( @@ -49,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateOpenIdConnectProvider.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateOpenIdConnectProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy.py index 897a11e6333f..e5c7af596c54 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy.create_or_update( @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreatePolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreatePolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_fragment.py index acf5622f3098..ce35a59a8cce 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_fragment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy_fragment.begin_create_or_update( @@ -46,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreatePolicyFragment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreatePolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_restriction.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_restriction.py index 668bc46f4196..40bdeaea55de 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_restriction.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_policy_restriction.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy_restriction.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreatePolicyRestriction.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreatePolicyRestriction.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_config.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_config.py index 02fc9674bcf0..7c0a9989db63 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_config.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_config.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,14 +27,13 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.portal_config.create_or_update( resource_group_name="rg1", service_name="apimService1", portal_config_id="default", - if_match="*", parameters={ "properties": { "cors": {"allowedOrigins": ["https://contoso.com"]}, @@ -57,10 +55,12 @@ def main(): }, } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreatePortalConfig.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreatePortalConfig.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_revision.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_revision.py index ccee595915dc..bfe1e432575f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_revision.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_portal_revision.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.portal_revision.begin_create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreatePortalRevision.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreatePortalRevision.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product.py index 5550de62deac..42eada2be3cb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProduct.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api.py index 06edb7b221af..445d4544284b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_api.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateProductApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api_link.py index 2f6623fff5e8..7208ff0aa6af 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_api_link.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_api_link.create_or_update( @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductApiLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateProductApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group.py index 224ba662915b..cccc990e98c1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_group.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateProductGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group_link.py index 3e217a70c092..66f7d161db68 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_group_link.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_group_link.create_or_update( @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductGroupLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateProductGroupLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_policy.py index 8a022ca274ea..23f8752feab0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_policy.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_policy.create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_tag.py index ab44a7023f02..fbf908ae3beb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.assign_to_product( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateProductTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_wiki.py index d4556f0b5acb..3713f1f79f3d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_product_wiki.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_wiki.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateProductWiki.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateProductWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service.py index 7f306a8ee61d..ded1fb3e2cc8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_create_or_update( @@ -44,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateService.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateService.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_having_msi.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_having_msi.py index 3b445c9548bc..dff78b6a0772 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_having_msi.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_having_msi.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_create_or_update( @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceHavingMsi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateServiceHavingMsi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_vnet_with_public_ip.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_vnet_with_public_ip.py index 70732f1d7ab8..dd4280c78ddc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_vnet_with_public_ip.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_vnet_with_public_ip.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_create_or_update( @@ -53,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceInVnetWithPublicIP.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateServiceInVnetWithPublicIP.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_zones.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_zones.py index 7902c0b379d0..714f8379dd2a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_zones.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_in_zones.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_create_or_update( @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceInZones.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateServiceInZones.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_skuv2_service.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_skuv2_service.py index 924061eeb7fa..68bedbf205d4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_skuv2_service.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_skuv2_service.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_create_or_update( @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceSkuv2Service.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateServiceSkuv2Service.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_custom_hostname_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_custom_hostname_key_vault.py index c2ad1e3ef2c2..74b9cb6994de 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_custom_hostname_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_custom_hostname_key_vault.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_create_or_update( @@ -82,6 +82,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateServiceWithCustomHostnameKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_developer_portal.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_developer_portal.py index aca374a9f74c..b4abac658279 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_developer_portal.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_developer_portal.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_create_or_update( @@ -48,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceWithDeveloperPortal.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateServiceWithDeveloperPortal.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_nat_gateway_enabled.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_nat_gateway_enabled.py index 66a70a9c0386..2d3d47d1e9f6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_nat_gateway_enabled.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_nat_gateway_enabled.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_create_or_update( @@ -48,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateServiceWithNatGatewayEnabled.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_system_certificates.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_system_certificates.py index ff168dd232aa..da08b3ee84ff 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_system_certificates.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_system_certificates.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_create_or_update( @@ -54,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceWithSystemCertificates.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateServiceWithSystemCertificates.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_user_assigned_identity.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_user_assigned_identity.py index 2d117446bc93..43af4d2f7cb7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_user_assigned_identity.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_with_user_assigned_identity.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_create_or_update( @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateServiceWithUserAssignedIdentity.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_without_legacy_configuration_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_without_legacy_configuration_api.py index 13a954ed62b3..030593f7117d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_without_legacy_configuration_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_service_without_legacy_configuration_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_create_or_update( @@ -48,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateServiceWithoutLegacyConfigurationApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateServiceWithoutLegacyConfigurationApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_pass_through_api_using_wsdl_import.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_pass_through_api_using_wsdl_import.py index 654cb3f9a060..459041e360f2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_pass_through_api_using_wsdl_import.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_pass_through_api_using_wsdl_import.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -48,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_to_rest_api_using_wsdl_import.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_to_rest_api_using_wsdl_import.py index d17bacf6c29c..f0e7f285472f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_to_rest_api_using_wsdl_import.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_soap_to_rest_api_using_wsdl_import.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -47,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateSoapToRestApiUsingWsdlImport.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_standard_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_standard_gateway.py index e95cec23886a..065bd91bb422 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_standard_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_standard_gateway.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_gateway.begin_create_or_update( @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateStandardGateway.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateStandardGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_subscription.py index 652b11b2f26c..e358136e9451 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_subscription.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.subscription.create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateSubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag.py index 5468070a1432..84c229de11f1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_api_link.py index d5681110de6b..a3ffa6549505 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_api_link.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag_api_link.create_or_update( @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateTagApiLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateTagApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_operation_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_operation_link.py index 4255a321d12c..3af9368ce8c1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_operation_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_operation_link.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag_operation_link.create_or_update( @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateTagOperationLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateTagOperationLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_product_link.py index 3294566cc3b2..5a7ac5dea361 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tag_product_link.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag_product_link.create_or_update( @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateTagProductLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateTagProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_template.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_template.py index e8897bc17a01..ffecf33bdd46 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_template.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_template.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.email_template.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateTemplate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateTemplate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tenant_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tenant_access.py index 30c6adcac054..9a8a09ed2ac4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tenant_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_tenant_access.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tenant_access.create( resource_group_name="rg1", service_name="apimService1", access_name="access", - if_match="*", parameters={"properties": {"enabled": True}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateTenantAccess.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateTenantAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_user.py index 232a7494e507..976fd3d9591f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.user.create_or_update( @@ -47,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_websocket_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_websocket_api.py index f44de3b393ad..526df3900f5d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_websocket_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_websocket_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.begin_create_or_update( @@ -49,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWebsocketApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWebsocketApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace.py index cc950e49d248..3efb9b371e77 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspace.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspace.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_ai_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_ai_logger.py index c4a0e30fd0dd..8080bc73cdea 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_ai_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_ai_logger.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_logger.create_or_update( @@ -47,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceAILogger.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceAILogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api.py index 42c87299316e..245b193cbbf5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api.begin_create_or_update( @@ -53,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_diagnostic.py index 54ec0c567984..591c5221c6a1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_diagnostic.create_or_update( @@ -56,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation.py index 582339386bf2..f887e2102435 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_operation.create_or_update( @@ -66,6 +65,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiOperation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation_policy.py index fee33afbd76f..27c27442a7a8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_operation_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_operation_policy.create_or_update( @@ -48,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiOperationPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_policy.py index fcc8d10322d2..51de36339b96 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_policy.create_or_update( @@ -47,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_release.py index 76e27e2cf4c8..c22167b5fde7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_release.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_release.create_or_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiRelease.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_schema.py index 3f772f266975..ab17893a3339 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_schema.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_schema.begin_create_or_update( @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_version_set.py index e8497d37c918..17a29a099d9c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_api_version_set.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_version_set.create_or_update( @@ -47,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceApiVersionSet.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_proxy_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_proxy_backend.py index 4ec13674cb0a..b303432617f2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_proxy_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_proxy_backend.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_backend.create_or_update( @@ -54,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceBackendProxyBackend.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceBackendProxyBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_service_fabric.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_service_fabric.py index 2325be3a7ec7..c6020c666d8e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_service_fabric.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_backend_service_fabric.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_backend.create_or_update( @@ -57,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceBackendServiceFabric.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceBackendServiceFabric.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate.py index 0f7f8b7c47a2..69f45bd8bd89 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_certificate.create_or_update( @@ -46,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceCertificate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate_with_key_vault.py index e91b7cbafb68..d1ce3a509612 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_certificate_with_key_vault.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_certificate.create_or_update( @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceCertificateWithKeyVault.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceCertificateWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_diagnostic.py index cebe431164a5..dc707702c005 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_diagnostic.create_or_update( @@ -55,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_eh_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_eh_logger.py index 18eb182deacb..3afa381fa303 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_eh_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_eh_logger.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_logger.create_or_update( @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceEHLogger.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceEHLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group.py index e87aa82b37e4..368b7a420a43 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_group.create_or_update( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_external.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_external.py index 48027a821d15..3d9d627a4319 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_external.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_external.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_group.create_or_update( @@ -48,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceGroupExternal.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceGroupExternal.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_user.py index f9dcca2c5339..57bfd32f5c02 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_group_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_group_user.create( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceGroupUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceGroupUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value.py index c6782620ae21..cd6952b37e17 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_named_value.begin_create_or_update( @@ -43,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceNamedValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value_with_key_vault.py index 375443d47cdd..7d3ab68c659f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_named_value_with_key_vault.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_named_value.begin_create_or_update( @@ -51,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceNamedValueWithKeyVault.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceNamedValueWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification.py index 8f2fd5ee7f81..abaa1a13c548 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_notification.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceNotification.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceNotification.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_email.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_email.py index 145a2951157c..0711278a8a87 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_email.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_email.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_notification_recipient_email.create_or_update( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceNotificationRecipientEmail.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceNotificationRecipientEmail.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_user.py index 6ca5e6b40ece..43fef287e4ca 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_notification_recipient_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_notification_recipient_user.create_or_update( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceNotificationRecipientUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceNotificationRecipientUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy.py index 4a43c76c4d3e..6c79a40644e3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_policy.create_or_update( @@ -46,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspacePolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspacePolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_fragment.py index d6b83c879fdc..0fd4c340748f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_fragment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_policy_fragment.begin_create_or_update( @@ -47,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspacePolicyFragment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspacePolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_non_xml_encoded.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_non_xml_encoded.py index 6fe64656fc25..e0cc8fcfeaba 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_non_xml_encoded.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_policy_non_xml_encoded.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_policy.create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_premium_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_premium_gateway.py index 39d286e6b6a8..10dec301d293 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_premium_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_premium_gateway.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_gateway.begin_create_or_update( @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspacePremiumGateway.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspacePremiumGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product.py index 4852c29f8aa4..32aee7ca1550 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product.create_or_update( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceProduct.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_api_link.py index 94c1f922dccd..1cc7a86bc7c4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_api_link.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product_api_link.create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceProductApiLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceProductApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_group_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_group_link.py index 819fca3d43d6..62420fccda50 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_group_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_group_link.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product_group_link.create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceProductGroupLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceProductGroupLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_policy.py index f43bd0ab9fe8..09d5c0962773 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_product_policy.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product_policy.create_or_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceProductPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_schema.py index 5b61b5464791..701b97f2eb07 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_schema.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_global_schema.begin_create_or_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_subscription.py index 369f75115bdc..0b2411c9d137 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_subscription.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_subscription.create_or_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceSubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag.py index 2c26a8a00690..3c106183bc6b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag.create_or_update( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_api_link.py index 2b078a2f7de7..8d6ace5f3ecf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_api_link.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag_api_link.create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceTagApiLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceTagApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_operation_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_operation_link.py index 6b434acb6be5..21f5df7b4824 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_operation_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_operation_link.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag_operation_link.create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceTagOperationLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceTagOperationLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_product_link.py index ece3ad858426..ea1f0508f768 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_create_workspace_tag_product_link.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag_product_link.create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementCreateWorkspaceTagProductLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementCreateWorkspaceTagProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api.py index 601e1939ea70..a4a544365f50 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api.begin_delete( resource_group_name="rg1", service_name="apimService1", api_id="echo-api", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ).result() -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_diagnostic.py index d01a69046626..593766d5c249 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_diagnostic.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", api_id="57d1f7558aa04f15146d9d8a", diagnostic_id="applicationinsights", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue.py index 84505cb92252..64b32b08f50a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_issue.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", api_id="57d1f7558aa04f15146d9d8a", issue_id="57d2ef278aa04f0ad01d6cdc", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiIssue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiIssue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_attachment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_attachment.py index ca721d0a9bf8..1bd3cd2b78c0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_attachment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_attachment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_issue_attachment.delete( @@ -37,10 +36,11 @@ def main(): api_id="57d1f7558aa04f15146d9d8a", issue_id="57d2ef278aa04f0ad01d6cdc", attachment_id="57d2ef278aa04f0888cba3f3", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiIssueAttachment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiIssueAttachment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_comment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_comment.py index ee1ca5b60cda..b7b60ac8cba6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_comment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_issue_comment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_issue_comment.delete( @@ -37,10 +36,11 @@ def main(): api_id="57d1f7558aa04f15146d9d8a", issue_id="57d2ef278aa04f0ad01d6cdc", comment_id="599e29ab193c3c0bd0b3e2fb", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiIssueComment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiIssueComment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation.py index 9e8081590529..b03037758ebc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_operation.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", api_id="57d2ef278aa04f0888cba3f3", operation_id="57d2ef278aa04f0ad01d6cdc", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiOperation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_policy.py index e169c3054182..608b2cef562c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_operation_policy.delete( @@ -37,10 +36,11 @@ def main(): api_id="testapi", operation_id="testoperation", policy_id="policy", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiOperationPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_tag.py index 02e56ce788df..4827a81b23b3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_operation_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.tag.detach_from_operation( @@ -40,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiOperationTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiOperationTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_policy.py index 5fbc7d155997..7866421ba62b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_policy.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", api_id="loggerId", policy_id="policy", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_release.py index 94aab43f1e1d..2d0168b1f929 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_release.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_release.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", api_id="5a5fcc09124a7fa9b89f2f1d", release_id="testrev", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiRelease.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_schema.py index e9962e7efacf..22bcc6272f0b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_schema.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_schema.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", api_id="59d5b28d1f7fab116c282650", schema_id="59d5b28e1f7fab116402044e", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag.py index 9ef3ca2b5bf3..002fe8269652 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.tag.detach_from_api( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag_description.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag_description.py index 8d6bb4cfbbea..d81b82aee7e9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag_description.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tag_description.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_tag_description.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", api_id="59d5b28d1f7fab116c282650", tag_description_id="59d5b28e1f7fab116402044e", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiTagDescription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiTagDescription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tool.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tool.py index b865856756a7..1f9974f54f6e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tool.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_tool.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_tool.delete( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiTool.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiTool.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_version_set.py index a377df708b0f..30599d96cc2c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_version_set.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_version_set.delete( resource_group_name="rg1", service_name="apimService1", version_set_id="a1", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiVersionSet.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_wiki.py index e92faf965d6e..826e44c016d2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_api_wiki.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_wiki.delete( resource_group_name="rg1", service_name="apimService1", api_id="57d1f7558aa04f15146d9d8a", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteApiWiki.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteApiWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization.py index ec339a73a179..e54a175fc4e0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.authorization.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", authorization_provider_id="aadwithauthcode", authorization_id="authz1", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteAuthorization.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteAuthorization.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_access_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_access_policy.py index 23a27d5f7bde..662ce94b3d1d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_access_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_access_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.authorization_access_policy.delete( @@ -37,10 +36,11 @@ def main(): authorization_provider_id="aadwithauthcode", authorization_id="authz1", authorization_access_policy_id="fe0bed83-631f-4149-bd0b-0464b1bc7cab", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteAuthorizationAccessPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteAuthorizationAccessPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_provider.py index a31620d346be..f6e4624bc9d4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_provider.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.authorization_provider.delete( resource_group_name="rg1", service_name="apimService1", authorization_provider_id="aadwithauthcode", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteAuthorizationProvider.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteAuthorizationProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_server.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_server.py index 9dbc86760a91..f21cf2084473 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_server.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_authorization_server.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.authorization_server.delete( resource_group_name="rg1", service_name="apimService1", authsid="newauthServer2", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteAuthorizationServer.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteAuthorizationServer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_backend.py index 70658774da62..7b8eb3732bb4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_backend.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.backend.delete( resource_group_name="rg1", service_name="apimService1", backend_id="sfbackend", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteBackend.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_cache.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_cache.py index fa005b61af80..1390f37107df 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_cache.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_cache.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.cache.delete( resource_group_name="rg1", service_name="apimService1", cache_id="southindia", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteCache.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteCache.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_certificate.py index 42c90dcac848..fc70a6263bad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_certificate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.certificate.delete( resource_group_name="rg1", service_name="apimService1", certificate_id="tempcert", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteCertificate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application.py index cb397467c859..26ad3e9d85ce 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.client_application.delete( @@ -38,6 +37,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteClientApplication.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteClientApplication.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application_product_link.py index 7c75d029d051..0e9e119b0065 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_client_application_product_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.client_application_product_link.delete( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteClientApplicationProductLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteClientApplicationProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type.py index 4558e65c360c..ba37764822c0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.content_type.delete( resource_group_name="rg1", service_name="apimService1", content_type_id="page", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteContentType.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteContentType.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type_content_item.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type_content_item.py index e8370c0cb08f..13a10f7c74ef 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type_content_item.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_content_type_content_item.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.content_item.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", content_type_id="page", content_item_id="4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteContentTypeContentItem.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteContentTypeContentItem.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_diagnostic.py index 7bb871aa9f12..5f48bd93a2c2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.diagnostic.delete( resource_group_name="rg1", service_name="apimService1", diagnostic_id="applicationinsights", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_documentation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_documentation.py index 427ee5e22a39..dc13b47ae517 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_documentation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_documentation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.documentation.delete( resource_group_name="rg1", service_name="apimService1", documentation_id="57d1f7558aa04f15146d9d8a", - if_match="str", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteDocumentation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteDocumentation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway.py index 130f4e96d721..5b42aa118c31 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.gateway.delete( resource_group_name="rg1", service_name="apimService1", gateway_id="gw1", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGateway.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_api.py index 857058cd05b7..2b42865a6af7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.gateway_api.delete( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGatewayApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteGatewayApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_certificate_authority.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_certificate_authority.py index df332133bb6a..6966320d37ad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_certificate_authority.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_certificate_authority.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.gateway_certificate_authority.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", gateway_id="gw1", certificate_id="default", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGatewayCertificateAuthority.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteGatewayCertificateAuthority.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_config_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_config_connection.py index 9a180a07ccc6..21e969f47ebc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_config_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_config_connection.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_gateway_config_connection.begin_delete( resource_group_name="rg1", gateway_name="standard-gw-01", config_connection_name="gcc-01", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ).result() -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGatewayConfigConnection.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteGatewayConfigConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_binding.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_binding.py index 0e53281ff68e..62e99825f416 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_binding.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_binding.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_gateway_hostname_binding.begin_delete( resource_group_name="rg1", gateway_name="standard-gw-01", hostname_binding_name="gcc-01", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ).result() -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGatewayHostnameBinding.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteGatewayHostnameBinding.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_configuration.py index ffcd9dd4d2e3..75812741ba8d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_gateway_hostname_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.gateway_hostname_configuration.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", gateway_id="gw1", hc_id="default", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGatewayHostnameConfiguration.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteGatewayHostnameConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_global_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_global_schema.py index d2dbe26136b3..9ba0a4a0f154 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_global_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_global_schema.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.global_schema.delete( resource_group_name="rg1", service_name="apimService1", schema_id="schema1", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGlobalSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteGlobalSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver.py index f5ee136449d1..2c4bec9af343 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.graph_ql_api_resolver.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", api_id="57d2ef278aa04f0888cba3f3", resolver_id="57d2ef278aa04f0ad01d6cdc", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGraphQLApiResolver.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteGraphQLApiResolver.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver_policy.py index 0597265ec904..85316da25e80 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_graph_ql_api_resolver_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.graph_ql_api_resolver_policy.delete( @@ -37,10 +36,11 @@ def main(): api_id="testapi", resolver_id="testResolver", policy_id="policy", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteGraphQLApiResolverPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group.py index 862f9a7f8425..98e9c1447e09 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.group.delete( resource_group_name="rg1", service_name="apimService1", group_id="aadGroup", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group_user.py index ef6598d60b3b..06e301621bee 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_group_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.group_user.delete( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteGroupUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteGroupUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_identity_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_identity_provider.py index 58f2e6811268..8cdcefb26bae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_identity_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_identity_provider.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.identity_provider.delete( resource_group_name="rg1", service_name="apimService1", identity_provider_name="aad", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteIdentityProvider.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteIdentityProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_logger.py index 116c8ba0a95b..a9e45612ec79 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_logger.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.logger.delete( resource_group_name="rg1", service_name="apimService1", logger_id="loggerId", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteLogger.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_named_value.py index 36c8d84878d8..9d2a8d7d0fd7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_named_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.named_value.delete( resource_group_name="rg1", service_name="apimService1", named_value_id="testprop2", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteNamedValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_email.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_email.py index a086b45d2a54..130814ba01c5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_email.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_email.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.notification_recipient_email.delete( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteNotificationRecipientEmail.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteNotificationRecipientEmail.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_user.py index 294c0430e76c..535fece15d10 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_notification_recipient_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.notification_recipient_user.delete( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteNotificationRecipientUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteNotificationRecipientUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_open_id_connect_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_open_id_connect_provider.py index 73877e8db254..f80d72df52b8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_open_id_connect_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_open_id_connect_provider.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.open_id_connect_provider.delete( resource_group_name="rg1", service_name="apimService1", opid="templateOpenIdConnect3", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteOpenIdConnectProvider.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteOpenIdConnectProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy.py index 7a6b1bca480d..b970307323c4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.policy.delete( resource_group_name="rg1", service_name="apimService1", policy_id="policy", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeletePolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeletePolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_fragment.py index 4c21c4b100d9..b9384ce7f2ad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_fragment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.policy_fragment.delete( resource_group_name="rg1", service_name="apimService1", id="policyFragment1", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeletePolicyFragment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeletePolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_restriction.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_restriction.py index d4ab94a95786..93cae759f2d1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_restriction.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_policy_restriction.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.policy_restriction.delete( @@ -38,6 +37,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeletePolicyRestriction.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeletePolicyRestriction.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_private_endpoint_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_private_endpoint_connection.py index a312c8a7bb43..07aeb8d3b12f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_private_endpoint_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_private_endpoint_connection.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.private_endpoint_connection.begin_delete( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeletePrivateEndpointConnection.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeletePrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product.py index 48be9fe3d035..9a70446f024e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.product.delete( resource_group_name="rg1", service_name="apimService1", product_id="testproduct", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProduct.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api.py index 420e920ad065..a8f42827ec3d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.product_api.delete( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteProductApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api_link.py index 8ef40bfee787..5bf86414421e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_api_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.product_api_link.delete( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductApiLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteProductApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group.py index c5c5acba19d8..56e0aa1e7333 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.product_group.delete( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteProductGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group_link.py index 092ee23df58c..2f6710a98f81 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_group_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.product_group_link.delete( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductGroupLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteProductGroupLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_policy.py index 7f9cfd403d16..78c40ac4b77f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.product_policy.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", product_id="testproduct", policy_id="policy", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_tag.py index 1ef11320fa50..4b75b7c8b9d9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.tag.detach_from_product( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteProductTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_wiki.py index cb5298522b33..01900673741c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_product_wiki.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.product_wiki.delete( resource_group_name="rg1", service_name="apimService1", product_id="57d1f7558aa04f15146d9d8a", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteProductWiki.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteProductWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_subscription.py index 98a82604a5cf..d04d34e903cf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.subscription.delete( resource_group_name="rg1", service_name="apimService1", sid="testsub", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteSubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag.py index c770f449e88b..aa5d573bd69b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.tag.delete( resource_group_name="rg1", service_name="apimService1", tag_id="tagId1", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_api_link.py index a4be7abe43ac..99329c3d7295 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_api_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.tag_api_link.delete( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteTagApiLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteTagApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_operation_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_operation_link.py index c84bad2663cc..e83dceb67743 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_operation_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_operation_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.tag_operation_link.delete( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteTagOperationLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteTagOperationLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_product_link.py index 39144d2738c6..14b6ee00c727 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_tag_product_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.tag_product_link.delete( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteTagProductLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteTagProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_template.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_template.py index f12c6846b184..306cb0a952ef 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_template.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_template.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.email_template.delete( resource_group_name="rg1", service_name="apimService1", template_name="newIssueNotificationMessage", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteTemplate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteTemplate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_user.py index 03bb800c42f0..24d56d25567d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.user.begin_delete( resource_group_name="rg1", service_name="apimService1", user_id="5931a75ae4bbd512288c680b", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ).result() -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace.py index 4aad03a8f255..eeb91c916442 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace.delete( resource_group_name="rg1", service_name="apimService1", workspace_id="wks1", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspace.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspace.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api.py index 27968d874d12..3e804ab0023d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_api.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", api_id="echo-api", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_diagnostic.py index e16178cc9092..b9a03fd5aedb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_api_diagnostic.delete( @@ -37,10 +36,11 @@ def main(): workspace_id="wks1", api_id="57d1f7558aa04f15146d9d8a", diagnostic_id="applicationinsights", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation.py index 6cf30d63a874..0f25223ef19d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_api_operation.delete( @@ -37,10 +36,11 @@ def main(): workspace_id="wks1", api_id="57d2ef278aa04f0888cba3f3", operation_id="57d2ef278aa04f0ad01d6cdc", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiOperation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation_policy.py index 9f4109cfb1f2..7e65fb483b5e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_operation_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_api_operation_policy.delete( @@ -38,10 +37,11 @@ def main(): api_id="testapi", operation_id="testoperation", policy_id="policy", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiOperationPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_policy.py index 9e97901ee80e..69d84d355d3a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_api_policy.delete( @@ -37,10 +36,11 @@ def main(): workspace_id="wks1", api_id="loggerId", policy_id="policy", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_release.py index 38da48cbb2ae..35de36abe024 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_release.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_api_release.delete( @@ -37,10 +36,11 @@ def main(): workspace_id="wks1", api_id="5a5fcc09124a7fa9b89f2f1d", release_id="testrev", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiRelease.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_schema.py index 973a601debc9..74e0b101c8ca 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_schema.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_api_schema.delete( @@ -37,10 +36,11 @@ def main(): workspace_id="wks1", api_id="59d5b28d1f7fab116c282650", schema_id="59d5b28e1f7fab116402044e", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_version_set.py index 374e1ed9b449..ed67dc1fef7a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_api_version_set.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_api_version_set.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", version_set_id="a1", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceApiVersionSet.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_backend.py index 113604e7bb2c..3c13889fec90 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_backend.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_backend.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", backend_id="sfbackend", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceBackend.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_certificate.py index 134739ba6a22..eea772457dc3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_certificate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_certificate.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", certificate_id="tempcert", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceCertificate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_diagnostic.py index 379a31e14926..849057399a96 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_diagnostic.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", diagnostic_id="applicationinsights", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group.py index d218e6f3cacb..0f1cd4ce29f9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_group.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", group_id="aadGroup", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group_user.py index eef3ac129f2a..6982db231e92 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_group_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_group_user.delete( @@ -40,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceGroupUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceGroupUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_logger.py index ecc6d0a67927..e03dd945e8e7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_logger.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_logger.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", logger_id="loggerId", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceLogger.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_named_value.py index 03b1d53457ab..12d4fce9a02b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_named_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_named_value.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", named_value_id="testprop2", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceNamedValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_email.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_email.py index de9a0308f36a..3801cca470f6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_email.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_email.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_notification_recipient_email.delete( @@ -40,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_user.py index f21dd8951c5b..f679f4978e09 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_notification_recipient_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_notification_recipient_user.delete( @@ -40,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceNotificationRecipientUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceNotificationRecipientUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy.py index 31e64eaeab8f..b860934d8ead 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_policy.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", policy_id="policy", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspacePolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspacePolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy_fragment.py index 8b29ca3e5d88..d4f34ff46f93 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_policy_fragment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_policy_fragment.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", id="policyFragment1", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspacePolicyFragment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspacePolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product.py index ae54fdf76840..b20dd2d01e07 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_product.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", product_id="testproduct", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceProduct.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_api_link.py index 4dfa956e2242..bc9e4107e72a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_api_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_product_api_link.delete( @@ -40,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceProductApiLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceProductApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_group_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_group_link.py index 0bad0eef405f..a8a72a5ec676 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_group_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_group_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_product_group_link.delete( @@ -40,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceProductGroupLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceProductGroupLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_policy.py index a0f8120635fd..02f1a693f645 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_product_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_product_policy.delete( @@ -37,10 +36,11 @@ def main(): workspace_id="wks1", product_id="testproduct", policy_id="policy", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceProductPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_schema.py index 7652e80b889b..0bae7644d203 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_schema.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_global_schema.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", schema_id="schema1", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_subscription.py index b011ee3144fc..6c311eda37a5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_subscription.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", sid="testsub", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceSubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag.py index 5401ba64f4ee..b2319981927c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_tag.delete( @@ -36,10 +35,11 @@ def main(): service_name="apimService1", workspace_id="wks1", tag_id="tagId1", - if_match="*", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_api_link.py index fa1bee11ea80..5187cad33312 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_api_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_tag_api_link.delete( @@ -40,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceTagApiLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceTagApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_operation_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_operation_link.py index 2965f59a4c4c..87a481c1abab 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_operation_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_operation_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_tag_operation_link.delete( @@ -40,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceTagOperationLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceTagOperationLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_product_link.py index fc66136ab31b..a6ff01acd133 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_delete_workspace_tag_product_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_tag_product_link.delete( @@ -40,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeleteWorkspaceTagProductLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeleteWorkspaceTagProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_list_by_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_list_by_subscription.py index 7bbcceaca947..a3d749514759 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_list_by_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.deleted_services.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeletedServicesListBySubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeletedServicesListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_purge.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_purge.py index b46cc81ac1e9..4f7111198d27 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_purge.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_deleted_services_purge.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,16 +27,16 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.deleted_services.begin_purge( - service_name="apimService3", location="westus", + service_name="apimService3", ).result() print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementDeletedServicesPurge.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementDeletedServicesPurge.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_delete_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_delete_gateway.py index 5ffc1a976e8e..2a70ee1522a1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_delete_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_delete_gateway.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_gateway.begin_delete( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayDeleteGateway.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGatewayDeleteGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_generate_token.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_generate_token.py index 2d4eeebb1a34..5e9fdc3c9cde 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_generate_token.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_generate_token.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway.generate_token( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayGenerateToken.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGatewayGenerateToken.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_get_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_get_gateway.py index 4590d0ca85ac..f4899a002b48 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_get_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_get_gateway.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_gateway.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayGetGateway.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGatewayGetGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_invalidate_debug_credentials.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_invalidate_debug_credentials.py index 9557c2f662f5..a528ef445414 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_invalidate_debug_credentials.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_invalidate_debug_credentials.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.gateway.invalidate_debug_credentials( @@ -38,6 +37,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayInvalidateDebugCredentials.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGatewayInvalidateDebugCredentials.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_debug_credentials.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_debug_credentials.py index 723d7ac04f98..20297a899c5b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_debug_credentials.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_debug_credentials.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway.list_debug_credentials( @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayListDebugCredentials.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGatewayListDebugCredentials.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_keys.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_keys.py index 52cfc5ae7136..43daebf2895c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_keys.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_keys.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway.list_keys( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayListKeys.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGatewayListKeys.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_trace.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_trace.py index 4084579b055a..4dbe00f724b9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_trace.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_list_trace.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway.list_trace( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayListTrace.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGatewayListTrace.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_regenerate_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_regenerate_key.py index 9352ad179712..a064e1535bfd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_regenerate_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_gateway_regenerate_key.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.gateway.regenerate_key( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGatewayRegenerateKey.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGatewayRegenerateKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_contract.py index 54cdfc1190a9..7f1c89603bdb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_contract.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_contract.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiContract.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiContract.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_diagnostic.py index 9b0078de8474..65e87191fbd2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_diagnostic.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api2dot0.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api2dot0.py index b38595fcbc57..e2202b5071dc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api2dot0.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api2dot0.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_export.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiExportInOpenApi2dot0.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiExportInOpenApi2dot0.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api3dot0.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api3dot0.py index 1e9e2a84137c..60590f303399 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api3dot0.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_export_in_open_api3dot0.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_export.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiExportInOpenApi3dot0.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiExportInOpenApi3dot0.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue.py index d790bb9cb304..623dde510314 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_issue.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiIssue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiIssue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_attachment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_attachment.py index d187a2cd9825..c4b3c5c4a1a3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_attachment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_attachment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_issue_attachment.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiIssueAttachment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiIssueAttachment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_comment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_comment.py index 01a9ec363dc1..029f24f40cae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_comment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_issue_comment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_issue_comment.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiIssueComment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiIssueComment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation.py index d4281441e0e7..423f26f4f0c2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_operation.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiOperation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_pet_store.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_pet_store.py index 6bda10210bcb..80738c52d8cf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_pet_store.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_pet_store.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_operation.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiOperationPetStore.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiOperationPetStore.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_policy.py index e08121d1b843..c48e5dfd990e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_operation_policy.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiOperationPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_tag.py index 5eef094bf47c..5a2189c5c23c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_operation_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.get_by_operation( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiOperationTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiOperationTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_policy.py index f5ded1fc9acc..bfde53310fd9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_policy.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_release.py index 239b7f2bcda3..12116b8509cc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_release.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_release.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiRelease.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_revision.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_revision.py index 7085ef95df54..2a2e6c252a98 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_revision.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_revision.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiRevision.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiRevision.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_schema.py index 9424c2443e75..d3812f8b6082 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_schema.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_schema.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag.py index 69e7b546b20c..7e02e26cb269 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.get_by_api( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag_description.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag_description.py index 9c8d290cd4af..8048e9f32738 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag_description.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tag_description.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_tag_description.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiTagDescription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiTagDescription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tool.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tool.py index 0a7d6147a42b..29cb3222c7fe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tool.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_tool.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_tool.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiTool.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiTool.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_version_set.py index 4e4bd98c591c..3fd71c75fb7f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_version_set.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_version_set.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiVersionSet.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_wiki.py index 30d09ef101b5..4e47171da14b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_api_wiki.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_wiki.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetApiWiki.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetApiWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization.py index 1add975c79c4..7c331ff300b3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetAuthorization.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetAuthorization.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_access_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_access_policy.py index d0df08408698..f9b185b1dbe6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_access_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_access_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_access_policy.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetAuthorizationAccessPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetAuthorizationAccessPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_login_request.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_login_request.py index 99fa1659c23d..63086644cca3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_login_request.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_login_request.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_login_links.post( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetAuthorizationLoginRequest.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetAuthorizationLoginRequest.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_provider.py index 1f9f86aedbbf..8416c348773f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_provider.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_provider.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetAuthorizationProvider.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetAuthorizationProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_server.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_server.py index a9fbc57b20e7..966c68121c1a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_server.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_authorization_server.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_server.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetAuthorizationServer.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetAuthorizationServer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_backend.py index 8bad8515d946..8b63cd6f21e4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_backend.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.backend.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetBackend.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_cache.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_cache.py index 0ea95669c3b5..60d284e711b7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_cache.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_cache.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.cache.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetCache.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetCache.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate.py index d8da997c2a21..9c3660824dc2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.certificate.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetCertificate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate_with_key_vault.py index 3e922e0859ac..315da1f8fcba 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_certificate_with_key_vault.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.certificate.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetCertificateWithKeyVault.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetCertificateWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application.py index 765149572d89..83dc13a3f531 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.client_application.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetClientApplication.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetClientApplication.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application_product_link.py index dc9656afac8e..472996db15b0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_client_application_product_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.client_application_product_link.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetClientApplicationProductLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetClientApplicationProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type.py index 715f6b8203c3..07b71c975ae5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.content_type.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetContentType.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetContentType.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type_content_item.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type_content_item.py index ddd6f6e63c1d..4ab68b8a51b0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type_content_item.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_content_type_content_item.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.content_item.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetContentTypeContentItem.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetContentTypeContentItem.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_deleted_service_by_name.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_deleted_service_by_name.py index 2da709903f80..0462a19a5c03 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_deleted_service_by_name.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_deleted_service_by_name.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,16 +27,16 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.deleted_services.get_by_name( - service_name="apimService3", location="westus", + service_name="apimService3", ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetDeletedServiceByName.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetDeletedServiceByName.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_diagnostic.py index 34df9837386c..5145731f4479 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.diagnostic.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_documentation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_documentation.py index 36c5d7f1212f..d996ab541ad8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_documentation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_documentation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.documentation.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetDocumentation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetDocumentation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway.py index 154335f539ad..b6dd780a067b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGateway.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_certificate_authority.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_certificate_authority.py index 96f8b50208a3..1b2b87f3f209 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_certificate_authority.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_certificate_authority.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway_certificate_authority.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGatewayCertificateAuthority.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetGatewayCertificateAuthority.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_config_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_config_connection.py index 01cfcdefcf6d..5dc9ecefea57 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_config_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_config_connection.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_gateway_config_connection.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGatewayConfigConnection.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetGatewayConfigConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_binding.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_binding.py index f5f08e28b8be..cf800d027d5e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_binding.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_binding.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_gateway_hostname_binding.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGatewayHostnameBinding.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetGatewayHostnameBinding.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_configuration.py index bfc7f7db31dd..cb29edbf1a5c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_gateway_hostname_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway_hostname_configuration.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGatewayHostnameConfiguration.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetGatewayHostnameConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema1.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema1.py index 5a2b10f07418..4ae47bccb964 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema1.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema1.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.global_schema.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGlobalSchema1.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetGlobalSchema1.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema2.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema2.py index fc4009cad014..879fa609f80e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema2.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_global_schema2.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.global_schema.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGlobalSchema2.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetGlobalSchema2.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver.py index 5cd9222598b4..cf4ff3c740f8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.graph_ql_api_resolver.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGraphQLApiResolver.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetGraphQLApiResolver.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver_policy.py index 821c42ee89f4..8c04dcd1276c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_graph_ql_api_resolver_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.graph_ql_api_resolver_policy.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGraphQLApiResolverPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetGraphQLApiResolverPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_group.py index 2170255efe45..e26e54e356f9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.group.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_identity_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_identity_provider.py index 9088d179f49c..d482369c13cc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_identity_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_identity_provider.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.identity_provider.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetIdentityProvider.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetIdentityProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_issue.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_issue.py index 613965db23e6..877b55fb8f4b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_issue.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_issue.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.issue.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetIssue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetIssue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_logger.py index a2d391da4a7c..957d7b24aa66 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_logger.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.logger.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetLogger.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value.py index daed17cbf215..91b915b438f8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.named_value.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetNamedValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value_with_key_vault.py index c53327afe7a3..4e06d2ac1381 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_named_value_with_key_vault.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.named_value.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetNamedValueWithKeyVault.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetNamedValueWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_notification.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_notification.py index 2a1465650bcc..455e0fa4f1ed 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_notification.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_notification.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.notification.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetNotification.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetNotification.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_open_id_connect_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_open_id_connect_provider.py index aaa7f371a57b..d66237705699 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_open_id_connect_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_open_id_connect_provider.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.open_id_connect_provider.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetOpenIdConnectProvider.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetOpenIdConnectProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_result.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_result.py index a8cd01294efb..2a66bb7a3cca 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_result.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_result.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.operations_results.get( @@ -37,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetOperationResult.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetOperationResult.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_status.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_status.py index 5330445f3aae..fa0171851c5f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_status.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_operation_status.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.operation_status.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetOperationStatus.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy.py index d0457cce474b..f45e72ee3ca5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_format.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_format.py index 7bc5d7653c09..2581cfffb040 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_format.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_format.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPolicyFormat.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetPolicyFormat.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment.py index be9e437a5145..fabaad17bc33 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy_fragment.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPolicyFragment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetPolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment_format.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment_format.py index 72af061438dc..db6fa1d8e0af 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment_format.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_fragment_format.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy_fragment.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPolicyFragmentFormat.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetPolicyFragmentFormat.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_restriction.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_restriction.py index 2937d0c0bb40..fe8b9739e39d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_restriction.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_policy_restriction.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy_restriction.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPolicyRestriction.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetPolicyRestriction.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_portal_revision.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_portal_revision.py index d5e0e337596f..c171edf362ea 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_portal_revision.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_portal_revision.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.portal_revision.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPortalRevision.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetPortalRevision.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_endpoint_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_endpoint_connection.py index 9fcda812eed9..8d5212e9717b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_endpoint_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_endpoint_connection.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_endpoint_connection.get_by_name( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPrivateEndpointConnection.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_link_group_resource.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_link_group_resource.py index 60cf089e04df..55ac0642773e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_link_group_resource.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_private_link_group_resource.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_endpoint_connection.get_private_link_resource( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetPrivateLinkGroupResource.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetPrivateLinkGroupResource.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product.py index 9605376fe669..4c09d4ef182e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetProduct.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_api_link.py index f14771e8e93c..18f3597de6a7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_api_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_api_link.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetProductApiLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetProductApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_group_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_group_link.py index 67397fb4124d..e55de7b613b7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_group_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_group_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_group_link.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetProductGroupLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetProductGroupLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_policy.py index d2c23129c491..7f226ce305f4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_policy.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetProductPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_tag.py index e8b57d5daccc..f241e0156a9f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.get_by_product( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetProductTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetProductTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_wiki.py index 11762a444bd5..3cfbf36e1750 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_product_wiki.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_wiki.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetProductWiki.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetProductWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys.py index 139c81231ec7..5e76ec03a3ef 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.quota_by_counter_keys.list_by_service( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetQuotaCounterKeys.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetQuotaCounterKeys.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys_by_quota_period.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys_by_quota_period.py index 5289483658ac..9c000639ea5b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys_by_quota_period.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_quota_counter_keys_by_quota_period.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.quota_by_period_keys.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_api.py index a250877a6146..5686359e3d10 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.reports.list_by_api( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetReportsByApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_geo.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_geo.py index 81f621645910..7a980542c8e4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_geo.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_geo.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.reports.list_by_geo( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByGeo.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetReportsByGeo.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_operation.py index e94fe1de051a..db8a580c9524 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_operation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.reports.list_by_operation( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByOperation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetReportsByOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_product.py index 15d4b2118877..316f34e96620 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_product.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.reports.list_by_product( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByProduct.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetReportsByProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_request.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_request.py index f276ef3d4d95..9a918e3322ff 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_request.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_request.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.reports.list_by_request( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByRequest.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetReportsByRequest.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_subscription.py index 3b3f5437e74d..18b98c126d9c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.reports.list_by_subscription( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsBySubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetReportsBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_time.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_time.py index 8f70071c28b8..334a78ae892a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_time.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_time.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -30,7 +29,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.reports.list_by_time( @@ -43,6 +42,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByTime.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetReportsByTime.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_user.py index ec338a35ea78..6ddae9abf9f6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_reports_by_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.reports.list_by_user( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetReportsByUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetReportsByUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_subscription.py index 5f62505230d8..6a7c2d49d306 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.subscription.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetSubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag.py index 82c1dec40b4d..1a24b3a9ab81 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_api_link.py index e1a38c12d211..fd1379b8dd92 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_api_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag_api_link.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTagApiLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetTagApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_operation_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_operation_link.py index 2d583be63e26..1c7f4d2bffd8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_operation_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_operation_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag_operation_link.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTagOperationLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetTagOperationLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_product_link.py index a35b0797852c..d4a158d57e8f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tag_product_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag_product_link.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTagProductLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetTagProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_template.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_template.py index b88ef3ca7889..0a0c53c8b1fa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_template.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_template.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.email_template.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTemplate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetTemplate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_access.py index b80b0d2add73..2fdcb12f1df1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_access.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tenant_access.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTenantAccess.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetTenantAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_git_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_git_access.py index c29cd3b747e7..bcff657af6be 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_git_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_git_access.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tenant_access.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTenantGitAccess.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetTenantGitAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_settings.py index 68104298ee97..5660ce6c57b8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_settings.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_tenant_settings.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tenant_settings.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetTenantSettings.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetTenantSettings.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user.py index 69eb90c6256e..7bb89d29acb5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.user.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user_subscription.py index 290237ae51ca..b7d89a00e9a5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_user_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.user_subscription.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetUserSubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetUserSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace.py index bdee9e6c6d28..3a07057f3ae0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspace.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspace.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_contract.py index dfec42502d7c..35347a73bed9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_contract.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_contract.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiContract.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceApiContract.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_diagnostic.py index a5f705a3ee00..4d5258fc0531 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_diagnostic.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api2dot0.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api2dot0.py index 4890fcfe8cfb..5fb1e80eebac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api2dot0.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api2dot0.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_export.get( @@ -42,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api3dot0.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api3dot0.py index 4602e5998f11..962a19e4bd71 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api3dot0.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_export_in_open_api3dot0.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_export.get( @@ -42,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiExportInOpenApi3dot0.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceApiExportInOpenApi3dot0.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation.py index b902ae452fbe..13e50805b301 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_operation.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiOperation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation_policy.py index bd8f6c9be441..351a2967c1ce 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_operation_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_operation_policy.get( @@ -42,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiOperationPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_policy.py index 1002a462a110..dbf50a2a6470 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_policy.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_release.py index defc619c3ca0..a4f811a3d0a4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_release.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_release.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiRelease.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_revision.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_revision.py index 58e6a9da7805..e36beda15ec3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_revision.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_revision.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiRevision.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceApiRevision.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_schema.py index 0c236e8b44f0..ba1a9b05b885 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_schema.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_schema.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_version_set.py index cdb1b33bf8b7..c5235d5c762d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_api_version_set.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_version_set.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceApiVersionSet.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_backend.py index 5c8b31a8b372..c0b940e553de 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_backend.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_backend.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceBackend.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate.py index e520205ac7e8..6124a6d9d285 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_certificate.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceCertificate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate_with_key_vault.py index 794565885223..f39f29894d0c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_certificate_with_key_vault.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_certificate.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceCertificateWithKeyVault.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceCertificateWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_diagnostic.py index 2797038aa3bd..0de9b70311b7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_diagnostic.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_group.py index 1af1796cbc5b..a3a0e9fecd93 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_group.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_link.py index 7f49b7e7265b..0a37feea392d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_workspace_link.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_logger.py index b5265d251f8c..71eef64f4c30 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_logger.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_logger.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceLogger.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value.py index 5202427acedb..2a526716cb6f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_named_value.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceNamedValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value_with_key_vault.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value_with_key_vault.py index 55fcbd7e4eb4..494c405c21e2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value_with_key_vault.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_named_value_with_key_vault.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_named_value.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceNamedValueWithKeyVault.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_notification.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_notification.py index 918af64d78f4..910b28206a92 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_notification.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_notification.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_notification.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceNotification.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceNotification.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy.py index 34f53082dd55..ffa642e6b010 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_policy.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspacePolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspacePolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment.py index b3cff912c9e2..aee5164ec2da 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_policy_fragment.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspacePolicyFragment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspacePolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment_format.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment_format.py index ebf0816ffebb..fb8b111f0f94 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment_format.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_policy_fragment_format.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_policy_fragment.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspacePolicyFragmentFormat.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product.py index cdaa99efdd8e..84cc599b99d3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceProduct.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_api_link.py index 7137c4d66fa3..e1f792d05ecf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_api_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product_api_link.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceProductApiLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceProductApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_group_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_group_link.py index a6abb7de2d63..00017c4e00ff 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_group_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_group_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product_group_link.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceProductGroupLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceProductGroupLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_policy.py index b6fcb70dd7e0..50583e23eaf5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_product_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product_policy.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceProductPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_schema.py index c465de68704c..59c2b738864f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_schema.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_global_schema.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_subscription.py index 8fa9061836de..7f46f3c3c414 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_subscription.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceSubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag.py index 215a844efa98..104b5d3dfbfc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_api_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_api_link.py index a271101f8b7d..09050556466e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_api_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_api_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag_api_link.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceTagApiLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceTagApiLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_operation_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_operation_link.py index 01a268f1c81c..c413d24720c7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_operation_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_operation_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag_operation_link.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceTagOperationLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceTagOperationLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_product_link.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_product_link.py index 0510bbf73e6b..aed3f1359b2f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_product_link.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_get_workspace_tag_product_link.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag_product_link.get( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementGetWorkspaceTagProductLink.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementGetWorkspaceTagProductLink.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api.py index 9c9515e302f3..a0f6e91a9167 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_diagnostic.py index ce44ba3cb036..93e92ccac64b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_diagnostic.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue.py index 6522dac82a29..bba7c220b96a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_issue.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiIssue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiIssue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_attachment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_attachment.py index 238d9c04823a..acb19389294a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_attachment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_attachment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_issue_attachment.get_entity_tag( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiIssueAttachment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiIssueAttachment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_comment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_comment.py index ad69c768d95f..de3ebaaca1e0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_comment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_issue_comment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_issue_comment.get_entity_tag( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiIssueComment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiIssueComment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation.py index 45c7b6b21395..4572796db88e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_operation.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiOperation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_policy.py index 465a07966f48..21464afb9122 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_operation_policy.get_entity_tag( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiOperationPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_tag.py index 2d0f1f89a960..894328df559f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_operation_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.get_entity_state_by_operation( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiOperationTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiOperationTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_policy.py index bb6721ede50f..c48671a68d7a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_policy.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_release.py index ecf0a5bcfb0f..c07d51461783 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_release.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_release.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiRelease.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_schema.py index 7bcfd3e4998f..deaaae3ce489 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_schema.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_schema.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag.py index 833474452c8f..75b02fc864d5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.get_entity_state_by_api( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag_description.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag_description.py index e5e7f03511fa..ddff9aeb6f7a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag_description.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tag_description.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_tag_description.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiTagDescription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiTagDescription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tool.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tool.py index 869380911762..b6a2b9b8782d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tool.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_tool.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_tool.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiTool.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiTool.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_version_set.py index 0da95c50c870..4c45bfb442b5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_version_set.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_version_set.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiVersionSet.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_wiki.py index 2ca870f37b4d..1e73265052e3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_api_wiki.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_wiki.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadApiWiki.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadApiWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_authorization_server.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_authorization_server.py index c12ffc50a648..c18864e7cda1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_authorization_server.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_authorization_server.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_server.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadAuthorizationServer.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadAuthorizationServer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_backend.py index 49844d5bb1fc..cc83556e0242 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_backend.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.backend.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadBackend.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_cache.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_cache.py index 3c3332adb3da..73cf268d63e1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_cache.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_cache.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.cache.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadCache.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadCache.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_certificate.py index 64228c74ddef..0e78a3cefd50 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_certificate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.certificate.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadCertificate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_client_application.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_client_application.py index a8b2ecbbe2cf..cc191661da96 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_client_application.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_client_application.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.client_application.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadClientApplication.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadClientApplication.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_content_type_content_item.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_content_type_content_item.py index d459e5528545..0585fe4fd690 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_content_type_content_item.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_content_type_content_item.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.content_item.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadContentTypeContentItem.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadContentTypeContentItem.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_delegation_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_delegation_settings.py index 8fe387c3e2b9..dcbe1833b148 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_delegation_settings.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_delegation_settings.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.delegation_settings.get_entity_tag( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadDelegationSettings.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadDelegationSettings.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_diagnostic.py index 6ab8b242aa3c..e835fb32a027 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.diagnostic.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_documentation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_documentation.py index 9b919980f781..dc8a13d2e509 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_documentation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_documentation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.documentation.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadDocumentation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadDocumentation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_email_template.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_email_template.py index f9af6523743a..dffe08312fa8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_email_template.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_email_template.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.email_template.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadEmailTemplate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadEmailTemplate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway.py index 3e5798867f46..3e5adf8697cc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGateway.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_api.py index 48243b29dfb1..68afe078941e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway_api.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGatewayApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadGatewayApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_certificate_authority.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_certificate_authority.py index c93c49ca9365..b8e899236947 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_certificate_authority.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_certificate_authority.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway_certificate_authority.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGatewayCertificateAuthority.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadGatewayCertificateAuthority.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_hostname_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_hostname_configuration.py index 12b2ce73b57c..0d33b756fff6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_hostname_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_gateway_hostname_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway_hostname_configuration.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGatewayHostnameConfiguration.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadGatewayHostnameConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_global_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_global_schema.py index ec4b7580c263..e159d113d61b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_global_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_global_schema.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.global_schema.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGlobalSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadGlobalSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver.py index a58e2ffa77f8..4519550233b9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.graph_ql_api_resolver.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGraphQLApiResolver.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadGraphQLApiResolver.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver_policy.py index 4859df9fc7b5..1dedf71139b5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_graph_ql_api_resolver_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.graph_ql_api_resolver_policy.get_entity_tag( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGraphQLApiResolverPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadGraphQLApiResolverPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group.py index ba4e1482725a..e8cc75eb3634 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.group.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group_user.py index 5b28c08d431f..232eef622a27 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_group_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.group_user.check_entity_exists( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadGroupUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadGroupUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_identity_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_identity_provider.py index c14774a1212d..ff82a206ff8f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_identity_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_identity_provider.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.identity_provider.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadIdentityProvider.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadIdentityProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_logger.py index fad594bc4e1e..e77c308d9144 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_logger.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.logger.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadLogger.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_named_value.py index 04e54d32bd0f..e011e301a394 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_named_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.named_value.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadNamedValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_email.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_email.py index bf5490a9c6c1..0041a8903744 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_email.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_email.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.notification_recipient_email.check_entity_exists( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadNotificationRecipientEmail.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadNotificationRecipientEmail.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_user.py index 27b2771631e3..ce13ae3c3c9e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_notification_recipient_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.notification_recipient_user.check_entity_exists( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadNotificationRecipientUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadNotificationRecipientUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_open_id_connect_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_open_id_connect_provider.py index fcdbe3e79013..b825c9133eaf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_open_id_connect_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_open_id_connect_provider.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.open_id_connect_provider.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadOpenIdConnectProvider.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadOpenIdConnectProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy.py index 396e7dce7d0e..0a781f2384bf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_fragment.py index e190c310df43..b717a2767b4e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_fragment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy_fragment.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadPolicyFragment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadPolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_restriction.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_restriction.py index 57d529c91791..78dd9ff87642 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_restriction.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_policy_restriction.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy_restriction.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadPolicyRestriction.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadPolicyRestriction.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_config.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_config.py index 0ecedf36f066..991ff8ca1422 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_config.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_config.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.portal_config.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadPortalConfig.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadPortalConfig.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_revision.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_revision.py index 72873e0b6baf..650667806803 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_revision.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_portal_revision.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.portal_revision.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadPortalRevision.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadPortalRevision.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product.py index 33ef84f1aef2..f83b99fbf859 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadProduct.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_api.py index 94c0cb813f78..0fa9b66be8e7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_api.check_entity_exists( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadProductApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadProductApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_group.py index f65f4a518867..ee368b368e24 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_group.check_entity_exists( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadProductGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadProductGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_policy.py index b47eacab5f1e..94645385ec31 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_policy.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadProductPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_tag.py index 1cd2399a5422..2c11bd4076c7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.get_entity_state_by_product( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadProductTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadProductTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_wiki.py index 57df766181f1..956e73e1930d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_product_wiki.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_wiki.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadProductWiki.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadProductWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_in_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_in_settings.py index d7d8474ad307..1dcc42502edb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_in_settings.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_in_settings.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.sign_in_settings.get_entity_tag( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadSignInSettings.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadSignInSettings.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_up_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_up_settings.py index 9ba9b9ce17ab..0529c8532e5b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_up_settings.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_sign_up_settings.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.sign_up_settings.get_entity_tag( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadSignUpSettings.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadSignUpSettings.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_subscription.py index 7e1a2909474b..3f881e468f23 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.subscription.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadSubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tag.py index 563e98fb04d9..5c969d6f2703 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.get_entity_state( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tenant_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tenant_access.py index e1a17a8423ad..2b1a63e55277 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tenant_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_tenant_access.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tenant_access.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadTenantAccess.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadTenantAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_user.py index 48adad507cbf..22f898f8842f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.user.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace.py index a3cf4cb24d30..35a1efda64d5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace.get_entity_tag( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspace.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspace.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api.py index 3b4cf5465832..d094f499e4ca 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_diagnostic.py index a8fc98f24d77..acf3c5a48182 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_diagnostic.get_entity_tag( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation.py index 34a58be58d08..79a560801e71 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_operation.get_entity_tag( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiOperation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation_policy.py index e3acf150bd2d..d2b578baa236 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_operation_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_operation_policy.get_entity_tag( @@ -42,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiOperationPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceApiOperationPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_policy.py index 04f01ec48628..0c90be16b3fd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_policy.get_entity_tag( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceApiPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_release.py index f30cc0be8b58..cad962c0cf09 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_release.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_release.get_entity_tag( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiRelease.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_schema.py index 408cf4765a9c..f1e6cb01c5b5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_schema.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_schema.get_entity_tag( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceApiSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_version_set.py index 5c424ee37a47..ab6e237441b8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_api_version_set.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_version_set.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceApiVersionSet.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_backend.py index 31ac3c7179e9..ef5cc769252f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_backend.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_backend.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceBackend.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_certificate.py index 0fd7e4072979..e9ea4b422c5b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_certificate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_certificate.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceCertificate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_diagnostic.py index af4dd52d8da3..4586195aaa7b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_diagnostic.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group.py index d0a0aefc3f50..524ac8756211 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_group.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group_user.py index ece8b5d5d120..dee452f002ab 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_group_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_group_user.check_entity_exists( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceGroupUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceGroupUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_logger.py index e32ad5391f39..2b5ab3cf8e6b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_logger.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_logger.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceLogger.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_named_value.py index f87af790eab5..977ed266ddca 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_named_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_named_value.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceNamedValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_email.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_email.py index 6076e2bddae3..f6826d189d73 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_email.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_email.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_notification_recipient_email.check_entity_exists( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceNotificationRecipientEmail.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceNotificationRecipientEmail.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_user.py index 97e8ef8e3bca..d9bfca66ee29 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_notification_recipient_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_notification_recipient_user.check_entity_exists( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceNotificationRecipientUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceNotificationRecipientUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy.py index 72925144431f..8bd6bcc14f48 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_policy.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspacePolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspacePolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy_fragment.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy_fragment.py index 6b17ae876f60..78795ff00233 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy_fragment.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_policy_fragment.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_policy_fragment.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspacePolicyFragment.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspacePolicyFragment.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product.py index a538e8d8ea79..5bbc62616d43 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceProduct.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product_policy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product_policy.py index a210cc16a41b..149ca00b5fea 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product_policy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_product_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product_policy.get_entity_tag( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceProductPolicy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceProductPolicy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_schema.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_schema.py index 743d599af28f..3261b2aa1a94 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_schema.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_schema.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_global_schema.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceSchema.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceSchema.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_subscription.py index 4579dcc43722..c4c25bcc3d12 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_subscription.get_entity_tag( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceSubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_tag.py index 257960ba4354..ca1f584a1750 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_head_workspace_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag.get_entity_state( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementHeadWorkspaceTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementHeadWorkspaceTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_identity_provider_list_secrets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_identity_provider_list_secrets.py index 744ba705fd38..cafcf677ec4f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_identity_provider_list_secrets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_identity_provider_list_secrets.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.identity_provider.list_secrets( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementIdentityProviderListSecrets.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementIdentityProviderListSecrets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_diagnostics.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_diagnostics.py index fe0e68a61dc1..47a010a250b2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_diagnostics.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_diagnostics.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_diagnostic.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiDiagnostics.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiDiagnostics.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_attachments.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_attachments.py index 0b31301837d2..42f1f25b35d3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_attachments.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_attachments.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_issue_attachment.list_by_service( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiIssueAttachments.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiIssueAttachments.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_comments.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_comments.py index 37097bca9bd0..75017ca629e0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_comments.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issue_comments.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_issue_comment.list_by_service( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiIssueComments.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiIssueComments.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issues.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issues.py index 981b045959e3..64dc96220450 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issues.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_issues.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_issue.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiIssues.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiIssues.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_policies.py index 676cc113f3b6..2f7da8b34905 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_policies.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_operation_policy.list_by_operation( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiOperationPolicies.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiOperationPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_tags.py index c02bc7dac458..b5348889f47f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operation_tags.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.list_by_operation( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiOperationTags.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiOperationTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations.py index c5170555884f..40769cd58995 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_operation.list_by_api( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiOperations.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiOperations.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations_by_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations_by_tags.py index d30405b32276..58e1244fe69a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations_by_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_operations_by_tags.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.operation.list_by_tags( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiOperationsByTags.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiOperationsByTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_policies.py index aabad67b1908..c1d279867df4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_policies.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_policy.list_by_api( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiPolicies.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_products.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_products.py index 3c320f295193..e039f0ea0827 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_products.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_products.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_product.list_by_apis( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiProducts.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiProducts.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_releases.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_releases.py index b2ff06f2bc5f..84b64c4bdd4a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_releases.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_releases.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_release.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiReleases.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiReleases.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_revisions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_revisions.py index 97c4dbaabaef..2d326db8b9e6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_revisions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_revisions.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_revision.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiRevisions.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiRevisions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_schemas.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_schemas.py index 11f49b90e077..70d87974feb2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_schemas.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_schemas.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_schema.list_by_api( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiSchemas.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiSchemas.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tag_descriptions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tag_descriptions.py index 01e636399e14..6f6987c47a73 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tag_descriptions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tag_descriptions.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_tag_description.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiTagDescriptions.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiTagDescriptions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tags.py index 90ab1fef9f7a..9dda29302d76 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tags.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.list_by_api( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiTags.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tools.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tools.py index 1ff073b1141c..424c04fea67e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tools.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_tools.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_tool.list_by_api( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiTools.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiTools.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_version_sets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_version_sets.py index 05a843661da8..057e9da1c764 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_version_sets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_version_sets.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_version_set.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiVersionSets.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiVersionSets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_wikis.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_wikis.py index 3dc7812dcfe0..2bcd98ef22a8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_wikis.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_api_wikis.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_wikis.list( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApiWikis.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApiWikis.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis.py index d98ec4796bc3..a17c3508935d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApis.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApis.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis_by_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis_by_tags.py index f6faa082c784..f1e43826289f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis_by_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_apis_by_tags.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.list_by_tags( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListApisByTags.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListApisByTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_access_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_access_policies.py index fb7dc99da1e0..7e6f696c9638 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_access_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_access_policies.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_access_policy.list_by_authorization( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListAuthorizationAccessPolicies.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListAuthorizationAccessPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_providers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_providers.py index 16d42893abfc..f589ffddd4d3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_providers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_providers.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_provider.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListAuthorizationProviders.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListAuthorizationProviders.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_servers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_servers.py index 822c85673d1c..9facceeb899d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_servers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorization_servers.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_server.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListAuthorizationServers.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListAuthorizationServers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_auth_code.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_auth_code.py index 1c7157e25b76..38ee1f3e484e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_auth_code.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_auth_code.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization.list_by_authorization_provider( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListAuthorizationsAuthCode.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListAuthorizationsAuthCode.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_client_cred.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_client_cred.py index dfa28658f71d..6051ba9fe85c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_client_cred.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_authorizations_client_cred.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization.list_by_authorization_provider( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListAuthorizationsClientCred.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListAuthorizationsClientCred.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_backends.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_backends.py index 898c97ce17c9..bb457ab0a44b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_backends.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_backends.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.backend.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListBackends.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListBackends.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_caches.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_caches.py index e87ab71a8aa6..ac7e2132a755 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_caches.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_caches.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.cache.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListCaches.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListCaches.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_certificates.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_certificates.py index 52a6fed523ce..ff3dcba7d7a0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_certificates.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_certificates.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.certificate.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListCertificates.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListCertificates.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_product_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_product_links.py index 270111246670..855dc92963da 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_product_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_product_links.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.client_application_product_link.list_by_client_applications( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListClientApplicationProductLinks.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListClientApplicationProductLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_secrets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_secrets.py index a4c5ac8e5e53..28af46ff2c8b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_secrets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_application_secrets.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.client_application.list_secrets( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListClientApplicationSecrets.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListClientApplicationSecrets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_applications.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_applications.py index 458adc657ec9..0476d2e86a70 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_applications.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_client_applications.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.client_application.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListClientApplications.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListClientApplications.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_type_content_items.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_type_content_items.py index 42662ae61ba1..efe5b7824fa4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_type_content_items.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_type_content_items.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.content_item.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListContentTypeContentItems.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListContentTypeContentItems.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_types.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_types.py index b10ca0f552bd..8137fc0fb4ae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_types.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_content_types.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.content_type.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListContentTypes.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListContentTypes.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_diagnostics.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_diagnostics.py index e0df0da9f16e..a51911925254 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_diagnostics.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_diagnostics.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.diagnostic.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListDiagnostics.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListDiagnostics.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_documentations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_documentations.py index 52f4525321de..0cfc72e0ad77 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_documentations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_documentations.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.documentation.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListDocumentations.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListDocumentations.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_apis.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_apis.py index 19bebf6248f1..d0ea5c4ed71b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_apis.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_apis.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway_api.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewayApis.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListGatewayApis.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_certificate_authorities.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_certificate_authorities.py index 0007d7352620..d693f2007395 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_certificate_authorities.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_certificate_authorities.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway_certificate_authority.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewayCertificateAuthorities.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListGatewayCertificateAuthorities.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_config_connection.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_config_connection.py index b585ae014b91..1fec9dabc095 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_config_connection.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_config_connection.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_gateway_config_connection.list_by_gateway( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewayConfigConnection.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListGatewayConfigConnection.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_bindings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_bindings.py index 581be5442734..847e380da366 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_bindings.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_bindings.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_gateway_hostname_binding.list_by_gateway( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewayHostnameBindings.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListGatewayHostnameBindings.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_configurations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_configurations.py index c57b39b8d1f7..606eef3c0953 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_configurations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateway_hostname_configurations.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway_hostname_configuration.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewayHostnameConfigurations.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListGatewayHostnameConfigurations.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways.py index 8236e2b3f5d2..170be3e9f57e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGateways.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListGateways.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription.py index d4316a8051fc..e1fac4bab779 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_gateway.list() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewaysBySubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListGatewaysBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription_and_resource_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription_and_resource_group.py index 9dfbc0ee9b52..27261c5fab2d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription_and_resource_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_gateways_by_subscription_and_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_gateway.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_global_schemas.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_global_schemas.py index 90608befd1aa..dd3b62487723 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_global_schemas.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_global_schemas.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.global_schema.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGlobalSchemas.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListGlobalSchemas.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolver_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolver_policies.py index 7bc68d8c8104..643ffcb50b81 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolver_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolver_policies.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.graph_ql_api_resolver_policy.list_by_resolver( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGraphQLApiResolverPolicies.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListGraphQLApiResolverPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolvers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolvers.py index 15b0d5a4bc51..e925b98b6a13 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolvers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_graph_ql_api_resolvers.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.graph_ql_api_resolver.list_by_api( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGraphQLApiResolvers.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListGraphQLApiResolvers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_group_users.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_group_users.py index 945578b874b6..b4aa1a29b868 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_group_users.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_group_users.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.group_user.list( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGroupUsers.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListGroupUsers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_groups.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_groups.py index 35bfde608224..cb4bf7ca51ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_groups.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_groups.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.group.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListGroups.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListGroups.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_identity_providers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_identity_providers.py index 1e70ebb6f1b7..2dac4bc5dfa8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_identity_providers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_identity_providers.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.identity_provider.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListIdentityProviders.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListIdentityProviders.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_issues.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_issues.py index dfd217a92e6e..b93f018c49f3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_issues.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_issues.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.issue.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListIssues.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListIssues.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_loggers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_loggers.py index 4439238783d2..051e3fe3e0f6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_loggers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_loggers.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.logger.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListLoggers.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListLoggers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_named_values.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_named_values.py index 58ed439dc4db..2c98791907da 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_named_values.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_named_values.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.named_value.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListNamedValues.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListNamedValues.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_emails.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_emails.py index 6a1d6eabce19..de8a8ef70337 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_emails.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_emails.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.notification_recipient_email.list_by_notification( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListNotificationRecipientEmails.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListNotificationRecipientEmails.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_users.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_users.py index a935b7924883..f6ba7327f1f0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_users.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notification_recipient_users.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.notification_recipient_user.list_by_notification( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListNotificationRecipientUsers.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListNotificationRecipientUsers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notifications.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notifications.py index f58eccdb1477..03e135039cc7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notifications.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_notifications.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.notification.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListNotifications.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListNotifications.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_open_id_connect_providers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_open_id_connect_providers.py index 5eef0d8bfbf8..8deddf0b442c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_open_id_connect_providers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_open_id_connect_providers.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.open_id_connect_provider.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListOpenIdConnectProviders.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListOpenIdConnectProviders.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_operations.py index 7cc000e11f9b..0f44aebf297a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_operations.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListOperations.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListOperations.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policies.py index 45817cd7aad6..b454ab3ef0b9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policies.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPolicies.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_descriptions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_descriptions.py index 04d9c4692edb..c31c14407f9f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_descriptions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_descriptions.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy_description.list_by_service( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPolicyDescriptions.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListPolicyDescriptions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragment_references.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragment_references.py index e9a3d9d833f2..36840a3bf528 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragment_references.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragment_references.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy_fragment.list_references( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPolicyFragmentReferences.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListPolicyFragmentReferences.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragments.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragments.py index 1a5cbcc9de5c..7081bd42d014 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragments.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_fragments.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy_fragment.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPolicyFragments.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListPolicyFragments.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_restrictions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_restrictions.py index a3dd9ed61310..e5915ff777a0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_restrictions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_policy_restrictions.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy_restriction.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPolicyRestrictions.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListPolicyRestrictions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_config.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_config.py index b418a38692be..3e25eef5b095 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_config.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_config.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.portal_config.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPortalConfig.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListPortalConfig.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_revisions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_revisions.py index 2510a21c9229..4ac70b317a06 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_revisions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_revisions.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.portal_revision.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPortalRevisions.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListPortalRevisions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_settings.py index 083fe409ea3b..7daba02c5573 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_settings.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_portal_settings.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.portal_settings.list_by_service( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPortalSettings.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListPortalSettings.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_endpoint_connections.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_endpoint_connections.py index d33418cef03e..8b1fafdaa83c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_endpoint_connections.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_endpoint_connections.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_endpoint_connection.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPrivateEndpointConnections.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListPrivateEndpointConnections.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_link_group_resources.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_link_group_resources.py index c49e93caf8bd..e4800f99e3c8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_link_group_resources.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_private_link_group_resources.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_endpoint_connection.list_private_link_resources( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListPrivateLinkGroupResources.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListPrivateLinkGroupResources.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_api_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_api_links.py index de69af1dca47..8fc5768766e1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_api_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_api_links.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_api_link.list_by_product( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductApiLinks.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListProductApiLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_apis.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_apis.py index b5a20e410880..ac51410b5b71 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_apis.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_apis.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_api.list_by_product( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductApis.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListProductApis.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_group_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_group_links.py index e2dee92fd8b8..49d54f350221 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_group_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_group_links.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_group_link.list_by_product( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductGroupLinks.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListProductGroupLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_groups.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_groups.py index 21a8c4000e3c..97f809d5204a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_groups.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_groups.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_group.list_by_product( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductGroups.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListProductGroups.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_policies.py index 166c20b95b27..e931fb467ca2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_policies.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_policy.list_by_product( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductPolicies.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListProductPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_subscriptions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_subscriptions.py index dc3c1cdb8eaa..98e4270d4b5d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_subscriptions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_subscriptions.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_subscriptions.list( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductSubscriptions.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListProductSubscriptions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_tags.py index 80442570c5d9..3fa423c9ce13 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_tags.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.list_by_product( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductTags.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListProductTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_wikis.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_wikis.py index a77889565248..4ac30275d687 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_wikis.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_product_wikis.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_wikis.list( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductWikis.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListProductWikis.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products.py index 45d4eb8ab36d..5e3bc7d57cc4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProducts.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListProducts.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products_by_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products_by_tags.py index 1cc7977d3839..6f77ba45bcf7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products_by_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_products_by_tags.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product.list_by_tags( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListProductsByTags.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListProductsByTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_regions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_regions.py index d31ac639892f..869503993607 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_regions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_regions.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.region.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListRegions.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListRegions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_portal_settings_validation_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_portal_settings_validation_key.py index e6bb361c5ef9..3fd1e67f4089 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_portal_settings_validation_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_portal_settings_validation_key.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.delegation_settings.list_secrets( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSecretsPortalSettingsValidationKey.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListSecretsPortalSettingsValidationKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_tenant_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_tenant_access.py index 2dc2ad760b43..0ac630702bd5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_tenant_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_secrets_tenant_access.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tenant_access.list_secrets( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSecretsTenantAccess.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListSecretsTenantAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription.py index f6a069fc15e8..56c9394c31e6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.list() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListServiceBySubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListServiceBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription_and_resource_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription_and_resource_group.py index dfd274fdb4be..d76c66e892ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription_and_resource_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_service_by_subscription_and_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListServiceBySubscriptionAndResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_consumption.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_consumption.py index 32049f5c025a..dbdb6773c8da 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_consumption.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_consumption.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service_skus.list_available_service_skus( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSKUs-Consumption.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListSKUs-Consumption.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_dedicated.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_dedicated.py index 1f39fa2856b5..ab380fe948de 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_dedicated.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_dedicated.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service_skus.list_available_service_skus( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSKUs-Dedicated.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListSKUs-Dedicated.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_gateways.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_gateways.py index 25db7fdf6549..be6b297e6075 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_gateways.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sk_us_gateways.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_gateway_skus.list_available_skus( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSKUs-Gateways.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListSKUs-Gateways.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sku.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sku.py index 924cb5b83aa0..855efc587d0d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sku.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_sku.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_skus.list() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSku.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListSku.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_subscriptions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_subscriptions.py index abbc44fd196f..e20c359c6443 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_subscriptions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_subscriptions.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.subscription.list( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListSubscriptions.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListSubscriptions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_api_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_api_links.py index e987183df292..de1cbe8056b6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_api_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_api_links.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag_api_link.list_by_product( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTagApiLinks.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListTagApiLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_operation_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_operation_links.py index 008d3e064dfa..5df801234db0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_operation_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_operation_links.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag_operation_link.list_by_product( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTagOperationLinks.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListTagOperationLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_product_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_product_links.py index f0e528162d30..5aa5f99f0052 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_product_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_product_links.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag_product_link.list_by_product( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTagProductLinks.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListTagProductLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_resources.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_resources.py index aa42275c5d17..4ede160345a5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_resources.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tag_resources.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag_resource.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTagResources.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListTagResources.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tags.py index 0fb89df3056c..f837a69da14a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tags.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTags.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_templates.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_templates.py index 28a2434075e2..625b59dc8913 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_templates.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_templates.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.email_template.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTemplates.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListTemplates.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_access.py index 103e57c1ff8e..022202533758 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_access.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tenant_access.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTenantAccess.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListTenantAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_settings.py index 66998d79dac1..76b18604a7af 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_settings.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_tenant_settings.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tenant_settings.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListTenantSettings.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListTenantSettings.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_groups.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_groups.py index 39bf210fd5bf..6e1ac8f13186 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_groups.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_groups.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.user_group.list( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListUserGroups.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListUserGroups.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_identities.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_identities.py index 17a5061b8eff..02e902953d34 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_identities.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_identities.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.user_identities.list( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListUserIdentities.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListUserIdentities.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_subscriptions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_subscriptions.py index ef3480bda330..2415a4d36291 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_subscriptions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_user_subscriptions.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.user_subscription.list( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListUserSubscriptions.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListUserSubscriptions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_users.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_users.py index 214f9ca98273..f48a875ee400 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_users.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_users.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.user.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListUsers.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListUsers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_diagnostics.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_diagnostics.py index 44c9b1c2135a..3f7addbe0b51 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_diagnostics.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_diagnostics.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_diagnostic.list_by_workspace( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiDiagnostics.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceApiDiagnostics.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operation_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operation_policies.py index 458ac45cc4ae..4c2bf867185a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operation_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operation_policies.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_operation_policy.list_by_operation( @@ -42,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiOperationPolicies.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceApiOperationPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operations.py index f869508a3206..b1e59f5e0266 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_operations.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_operation.list_by_api( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiOperations.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceApiOperations.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_policies.py index 74ed69b4c14d..d1925355840d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_policies.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_policy.list_by_api( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiPolicies.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceApiPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_releases.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_releases.py index 6d90931909c6..d58b6a37e06c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_releases.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_releases.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_release.list_by_service( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiReleases.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceApiReleases.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_revisions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_revisions.py index 53659bcbbe62..b0803f11aabd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_revisions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_revisions.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_revision.list_by_service( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiRevisions.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceApiRevisions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_schemas.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_schemas.py index a8eed1374a2d..76aa872c6cca 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_schemas.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_schemas.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_schema.list_by_api( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiSchemas.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceApiSchemas.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_version_sets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_version_sets.py index 417565d14ca7..4c2423132f5b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_version_sets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_api_version_sets.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_version_set.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApiVersionSets.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceApiVersionSets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_apis.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_apis.py index 2e016c9084a2..102988bd439a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_apis.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_apis.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceApis.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceApis.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_backends.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_backends.py index 275bd0b501b6..15c467166fd2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_backends.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_backends.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_backend.list_by_workspace( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceBackends.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceBackends.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_certificates.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_certificates.py index 63e0baa61581..8974b8d87bea 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_certificates.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_certificates.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_certificate.list_by_workspace( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceCertificates.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceCertificates.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_diagnostics.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_diagnostics.py index 7ffde7255344..e10daea6ec7f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_diagnostics.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_diagnostics.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_diagnostic.list_by_workspace( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceDiagnostics.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceDiagnostics.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_group_users.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_group_users.py index 6215063a2d5e..571be91f4534 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_group_users.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_group_users.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_group_user.list( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceGroupUsers.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceGroupUsers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_groups.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_groups.py index 3ba7ed7189c7..5ac98c35a7d2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_groups.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_groups.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_group.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceGroups.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceGroups.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_links.py index 20e9e2769071..3bf93f5cbac4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_links.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_workspace_links.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceLinks.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_loggers.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_loggers.py index b4cea054141b..47326a2ebb8f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_loggers.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_loggers.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_logger.list_by_workspace( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceLoggers.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceLoggers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_named_values.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_named_values.py index f123a2c8c74b..c341f7e2f968 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_named_values.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_named_values.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_named_value.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceNamedValues.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceNamedValues.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_emails.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_emails.py index 88ae500e3978..3f0cee858c63 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_emails.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_emails.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_notification_recipient_email.list_by_notification( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceNotificationRecipientEmails.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceNotificationRecipientEmails.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_users.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_users.py index 57207b26b1e1..8479fb349fda 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_users.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notification_recipient_users.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_notification_recipient_user.list_by_notification( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceNotificationRecipientUsers.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceNotificationRecipientUsers.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notifications.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notifications.py index 246bad0134a4..9e1c0039ceb2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notifications.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_notifications.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_notification.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceNotifications.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceNotifications.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policies.py index 5d6a57ea2011..8ced29f71582 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policies.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_policy.list_by_api( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspacePolicies.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspacePolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragment_references.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragment_references.py index dbc1c4db5e4e..0b1664a659a2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragment_references.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragment_references.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_policy_fragment.list_references( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspacePolicyFragmentReferences.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspacePolicyFragmentReferences.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragments.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragments.py index 3395e38dca52..fa929fc749b4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragments.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_policy_fragments.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_policy_fragment.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspacePolicyFragments.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspacePolicyFragments.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_api_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_api_links.py index 0fdb9988f41b..e1bf8da43c22 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_api_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_api_links.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product_api_link.list_by_product( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceProductApiLinks.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceProductApiLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_group_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_group_links.py index eb9a5c721767..c2ec5deb78e6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_group_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_group_links.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product_group_link.list_by_product( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceProductGroupLinks.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceProductGroupLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_policies.py index 28775367fefe..06006f34b155 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_product_policies.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product_policy.list_by_product( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceProductPolicies.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceProductPolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_products.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_products.py index e27c30beb919..52ebe95b2e48 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_products.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_products.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceProducts.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceProducts.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_schemas.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_schemas.py index 6ba784b1785e..3b346abf38ad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_schemas.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_schemas.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_global_schema.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceSchemas.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceSchemas.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_subscriptions.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_subscriptions.py index af83528dd851..1ade81acbe59 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_subscriptions.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_subscriptions.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_subscription.list( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceSubscriptions.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceSubscriptions.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_api_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_api_links.py index bd45ce54a990..8783505fad95 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_api_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_api_links.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag_api_link.list_by_product( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceTagApiLinks.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceTagApiLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_operation_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_operation_links.py index 3aecbb4413d7..e5e845199a86 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_operation_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_operation_links.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag_operation_link.list_by_product( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceTagOperationLinks.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceTagOperationLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_product_links.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_product_links.py index 3cf4ffa99c20..167b068432eb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_product_links.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tag_product_links.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag_product_link.list_by_product( @@ -41,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceTagProductLinks.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceTagProductLinks.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tags.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tags.py index fd204f5044c0..884060bc2905 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tags.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspace_tags.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag.list_by_service( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaceTags.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaceTags.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspaces.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspaces.py index 4a133c0ced16..035781805997 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspaces.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_list_workspaces.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace.list_by_service( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementListWorkspaces.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementListWorkspaces.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_named_value_list_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_named_value_list_value.py index efde26abf994..8f599abcd0e8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_named_value_list_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_named_value_list_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.named_value.list_value( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementNamedValueListValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementNamedValueListValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_openid_connect_provider_list_secrets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_openid_connect_provider_list_secrets.py index ed0fd7dd9839..0f4e1e2437b0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_openid_connect_provider_list_secrets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_openid_connect_provider_list_secrets.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.open_id_connect_provider.list_secrets( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementOpenidConnectProviderListSecrets.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementOpenidConnectProviderListSecrets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check.py index 5ccd635bf9ab..c6f29fb6a3af 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.begin_perform_connectivity_check_async( @@ -43,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPerformConnectivityCheck.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementPerformConnectivityCheck.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check_http_connect.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check_http_connect.py index 20cf62542fc5..7a1e0e4db063 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check_http_connect.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_perform_connectivity_check_http_connect.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.begin_perform_connectivity_check_async( @@ -50,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPerformConnectivityCheckHttpConnect.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementPerformConnectivityCheckHttpConnect.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_config.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_config.py index 465d70204b8d..3d62f571b513 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_config.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_config.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.portal_config.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalConfig.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementPortalConfig.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_delegation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_delegation.py index 31e1dabfb62b..839c92e8be95 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_delegation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_delegation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.delegation_settings.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsGetDelegation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementPortalSettingsGetDelegation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_in.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_in.py index 8b0dbf6937cb..b5e5e6c7f770 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_in.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_in.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.sign_in_settings.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsGetSignIn.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementPortalSettingsGetSignIn.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_up.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_up.py index ad9e8c143d45..78877405b34b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_up.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_get_sign_up.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.sign_up_settings.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsGetSignUp.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementPortalSettingsGetSignUp.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_delegation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_delegation.py index 24d325ad1a85..b874fc1af82d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_delegation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_delegation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.delegation_settings.create_or_update( @@ -46,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsPutDelegation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementPortalSettingsPutDelegation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_in.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_in.py index 0ec0ae676379..dfc94df9a287 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_in.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_in.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.sign_in_settings.create_or_update( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsPutSignIn.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementPortalSettingsPutSignIn.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_up.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_up.py index 54e6d9f0ac9f..c141c65c2898 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_up.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_put_sign_up.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.sign_up_settings.create_or_update( @@ -44,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsPutSignUp.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementPortalSettingsPutSignUp.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_delegation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_delegation.py index 3e164bc5e9d7..c90f51978232 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_delegation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_delegation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,13 +27,12 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.delegation_settings.update( resource_group_name="rg1", service_name="apimService1", - if_match="*", parameters={ "properties": { "subscriptions": {"enabled": True}, @@ -43,9 +41,11 @@ def main(): "validationKey": "", } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsUpdateDelegation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementPortalSettingsUpdateDelegation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_in.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_in.py index 322f3b0d9be5..18d0c73d0e64 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_in.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_in.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.sign_in_settings.update( resource_group_name="rg1", service_name="apimService1", - if_match="*", parameters={"properties": {"enabled": True}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsUpdateSignIn.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementPortalSettingsUpdateSignIn.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_up.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_up.py index 0b10a68fc574..185d3f6fcb1d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_up.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_portal_settings_update_sign_up.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,22 +27,23 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.sign_up_settings.update( resource_group_name="rg1", service_name="apimService1", - if_match="*", parameters={ "properties": { "enabled": True, "termsOfService": {"consentRequired": True, "enabled": True, "text": "Terms of service text."}, } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPortalSettingsUpdateSignUp.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementPortalSettingsUpdateSignUp.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_post_authorization_confirm_consent_code_request.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_post_authorization_confirm_consent_code_request.py index a98ad7d7e41d..e475261923fb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_post_authorization_confirm_consent_code_request.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_post_authorization_confirm_consent_code_request.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.authorization.confirm_consent_code( @@ -40,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_authorization_provider_secret.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_authorization_provider_secret.py index 6c091f11d367..c68ba0bc6306 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_authorization_provider_secret.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_authorization_provider_secret.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_provider.refresh_secret( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRefreshAuthorizationProviderSecret.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementRefreshAuthorizationProviderSecret.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_certificate.py index 98daeb55f521..f4a6a790c664 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_certificate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.certificate.refresh_secret( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRefreshCertificate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementRefreshCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_gateway_hostname_binding_secret.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_gateway_hostname_binding_secret.py index 32c92457e54a..4af74dcc7ee4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_gateway_hostname_binding_secret.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_gateway_hostname_binding_secret.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.api_gateway_hostname_binding.begin_refresh_secret( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRefreshGatewayHostnameBindingSecret.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementRefreshGatewayHostnameBindingSecret.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_named_value.py index 12e7be30bed1..731b11cbcc2b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_named_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.named_value.begin_refresh_secret( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRefreshNamedValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementRefreshNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_certificate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_certificate.py index 31aca5ad5098..469570600f9d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_certificate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_certificate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_certificate.refresh_secret( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRefreshWorkspaceCertificate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementRefreshWorkspaceCertificate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_named_value.py index ff2a27c34b74..848d3f8f0a7c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_refresh_workspace_named_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_named_value.begin_refresh_secret( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRefreshWorkspaceNamedValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementRefreshWorkspaceNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_restore_with_access_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_restore_with_access_key.py index 607c04c89b07..c6de587da98d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_restore_with_access_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_restore_with_access_key.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_restore( @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementRestoreWithAccessKey.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementRestoreWithAccessKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_check_name_availability.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_check_name_availability.py index c4bb2cf73362..1b60eebaf3bd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_check_name_availability.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_check_name_availability.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.check_name_availability( @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceCheckNameAvailability.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementServiceCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_delete_service.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_delete_service.py index 688d1a561c87..97174bb4f53b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_delete_service.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_delete_service.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_delete( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceDeleteService.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementServiceDeleteService.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_domain_ownership_identifier.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_domain_ownership_identifier.py index e43d622b8888..fe78a6a858fa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_domain_ownership_identifier.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_domain_ownership_identifier.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,13 +27,13 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.get_domain_ownership_identifier() print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementServiceGetDomainOwnershipIdentifier.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_multi_region_internal_vnet.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_multi_region_internal_vnet.py index 0f7e2453915d..147c48f590db 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_multi_region_internal_vnet.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_multi_region_internal_vnet.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetMultiRegionInternalVnet.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementServiceGetMultiRegionInternalVnet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status.py index 93734fabe1cd..2b2ef864476e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_status.list_by_service( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetNetworkStatus.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementServiceGetNetworkStatus.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status_by_location.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status_by_location.py index 8d6205f6df11..3e4e90ae9fde 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status_by_location.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_network_status_by_location.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_status.list_by_location( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetNetworkStatusByLocation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementServiceGetNetworkStatusByLocation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_outbound_network_dependencies_endpoints.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_outbound_network_dependencies_endpoints.py index 74d901eb9b75..0b1086dcd712 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_outbound_network_dependencies_endpoints.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_outbound_network_dependencies_endpoints.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.outbound_network_dependencies_endpoints.list_by_service( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service.py index a58d280d5840..34fd84e9b740 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetService.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementServiceGetService.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service_having_msi.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service_having_msi.py index 2c38d8737696..f3b5a3c493fc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service_having_msi.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_service_having_msi.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetServiceHavingMsi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementServiceGetServiceHavingMsi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_sso_token.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_sso_token.py index d796924aca06..8107c2bf37ed 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_sso_token.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_get_sso_token.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.get_sso_token( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceGetSsoToken.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementServiceGetSsoToken.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_migrate_to_stv2.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_migrate_to_stv2.py index ae9216618220..e238b682d146 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_migrate_to_stv2.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_migrate_to_stv2.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_migrate_to_stv2( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceMigrateToStv2.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementServiceMigrateToStv2.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_refresh_key_vault_hostnames.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_refresh_key_vault_hostnames.py index ab352e2ab021..1af6e464988e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_refresh_key_vault_hostnames.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_service_refresh_key_vault_hostnames.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_refresh_hostnames( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementServiceRefreshKeyVaultHostnames.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementServiceRefreshKeyVaultHostnames.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_list_secrets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_list_secrets.py index f85c5859d72e..30e503b73805 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_list_secrets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_list_secrets.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.subscription.list_secrets( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementSubscriptionListSecrets.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementSubscriptionListSecrets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_primary_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_primary_key.py index b206424eca0e..e983192f4b53 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_primary_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_primary_key.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.subscription.regenerate_primary_key( @@ -38,6 +37,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementSubscriptionRegeneratePrimaryKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_secondary_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_secondary_key.py index f90482d269e9..efd498d60a9e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_secondary_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_subscription_regenerate_secondary_key.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.subscription.regenerate_secondary_key( @@ -38,6 +37,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementSubscriptionRegenerateSecondaryKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_git_regenerate_primary_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_git_regenerate_primary_key.py new file mode 100644 index 000000000000..98b81aed1bbc --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_git_regenerate_primary_key.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_tenant_access_git_regenerate_primary_key.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.tenant_access_git.regenerate_primary_key( + resource_group_name="rg1", + service_name="apimService1", + access_name="access", + ) + + +# x-ms-original-file: 2025-03-01-preview/ApiManagementTenantAccessGitRegeneratePrimaryKey.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_key.py index 1a4d1bd7be7e..423ab5745556 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_key.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,16 +27,16 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) - client.tenant_access.regenerate_primary_key( + client.tenant_access_git.regenerate_secondary_key( resource_group_name="rg1", service_name="apimService1", access_name="access", ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementTenantAccessRegenerateKey.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementTenantAccessRegenerateKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_primary_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_primary_key.py new file mode 100644 index 000000000000..74f3df43b241 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_primary_key.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_tenant_access_regenerate_primary_key.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.tenant_access.regenerate_primary_key( + resource_group_name="rg1", + service_name="apimService1", + access_name="access", + ) + + +# x-ms-original-file: 2025-03-01-preview/ApiManagementTenantAccessRegeneratePrimaryKey.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_secondary_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_secondary_key.py new file mode 100644 index 000000000000..6aadefc84de8 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_regenerate_secondary_key.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.apimanagement import ApiManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-apimanagement +# USAGE + python api_management_tenant_access_regenerate_secondary_key.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ApiManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.tenant_access.regenerate_secondary_key( + resource_group_name="rg1", + service_name="apimService1", + access_name="access", + ) + + +# x-ms-original-file: 2025-03-01-preview/ApiManagementTenantAccessRegenerateSecondaryKey.json +if __name__ == "__main__": + main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_sync_state.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_sync_state.py index f8aad0f1ac9b..328a266c2462 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_sync_state.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_access_sync_state.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tenant_configuration.get_sync_state( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementTenantAccessSyncState.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementTenantAccessSyncState.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_deploy.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_deploy.py index 670d9de5bb11..8f700f95083a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_deploy.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_deploy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tenant_configuration.begin_deploy( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementTenantConfigurationDeploy.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementTenantConfigurationDeploy.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_save.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_save.py index fb15f00ad349..9704eb3b957d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_save.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_save.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tenant_configuration.begin_save( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementTenantConfigurationSave.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementTenantConfigurationSave.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_validate.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_validate.py index c26e9018e181..050bd1189d97 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_validate.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_tenant_configuration_validate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tenant_configuration.begin_validate( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementTenantConfigurationValidate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementTenantConfigurationValidate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_undelete.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_undelete.py index e624980aa322..6f9f01fcfaf2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_undelete.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_undelete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_create_or_update( @@ -43,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUndelete.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUndelete.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api.py index 52dc4933173a..b30b3cfe6cc1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,14 +27,13 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api.update( resource_group_name="rg1", service_name="apimService1", api_id="echo-api", - if_match="*", parameters={ "properties": { "displayName": "Echo API New", @@ -43,10 +41,12 @@ def main(): "serviceUrl": "http://echoapi.cloudapp.net/api2", } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_diagnostic.py index 0fdcea8dcf7c..37229c6113ce 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_diagnostic.update( @@ -36,7 +35,6 @@ def main(): service_name="apimService1", api_id="echo-api", diagnostic_id="applicationinsights", - if_match="*", parameters={ "properties": { "alwaysLog": "allErrors", @@ -52,10 +50,12 @@ def main(): "sampling": {"percentage": 50, "samplingType": "fixed"}, } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_issue.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_issue.py index 019fc3f4c20e..afdf2b5b6fde 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_issue.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_issue.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_issue.update( @@ -36,12 +35,13 @@ def main(): service_name="apimService1", api_id="57d1f7558aa04f15146d9d8a", issue_id="57d2ef278aa04f0ad01d6cdc", - if_match="*", parameters={"properties": {"state": "closed"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiIssue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateApiIssue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_operation.py index 40fb9903b694..64646dbe3e43 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_operation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_operation.update( @@ -36,7 +35,6 @@ def main(): service_name="apimService1", api_id="echo-api", operation_id="operationId", - if_match="*", parameters={ "properties": { "displayName": "Retrieve resource", @@ -61,10 +59,12 @@ def main(): "urlTemplate": "/resource", } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiOperation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_release.py index b7e4189c0a6c..1c8101b62abe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_release.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_release.update( @@ -36,17 +36,18 @@ def main(): service_name="apimService1", api_id="a1", release_id="testrev", - if_match="*", parameters={ "properties": { "apiId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", "notes": "yahooagain", } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiRelease.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_tool.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_tool.py index ebe480a50679..9c1542870574 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_tool.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_tool.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_tool.update( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiTool.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateApiTool.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_version_set.py index 6f2a23b47bce..72be3518a947 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_version_set.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,14 +27,13 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_version_set.update( resource_group_name="rg1", service_name="apimService1", version_set_id="vs1", - if_match="*", parameters={ "properties": { "description": "Version configuration", @@ -43,10 +41,12 @@ def main(): "versioningScheme": "Segment", } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiVersionSet.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_wiki.py index 18ad320c5725..1df6e55379b3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_api_wiki.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_wiki.update( resource_group_name="rg1", service_name="apimService1", api_id="57d1f7558aa04f15146d9d8a", - if_match="*", parameters={"properties": {"documents": [{"documentationId": "docId1"}]}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateApiWiki.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateApiWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_authorization_server.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_authorization_server.py index ce7b90d19b53..e6a39cf78c63 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_authorization_server.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_authorization_server.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,14 +27,13 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.authorization_server.update( resource_group_name="rg1", service_name="apimService1", authsid="newauthServer", - if_match="*", parameters={ "properties": { "clientId": "update", @@ -44,10 +42,12 @@ def main(): "useInTestConsole": False, } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateAuthorizationServer.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateAuthorizationServer.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_backend.py index fb75db3202a8..d3cc293159ca 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_backend.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,24 +27,25 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.backend.update( resource_group_name="rg1", service_name="apimService1", backend_id="proxybackend", - if_match="*", parameters={ "properties": { "description": "description5308", "tls": {"validateCertificateChain": False, "validateCertificateName": True}, } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateBackend.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_cache.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_cache.py index 65abb55d85ef..da800fdcfd8f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_cache.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_cache.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.cache.update( resource_group_name="rg1", service_name="apimService1", cache_id="c1", - if_match="*", parameters={"properties": {"useFromLocation": "westindia"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateCache.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateCache.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_diagnostic.py index 9e6d23a37d4f..6df2c7346891 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,14 +27,13 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.diagnostic.update( resource_group_name="rg1", service_name="apimService1", diagnostic_id="applicationinsights", - if_match="*", parameters={ "properties": { "alwaysLog": "allErrors", @@ -51,10 +49,12 @@ def main(): "sampling": {"percentage": 50, "samplingType": "fixed"}, } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_documentation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_documentation.py index deaf930c5601..e218b5e90fc8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_documentation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_documentation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.documentation.update( resource_group_name="rg1", service_name="apimService1", documentation_id="57d1f7558aa04f15146d9d8a", - if_match="str", parameters={"properties": {"content": "content updated", "title": "Title updated"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateDocumentation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateDocumentation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_gateway.py index adfaedb2258a..0eeafa396764 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_gateway.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.gateway.update( resource_group_name="rg1", service_name="apimService1", gateway_id="gw1", - if_match="*", parameters={"properties": {"description": "my gateway 1", "locationData": {"name": "my location"}}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateGateway.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_graph_ql_api_resolver.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_graph_ql_api_resolver.py index 9e92c46f7580..e2757f3b6c0f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_graph_ql_api_resolver.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_graph_ql_api_resolver.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.graph_ql_api_resolver.update( @@ -36,7 +35,6 @@ def main(): service_name="apimService1", api_id="echo-api", resolver_id="resolverId", - if_match="*", parameters={ "properties": { "description": "A GraphQL Resolver example", @@ -44,10 +42,12 @@ def main(): "path": "Query/adminUsers", } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateGraphQLApiResolver.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateGraphQLApiResolver.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_group.py index 6eea99a67b2e..1c65ed4dfa95 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.group.update( resource_group_name="rg1", service_name="apimService1", group_id="tempgroup", - if_match="*", parameters={"properties": {"displayName": "temp group"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_identity_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_identity_provider.py index b4a6176a3ca4..89bbbd16c6db 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_identity_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_identity_provider.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.identity_provider.update( resource_group_name="rg1", service_name="apimService1", identity_provider_name="facebook", - if_match="*", parameters={"properties": {"clientId": "updatedfacebookid", "clientSecret": "updatedfacebooksecret"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateIdentityProvider.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateIdentityProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_logger.py index c51fadaefc1a..007a1a4744f2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_logger.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.logger.update( resource_group_name="rg1", service_name="apimService1", logger_id="eh1", - if_match="*", parameters={"properties": {"description": "updating description", "loggerType": "azureEventHub"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateLogger.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_named_value.py index ba97a0209b3c..45183ea9dd20 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_named_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,21 +27,22 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.named_value.begin_update( resource_group_name="rg1", service_name="apimService1", named_value_id="testprop2", - if_match="*", parameters={ "properties": {"displayName": "prop3name", "secret": False, "tags": ["foo", "bar2"], "value": "propValue"} }, + etag="str", + match_condition=~azure.core.MatchConditions, ).result() print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateNamedValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_open_id_connect_provider.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_open_id_connect_provider.py index aad9408ec7d0..9df77fee27ea 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_open_id_connect_provider.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_open_id_connect_provider.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,21 +27,22 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.open_id_connect_provider.update( resource_group_name="rg1", service_name="apimService1", opid="templateOpenIdConnect2", - if_match="*", parameters={ "properties": {"clientSecret": "updatedsecret", "useInApiDocumentation": True, "useInTestConsole": False} }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateOpenIdConnectProvider.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateOpenIdConnectProvider.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_policy_restriction.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_policy_restriction.py index f0e4032cd988..d85e01117227 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_policy_restriction.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_policy_restriction.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy_restriction.update( resource_group_name="rg1", service_name="apimService1", policy_restriction_id="policyRestriction1", - if_match="*", parameters={"properties": {"scope": "Sample Path 2 to the policy document."}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdatePolicyRestriction.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdatePolicyRestriction.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_config.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_config.py index c87e2e6f52a5..c3455c7de147 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_config.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_config.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,14 +27,13 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.portal_config.update( resource_group_name="rg1", service_name="apimService1", portal_config_id="default", - if_match="*", parameters={ "properties": { "cors": {"allowedOrigins": ["https://contoso.com"]}, @@ -57,10 +55,12 @@ def main(): }, } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdatePortalConfig.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdatePortalConfig.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_revision.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_revision.py index f4c19d4a9ef0..80846ba6297a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_revision.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_portal_revision.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.portal_revision.begin_update( resource_group_name="rg1", service_name="apimService1", portal_revision_id="20201112101010", - if_match="*", parameters={"properties": {"description": "portal revision update", "isCurrent": True}}, + etag="str", + match_condition=~azure.core.MatchConditions, ).result() print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdatePortalRevision.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdatePortalRevision.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product.py index 3eefaec4cd15..43a3b06504f7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product.update( resource_group_name="rg1", service_name="apimService1", product_id="testproduct", - if_match="*", parameters={"properties": {"displayName": "Test Template ProductName 4"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateProduct.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product_wiki.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product_wiki.py index a0eb95e06b62..e1b4acf62ea1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product_wiki.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_product_wiki.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.product_wiki.update( resource_group_name="rg1", service_name="apimService1", product_id="57d1f7558aa04f15146d9d8a", - if_match="*", parameters={"properties": {"documents": [{"documentationId": "docId1"}]}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateProductWiki.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateProductWiki.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key.py index 4ad8f2e0f6d0..abafedc813c7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.quota_by_counter_keys.update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateQuotaCounterKey.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateQuotaCounterKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key_by_quota_period.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key_by_quota_period.py index 260e62aa0a8e..9db327e31472 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key_by_quota_period.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_quota_counter_key_by_quota_period.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.quota_by_period_keys.update( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_disable_tls10.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_disable_tls10.py index e9deff5038c3..978f2c6c24d9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_disable_tls10.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_disable_tls10.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_update( @@ -43,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateServiceDisableTls10.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateServiceDisableTls10.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_publisher_details.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_publisher_details.py index a7a141ddd1be..70d5bfebd2e6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_publisher_details.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_publisher_details.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_update( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateServicePublisherDetails.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateServicePublisherDetails.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_to_new_vnet_and_azs.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_to_new_vnet_and_azs.py index 97d952fb4cec..e6bd187e2ffd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_to_new_vnet_and_azs.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_service_to_new_vnet_and_azs.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_management_service.begin_update( @@ -60,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateServiceToNewVnetAndAZs.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_standard_gateway.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_standard_gateway.py index 5674fe6bfda6..4a821791d042 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_standard_gateway.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_standard_gateway.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.api_gateway.begin_update( @@ -43,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateStandardGateway.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateStandardGateway.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_subscription.py index 3c99b390688e..fee5aeecd151 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.subscription.update( resource_group_name="rg1", service_name="apimService1", sid="testsub", - if_match="*", parameters={"properties": {"displayName": "testsub"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateSubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tag.py index 65627a92d59b..5afe49ddfc5a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tag.update( resource_group_name="rg1", service_name="apimService1", tag_id="temptag", - if_match="*", parameters={"properties": {"displayName": "temp tag"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_template.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_template.py index 19c33a594558..7522b2def92b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_template.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_template.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,24 +28,25 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.email_template.update( resource_group_name="rg1", service_name="apimService1", template_name="newIssueNotificationMessage", - if_match="*", parameters={ "properties": { "body": '\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

\r\n We are happy to let you know that your request to publish the $AppName application in the gallery has been approved. Your application has been published and can be viewed here.\r\n

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n', "subject": "Your request $IssueName was received", } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateTemplate.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateTemplate.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tenant_access.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tenant_access.py index 6b73fbda2a67..5086b9f8bd75 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tenant_access.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_tenant_access.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.tenant_access.update( resource_group_name="rg1", service_name="apimService1", access_name="access", - if_match="*", parameters={"properties": {"enabled": True}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateTenantAccess.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateTenantAccess.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_user.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_user.py index 40a3fb76ca0c..e2512961071b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_user.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_user.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.user.update( resource_group_name="rg1", service_name="apimService1", user_id="5931a75ae4bbd512a88c680b", - if_match="*", parameters={"properties": {"email": "foobar@outlook.com", "firstName": "foo", "lastName": "bar"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateUser.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateUser.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace.py index da207c23f6b5..fe2454638635 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace.update( resource_group_name="rg1", service_name="apimService1", workspace_id="wks1", - if_match="*", parameters={"properties": {"description": "workspace 1", "displayName": "my workspace"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspace.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspace.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api.py index cec84ae30563..cd130da75f81 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api.update( @@ -36,7 +35,6 @@ def main(): service_name="apimService1", workspace_id="wks1", api_id="echo-api", - if_match="*", parameters={ "properties": { "displayName": "Echo API New", @@ -44,10 +42,12 @@ def main(): "serviceUrl": "http://echoapi.cloudapp.net/api2", } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceApi.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspaceApi.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_diagnostic.py index 652b48aa9a35..b7989c4fc6f2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_diagnostic.update( @@ -37,7 +36,6 @@ def main(): workspace_id="wks1", api_id="echo-api", diagnostic_id="applicationinsights", - if_match="*", parameters={ "properties": { "alwaysLog": "allErrors", @@ -53,10 +51,12 @@ def main(): "sampling": {"percentage": 50, "samplingType": "fixed"}, } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceApiDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspaceApiDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_operation.py index d6538ef1fb73..73a91496eb93 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_operation.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_operation.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_operation.update( @@ -37,7 +36,6 @@ def main(): workspace_id="wks1", api_id="echo-api", operation_id="operationId", - if_match="*", parameters={ "properties": { "displayName": "Retrieve resource", @@ -62,10 +60,12 @@ def main(): "urlTemplate": "/resource", } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceApiOperation.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspaceApiOperation.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_release.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_release.py index d5861be18c7a..6343ebfa6204 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_release.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_release.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_release.update( @@ -37,17 +37,18 @@ def main(): workspace_id="wks1", api_id="a1", release_id="testrev", - if_match="*", parameters={ "properties": { "apiId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/a1", "notes": "yahooagain", } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceApiRelease.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspaceApiRelease.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_version_set.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_version_set.py index 9cf275194f63..f43b872fb982 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_version_set.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_api_version_set.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_api_version_set.update( @@ -36,7 +35,6 @@ def main(): service_name="apimService1", workspace_id="wks1", version_set_id="vs1", - if_match="*", parameters={ "properties": { "description": "Version configuration", @@ -44,10 +42,12 @@ def main(): "versioningScheme": "Segment", } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceApiVersionSet.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspaceApiVersionSet.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_backend.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_backend.py index 8805699d7789..4c39c597359e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_backend.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_backend.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_backend.update( @@ -36,17 +35,18 @@ def main(): service_name="apimService1", workspace_id="wks1", backend_id="proxybackend", - if_match="*", parameters={ "properties": { "description": "description5308", "tls": {"validateCertificateChain": False, "validateCertificateName": True}, } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceBackend.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspaceBackend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_diagnostic.py index ec29833617e2..e618704dd962 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_diagnostic.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_diagnostic.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_diagnostic.update( @@ -36,7 +35,6 @@ def main(): service_name="apimService1", workspace_id="wks1", diagnostic_id="applicationinsights", - if_match="*", parameters={ "properties": { "alwaysLog": "allErrors", @@ -52,10 +50,12 @@ def main(): "sampling": {"percentage": 50, "samplingType": "fixed"}, } }, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceDiagnostic.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspaceDiagnostic.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_group.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_group.py index e0601a516b55..ef548d68aa60 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_group.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_group.update( @@ -36,12 +35,13 @@ def main(): service_name="apimService1", workspace_id="wks1", group_id="tempgroup", - if_match="*", parameters={"properties": {"displayName": "temp group"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceGroup.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspaceGroup.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_logger.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_logger.py index adebe189b12c..5371508573c2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_logger.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_logger.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_logger.update( @@ -36,12 +35,13 @@ def main(): service_name="apimService1", workspace_id="wks1", logger_id="eh1", - if_match="*", parameters={"properties": {"description": "updating description", "loggerType": "azureEventHub"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceLogger.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspaceLogger.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_named_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_named_value.py index 0a1dd9de9bf2..f3028798af83 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_named_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_named_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_named_value.begin_update( @@ -36,14 +35,15 @@ def main(): service_name="apimService1", workspace_id="wks1", named_value_id="testprop2", - if_match="*", parameters={ "properties": {"displayName": "prop3name", "secret": False, "tags": ["foo", "bar2"], "value": "propValue"} }, + etag="str", + match_condition=~azure.core.MatchConditions, ).result() print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceNamedValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspaceNamedValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_product.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_product.py index 442b8a3508f9..bf8e1f4bac2c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_product.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_product.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_product.update( @@ -36,12 +35,13 @@ def main(): service_name="apimService1", workspace_id="wks1", product_id="testproduct", - if_match="*", parameters={"properties": {"displayName": "Test Template ProductName 4"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceProduct.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspaceProduct.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_subscription.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_subscription.py index 1c826ae061e9..c2243d686b51 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_subscription.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_subscription.update( @@ -36,12 +35,13 @@ def main(): service_name="apimService1", workspace_id="wks1", sid="testsub", - if_match="*", parameters={"properties": {"displayName": "testsub"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceSubscription.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspaceSubscription.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_tag.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_tag.py index 79c277a88a18..9ecbdbb2601f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_tag.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_update_workspace_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_tag.update( @@ -36,12 +35,13 @@ def main(): service_name="apimService1", workspace_id="wks1", tag_id="temptag", - if_match="*", parameters={"properties": {"displayName": "temp tag"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUpdateWorkspaceTag.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUpdateWorkspaceTag.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_confirmation_password_send.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_confirmation_password_send.py index de8a4523f7dd..6727c903ed0f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_confirmation_password_send.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_confirmation_password_send.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.user_confirmation_password.send( @@ -38,6 +37,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUserConfirmationPasswordSend.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUserConfirmationPasswordSend.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_generate_sso_url.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_generate_sso_url.py index 8f6b0c37ef3c..149e3c944bcc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_generate_sso_url.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_generate_sso_url.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.user.generate_sso_url( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUserGenerateSsoUrl.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUserGenerateSsoUrl.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_token.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_token.py index 1dd542be0cdd..a34ee1cf6136 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_token.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_user_token.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.user.get_shared_access_token( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementUserToken.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementUserToken.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_validate_policies.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_validate_policies.py index 4daec198e0e7..ae415bad0d0e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_validate_policies.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_validate_policies.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policy_restriction_validations.begin_by_service( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementValidatePolicies.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementValidatePolicies.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_named_value_list_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_named_value_list_value.py index 648875cdf8b7..44e6b454dc3e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_named_value_list_value.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_named_value_list_value.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_named_value.list_value( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementWorkspaceNamedValueListValue.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementWorkspaceNamedValueListValue.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_list_secrets.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_list_secrets.py index e71988b7cd40..f055d56a7d81 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_list_secrets.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_list_secrets.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.workspace_subscription.list_secrets( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementWorkspaceSubscriptionListSecrets.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementWorkspaceSubscriptionListSecrets.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_primary_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_primary_key.py index f7220ec3e26e..5e1ae8121850 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_primary_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_primary_key.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_subscription.regenerate_primary_key( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_secondary_key.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_secondary_key.py index 287e2a80b208..4f316d25555f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_secondary_key.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_samples/api_management_workspace_subscription_regenerate_secondary_key.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = ApiManagementClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.workspace_subscription.regenerate_secondary_key( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/preview/2025-03-01-preview/examples/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json +# x-ms-original-file: 2025-03-01-preview/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json if __name__ == "__main__": main() diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/conftest.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/conftest.py index f88b03f80459..ff126cac4bdd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/conftest.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/conftest.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import os diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management.py index 18951606829f..67ba6b767873 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -37,7 +37,6 @@ def test_begin_perform_connectivity_check_async(self, resource_group): } }, }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations.py index 1fc6d412e13f..0e9d4e59d8f4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_all_policies_list_by_service(self, resource_group): response = self.client.all_policies.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations_async.py index 08670b9c6063..6a13e5b97006 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_all_policies_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_all_policies_list_by_service(self, resource_group): response = self.client.all_policies.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations.py index cfcc8c235aaf..da18199c8044 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_diagnostic_list_by_service(self, resource_group): - response = self.client.api_diagnostic.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_diagnostic_get_entity_tag(self, resource_group): - response = self.client.api_diagnostic.get_entity_tag( + def test_api_diagnostic_get(self, resource_group): + response = self.client.api_diagnostic.get( resource_group_name=resource_group.name, service_name="str", api_id="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_api_diagnostic_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_diagnostic_get(self, resource_group): - response = self.client.api_diagnostic.get( + def test_api_diagnostic_get_entity_tag(self, resource_group): + response = self.client.api_diagnostic.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,60 +53,69 @@ def test_api_diagnostic_create_or_update(self, resource_group): api_id="str", diagnostic_id="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "loggerId": "str", + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, + "logClientIp": bool, + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "largeLanguageModel": { - "logs": "str", - "requests": {"maxSizeInBytes": 0, "messages": "str"}, - "responses": {"maxSizeInBytes": 0, "messages": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -135,62 +129,72 @@ def test_api_diagnostic_update(self, resource_group): service_name="str", api_id="str", diagnostic_id="str", - if_match="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "loggerId": "str", + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, + "logClientIp": bool, + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "largeLanguageModel": { - "logs": "str", - "requests": {"maxSizeInBytes": 0, "messages": "str"}, - "responses": {"maxSizeInBytes": 0, "messages": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -204,9 +208,21 @@ def test_api_diagnostic_delete(self, resource_group): service_name="str", api_id="str", diagnostic_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_diagnostic_list_by_service(self, resource_group): + response = self.client.api_diagnostic.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations_async.py index c603802d1b3a..0df8002ec0ec 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_diagnostic_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_diagnostic_list_by_service(self, resource_group): - response = self.client.api_diagnostic.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_diagnostic_get_entity_tag(self, resource_group): - response = await self.client.api_diagnostic.get_entity_tag( + async def test_api_diagnostic_get(self, resource_group): + response = await self.client.api_diagnostic.get( resource_group_name=resource_group.name, service_name="str", api_id="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_api_diagnostic_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_diagnostic_get(self, resource_group): - response = await self.client.api_diagnostic.get( + async def test_api_diagnostic_get_entity_tag(self, resource_group): + response = await self.client.api_diagnostic.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,60 +54,69 @@ async def test_api_diagnostic_create_or_update(self, resource_group): api_id="str", diagnostic_id="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "loggerId": "str", + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, + "logClientIp": bool, + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "largeLanguageModel": { - "logs": "str", - "requests": {"maxSizeInBytes": 0, "messages": "str"}, - "responses": {"maxSizeInBytes": 0, "messages": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -136,62 +130,72 @@ async def test_api_diagnostic_update(self, resource_group): service_name="str", api_id="str", diagnostic_id="str", - if_match="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "loggerId": "str", + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, + "logClientIp": bool, + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "largeLanguageModel": { - "logs": "str", - "requests": {"maxSizeInBytes": 0, "messages": "str"}, - "responses": {"maxSizeInBytes": 0, "messages": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -205,9 +209,21 @@ async def test_api_diagnostic_delete(self, resource_group): service_name="str", api_id="str", diagnostic_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_diagnostic_list_by_service(self, resource_group): + response = self.client.api_diagnostic.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations.py index 2ef3f0718f2a..40eedc28bc93 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -27,7 +27,6 @@ def test_api_export_get(self, resource_group): api_id="str", format="str", export="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations_async.py index c4af50087b52..f15f87cec341 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_export_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -28,7 +28,6 @@ async def test_api_export_get(self, resource_group): api_id="str", format="str", export="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations.py index db8c3b343854..29bc7a0e9263 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestApiManagementApiGatewayConfigConnectionOperations(AzureMgmtRecordedTes def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_gateway_config_connection_list_by_gateway(self, resource_group): - response = self.client.api_gateway_config_connection.list_by_gateway( - resource_group_name=resource_group.name, - gateway_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_api_gateway_config_connection_get(self, resource_group): @@ -37,7 +25,6 @@ def test_api_gateway_config_connection_get(self, resource_group): resource_group_name=resource_group.name, gateway_name="str", config_connection_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,16 +38,25 @@ def test_api_gateway_config_connection_begin_create_or_update(self, resource_gro gateway_name="str", config_connection_name="str", parameters={ - "defaultHostname": "str", + "properties": { + "defaultHostname": "str", + "hostnames": ["str"], + "provisioningState": "str", + "sourceId": "str", + }, "etag": "str", - "hostnames": ["str"], "id": "str", "name": "str", - "provisioningState": "str", - "sourceId": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -73,9 +69,20 @@ def test_api_gateway_config_connection_begin_delete(self, resource_group): resource_group_name=resource_group.name, gateway_name="str", config_connection_name="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_gateway_config_connection_list_by_gateway(self, resource_group): + response = self.client.api_gateway_config_connection.list_by_gateway( + resource_group_name=resource_group.name, + gateway_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations_async.py index 0a514ec2ef20..ed93d856b28f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_config_connection_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestApiManagementApiGatewayConfigConnectionOperationsAsync(AzureMgmtRecord def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_gateway_config_connection_list_by_gateway(self, resource_group): - response = self.client.api_gateway_config_connection.list_by_gateway( - resource_group_name=resource_group.name, - gateway_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_api_gateway_config_connection_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_api_gateway_config_connection_get(self, resource_group): resource_group_name=resource_group.name, gateway_name="str", config_connection_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,16 +40,25 @@ async def test_api_gateway_config_connection_begin_create_or_update(self, resour gateway_name="str", config_connection_name="str", parameters={ - "defaultHostname": "str", + "properties": { + "defaultHostname": "str", + "hostnames": ["str"], + "provisioningState": "str", + "sourceId": "str", + }, "etag": "str", - "hostnames": ["str"], "id": "str", "name": "str", - "provisioningState": "str", - "sourceId": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -77,10 +73,21 @@ async def test_api_gateway_config_connection_begin_delete(self, resource_group): resource_group_name=resource_group.name, gateway_name="str", config_connection_name="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_gateway_config_connection_list_by_gateway(self, resource_group): + response = self.client.api_gateway_config_connection.list_by_gateway( + resource_group_name=resource_group.name, + gateway_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations.py index 8212d14ebdce..c1cb8ff0027e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestApiManagementApiGatewayHostnameBindingOperations(AzureMgmtRecordedTest def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_gateway_hostname_binding_list_by_gateway(self, resource_group): - response = self.client.api_gateway_hostname_binding.list_by_gateway( - resource_group_name=resource_group.name, - gateway_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_api_gateway_hostname_binding_get(self, resource_group): @@ -37,7 +25,6 @@ def test_api_gateway_hostname_binding_get(self, resource_group): resource_group_name=resource_group.name, gateway_name="str", hostname_binding_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,24 +38,33 @@ def test_api_gateway_hostname_binding_begin_create_or_update(self, resource_grou gateway_name="str", hostname_binding_name="str", parameters={ - "hostname": "str", - "keyVault": { - "secretId": "str", - "identityClientId": "str", - "lastStatus": { - "code": "str", - "lastSuccessTimeStampUtc": "2020-02-20 00:00:00", - "timeStampUtc": "2020-02-20 00:00:00", + "properties": { + "hostname": "str", + "keyVault": { + "secretId": "str", + "identityClientId": "str", + "lastStatus": { + "code": "str", + "lastSuccessTimeStampUtc": "2020-02-20 00:00:00", + "timeStampUtc": "2020-02-20 00:00:00", + }, }, + "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, + "provisioningState": "str", }, - "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, "etag": "str", "id": "str", "name": "str", - "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -81,13 +77,24 @@ def test_api_gateway_hostname_binding_begin_delete(self, resource_group): resource_group_name=resource_group.name, gateway_name="str", hostname_binding_name="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_gateway_hostname_binding_list_by_gateway(self, resource_group): + response = self.client.api_gateway_hostname_binding.list_by_gateway( + resource_group_name=resource_group.name, + gateway_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_api_gateway_hostname_binding_begin_refresh_secret(self, resource_group): @@ -95,7 +102,6 @@ def test_api_gateway_hostname_binding_begin_refresh_secret(self, resource_group) resource_group_name=resource_group.name, gateway_name="str", hostname_binding_name="str", - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations_async.py index 6e46356ba304..41e62dd750b6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_hostname_binding_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestApiManagementApiGatewayHostnameBindingOperationsAsync(AzureMgmtRecorde def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_gateway_hostname_binding_list_by_gateway(self, resource_group): - response = self.client.api_gateway_hostname_binding.list_by_gateway( - resource_group_name=resource_group.name, - gateway_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_api_gateway_hostname_binding_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_api_gateway_hostname_binding_get(self, resource_group): resource_group_name=resource_group.name, gateway_name="str", hostname_binding_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,24 +40,33 @@ async def test_api_gateway_hostname_binding_begin_create_or_update(self, resourc gateway_name="str", hostname_binding_name="str", parameters={ - "hostname": "str", - "keyVault": { - "secretId": "str", - "identityClientId": "str", - "lastStatus": { - "code": "str", - "lastSuccessTimeStampUtc": "2020-02-20 00:00:00", - "timeStampUtc": "2020-02-20 00:00:00", + "properties": { + "hostname": "str", + "keyVault": { + "secretId": "str", + "identityClientId": "str", + "lastStatus": { + "code": "str", + "lastSuccessTimeStampUtc": "2020-02-20 00:00:00", + "timeStampUtc": "2020-02-20 00:00:00", + }, }, + "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, + "provisioningState": "str", }, - "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, "etag": "str", "id": "str", "name": "str", - "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -85,14 +81,25 @@ async def test_api_gateway_hostname_binding_begin_delete(self, resource_group): resource_group_name=resource_group.name, gateway_name="str", hostname_binding_name="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_gateway_hostname_binding_list_by_gateway(self, resource_group): + response = self.client.api_gateway_hostname_binding.list_by_gateway( + resource_group_name=resource_group.name, + gateway_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_api_gateway_hostname_binding_begin_refresh_secret(self, resource_group): @@ -101,7 +108,6 @@ async def test_api_gateway_hostname_binding_begin_refresh_secret(self, resource_ resource_group_name=resource_group.name, gateway_name="str", hostname_binding_name="str", - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations.py index 9a7824b5badc..1b22ac24b848 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestApiManagementApiGatewayOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_gateway_get(self, resource_group): + response = self.client.api_gateway.get( + resource_group_name=resource_group.name, + gateway_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_api_gateway_begin_create_or_update(self, resource_group): @@ -26,15 +37,19 @@ def test_api_gateway_begin_create_or_update(self, resource_group): gateway_name="str", parameters={ "location": "str", + "properties": { + "backend": {"subnet": {"id": "str"}}, + "configurationApi": {"hostname": "str"}, + "createdAtUtc": "2020-02-20 00:00:00", + "frontend": {"defaultHostname": "str"}, + "provisioningState": "str", + "targetProvisioningState": "str", + "virtualNetworkType": "str", + }, "sku": {"name": "str", "capacity": 0}, - "backend": {"subnet": {"id": "str"}}, - "configurationApi": {"hostname": "str"}, - "createdAtUtc": "2020-02-20 00:00:00", "etag": "str", - "frontend": {"defaultHostname": "str"}, "id": "str", "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -44,11 +59,8 @@ def test_api_gateway_begin_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "tags": {"str": "str"}, - "targetProvisioningState": "str", "type": "str", - "virtualNetworkType": "str", }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -61,45 +73,33 @@ def test_api_gateway_begin_update(self, resource_group): resource_group_name=resource_group.name, gateway_name="str", parameters={ - "backend": {"subnet": {"id": "str"}}, - "configurationApi": {"hostname": "str"}, - "createdAtUtc": "2020-02-20 00:00:00", "etag": "str", - "frontend": {"defaultHostname": "str"}, "id": "str", "name": "str", - "provisioningState": "str", + "properties": { + "backend": {"subnet": {"id": "str"}}, + "configurationApi": {"hostname": "str"}, + "createdAtUtc": "2020-02-20 00:00:00", + "frontend": {"defaultHostname": "str"}, + "provisioningState": "str", + "targetProvisioningState": "str", + "virtualNetworkType": "str", + }, "sku": {"capacity": 0, "name": "str"}, "tags": {"str": "str"}, - "targetProvisioningState": "str", "type": "str", - "virtualNetworkType": "str", }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_gateway_get(self, resource_group): - response = self.client.api_gateway.get( - resource_group_name=resource_group.name, - gateway_name="str", - api_version="2025-03-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_api_gateway_begin_delete(self, resource_group): response = self.client.api_gateway.begin_delete( resource_group_name=resource_group.name, gateway_name="str", - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -110,7 +110,6 @@ def test_api_gateway_begin_delete(self, resource_group): def test_api_gateway_list_by_resource_group(self, resource_group): response = self.client.api_gateway.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -119,9 +118,7 @@ def test_api_gateway_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_api_gateway_list(self, resource_group): - response = self.client.api_gateway.list( - api_version="2025-03-01-preview", - ) + response = self.client.api_gateway.list() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations_async.py index 90b08a27066e..fdade871d7c4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_gateway_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestApiManagementApiGatewayOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_gateway_get(self, resource_group): + response = await self.client.api_gateway.get( + resource_group_name=resource_group.name, + gateway_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_api_gateway_begin_create_or_update(self, resource_group): @@ -28,15 +39,19 @@ async def test_api_gateway_begin_create_or_update(self, resource_group): gateway_name="str", parameters={ "location": "str", + "properties": { + "backend": {"subnet": {"id": "str"}}, + "configurationApi": {"hostname": "str"}, + "createdAtUtc": "2020-02-20 00:00:00", + "frontend": {"defaultHostname": "str"}, + "provisioningState": "str", + "targetProvisioningState": "str", + "virtualNetworkType": "str", + }, "sku": {"name": "str", "capacity": 0}, - "backend": {"subnet": {"id": "str"}}, - "configurationApi": {"hostname": "str"}, - "createdAtUtc": "2020-02-20 00:00:00", "etag": "str", - "frontend": {"defaultHostname": "str"}, "id": "str", "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -46,11 +61,8 @@ async def test_api_gateway_begin_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "tags": {"str": "str"}, - "targetProvisioningState": "str", "type": "str", - "virtualNetworkType": "str", }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -65,39 +77,28 @@ async def test_api_gateway_begin_update(self, resource_group): resource_group_name=resource_group.name, gateway_name="str", parameters={ - "backend": {"subnet": {"id": "str"}}, - "configurationApi": {"hostname": "str"}, - "createdAtUtc": "2020-02-20 00:00:00", "etag": "str", - "frontend": {"defaultHostname": "str"}, "id": "str", "name": "str", - "provisioningState": "str", + "properties": { + "backend": {"subnet": {"id": "str"}}, + "configurationApi": {"hostname": "str"}, + "createdAtUtc": "2020-02-20 00:00:00", + "frontend": {"defaultHostname": "str"}, + "provisioningState": "str", + "targetProvisioningState": "str", + "virtualNetworkType": "str", + }, "sku": {"capacity": 0, "name": "str"}, "tags": {"str": "str"}, - "targetProvisioningState": "str", "type": "str", - "virtualNetworkType": "str", }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_gateway_get(self, resource_group): - response = await self.client.api_gateway.get( - resource_group_name=resource_group.name, - gateway_name="str", - api_version="2025-03-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_api_gateway_begin_delete(self, resource_group): @@ -105,7 +106,6 @@ async def test_api_gateway_begin_delete(self, resource_group): await self.client.api_gateway.begin_delete( resource_group_name=resource_group.name, gateway_name="str", - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -117,7 +117,6 @@ async def test_api_gateway_begin_delete(self, resource_group): async def test_api_gateway_list_by_resource_group(self, resource_group): response = self.client.api_gateway.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -126,9 +125,7 @@ async def test_api_gateway_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_api_gateway_list(self, resource_group): - response = self.client.api_gateway.list( - api_version="2025-03-01-preview", - ) + response = self.client.api_gateway.list() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations.py index c015d28b8660..d760fd50d713 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,15 +20,15 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_issue_attachment_list_by_service(self, resource_group): - response = self.client.api_issue_attachment.list_by_service( + def test_api_issue_attachment_get(self, resource_group): + response = self.client.api_issue_attachment.get( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", - api_version="2025-03-01-preview", + attachment_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -41,7 +41,6 @@ def test_api_issue_attachment_get_entity_tag(self, resource_group): api_id="str", issue_id="str", attachment_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -49,14 +48,27 @@ def test_api_issue_attachment_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_issue_attachment_get(self, resource_group): - response = self.client.api_issue_attachment.get( + def test_api_issue_attachment_create_or_update(self, resource_group): + response = self.client.api_issue_attachment.create_or_update( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", attachment_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"content": "str", "contentFormat": "str", "title": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -64,22 +76,15 @@ def test_api_issue_attachment_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_issue_attachment_create_or_update(self, resource_group): - response = self.client.api_issue_attachment.create_or_update( + def test_api_issue_attachment_delete(self, resource_group): + response = self.client.api_issue_attachment.delete( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", attachment_id="str", - parameters={ - "content": "str", - "contentFormat": "str", - "id": "str", - "name": "str", - "title": "str", - "type": "str", - }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -87,16 +92,13 @@ def test_api_issue_attachment_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_issue_attachment_delete(self, resource_group): - response = self.client.api_issue_attachment.delete( + def test_api_issue_attachment_list_by_service(self, resource_group): + response = self.client.api_issue_attachment.list_by_service( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", - attachment_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations_async.py index 3ac6f36ebc11..bbb3ab735cdf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_attachment_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,15 +21,15 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_issue_attachment_list_by_service(self, resource_group): - response = self.client.api_issue_attachment.list_by_service( + async def test_api_issue_attachment_get(self, resource_group): + response = await self.client.api_issue_attachment.get( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", - api_version="2025-03-01-preview", + attachment_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -42,7 +42,6 @@ async def test_api_issue_attachment_get_entity_tag(self, resource_group): api_id="str", issue_id="str", attachment_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,14 +49,27 @@ async def test_api_issue_attachment_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_issue_attachment_get(self, resource_group): - response = await self.client.api_issue_attachment.get( + async def test_api_issue_attachment_create_or_update(self, resource_group): + response = await self.client.api_issue_attachment.create_or_update( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", attachment_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"content": "str", "contentFormat": "str", "title": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -65,22 +77,15 @@ async def test_api_issue_attachment_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_issue_attachment_create_or_update(self, resource_group): - response = await self.client.api_issue_attachment.create_or_update( + async def test_api_issue_attachment_delete(self, resource_group): + response = await self.client.api_issue_attachment.delete( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", attachment_id="str", - parameters={ - "content": "str", - "contentFormat": "str", - "id": "str", - "name": "str", - "title": "str", - "type": "str", - }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -88,16 +93,13 @@ async def test_api_issue_attachment_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_issue_attachment_delete(self, resource_group): - response = await self.client.api_issue_attachment.delete( + async def test_api_issue_attachment_list_by_service(self, resource_group): + response = self.client.api_issue_attachment.list_by_service( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", - attachment_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations.py index 8dc9bf72cfa3..7f939bd484f3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,15 +20,15 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_issue_comment_list_by_service(self, resource_group): - response = self.client.api_issue_comment.list_by_service( + def test_api_issue_comment_get(self, resource_group): + response = self.client.api_issue_comment.get( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", - api_version="2025-03-01-preview", + comment_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -41,7 +41,6 @@ def test_api_issue_comment_get_entity_tag(self, resource_group): api_id="str", issue_id="str", comment_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -49,14 +48,27 @@ def test_api_issue_comment_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_issue_comment_get(self, resource_group): - response = self.client.api_issue_comment.get( + def test_api_issue_comment_create_or_update(self, resource_group): + response = self.client.api_issue_comment.create_or_update( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", comment_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"text": "str", "userId": "str", "createdDate": "2020-02-20 00:00:00"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -64,22 +76,15 @@ def test_api_issue_comment_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_issue_comment_create_or_update(self, resource_group): - response = self.client.api_issue_comment.create_or_update( + def test_api_issue_comment_delete(self, resource_group): + response = self.client.api_issue_comment.delete( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", comment_id="str", - parameters={ - "createdDate": "2020-02-20 00:00:00", - "id": "str", - "name": "str", - "text": "str", - "type": "str", - "userId": "str", - }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -87,16 +92,13 @@ def test_api_issue_comment_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_issue_comment_delete(self, resource_group): - response = self.client.api_issue_comment.delete( + def test_api_issue_comment_list_by_service(self, resource_group): + response = self.client.api_issue_comment.list_by_service( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", - comment_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations_async.py index fe299bf050e0..70643b1a5e25 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_comment_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,15 +21,15 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_issue_comment_list_by_service(self, resource_group): - response = self.client.api_issue_comment.list_by_service( + async def test_api_issue_comment_get(self, resource_group): + response = await self.client.api_issue_comment.get( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", - api_version="2025-03-01-preview", + comment_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -42,7 +42,6 @@ async def test_api_issue_comment_get_entity_tag(self, resource_group): api_id="str", issue_id="str", comment_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,14 +49,27 @@ async def test_api_issue_comment_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_issue_comment_get(self, resource_group): - response = await self.client.api_issue_comment.get( + async def test_api_issue_comment_create_or_update(self, resource_group): + response = await self.client.api_issue_comment.create_or_update( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", comment_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"text": "str", "userId": "str", "createdDate": "2020-02-20 00:00:00"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -65,22 +77,15 @@ async def test_api_issue_comment_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_issue_comment_create_or_update(self, resource_group): - response = await self.client.api_issue_comment.create_or_update( + async def test_api_issue_comment_delete(self, resource_group): + response = await self.client.api_issue_comment.delete( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", comment_id="str", - parameters={ - "createdDate": "2020-02-20 00:00:00", - "id": "str", - "name": "str", - "text": "str", - "type": "str", - "userId": "str", - }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -88,16 +93,13 @@ async def test_api_issue_comment_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_issue_comment_delete(self, resource_group): - response = await self.client.api_issue_comment.delete( + async def test_api_issue_comment_list_by_service(self, resource_group): + response = self.client.api_issue_comment.list_by_service( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", - comment_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations.py index c6c7613e4994..0aeb3622d1a4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_issue_list_by_service(self, resource_group): - response = self.client.api_issue.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_issue_get_entity_tag(self, resource_group): - response = self.client.api_issue.get_entity_tag( + def test_api_issue_get(self, resource_group): + response = self.client.api_issue.get( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_api_issue_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_issue_get(self, resource_group): - response = self.client.api_issue.get( + def test_api_issue_get_entity_tag(self, resource_group): + response = self.client.api_issue.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,17 +53,26 @@ def test_api_issue_create_or_update(self, resource_group): api_id="str", issue_id="str", parameters={ - "apiId": "str", - "createdDate": "2020-02-20 00:00:00", - "description": "str", "id": "str", "name": "str", - "state": "str", - "title": "str", + "properties": { + "description": "str", + "title": "str", + "userId": "str", + "apiId": "str", + "createdDate": "2020-02-20 00:00:00", + "state": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "userId": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -92,16 +86,18 @@ def test_api_issue_update(self, resource_group): service_name="str", api_id="str", issue_id="str", - if_match="str", parameters={ - "apiId": "str", - "createdDate": "2020-02-20 00:00:00", - "description": "str", - "state": "str", - "title": "str", - "userId": "str", + "properties": { + "apiId": "str", + "createdDate": "2020-02-20 00:00:00", + "description": "str", + "state": "str", + "title": "str", + "userId": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -115,9 +111,21 @@ def test_api_issue_delete(self, resource_group): service_name="str", api_id="str", issue_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_issue_list_by_service(self, resource_group): + response = self.client.api_issue.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations_async.py index e124709cad5d..128f15c66e7a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_issue_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_issue_list_by_service(self, resource_group): - response = self.client.api_issue.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_issue_get_entity_tag(self, resource_group): - response = await self.client.api_issue.get_entity_tag( + async def test_api_issue_get(self, resource_group): + response = await self.client.api_issue.get( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_api_issue_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_issue_get(self, resource_group): - response = await self.client.api_issue.get( + async def test_api_issue_get_entity_tag(self, resource_group): + response = await self.client.api_issue.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", issue_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,17 +54,26 @@ async def test_api_issue_create_or_update(self, resource_group): api_id="str", issue_id="str", parameters={ - "apiId": "str", - "createdDate": "2020-02-20 00:00:00", - "description": "str", "id": "str", "name": "str", - "state": "str", - "title": "str", + "properties": { + "description": "str", + "title": "str", + "userId": "str", + "apiId": "str", + "createdDate": "2020-02-20 00:00:00", + "state": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "userId": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -93,16 +87,18 @@ async def test_api_issue_update(self, resource_group): service_name="str", api_id="str", issue_id="str", - if_match="str", parameters={ - "apiId": "str", - "createdDate": "2020-02-20 00:00:00", - "description": "str", - "state": "str", - "title": "str", - "userId": "str", + "properties": { + "apiId": "str", + "createdDate": "2020-02-20 00:00:00", + "description": "str", + "state": "str", + "title": "str", + "userId": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -116,9 +112,21 @@ async def test_api_issue_delete(self, resource_group): service_name="str", api_id="str", issue_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_issue_list_by_service(self, resource_group): + response = self.client.api_issue.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations.py index dc85b23295f3..c4a84314d6bc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_api_management_gateway_skus_list_available_skus(self, resource_group): response = self.client.api_management_gateway_skus.list_available_skus( resource_group_name=resource_group.name, gateway_name="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations_async.py index 115bab16357c..43ae19ad687e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_gateway_skus_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_api_management_gateway_skus_list_available_skus(self, resource_gr response = self.client.api_management_gateway_skus.list_available_skus( resource_group_name=resource_group.name, gateway_name="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations.py index 778113bc4eae..11cb9e9a0669 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,9 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_api_management_operations_list(self, resource_group): - response = self.client.api_management_operations.list( - api_version="2025-03-01-preview", - ) + response = self.client.api_management_operations.list() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations_async.py index 6bb3fd48f13b..186ed1de4300 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_operations_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -22,9 +22,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_api_management_operations_list(self, resource_group): - response = self.client.api_management_operations.list( - api_version="2025-03-01-preview", - ) + response = self.client.api_management_operations.list() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations.py index 1e5adc1a47d0..72baa4fd4778 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,40 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_management_service_begin_restore(self, resource_group): - response = self.client.api_management_service.begin_restore( - resource_group_name=resource_group.name, - service_name="str", - parameters={ - "backupName": "str", - "containerName": "str", - "storageAccount": "str", - "accessKey": "str", - "accessType": "AccessKey", - "clientId": "str", - }, - api_version="2025-03-01-preview", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_management_service_begin_backup(self, resource_group): - response = self.client.api_management_service.begin_backup( + def test_api_management_service_get(self, resource_group): + response = self.client.api_management_service.get( resource_group_name=resource_group.name, service_name="str", - parameters={ - "backupName": "str", - "containerName": "str", - "storageAccount": "str", - "accessKey": "str", - "accessType": "AccessKey", - "clientId": "str", - }, - api_version="2025-03-01-preview", - ).result() # call '.result()' to poll until service return final result + ) # please add some check logic here by yourself # ... @@ -66,63 +37,101 @@ def test_api_management_service_begin_create_or_update(self, resource_group): service_name="str", parameters={ "location": "str", - "publisherEmail": "str", - "publisherName": "str", + "properties": { + "publisherEmail": "str", + "publisherName": "str", + "additionalLocations": [ + { + "location": "str", + "sku": {"capacity": 0, "name": "str"}, + "disableGateway": bool, + "gatewayRegionalUrl": "str", + "natGatewayState": "str", + "outboundPublicIPAddresses": ["str"], + "platformVersion": "str", + "privateIPAddresses": ["str"], + "publicIPAddresses": ["str"], + "publicIpAddressId": "str", + "virtualNetworkConfiguration": { + "subnetResourceId": "str", + "subnetname": "str", + "vnetid": "str", + }, + "zones": ["str"], + } + ], + "apiVersionConstraint": {"minApiVersion": "str"}, + "certificates": [ + { + "storeName": "str", + "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, + "certificatePassword": "str", + "encodedCertificate": "str", + } + ], + "configurationApi": {"legacyApi": "str"}, + "createdAtUtc": "2020-02-20 00:00:00", + "customProperties": {"str": "str"}, + "developerPortalStatus": "str", + "developerPortalUrl": "str", + "disableGateway": bool, + "enableClientCertificate": bool, + "gatewayRegionalUrl": "str", + "gatewayUrl": "str", + "hostnameConfigurations": [ + { + "hostName": "str", + "type": "str", + "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, + "certificatePassword": "str", + "certificateSource": "str", + "certificateStatus": "str", + "defaultSslBinding": bool, + "encodedCertificate": "str", + "identityClientId": "str", + "keyVaultId": "str", + "negotiateClientCertificate": bool, + } + ], + "legacyPortalStatus": "str", + "managementApiUrl": "str", + "natGatewayState": "str", + "notificationSenderEmail": "str", + "outboundPublicIPAddresses": ["str"], + "platformVersion": "str", + "portalUrl": "str", + "privateEndpointConnections": [ + { + "id": "str", + "name": "str", + "properties": { + "privateLinkServiceConnectionState": { + "actionsRequired": "str", + "description": "str", + "status": "str", + }, + "groupIds": ["str"], + "privateEndpoint": {"id": "str"}, + "provisioningState": "str", + }, + "type": "str", + } + ], + "privateIPAddresses": ["str"], + "provisioningState": "str", + "publicIPAddresses": ["str"], + "publicIpAddressId": "str", + "publicNetworkAccess": "str", + "releaseChannel": "str", + "restore": bool, + "scmUrl": "str", + "targetProvisioningState": "str", + "virtualNetworkConfiguration": {"subnetResourceId": "str", "subnetname": "str", "vnetid": "str"}, + "virtualNetworkType": "str", + "zoneRedundant": bool, + }, "sku": {"capacity": 0, "name": "str"}, - "additionalLocations": [ - { - "location": "str", - "sku": {"capacity": 0, "name": "str"}, - "disableGateway": False, - "gatewayRegionalUrl": "str", - "natGatewayState": "str", - "outboundPublicIPAddresses": ["str"], - "platformVersion": "str", - "privateIPAddresses": ["str"], - "publicIPAddresses": ["str"], - "publicIpAddressId": "str", - "virtualNetworkConfiguration": { - "subnetResourceId": "str", - "subnetname": "str", - "vnetid": "str", - }, - "zones": ["str"], - } - ], - "apiVersionConstraint": {"minApiVersion": "str"}, - "certificates": [ - { - "storeName": "str", - "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, - "certificatePassword": "str", - "encodedCertificate": "str", - } - ], - "configurationApi": {"legacyApi": "Enabled"}, - "createdAtUtc": "2020-02-20 00:00:00", - "customProperties": {"str": "str"}, - "developerPortalStatus": "Enabled", - "developerPortalUrl": "str", - "disableGateway": False, - "enableClientCertificate": False, "etag": "str", - "gatewayRegionalUrl": "str", - "gatewayUrl": "str", - "hostnameConfigurations": [ - { - "hostName": "str", - "type": "str", - "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, - "certificatePassword": "str", - "certificateSource": "str", - "certificateStatus": "str", - "defaultSslBinding": False, - "encodedCertificate": "str", - "identityClientId": "str", - "keyVaultId": "str", - "negotiateClientCertificate": False, - } - ], "id": "str", "identity": { "type": "str", @@ -130,37 +139,7 @@ def test_api_management_service_begin_create_or_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "legacyPortalStatus": "Enabled", - "managementApiUrl": "str", "name": "str", - "natGatewayState": "str", - "notificationSenderEmail": "str", - "outboundPublicIPAddresses": ["str"], - "platformVersion": "str", - "portalUrl": "str", - "privateEndpointConnections": [ - { - "groupIds": ["str"], - "id": "str", - "name": "str", - "privateEndpoint": {"id": "str"}, - "privateLinkServiceConnectionState": { - "actionsRequired": "str", - "description": "str", - "status": "str", - }, - "provisioningState": "str", - "type": "str", - } - ], - "privateIPAddresses": ["str"], - "provisioningState": "str", - "publicIPAddresses": ["str"], - "publicIpAddressId": "str", - "publicNetworkAccess": "str", - "releaseChannel": "str", - "restore": False, - "scmUrl": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -170,14 +149,9 @@ def test_api_management_service_begin_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "tags": {"str": "str"}, - "targetProvisioningState": "str", "type": "str", - "virtualNetworkConfiguration": {"subnetResourceId": "str", "subnetname": "str", "vnetid": "str"}, - "virtualNetworkType": "str", - "zoneRedundant": False, "zones": ["str"], }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -190,60 +164,7 @@ def test_api_management_service_begin_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", parameters={ - "additionalLocations": [ - { - "location": "str", - "sku": {"capacity": 0, "name": "str"}, - "disableGateway": False, - "gatewayRegionalUrl": "str", - "natGatewayState": "str", - "outboundPublicIPAddresses": ["str"], - "platformVersion": "str", - "privateIPAddresses": ["str"], - "publicIPAddresses": ["str"], - "publicIpAddressId": "str", - "virtualNetworkConfiguration": { - "subnetResourceId": "str", - "subnetname": "str", - "vnetid": "str", - }, - "zones": ["str"], - } - ], - "apiVersionConstraint": {"minApiVersion": "str"}, - "certificates": [ - { - "storeName": "str", - "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, - "certificatePassword": "str", - "encodedCertificate": "str", - } - ], - "configurationApi": {"legacyApi": "Enabled"}, - "createdAtUtc": "2020-02-20 00:00:00", - "customProperties": {"str": "str"}, - "developerPortalStatus": "Enabled", - "developerPortalUrl": "str", - "disableGateway": False, - "enableClientCertificate": False, "etag": "str", - "gatewayRegionalUrl": "str", - "gatewayUrl": "str", - "hostnameConfigurations": [ - { - "hostName": "str", - "type": "str", - "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, - "certificatePassword": "str", - "certificateSource": "str", - "certificateStatus": "str", - "defaultSslBinding": False, - "encodedCertificate": "str", - "identityClientId": "str", - "keyVaultId": "str", - "negotiateClientCertificate": False, - } - ], "id": "str", "identity": { "type": "str", @@ -251,85 +172,116 @@ def test_api_management_service_begin_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "legacyPortalStatus": "Enabled", - "managementApiUrl": "str", "name": "str", - "natGatewayState": "str", - "notificationSenderEmail": "str", - "outboundPublicIPAddresses": ["str"], - "platformVersion": "str", - "portalUrl": "str", - "privateEndpointConnections": [ - { - "groupIds": ["str"], - "id": "str", - "name": "str", - "privateEndpoint": {"id": "str"}, - "privateLinkServiceConnectionState": { - "actionsRequired": "str", - "description": "str", - "status": "str", - }, - "provisioningState": "str", - "type": "str", - } - ], - "privateIPAddresses": ["str"], - "provisioningState": "str", - "publicIPAddresses": ["str"], - "publicIpAddressId": "str", - "publicNetworkAccess": "str", - "publisherEmail": "str", - "publisherName": "str", - "releaseChannel": "str", - "restore": False, - "scmUrl": "str", + "properties": { + "additionalLocations": [ + { + "location": "str", + "sku": {"capacity": 0, "name": "str"}, + "disableGateway": bool, + "gatewayRegionalUrl": "str", + "natGatewayState": "str", + "outboundPublicIPAddresses": ["str"], + "platformVersion": "str", + "privateIPAddresses": ["str"], + "publicIPAddresses": ["str"], + "publicIpAddressId": "str", + "virtualNetworkConfiguration": { + "subnetResourceId": "str", + "subnetname": "str", + "vnetid": "str", + }, + "zones": ["str"], + } + ], + "apiVersionConstraint": {"minApiVersion": "str"}, + "certificates": [ + { + "storeName": "str", + "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, + "certificatePassword": "str", + "encodedCertificate": "str", + } + ], + "configurationApi": {"legacyApi": "str"}, + "createdAtUtc": "2020-02-20 00:00:00", + "customProperties": {"str": "str"}, + "developerPortalStatus": "str", + "developerPortalUrl": "str", + "disableGateway": bool, + "enableClientCertificate": bool, + "gatewayRegionalUrl": "str", + "gatewayUrl": "str", + "hostnameConfigurations": [ + { + "hostName": "str", + "type": "str", + "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, + "certificatePassword": "str", + "certificateSource": "str", + "certificateStatus": "str", + "defaultSslBinding": bool, + "encodedCertificate": "str", + "identityClientId": "str", + "keyVaultId": "str", + "negotiateClientCertificate": bool, + } + ], + "legacyPortalStatus": "str", + "managementApiUrl": "str", + "natGatewayState": "str", + "notificationSenderEmail": "str", + "outboundPublicIPAddresses": ["str"], + "platformVersion": "str", + "portalUrl": "str", + "privateEndpointConnections": [ + { + "id": "str", + "name": "str", + "properties": { + "privateLinkServiceConnectionState": { + "actionsRequired": "str", + "description": "str", + "status": "str", + }, + "groupIds": ["str"], + "privateEndpoint": {"id": "str"}, + "provisioningState": "str", + }, + "type": "str", + } + ], + "privateIPAddresses": ["str"], + "provisioningState": "str", + "publicIPAddresses": ["str"], + "publicIpAddressId": "str", + "publicNetworkAccess": "str", + "publisherEmail": "str", + "publisherName": "str", + "releaseChannel": "str", + "restore": bool, + "scmUrl": "str", + "targetProvisioningState": "str", + "virtualNetworkConfiguration": {"subnetResourceId": "str", "subnetname": "str", "vnetid": "str"}, + "virtualNetworkType": "str", + "zoneRedundant": bool, + }, "sku": {"capacity": 0, "name": "str"}, "tags": {"str": "str"}, - "targetProvisioningState": "str", "type": "str", - "virtualNetworkConfiguration": {"subnetResourceId": "str", "subnetname": "str", "vnetid": "str"}, - "virtualNetworkType": "str", - "zoneRedundant": False, "zones": ["str"], }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_management_service_get(self, resource_group): - response = self.client.api_management_service.get( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_api_management_service_begin_delete(self, resource_group): response = self.client.api_management_service.begin_delete( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_management_service_begin_migrate_to_stv2(self, resource_group): - response = self.client.api_management_service.begin_migrate_to_stv2( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -340,7 +292,6 @@ def test_api_management_service_begin_migrate_to_stv2(self, resource_group): def test_api_management_service_list_by_resource_group(self, resource_group): response = self.client.api_management_service.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -349,41 +300,66 @@ def test_api_management_service_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_api_management_service_list(self, resource_group): - response = self.client.api_management_service.list( - api_version="2025-03-01-preview", - ) + response = self.client.api_management_service.list() result = [r for r in response] # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_management_service_get_sso_token(self, resource_group): - response = self.client.api_management_service.get_sso_token( + def test_api_management_service_begin_restore(self, resource_group): + response = self.client.api_management_service.begin_restore( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", - ) + parameters={ + "backupName": "str", + "containerName": "str", + "storageAccount": "str", + "accessKey": "str", + "accessType": "str", + "clientId": "str", + }, + ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_management_service_check_name_availability(self, resource_group): - response = self.client.api_management_service.check_name_availability( - parameters={"name": "str"}, - api_version="2025-03-01-preview", - ) + def test_api_management_service_begin_backup(self, resource_group): + response = self.client.api_management_service.begin_backup( + resource_group_name=resource_group.name, + service_name="str", + parameters={ + "backupName": "str", + "containerName": "str", + "storageAccount": "str", + "accessKey": "str", + "accessType": "str", + "clientId": "str", + }, + ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_management_service_get_domain_ownership_identifier(self, resource_group): - response = self.client.api_management_service.get_domain_ownership_identifier( - api_version="2025-03-01-preview", + def test_api_management_service_begin_migrate_to_stv2(self, resource_group): + response = self.client.api_management_service.begin_migrate_to_stv2( + resource_group_name=resource_group.name, + service_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_management_service_get_sso_token(self, resource_group): + response = self.client.api_management_service.get_sso_token( + resource_group_name=resource_group.name, + service_name="str", ) # please add some check logic here by yourself @@ -395,7 +371,6 @@ def test_api_management_service_begin_apply_network_configuration_updates(self, response = self.client.api_management_service.begin_apply_network_configuration_updates( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -407,8 +382,25 @@ def test_api_management_service_begin_refresh_hostnames(self, resource_group): response = self.client.api_management_service.begin_refresh_hostnames( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_management_service_check_name_availability(self, resource_group): + response = self.client.api_management_service.check_name_availability( + parameters={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_management_service_get_domain_ownership_identifier(self, resource_group): + response = self.client.api_management_service.get_domain_ownership_identifier() + + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations_async.py index 8001a039ffb5..098a57c561f0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,44 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_management_service_begin_restore(self, resource_group): - response = await ( - await self.client.api_management_service.begin_restore( - resource_group_name=resource_group.name, - service_name="str", - parameters={ - "backupName": "str", - "containerName": "str", - "storageAccount": "str", - "accessKey": "str", - "accessType": "AccessKey", - "clientId": "str", - }, - api_version="2025-03-01-preview", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_management_service_begin_backup(self, resource_group): - response = await ( - await self.client.api_management_service.begin_backup( - resource_group_name=resource_group.name, - service_name="str", - parameters={ - "backupName": "str", - "containerName": "str", - "storageAccount": "str", - "accessKey": "str", - "accessType": "AccessKey", - "clientId": "str", - }, - api_version="2025-03-01-preview", - ) - ).result() # call '.result()' to poll until service return final result + async def test_api_management_service_get(self, resource_group): + response = await self.client.api_management_service.get( + resource_group_name=resource_group.name, + service_name="str", + ) # please add some check logic here by yourself # ... @@ -72,63 +39,105 @@ async def test_api_management_service_begin_create_or_update(self, resource_grou service_name="str", parameters={ "location": "str", - "publisherEmail": "str", - "publisherName": "str", + "properties": { + "publisherEmail": "str", + "publisherName": "str", + "additionalLocations": [ + { + "location": "str", + "sku": {"capacity": 0, "name": "str"}, + "disableGateway": bool, + "gatewayRegionalUrl": "str", + "natGatewayState": "str", + "outboundPublicIPAddresses": ["str"], + "platformVersion": "str", + "privateIPAddresses": ["str"], + "publicIPAddresses": ["str"], + "publicIpAddressId": "str", + "virtualNetworkConfiguration": { + "subnetResourceId": "str", + "subnetname": "str", + "vnetid": "str", + }, + "zones": ["str"], + } + ], + "apiVersionConstraint": {"minApiVersion": "str"}, + "certificates": [ + { + "storeName": "str", + "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, + "certificatePassword": "str", + "encodedCertificate": "str", + } + ], + "configurationApi": {"legacyApi": "str"}, + "createdAtUtc": "2020-02-20 00:00:00", + "customProperties": {"str": "str"}, + "developerPortalStatus": "str", + "developerPortalUrl": "str", + "disableGateway": bool, + "enableClientCertificate": bool, + "gatewayRegionalUrl": "str", + "gatewayUrl": "str", + "hostnameConfigurations": [ + { + "hostName": "str", + "type": "str", + "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, + "certificatePassword": "str", + "certificateSource": "str", + "certificateStatus": "str", + "defaultSslBinding": bool, + "encodedCertificate": "str", + "identityClientId": "str", + "keyVaultId": "str", + "negotiateClientCertificate": bool, + } + ], + "legacyPortalStatus": "str", + "managementApiUrl": "str", + "natGatewayState": "str", + "notificationSenderEmail": "str", + "outboundPublicIPAddresses": ["str"], + "platformVersion": "str", + "portalUrl": "str", + "privateEndpointConnections": [ + { + "id": "str", + "name": "str", + "properties": { + "privateLinkServiceConnectionState": { + "actionsRequired": "str", + "description": "str", + "status": "str", + }, + "groupIds": ["str"], + "privateEndpoint": {"id": "str"}, + "provisioningState": "str", + }, + "type": "str", + } + ], + "privateIPAddresses": ["str"], + "provisioningState": "str", + "publicIPAddresses": ["str"], + "publicIpAddressId": "str", + "publicNetworkAccess": "str", + "releaseChannel": "str", + "restore": bool, + "scmUrl": "str", + "targetProvisioningState": "str", + "virtualNetworkConfiguration": { + "subnetResourceId": "str", + "subnetname": "str", + "vnetid": "str", + }, + "virtualNetworkType": "str", + "zoneRedundant": bool, + }, "sku": {"capacity": 0, "name": "str"}, - "additionalLocations": [ - { - "location": "str", - "sku": {"capacity": 0, "name": "str"}, - "disableGateway": False, - "gatewayRegionalUrl": "str", - "natGatewayState": "str", - "outboundPublicIPAddresses": ["str"], - "platformVersion": "str", - "privateIPAddresses": ["str"], - "publicIPAddresses": ["str"], - "publicIpAddressId": "str", - "virtualNetworkConfiguration": { - "subnetResourceId": "str", - "subnetname": "str", - "vnetid": "str", - }, - "zones": ["str"], - } - ], - "apiVersionConstraint": {"minApiVersion": "str"}, - "certificates": [ - { - "storeName": "str", - "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, - "certificatePassword": "str", - "encodedCertificate": "str", - } - ], - "configurationApi": {"legacyApi": "Enabled"}, - "createdAtUtc": "2020-02-20 00:00:00", - "customProperties": {"str": "str"}, - "developerPortalStatus": "Enabled", - "developerPortalUrl": "str", - "disableGateway": False, - "enableClientCertificate": False, "etag": "str", - "gatewayRegionalUrl": "str", - "gatewayUrl": "str", - "hostnameConfigurations": [ - { - "hostName": "str", - "type": "str", - "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, - "certificatePassword": "str", - "certificateSource": "str", - "certificateStatus": "str", - "defaultSslBinding": False, - "encodedCertificate": "str", - "identityClientId": "str", - "keyVaultId": "str", - "negotiateClientCertificate": False, - } - ], "id": "str", "identity": { "type": "str", @@ -136,37 +145,7 @@ async def test_api_management_service_begin_create_or_update(self, resource_grou "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "legacyPortalStatus": "Enabled", - "managementApiUrl": "str", "name": "str", - "natGatewayState": "str", - "notificationSenderEmail": "str", - "outboundPublicIPAddresses": ["str"], - "platformVersion": "str", - "portalUrl": "str", - "privateEndpointConnections": [ - { - "groupIds": ["str"], - "id": "str", - "name": "str", - "privateEndpoint": {"id": "str"}, - "privateLinkServiceConnectionState": { - "actionsRequired": "str", - "description": "str", - "status": "str", - }, - "provisioningState": "str", - "type": "str", - } - ], - "privateIPAddresses": ["str"], - "provisioningState": "str", - "publicIPAddresses": ["str"], - "publicIpAddressId": "str", - "publicNetworkAccess": "str", - "releaseChannel": "str", - "restore": False, - "scmUrl": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -176,14 +155,9 @@ async def test_api_management_service_begin_create_or_update(self, resource_grou "lastModifiedByType": "str", }, "tags": {"str": "str"}, - "targetProvisioningState": "str", "type": "str", - "virtualNetworkConfiguration": {"subnetResourceId": "str", "subnetname": "str", "vnetid": "str"}, - "virtualNetworkType": "str", - "zoneRedundant": False, "zones": ["str"], }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -198,60 +172,7 @@ async def test_api_management_service_begin_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", parameters={ - "additionalLocations": [ - { - "location": "str", - "sku": {"capacity": 0, "name": "str"}, - "disableGateway": False, - "gatewayRegionalUrl": "str", - "natGatewayState": "str", - "outboundPublicIPAddresses": ["str"], - "platformVersion": "str", - "privateIPAddresses": ["str"], - "publicIPAddresses": ["str"], - "publicIpAddressId": "str", - "virtualNetworkConfiguration": { - "subnetResourceId": "str", - "subnetname": "str", - "vnetid": "str", - }, - "zones": ["str"], - } - ], - "apiVersionConstraint": {"minApiVersion": "str"}, - "certificates": [ - { - "storeName": "str", - "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, - "certificatePassword": "str", - "encodedCertificate": "str", - } - ], - "configurationApi": {"legacyApi": "Enabled"}, - "createdAtUtc": "2020-02-20 00:00:00", - "customProperties": {"str": "str"}, - "developerPortalStatus": "Enabled", - "developerPortalUrl": "str", - "disableGateway": False, - "enableClientCertificate": False, "etag": "str", - "gatewayRegionalUrl": "str", - "gatewayUrl": "str", - "hostnameConfigurations": [ - { - "hostName": "str", - "type": "str", - "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, - "certificatePassword": "str", - "certificateSource": "str", - "certificateStatus": "str", - "defaultSslBinding": False, - "encodedCertificate": "str", - "identityClientId": "str", - "keyVaultId": "str", - "negotiateClientCertificate": False, - } - ], "id": "str", "identity": { "type": "str", @@ -259,67 +180,115 @@ async def test_api_management_service_begin_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "legacyPortalStatus": "Enabled", - "managementApiUrl": "str", "name": "str", - "natGatewayState": "str", - "notificationSenderEmail": "str", - "outboundPublicIPAddresses": ["str"], - "platformVersion": "str", - "portalUrl": "str", - "privateEndpointConnections": [ - { - "groupIds": ["str"], - "id": "str", - "name": "str", - "privateEndpoint": {"id": "str"}, - "privateLinkServiceConnectionState": { - "actionsRequired": "str", - "description": "str", - "status": "str", - }, - "provisioningState": "str", - "type": "str", - } - ], - "privateIPAddresses": ["str"], - "provisioningState": "str", - "publicIPAddresses": ["str"], - "publicIpAddressId": "str", - "publicNetworkAccess": "str", - "publisherEmail": "str", - "publisherName": "str", - "releaseChannel": "str", - "restore": False, - "scmUrl": "str", + "properties": { + "additionalLocations": [ + { + "location": "str", + "sku": {"capacity": 0, "name": "str"}, + "disableGateway": bool, + "gatewayRegionalUrl": "str", + "natGatewayState": "str", + "outboundPublicIPAddresses": ["str"], + "platformVersion": "str", + "privateIPAddresses": ["str"], + "publicIPAddresses": ["str"], + "publicIpAddressId": "str", + "virtualNetworkConfiguration": { + "subnetResourceId": "str", + "subnetname": "str", + "vnetid": "str", + }, + "zones": ["str"], + } + ], + "apiVersionConstraint": {"minApiVersion": "str"}, + "certificates": [ + { + "storeName": "str", + "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, + "certificatePassword": "str", + "encodedCertificate": "str", + } + ], + "configurationApi": {"legacyApi": "str"}, + "createdAtUtc": "2020-02-20 00:00:00", + "customProperties": {"str": "str"}, + "developerPortalStatus": "str", + "developerPortalUrl": "str", + "disableGateway": bool, + "enableClientCertificate": bool, + "gatewayRegionalUrl": "str", + "gatewayUrl": "str", + "hostnameConfigurations": [ + { + "hostName": "str", + "type": "str", + "certificate": {"expiry": "2020-02-20 00:00:00", "subject": "str", "thumbprint": "str"}, + "certificatePassword": "str", + "certificateSource": "str", + "certificateStatus": "str", + "defaultSslBinding": bool, + "encodedCertificate": "str", + "identityClientId": "str", + "keyVaultId": "str", + "negotiateClientCertificate": bool, + } + ], + "legacyPortalStatus": "str", + "managementApiUrl": "str", + "natGatewayState": "str", + "notificationSenderEmail": "str", + "outboundPublicIPAddresses": ["str"], + "platformVersion": "str", + "portalUrl": "str", + "privateEndpointConnections": [ + { + "id": "str", + "name": "str", + "properties": { + "privateLinkServiceConnectionState": { + "actionsRequired": "str", + "description": "str", + "status": "str", + }, + "groupIds": ["str"], + "privateEndpoint": {"id": "str"}, + "provisioningState": "str", + }, + "type": "str", + } + ], + "privateIPAddresses": ["str"], + "provisioningState": "str", + "publicIPAddresses": ["str"], + "publicIpAddressId": "str", + "publicNetworkAccess": "str", + "publisherEmail": "str", + "publisherName": "str", + "releaseChannel": "str", + "restore": bool, + "scmUrl": "str", + "targetProvisioningState": "str", + "virtualNetworkConfiguration": { + "subnetResourceId": "str", + "subnetname": "str", + "vnetid": "str", + }, + "virtualNetworkType": "str", + "zoneRedundant": bool, + }, "sku": {"capacity": 0, "name": "str"}, "tags": {"str": "str"}, - "targetProvisioningState": "str", "type": "str", - "virtualNetworkConfiguration": {"subnetResourceId": "str", "subnetname": "str", "vnetid": "str"}, - "virtualNetworkType": "str", - "zoneRedundant": False, "zones": ["str"], }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_management_service_get(self, resource_group): - response = await self.client.api_management_service.get( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_api_management_service_begin_delete(self, resource_group): @@ -327,21 +296,6 @@ async def test_api_management_service_begin_delete(self, resource_group): await self.client.api_management_service.begin_delete( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_management_service_begin_migrate_to_stv2(self, resource_group): - response = await ( - await self.client.api_management_service.begin_migrate_to_stv2( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -353,7 +307,6 @@ async def test_api_management_service_begin_migrate_to_stv2(self, resource_group async def test_api_management_service_list_by_resource_group(self, resource_group): response = self.client.api_management_service.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -362,41 +315,72 @@ async def test_api_management_service_list_by_resource_group(self, resource_grou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_api_management_service_list(self, resource_group): - response = self.client.api_management_service.list( - api_version="2025-03-01-preview", - ) + response = self.client.api_management_service.list() result = [r async for r in response] # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_management_service_get_sso_token(self, resource_group): - response = await self.client.api_management_service.get_sso_token( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) + async def test_api_management_service_begin_restore(self, resource_group): + response = await ( + await self.client.api_management_service.begin_restore( + resource_group_name=resource_group.name, + service_name="str", + parameters={ + "backupName": "str", + "containerName": "str", + "storageAccount": "str", + "accessKey": "str", + "accessType": "str", + "clientId": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_management_service_check_name_availability(self, resource_group): - response = await self.client.api_management_service.check_name_availability( - parameters={"name": "str"}, - api_version="2025-03-01-preview", - ) + async def test_api_management_service_begin_backup(self, resource_group): + response = await ( + await self.client.api_management_service.begin_backup( + resource_group_name=resource_group.name, + service_name="str", + parameters={ + "backupName": "str", + "containerName": "str", + "storageAccount": "str", + "accessKey": "str", + "accessType": "str", + "clientId": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_management_service_get_domain_ownership_identifier(self, resource_group): - response = await self.client.api_management_service.get_domain_ownership_identifier( - api_version="2025-03-01-preview", + async def test_api_management_service_begin_migrate_to_stv2(self, resource_group): + response = await ( + await self.client.api_management_service.begin_migrate_to_stv2( + resource_group_name=resource_group.name, + service_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_management_service_get_sso_token(self, resource_group): + response = await self.client.api_management_service.get_sso_token( + resource_group_name=resource_group.name, + service_name="str", ) # please add some check logic here by yourself @@ -409,7 +393,6 @@ async def test_api_management_service_begin_apply_network_configuration_updates( await self.client.api_management_service.begin_apply_network_configuration_updates( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -423,9 +406,26 @@ async def test_api_management_service_begin_refresh_hostnames(self, resource_gro await self.client.api_management_service.begin_refresh_hostnames( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_management_service_check_name_availability(self, resource_group): + response = await self.client.api_management_service.check_name_availability( + parameters={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_management_service_get_domain_ownership_identifier(self, resource_group): + response = await self.client.api_management_service.get_domain_ownership_identifier() + + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations.py index f99ebc98caad..04221ca972d3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_api_management_service_skus_list_available_service_skus(self, resource_ response = self.client.api_management_service_skus.list_available_service_skus( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations_async.py index c9a91c8d7386..46aa54613089 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_service_skus_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_api_management_service_skus_list_available_service_skus(self, res response = self.client.api_management_service_skus.list_available_service_skus( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations.py index a73cefd8fcd7..ef05540295a7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,9 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_api_management_skus_list(self, resource_group): - response = self.client.api_management_skus.list( - api_version="2025-03-01-preview", - ) + response = self.client.api_management_skus.list() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations_async.py index eb748831c23c..0214c8d6f5f4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_skus_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -22,9 +22,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_api_management_skus_list(self, resource_group): - response = self.client.api_management_skus.list( - api_version="2025-03-01-preview", - ) + response = self.client.api_management_skus.list() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations.py index e28f8bd1e307..5d33c4abcf54 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_api_management_workspace_link_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations_async.py index aad93181e943..f31574b2a70e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_link_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_api_management_workspace_link_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations.py index ae2aa7a186c8..12bf35b8d87f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_api_management_workspace_links_list_by_service(self, resource_group): response = self.client.api_management_workspace_links.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations_async.py index 5bae4ab16a2a..1f40a5822fdf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_management_workspace_links_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_api_management_workspace_links_list_by_service(self, resource_gro response = self.client.api_management_workspace_links.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations.py index 1a3a446e70da..99982e770c62 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_operation_list_by_api(self, resource_group): - response = self.client.api_operation.list_by_api( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_operation_get_entity_tag(self, resource_group): - response = self.client.api_operation.get_entity_tag( + def test_api_operation_get(self, resource_group): + response = self.client.api_operation.get( resource_group_name=resource_group.name, service_name="str", api_id="str", operation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_api_operation_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_operation_get(self, resource_group): - response = self.client.api_operation.get( + def test_api_operation_get_entity_tag(self, resource_group): + response = self.client.api_operation.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", operation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,78 +53,15 @@ def test_api_operation_create_or_update(self, resource_group): api_id="str", operation_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", - "method": "str", "name": "str", - "policies": "str", - "request": { + "properties": { + "displayName": "str", + "method": "str", + "urlTemplate": "str", "description": "str", - "headers": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "queryParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "representations": [ - { - "contentType": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "formParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": { - "description": "str", - "externalValue": "str", - "summary": "str", - "value": {}, - } - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "schemaId": "str", - "typeName": "str", - } - ], - }, - "responses": [ - { - "statusCode": 0, + "policies": "str", + "request": { "description": "str", "headers": [ { @@ -156,6 +78,21 @@ def test_api_operation_create_or_update(self, resource_group): "values": ["str"], } ], + "queryParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], "representations": [ { "contentType": "str", @@ -186,85 +123,12 @@ def test_api_operation_create_or_update(self, resource_group): "typeName": "str", } ], - } - ], - "templateParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "type": "str", - "urlTemplate": "str", - }, - api_version="2025-03-01-preview", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_operation_update(self, resource_group): - response = self.client.api_operation.update( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - operation_id="str", - if_match="str", - parameters={ - "description": "str", - "displayName": "str", - "method": "str", - "policies": "str", - "request": { - "description": "str", - "headers": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "queryParameters": [ + }, + "responses": [ { - "name": "str", - "type": "str", - "defaultValue": "str", + "statusCode": 0, "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "representations": [ - { - "contentType": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "formParameters": [ + "headers": [ { "name": "str", "type": "str", @@ -284,14 +148,89 @@ def test_api_operation_update(self, resource_group): "values": ["str"], } ], + "representations": [ + { + "contentType": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "formParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "schemaId": "str", + "typeName": "str", + } + ], + } + ], + "templateParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, "schemaId": "str", "typeName": "str", + "values": ["str"], } ], }, - "responses": [ - { - "statusCode": 0, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_operation_update(self, resource_group): + response = self.client.api_operation.update( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + operation_id="str", + parameters={ + "properties": { + "description": "str", + "displayName": "str", + "method": "str", + "policies": "str", + "request": { "description": "str", "headers": [ { @@ -308,6 +247,21 @@ def test_api_operation_update(self, resource_group): "values": ["str"], } ], + "queryParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], "representations": [ { "contentType": "str", @@ -338,26 +292,88 @@ def test_api_operation_update(self, resource_group): "typeName": "str", } ], - } - ], - "templateParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "urlTemplate": "str", + }, + "responses": [ + { + "statusCode": 0, + "description": "str", + "headers": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "representations": [ + { + "contentType": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "formParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "schemaId": "str", + "typeName": "str", + } + ], + } + ], + "templateParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "urlTemplate": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -371,9 +387,21 @@ def test_api_operation_delete(self, resource_group): service_name="str", api_id="str", operation_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_operation_list_by_api(self, resource_group): + response = self.client.api_operation.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations_async.py index 0d2763b6794e..b1d4ae4b7a50 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_operation_list_by_api(self, resource_group): - response = self.client.api_operation.list_by_api( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_operation_get_entity_tag(self, resource_group): - response = await self.client.api_operation.get_entity_tag( + async def test_api_operation_get(self, resource_group): + response = await self.client.api_operation.get( resource_group_name=resource_group.name, service_name="str", api_id="str", operation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_api_operation_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_operation_get(self, resource_group): - response = await self.client.api_operation.get( + async def test_api_operation_get_entity_tag(self, resource_group): + response = await self.client.api_operation.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", operation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,78 +54,15 @@ async def test_api_operation_create_or_update(self, resource_group): api_id="str", operation_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", - "method": "str", "name": "str", - "policies": "str", - "request": { + "properties": { + "displayName": "str", + "method": "str", + "urlTemplate": "str", "description": "str", - "headers": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "queryParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "representations": [ - { - "contentType": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "formParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": { - "description": "str", - "externalValue": "str", - "summary": "str", - "value": {}, - } - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "schemaId": "str", - "typeName": "str", - } - ], - }, - "responses": [ - { - "statusCode": 0, + "policies": "str", + "request": { "description": "str", "headers": [ { @@ -157,6 +79,21 @@ async def test_api_operation_create_or_update(self, resource_group): "values": ["str"], } ], + "queryParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], "representations": [ { "contentType": "str", @@ -187,85 +124,12 @@ async def test_api_operation_create_or_update(self, resource_group): "typeName": "str", } ], - } - ], - "templateParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "type": "str", - "urlTemplate": "str", - }, - api_version="2025-03-01-preview", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_operation_update(self, resource_group): - response = await self.client.api_operation.update( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - operation_id="str", - if_match="str", - parameters={ - "description": "str", - "displayName": "str", - "method": "str", - "policies": "str", - "request": { - "description": "str", - "headers": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "queryParameters": [ + }, + "responses": [ { - "name": "str", - "type": "str", - "defaultValue": "str", + "statusCode": 0, "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "representations": [ - { - "contentType": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "formParameters": [ + "headers": [ { "name": "str", "type": "str", @@ -285,14 +149,89 @@ async def test_api_operation_update(self, resource_group): "values": ["str"], } ], + "representations": [ + { + "contentType": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "formParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "schemaId": "str", + "typeName": "str", + } + ], + } + ], + "templateParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, "schemaId": "str", "typeName": "str", + "values": ["str"], } ], }, - "responses": [ - { - "statusCode": 0, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_operation_update(self, resource_group): + response = await self.client.api_operation.update( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + operation_id="str", + parameters={ + "properties": { + "description": "str", + "displayName": "str", + "method": "str", + "policies": "str", + "request": { "description": "str", "headers": [ { @@ -309,6 +248,21 @@ async def test_api_operation_update(self, resource_group): "values": ["str"], } ], + "queryParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], "representations": [ { "contentType": "str", @@ -339,26 +293,88 @@ async def test_api_operation_update(self, resource_group): "typeName": "str", } ], - } - ], - "templateParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "urlTemplate": "str", + }, + "responses": [ + { + "statusCode": 0, + "description": "str", + "headers": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "representations": [ + { + "contentType": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "formParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "schemaId": "str", + "typeName": "str", + } + ], + } + ], + "templateParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "urlTemplate": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -372,9 +388,21 @@ async def test_api_operation_delete(self, resource_group): service_name="str", api_id="str", operation_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_operation_list_by_api(self, resource_group): + response = self.client.api_operation.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations.py index eed7b8a9cc6b..65161250b58f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_operation_policy_list_by_operation(self, resource_group): - response = self.client.api_operation_policy.list_by_operation( + def test_api_operation_policy_get(self, resource_group): + response = self.client.api_operation_policy.get( resource_group_name=resource_group.name, service_name="str", api_id="str", operation_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) # please add some check logic here by yourself @@ -41,7 +41,6 @@ def test_api_operation_policy_get_entity_tag(self, resource_group): api_id="str", operation_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -49,14 +48,27 @@ def test_api_operation_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_operation_policy_get(self, resource_group): - response = self.client.api_operation_policy.get( + def test_api_operation_policy_create_or_update(self, resource_group): + response = self.client.api_operation_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", api_id="str", operation_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -64,15 +76,15 @@ def test_api_operation_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_operation_policy_create_or_update(self, resource_group): - response = self.client.api_operation_policy.create_or_update( + def test_api_operation_policy_delete(self, resource_group): + response = self.client.api_operation_policy.delete( resource_group_name=resource_group.name, service_name="str", api_id="str", operation_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -80,15 +92,12 @@ def test_api_operation_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_operation_policy_delete(self, resource_group): - response = self.client.api_operation_policy.delete( + def test_api_operation_policy_list_by_operation(self, resource_group): + response = self.client.api_operation_policy.list_by_operation( resource_group_name=resource_group.name, service_name="str", api_id="str", operation_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations_async.py index e5787a8d690b..5a9b84e4a045 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operation_policy_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_operation_policy_list_by_operation(self, resource_group): - response = await self.client.api_operation_policy.list_by_operation( + async def test_api_operation_policy_get(self, resource_group): + response = await self.client.api_operation_policy.get( resource_group_name=resource_group.name, service_name="str", api_id="str", operation_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) # please add some check logic here by yourself @@ -42,7 +42,6 @@ async def test_api_operation_policy_get_entity_tag(self, resource_group): api_id="str", operation_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,14 +49,27 @@ async def test_api_operation_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_operation_policy_get(self, resource_group): - response = await self.client.api_operation_policy.get( + async def test_api_operation_policy_create_or_update(self, resource_group): + response = await self.client.api_operation_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", api_id="str", operation_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -65,15 +77,15 @@ async def test_api_operation_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_operation_policy_create_or_update(self, resource_group): - response = await self.client.api_operation_policy.create_or_update( + async def test_api_operation_policy_delete(self, resource_group): + response = await self.client.api_operation_policy.delete( resource_group_name=resource_group.name, service_name="str", api_id="str", operation_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -81,15 +93,12 @@ async def test_api_operation_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_operation_policy_delete(self, resource_group): - response = await self.client.api_operation_policy.delete( + async def test_api_operation_policy_list_by_operation(self, resource_group): + response = await self.client.api_operation_policy.list_by_operation( resource_group_name=resource_group.name, service_name="str", api_id="str", operation_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations.py index 858dffc8de05..9f2917909c66 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_list_by_service(self, resource_group): - response = self.client.api.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_get_entity_tag(self, resource_group): - response = self.client.api.get_entity_tag( + def test_api_get(self, resource_group): + response = self.client.api.get( resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_api_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_get(self, resource_group): - response = self.client.api.get( + def test_api_get_entity_tag(self, resource_group): + response = self.client.api.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,47 +50,50 @@ def test_api_begin_create_or_update(self, resource_group): service_name="str", api_id="str", parameters={ - "apiRevision": "str", - "apiRevisionDescription": "str", - "apiType": "str", - "apiVersion": "str", - "apiVersionDescription": "str", - "apiVersionSet": { + "properties": { + "path": "str", + "apiRevision": "str", + "apiRevisionDescription": "str", + "apiType": "str", + "apiVersion": "str", + "apiVersionDescription": "str", + "apiVersionSet": { + "description": "str", + "id": "str", + "name": "str", + "versionHeaderName": "str", + "versionQueryName": "str", + "versioningScheme": "str", + }, + "apiVersionSetId": "str", + "authenticationSettings": { + "oAuth2": {"authorizationServerId": "str", "scope": "str"}, + "oAuth2AuthenticationSettings": [{"authorizationServerId": "str", "scope": "str"}], + "openid": {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}, + "openidAuthenticationSettings": [ + {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"} + ], + }, + "contact": {"email": "str", "name": "str", "url": "str"}, "description": "str", - "id": "str", - "name": "str", - "versionHeaderName": "str", - "versionQueryName": "str", - "versioningScheme": "str", - }, - "apiVersionSetId": "str", - "authenticationSettings": { - "oAuth2": {"authorizationServerId": "str", "scope": "str"}, - "oAuth2AuthenticationSettings": [{"authorizationServerId": "str", "scope": "str"}], - "openid": {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}, - "openidAuthenticationSettings": [{"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}], - }, - "contact": {"email": "str", "name": "str", "url": "str"}, - "description": "str", - "displayName": "str", - "format": "str", - "isCurrent": bool, - "isOnline": bool, - "license": {"name": "str", "url": "str"}, - "path": "str", - "protocols": ["str"], - "provisioningState": "str", - "serviceUrl": "str", - "sourceApiId": "str", - "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, - "subscriptionRequired": bool, - "termsOfServiceUrl": "str", - "translateRequiredQueryParameters": "str", - "type": "str", - "value": "str", - "wsdlSelector": {"wsdlEndpointName": "str", "wsdlServiceName": "str"}, + "displayName": "str", + "format": "str", + "isCurrent": bool, + "isOnline": bool, + "license": {"name": "str", "url": "str"}, + "protocols": ["str"], + "provisioningState": "str", + "serviceUrl": "str", + "sourceApiId": "str", + "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, + "subscriptionRequired": bool, + "termsOfServiceUrl": "str", + "translateRequiredQueryParameters": "str", + "type": "str", + "value": "str", + "wsdlSelector": {"wsdlEndpointName": "str", "wsdlServiceName": "str"}, + } }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -117,34 +106,38 @@ def test_api_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - if_match="str", parameters={ - "apiRevision": "str", - "apiRevisionDescription": "str", - "apiVersion": "str", - "apiVersionDescription": "str", - "apiVersionSetId": "str", - "authenticationSettings": { - "oAuth2": {"authorizationServerId": "str", "scope": "str"}, - "oAuth2AuthenticationSettings": [{"authorizationServerId": "str", "scope": "str"}], - "openid": {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}, - "openidAuthenticationSettings": [{"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}], - }, - "contact": {"email": "str", "name": "str", "url": "str"}, - "description": "str", - "displayName": "str", - "isCurrent": bool, - "isOnline": bool, - "license": {"name": "str", "url": "str"}, - "path": "str", - "protocols": ["str"], - "serviceUrl": "str", - "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, - "subscriptionRequired": bool, - "termsOfServiceUrl": "str", - "type": "str", + "properties": { + "apiRevision": "str", + "apiRevisionDescription": "str", + "apiVersion": "str", + "apiVersionDescription": "str", + "apiVersionSetId": "str", + "authenticationSettings": { + "oAuth2": {"authorizationServerId": "str", "scope": "str"}, + "oAuth2AuthenticationSettings": [{"authorizationServerId": "str", "scope": "str"}], + "openid": {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}, + "openidAuthenticationSettings": [ + {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"} + ], + }, + "contact": {"email": "str", "name": "str", "url": "str"}, + "description": "str", + "displayName": "str", + "isCurrent": bool, + "isOnline": bool, + "license": {"name": "str", "url": "str"}, + "path": "str", + "protocols": ["str"], + "serviceUrl": "str", + "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, + "subscriptionRequired": bool, + "termsOfServiceUrl": "str", + "type": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -157,20 +150,30 @@ def test_api_begin_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_list_by_service(self, resource_group): + response = self.client.api.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_api_list_by_tags(self, resource_group): response = self.client.api.list_by_tags( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations_async.py index e57742c6f8f1..392beff04bbe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_list_by_service(self, resource_group): - response = self.client.api.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_get_entity_tag(self, resource_group): - response = await self.client.api.get_entity_tag( + async def test_api_get(self, resource_group): + response = await self.client.api.get( resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_api_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_get(self, resource_group): - response = await self.client.api.get( + async def test_api_get_entity_tag(self, resource_group): + response = await self.client.api.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,19 +52,69 @@ async def test_api_begin_create_or_update(self, resource_group): service_name="str", api_id="str", parameters={ + "properties": { + "path": "str", + "apiRevision": "str", + "apiRevisionDescription": "str", + "apiType": "str", + "apiVersion": "str", + "apiVersionDescription": "str", + "apiVersionSet": { + "description": "str", + "id": "str", + "name": "str", + "versionHeaderName": "str", + "versionQueryName": "str", + "versioningScheme": "str", + }, + "apiVersionSetId": "str", + "authenticationSettings": { + "oAuth2": {"authorizationServerId": "str", "scope": "str"}, + "oAuth2AuthenticationSettings": [{"authorizationServerId": "str", "scope": "str"}], + "openid": {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}, + "openidAuthenticationSettings": [ + {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"} + ], + }, + "contact": {"email": "str", "name": "str", "url": "str"}, + "description": "str", + "displayName": "str", + "format": "str", + "isCurrent": bool, + "isOnline": bool, + "license": {"name": "str", "url": "str"}, + "protocols": ["str"], + "provisioningState": "str", + "serviceUrl": "str", + "sourceApiId": "str", + "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, + "subscriptionRequired": bool, + "termsOfServiceUrl": "str", + "translateRequiredQueryParameters": "str", + "type": "str", + "value": "str", + "wsdlSelector": {"wsdlEndpointName": "str", "wsdlServiceName": "str"}, + } + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_update(self, resource_group): + response = await self.client.api.update( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + parameters={ + "properties": { "apiRevision": "str", "apiRevisionDescription": "str", - "apiType": "str", "apiVersion": "str", "apiVersionDescription": "str", - "apiVersionSet": { - "description": "str", - "id": "str", - "name": "str", - "versionHeaderName": "str", - "versionQueryName": "str", - "versioningScheme": "str", - }, "apiVersionSetId": "str", "authenticationSettings": { "oAuth2": {"authorizationServerId": "str", "scope": "str"}, @@ -91,65 +127,20 @@ async def test_api_begin_create_or_update(self, resource_group): "contact": {"email": "str", "name": "str", "url": "str"}, "description": "str", "displayName": "str", - "format": "str", "isCurrent": bool, "isOnline": bool, "license": {"name": "str", "url": "str"}, "path": "str", "protocols": ["str"], - "provisioningState": "str", "serviceUrl": "str", - "sourceApiId": "str", "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, "subscriptionRequired": bool, "termsOfServiceUrl": "str", - "translateRequiredQueryParameters": "str", "type": "str", - "value": "str", - "wsdlSelector": {"wsdlEndpointName": "str", "wsdlServiceName": "str"}, - }, - api_version="2025-03-01-preview", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_update(self, resource_group): - response = await self.client.api.update( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - if_match="str", - parameters={ - "apiRevision": "str", - "apiRevisionDescription": "str", - "apiVersion": "str", - "apiVersionDescription": "str", - "apiVersionSetId": "str", - "authenticationSettings": { - "oAuth2": {"authorizationServerId": "str", "scope": "str"}, - "oAuth2AuthenticationSettings": [{"authorizationServerId": "str", "scope": "str"}], - "openid": {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}, - "openidAuthenticationSettings": [{"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}], - }, - "contact": {"email": "str", "name": "str", "url": "str"}, - "description": "str", - "displayName": "str", - "isCurrent": bool, - "isOnline": bool, - "license": {"name": "str", "url": "str"}, - "path": "str", - "protocols": ["str"], - "serviceUrl": "str", - "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, - "subscriptionRequired": bool, - "termsOfServiceUrl": "str", - "type": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -163,21 +154,31 @@ async def test_api_begin_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_list_by_service(self, resource_group): + response = self.client.api.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_api_list_by_tags(self, resource_group): response = self.client.api.list_by_tags( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations.py index 73175a4c0398..cb525f522c2e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,12 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_policy_list_by_api(self, resource_group): - response = self.client.api_policy.list_by_api( + def test_api_policy_get(self, resource_group): + response = self.client.api_policy.get( resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) # please add some check logic here by yourself @@ -39,7 +39,6 @@ def test_api_policy_get_entity_tag(self, resource_group): service_name="str", api_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +46,26 @@ def test_api_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_policy_get(self, resource_group): - response = self.client.api_policy.get( + def test_api_policy_create_or_update(self, resource_group): + response = self.client.api_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", api_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -61,14 +73,14 @@ def test_api_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_policy_create_or_update(self, resource_group): - response = self.client.api_policy.create_or_update( + def test_api_policy_delete(self, resource_group): + response = self.client.api_policy.delete( resource_group_name=resource_group.name, service_name="str", api_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -76,14 +88,11 @@ def test_api_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_policy_delete(self, resource_group): - response = self.client.api_policy.delete( + def test_api_policy_list_by_api(self, resource_group): + response = self.client.api_policy.list_by_api( resource_group_name=resource_group.name, service_name="str", api_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations_async.py index 4fe0743f86ad..7024ab54f863 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_policy_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,12 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_policy_list_by_api(self, resource_group): - response = await self.client.api_policy.list_by_api( + async def test_api_policy_get(self, resource_group): + response = await self.client.api_policy.get( resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) # please add some check logic here by yourself @@ -40,7 +40,6 @@ async def test_api_policy_get_entity_tag(self, resource_group): service_name="str", api_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +47,26 @@ async def test_api_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_policy_get(self, resource_group): - response = await self.client.api_policy.get( + async def test_api_policy_create_or_update(self, resource_group): + response = await self.client.api_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", api_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -62,14 +74,14 @@ async def test_api_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_policy_create_or_update(self, resource_group): - response = await self.client.api_policy.create_or_update( + async def test_api_policy_delete(self, resource_group): + response = await self.client.api_policy.delete( resource_group_name=resource_group.name, service_name="str", api_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -77,14 +89,11 @@ async def test_api_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_policy_delete(self, resource_group): - response = await self.client.api_policy.delete( + async def test_api_policy_list_by_api(self, resource_group): + response = await self.client.api_policy.list_by_api( resource_group_name=resource_group.name, service_name="str", api_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations.py index 4733ca3d8526..ab0765af9999 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_api_product_list_by_apis(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations_async.py index da8c6abab202..7164aba27a96 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_product_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_api_product_list_by_apis(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations.py index 1c2eac03cf7a..ae65151bfe57 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_release_list_by_service(self, resource_group): - response = self.client.api_release.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_release_get_entity_tag(self, resource_group): - response = self.client.api_release.get_entity_tag( + def test_api_release_get(self, resource_group): + response = self.client.api_release.get( resource_group_name=resource_group.name, service_name="str", api_id="str", release_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_api_release_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_release_get(self, resource_group): - response = self.client.api_release.get( + def test_api_release_get_entity_tag(self, resource_group): + response = self.client.api_release.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", release_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,15 +53,24 @@ def test_api_release_create_or_update(self, resource_group): api_id="str", release_id="str", parameters={ - "apiId": "str", - "createdDateTime": "2020-02-20 00:00:00", "id": "str", "name": "str", - "notes": "str", + "properties": { + "apiId": "str", + "createdDateTime": "2020-02-20 00:00:00", + "notes": "str", + "updatedDateTime": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -90,17 +84,27 @@ def test_api_release_update(self, resource_group): service_name="str", api_id="str", release_id="str", - if_match="str", parameters={ - "apiId": "str", - "createdDateTime": "2020-02-20 00:00:00", "id": "str", "name": "str", - "notes": "str", + "properties": { + "apiId": "str", + "createdDateTime": "2020-02-20 00:00:00", + "notes": "str", + "updatedDateTime": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -114,9 +118,21 @@ def test_api_release_delete(self, resource_group): service_name="str", api_id="str", release_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_release_list_by_service(self, resource_group): + response = self.client.api_release.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations_async.py index 94d9802f1001..9215bedec8e4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_release_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_release_list_by_service(self, resource_group): - response = self.client.api_release.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_release_get_entity_tag(self, resource_group): - response = await self.client.api_release.get_entity_tag( + async def test_api_release_get(self, resource_group): + response = await self.client.api_release.get( resource_group_name=resource_group.name, service_name="str", api_id="str", release_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_api_release_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_release_get(self, resource_group): - response = await self.client.api_release.get( + async def test_api_release_get_entity_tag(self, resource_group): + response = await self.client.api_release.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", release_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,15 +54,24 @@ async def test_api_release_create_or_update(self, resource_group): api_id="str", release_id="str", parameters={ - "apiId": "str", - "createdDateTime": "2020-02-20 00:00:00", "id": "str", "name": "str", - "notes": "str", + "properties": { + "apiId": "str", + "createdDateTime": "2020-02-20 00:00:00", + "notes": "str", + "updatedDateTime": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -91,17 +85,27 @@ async def test_api_release_update(self, resource_group): service_name="str", api_id="str", release_id="str", - if_match="str", parameters={ - "apiId": "str", - "createdDateTime": "2020-02-20 00:00:00", "id": "str", "name": "str", - "notes": "str", + "properties": { + "apiId": "str", + "createdDateTime": "2020-02-20 00:00:00", + "notes": "str", + "updatedDateTime": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -115,9 +119,21 @@ async def test_api_release_delete(self, resource_group): service_name="str", api_id="str", release_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_release_list_by_service(self, resource_group): + response = self.client.api_release.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations.py index b91a86cc05c4..209d435ec504 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_api_revision_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations_async.py index d15e86c4b645..3bac87b546ce 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_revision_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_api_revision_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations.py index 4ea6178ad4fa..656f06998c28 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_schema_list_by_api(self, resource_group): - response = self.client.api_schema.list_by_api( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_schema_get_entity_tag(self, resource_group): - response = self.client.api_schema.get_entity_tag( + def test_api_schema_get(self, resource_group): + response = self.client.api_schema.get( resource_group_name=resource_group.name, service_name="str", api_id="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_api_schema_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_schema_get(self, resource_group): - response = self.client.api_schema.get( + def test_api_schema_get_entity_tag(self, resource_group): + response = self.client.api_schema.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,16 +53,23 @@ def test_api_schema_begin_create_or_update(self, resource_group): api_id="str", schema_id="str", parameters={ - "components": {}, - "contentType": "str", - "definitions": {}, "id": "str", "name": "str", - "provisioningState": "str", + "properties": { + "contentType": "str", + "document": {"components": {}, "definitions": {}, "value": "str"}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": "str", }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -91,9 +83,21 @@ def test_api_schema_delete(self, resource_group): service_name="str", api_id="str", schema_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_schema_list_by_api(self, resource_group): + response = self.client.api_schema.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations_async.py index dfcc64cc5c87..38537edb0d28 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_schema_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_schema_list_by_api(self, resource_group): - response = self.client.api_schema.list_by_api( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_schema_get_entity_tag(self, resource_group): - response = await self.client.api_schema.get_entity_tag( + async def test_api_schema_get(self, resource_group): + response = await self.client.api_schema.get( resource_group_name=resource_group.name, service_name="str", api_id="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_api_schema_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_schema_get(self, resource_group): - response = await self.client.api_schema.get( + async def test_api_schema_get_entity_tag(self, resource_group): + response = await self.client.api_schema.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -70,16 +55,23 @@ async def test_api_schema_begin_create_or_update(self, resource_group): api_id="str", schema_id="str", parameters={ - "components": {}, - "contentType": "str", - "definitions": {}, "id": "str", "name": "str", - "provisioningState": "str", + "properties": { + "contentType": "str", + "document": {"components": {}, "definitions": {}, "value": "str"}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": "str", }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -94,9 +86,21 @@ async def test_api_schema_delete(self, resource_group): service_name="str", api_id="str", schema_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_schema_list_by_api(self, resource_group): + response = self.client.api_schema.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations.py index 0eb45453c43b..1aebe201b483 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,14 +20,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_tag_description_list_by_service(self, resource_group): - response = self.client.api_tag_description.list_by_service( + def test_api_tag_description_get(self, resource_group): + response = self.client.api_tag_description.get( resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", + tag_description_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -39,7 +39,6 @@ def test_api_tag_description_get_entity_tag(self, resource_group): service_name="str", api_id="str", tag_description_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +46,15 @@ def test_api_tag_description_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_tag_description_get(self, resource_group): - response = self.client.api_tag_description.get( + def test_api_tag_description_create_or_update(self, resource_group): + response = self.client.api_tag_description.create_or_update( resource_group_name=resource_group.name, service_name="str", api_id="str", tag_description_id="str", - api_version="2025-03-01-preview", + parameters={ + "properties": {"description": "str", "externalDocsDescription": "str", "externalDocsUrl": "str"} + }, ) # please add some check logic here by yourself @@ -61,14 +62,14 @@ def test_api_tag_description_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_tag_description_create_or_update(self, resource_group): - response = self.client.api_tag_description.create_or_update( + def test_api_tag_description_delete(self, resource_group): + response = self.client.api_tag_description.delete( resource_group_name=resource_group.name, service_name="str", api_id="str", tag_description_id="str", - parameters={"description": "str", "externalDocsDescription": "str", "externalDocsUrl": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -76,15 +77,12 @@ def test_api_tag_description_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_tag_description_delete(self, resource_group): - response = self.client.api_tag_description.delete( + def test_api_tag_description_list_by_service(self, resource_group): + response = self.client.api_tag_description.list_by_service( resource_group_name=resource_group.name, service_name="str", api_id="str", - tag_description_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations_async.py index a165eb3a13b7..88b55372dbd5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tag_description_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,14 +21,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_tag_description_list_by_service(self, resource_group): - response = self.client.api_tag_description.list_by_service( + async def test_api_tag_description_get(self, resource_group): + response = await self.client.api_tag_description.get( resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", + tag_description_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -40,7 +40,6 @@ async def test_api_tag_description_get_entity_tag(self, resource_group): service_name="str", api_id="str", tag_description_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +47,15 @@ async def test_api_tag_description_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_tag_description_get(self, resource_group): - response = await self.client.api_tag_description.get( + async def test_api_tag_description_create_or_update(self, resource_group): + response = await self.client.api_tag_description.create_or_update( resource_group_name=resource_group.name, service_name="str", api_id="str", tag_description_id="str", - api_version="2025-03-01-preview", + parameters={ + "properties": {"description": "str", "externalDocsDescription": "str", "externalDocsUrl": "str"} + }, ) # please add some check logic here by yourself @@ -62,14 +63,14 @@ async def test_api_tag_description_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_tag_description_create_or_update(self, resource_group): - response = await self.client.api_tag_description.create_or_update( + async def test_api_tag_description_delete(self, resource_group): + response = await self.client.api_tag_description.delete( resource_group_name=resource_group.name, service_name="str", api_id="str", tag_description_id="str", - parameters={"description": "str", "externalDocsDescription": "str", "externalDocsUrl": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -77,15 +78,12 @@ async def test_api_tag_description_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_tag_description_delete(self, resource_group): - response = await self.client.api_tag_description.delete( + async def test_api_tag_description_list_by_service(self, resource_group): + response = self.client.api_tag_description.list_by_service( resource_group_name=resource_group.name, service_name="str", api_id="str", - tag_description_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations.py index 523b5b7639ca..ac84cdbb2902 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_tool_list_by_api(self, resource_group): - response = self.client.api_tool.list_by_api( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_tool_get_entity_tag(self, resource_group): - response = self.client.api_tool.get_entity_tag( + def test_api_tool_get(self, resource_group): + response = self.client.api_tool.get( resource_group_name=resource_group.name, service_name="str", api_id="str", tool_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_api_tool_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_tool_get(self, resource_group): - response = self.client.api_tool.get( + def test_api_tool_get_entity_tag(self, resource_group): + response = self.client.api_tool.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", tool_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,14 +53,19 @@ def test_api_tool_create_or_update(self, resource_group): api_id="str", tool_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", "name": "str", - "operationId": "str", + "properties": {"description": "str", "displayName": "str", "operationId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -90,14 +80,19 @@ def test_api_tool_update(self, resource_group): api_id="str", tool_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", "name": "str", - "operationId": "str", + "properties": {"description": "str", "displayName": "str", "operationId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -111,8 +106,19 @@ def test_api_tool_delete(self, resource_group): service_name="str", api_id="str", tool_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_tool_list_by_api(self, resource_group): + response = self.client.api_tool.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations_async.py index 44deb567f69e..4a9394c005a5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_tool_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_tool_list_by_api(self, resource_group): - response = self.client.api_tool.list_by_api( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_tool_get_entity_tag(self, resource_group): - response = await self.client.api_tool.get_entity_tag( + async def test_api_tool_get(self, resource_group): + response = await self.client.api_tool.get( resource_group_name=resource_group.name, service_name="str", api_id="str", tool_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_api_tool_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_tool_get(self, resource_group): - response = await self.client.api_tool.get( + async def test_api_tool_get_entity_tag(self, resource_group): + response = await self.client.api_tool.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", tool_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,14 +54,19 @@ async def test_api_tool_create_or_update(self, resource_group): api_id="str", tool_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", "name": "str", - "operationId": "str", + "properties": {"description": "str", "displayName": "str", "operationId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -91,14 +81,19 @@ async def test_api_tool_update(self, resource_group): api_id="str", tool_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", "name": "str", - "operationId": "str", + "properties": {"description": "str", "displayName": "str", "operationId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -112,8 +107,19 @@ async def test_api_tool_delete(self, resource_group): service_name="str", api_id="str", tool_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_tool_list_by_api(self, resource_group): + response = self.client.api_tool.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations.py index 040a7433f67a..7064e0d7a12f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_version_set_list_by_service(self, resource_group): - response = self.client.api_version_set.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_api_version_set_get_entity_tag(self, resource_group): - response = self.client.api_version_set.get_entity_tag( + def test_api_version_set_get(self, resource_group): + response = self.client.api_version_set.get( resource_group_name=resource_group.name, service_name="str", version_set_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_api_version_set_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_version_set_get(self, resource_group): - response = self.client.api_version_set.get( + def test_api_version_set_get_entity_tag(self, resource_group): + response = self.client.api_version_set.get_entity_tag( resource_group_name=resource_group.name, service_name="str", version_set_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,16 +50,25 @@ def test_api_version_set_create_or_update(self, resource_group): service_name="str", version_set_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", "name": "str", + "properties": { + "displayName": "str", + "versioningScheme": "str", + "description": "str", + "versionHeaderName": "str", + "versionQueryName": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "versionHeaderName": "str", - "versionQueryName": "str", - "versioningScheme": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -86,15 +81,17 @@ def test_api_version_set_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", version_set_id="str", - if_match="str", parameters={ - "description": "str", - "displayName": "str", - "versionHeaderName": "str", - "versionQueryName": "str", - "versioningScheme": "str", + "properties": { + "description": "str", + "displayName": "str", + "versionHeaderName": "str", + "versionQueryName": "str", + "versioningScheme": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -107,9 +104,20 @@ def test_api_version_set_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", version_set_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_api_version_set_list_by_service(self, resource_group): + response = self.client.api_version_set.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations_async.py index 466599699eb1..24981a27d231 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_version_set_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_version_set_list_by_service(self, resource_group): - response = self.client.api_version_set.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_api_version_set_get_entity_tag(self, resource_group): - response = await self.client.api_version_set.get_entity_tag( + async def test_api_version_set_get(self, resource_group): + response = await self.client.api_version_set.get( resource_group_name=resource_group.name, service_name="str", version_set_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_api_version_set_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_version_set_get(self, resource_group): - response = await self.client.api_version_set.get( + async def test_api_version_set_get_entity_tag(self, resource_group): + response = await self.client.api_version_set.get_entity_tag( resource_group_name=resource_group.name, service_name="str", version_set_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,16 +51,25 @@ async def test_api_version_set_create_or_update(self, resource_group): service_name="str", version_set_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", "name": "str", + "properties": { + "displayName": "str", + "versioningScheme": "str", + "description": "str", + "versionHeaderName": "str", + "versionQueryName": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "versionHeaderName": "str", - "versionQueryName": "str", - "versioningScheme": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -87,15 +82,17 @@ async def test_api_version_set_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", version_set_id="str", - if_match="str", parameters={ - "description": "str", - "displayName": "str", - "versionHeaderName": "str", - "versionQueryName": "str", - "versioningScheme": "str", + "properties": { + "description": "str", + "displayName": "str", + "versionHeaderName": "str", + "versionQueryName": "str", + "versioningScheme": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -108,9 +105,20 @@ async def test_api_version_set_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", version_set_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_api_version_set_list_by_service(self, resource_group): + response = self.client.api_version_set.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations.py index d24ecc5aa2ae..0e71c8f6a05e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,12 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_wiki_get_entity_tag(self, resource_group): - response = self.client.api_wiki.get_entity_tag( + def test_api_wiki_get(self, resource_group): + response = self.client.api_wiki.get( resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -33,12 +32,11 @@ def test_api_wiki_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_api_wiki_get(self, resource_group): - response = self.client.api_wiki.get( + def test_api_wiki_get_entity_tag(self, resource_group): + response = self.client.api_wiki.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,8 +49,20 @@ def test_api_wiki_create_or_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - parameters={"documents": [{"documentationId": "str"}], "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"documents": [{"documentationId": "str"}]}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -65,9 +75,9 @@ def test_api_wiki_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - if_match="str", - parameters={"documents": [{"documentationId": "str"}]}, - api_version="2025-03-01-preview", + parameters={"properties": {"documents": [{"documentationId": "str"}]}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -80,8 +90,8 @@ def test_api_wiki_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations_async.py index bebb87ed10e4..2c08059f4209 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wiki_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,12 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_wiki_get_entity_tag(self, resource_group): - response = await self.client.api_wiki.get_entity_tag( + async def test_api_wiki_get(self, resource_group): + response = await self.client.api_wiki.get( resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -34,12 +33,11 @@ async def test_api_wiki_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_api_wiki_get(self, resource_group): - response = await self.client.api_wiki.get( + async def test_api_wiki_get_entity_tag(self, resource_group): + response = await self.client.api_wiki.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -52,8 +50,20 @@ async def test_api_wiki_create_or_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - parameters={"documents": [{"documentationId": "str"}], "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"documents": [{"documentationId": "str"}]}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -66,9 +76,9 @@ async def test_api_wiki_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - if_match="str", - parameters={"documents": [{"documentationId": "str"}]}, - api_version="2025-03-01-preview", + parameters={"properties": {"documents": [{"documentationId": "str"}]}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -81,8 +91,8 @@ async def test_api_wiki_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations.py index 218acd4b3621..def785c47719 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_api_wikis_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations_async.py index bac8419a56ae..ecbb172b1f1e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_api_wikis_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_api_wikis_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_async.py index 81f381166196..129141571ae8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -39,7 +39,6 @@ async def test_begin_perform_connectivity_check_async(self, resource_group): } }, }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations.py index 5cde8745c5a0..fa3fad7ae299 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,20 +18,6 @@ class TestApiManagementAuthorizationAccessPolicyOperations(AzureMgmtRecordedTest def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_authorization_access_policy_list_by_authorization(self, resource_group): - response = self.client.authorization_access_policy.list_by_authorization( - resource_group_name=resource_group.name, - service_name="str", - authorization_provider_id="str", - authorization_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_authorization_access_policy_get(self, resource_group): @@ -41,7 +27,6 @@ def test_authorization_access_policy_get(self, resource_group): authorization_provider_id="str", authorization_id="str", authorization_access_policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,14 +42,19 @@ def test_authorization_access_policy_create_or_update(self, resource_group): authorization_id="str", authorization_access_policy_id="str", parameters={ - "appIds": ["str"], "id": "str", "name": "str", - "objectId": "str", - "tenantId": "str", + "properties": {"appIds": ["str"], "objectId": "str", "tenantId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,9 +69,22 @@ def test_authorization_access_policy_delete(self, resource_group): authorization_provider_id="str", authorization_id="str", authorization_access_policy_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_authorization_access_policy_list_by_authorization(self, resource_group): + response = self.client.authorization_access_policy.list_by_authorization( + resource_group_name=resource_group.name, + service_name="str", + authorization_provider_id="str", + authorization_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations_async.py index aeee0412fd32..5d8d742dc3d9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_access_policy_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,20 +19,6 @@ class TestApiManagementAuthorizationAccessPolicyOperationsAsync(AzureMgmtRecorde def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_authorization_access_policy_list_by_authorization(self, resource_group): - response = self.client.authorization_access_policy.list_by_authorization( - resource_group_name=resource_group.name, - service_name="str", - authorization_provider_id="str", - authorization_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_authorization_access_policy_get(self, resource_group): @@ -42,7 +28,6 @@ async def test_authorization_access_policy_get(self, resource_group): authorization_provider_id="str", authorization_id="str", authorization_access_policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -58,14 +43,19 @@ async def test_authorization_access_policy_create_or_update(self, resource_group authorization_id="str", authorization_access_policy_id="str", parameters={ - "appIds": ["str"], "id": "str", "name": "str", - "objectId": "str", - "tenantId": "str", + "properties": {"appIds": ["str"], "objectId": "str", "tenantId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,9 +70,22 @@ async def test_authorization_access_policy_delete(self, resource_group): authorization_provider_id="str", authorization_id="str", authorization_access_policy_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_authorization_access_policy_list_by_authorization(self, resource_group): + response = self.client.authorization_access_policy.list_by_authorization( + resource_group_name=resource_group.name, + service_name="str", + authorization_provider_id="str", + authorization_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations.py index 177600cac731..a4bd8315ddf0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -27,7 +27,6 @@ def test_authorization_login_links_post(self, resource_group): authorization_provider_id="str", authorization_id="str", parameters={"postLoginRedirectUrl": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations_async.py index 26019a5005df..154e82007e66 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_login_links_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -28,7 +28,6 @@ async def test_authorization_login_links_post(self, resource_group): authorization_provider_id="str", authorization_id="str", parameters={"postLoginRedirectUrl": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations.py index aa702a01878a..805f7f01dac7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,19 +18,6 @@ class TestApiManagementAuthorizationOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_authorization_list_by_authorization_provider(self, resource_group): - response = self.client.authorization.list_by_authorization_provider( - resource_group_name=resource_group.name, - service_name="str", - authorization_provider_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_authorization_get(self, resource_group): @@ -39,7 +26,6 @@ def test_authorization_get(self, resource_group): service_name="str", authorization_provider_id="str", authorization_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,16 +40,25 @@ def test_authorization_create_or_update(self, resource_group): authorization_provider_id="str", authorization_id="str", parameters={ - "authorizationType": "str", - "error": {"code": "str", "message": "str"}, "id": "str", "name": "str", - "oauth2grantType": "str", - "parameters": {"str": "str"}, - "status": "str", + "properties": { + "authorizationType": "str", + "error": {"code": "str", "message": "str"}, + "oauth2grantType": "str", + "parameters": {"str": "str"}, + "status": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -77,13 +72,25 @@ def test_authorization_delete(self, resource_group): service_name="str", authorization_provider_id="str", authorization_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_authorization_list_by_authorization_provider(self, resource_group): + response = self.client.authorization.list_by_authorization_provider( + resource_group_name=resource_group.name, + service_name="str", + authorization_provider_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_authorization_confirm_consent_code(self, resource_group): @@ -93,7 +100,6 @@ def test_authorization_confirm_consent_code(self, resource_group): authorization_provider_id="str", authorization_id="str", parameters={"consentCode": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations_async.py index 1a81fbeeb193..6bfa725ac90a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,19 +19,6 @@ class TestApiManagementAuthorizationOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_authorization_list_by_authorization_provider(self, resource_group): - response = self.client.authorization.list_by_authorization_provider( - resource_group_name=resource_group.name, - service_name="str", - authorization_provider_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_authorization_get(self, resource_group): @@ -40,7 +27,6 @@ async def test_authorization_get(self, resource_group): service_name="str", authorization_provider_id="str", authorization_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -55,16 +41,25 @@ async def test_authorization_create_or_update(self, resource_group): authorization_provider_id="str", authorization_id="str", parameters={ - "authorizationType": "str", - "error": {"code": "str", "message": "str"}, "id": "str", "name": "str", - "oauth2grantType": "str", - "parameters": {"str": "str"}, - "status": "str", + "properties": { + "authorizationType": "str", + "error": {"code": "str", "message": "str"}, + "oauth2grantType": "str", + "parameters": {"str": "str"}, + "status": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -78,13 +73,25 @@ async def test_authorization_delete(self, resource_group): service_name="str", authorization_provider_id="str", authorization_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_authorization_list_by_authorization_provider(self, resource_group): + response = self.client.authorization.list_by_authorization_provider( + resource_group_name=resource_group.name, + service_name="str", + authorization_provider_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_authorization_confirm_consent_code(self, resource_group): @@ -94,7 +101,6 @@ async def test_authorization_confirm_consent_code(self, resource_group): authorization_provider_id="str", authorization_id="str", parameters={"consentCode": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations.py index 4f1bd6b51cbc..9d24ad0d9ea9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestApiManagementAuthorizationProviderOperations(AzureMgmtRecordedTestCase def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_authorization_provider_list_by_service(self, resource_group): - response = self.client.authorization_provider.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_authorization_provider_get(self, resource_group): @@ -37,7 +25,6 @@ def test_authorization_provider_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", authorization_provider_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,22 +38,31 @@ def test_authorization_provider_create_or_update(self, resource_group): service_name="str", authorization_provider_id="str", parameters={ - "displayName": "str", "id": "str", - "identityProvider": "str", "name": "str", - "oauth2": { - "grantTypes": {"authorizationCode": {"str": "str"}, "clientCredentials": {"str": "str"}}, - "keyVault": { - "lastStatus": {"code": "str", "message": "str", "timeStampUtc": "2020-02-20 00:00:00"}, - "secretIdentifier": "str", - "updated": "2020-02-20 00:00:00", + "properties": { + "displayName": "str", + "identityProvider": "str", + "oauth2": { + "grantTypes": {"authorizationCode": {"str": "str"}, "clientCredentials": {"str": "str"}}, + "keyVault": { + "lastStatus": {"code": "str", "message": "str", "timeStampUtc": "2020-02-20 00:00:00"}, + "secretIdentifier": "str", + "updated": "2020-02-20 00:00:00", + }, + "redirectUrl": "str", }, - "redirectUrl": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,13 +75,24 @@ def test_authorization_provider_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", authorization_provider_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_authorization_provider_list_by_service(self, resource_group): + response = self.client.authorization_provider.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_authorization_provider_refresh_secret(self, resource_group): @@ -93,7 +100,6 @@ def test_authorization_provider_refresh_secret(self, resource_group): resource_group_name=resource_group.name, service_name="str", authorization_provider_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations_async.py index 7ffa066ca9d1..ec017f350074 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_provider_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestApiManagementAuthorizationProviderOperationsAsync(AzureMgmtRecordedTes def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_authorization_provider_list_by_service(self, resource_group): - response = self.client.authorization_provider.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_authorization_provider_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_authorization_provider_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", authorization_provider_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -52,22 +39,31 @@ async def test_authorization_provider_create_or_update(self, resource_group): service_name="str", authorization_provider_id="str", parameters={ - "displayName": "str", "id": "str", - "identityProvider": "str", "name": "str", - "oauth2": { - "grantTypes": {"authorizationCode": {"str": "str"}, "clientCredentials": {"str": "str"}}, - "keyVault": { - "lastStatus": {"code": "str", "message": "str", "timeStampUtc": "2020-02-20 00:00:00"}, - "secretIdentifier": "str", - "updated": "2020-02-20 00:00:00", + "properties": { + "displayName": "str", + "identityProvider": "str", + "oauth2": { + "grantTypes": {"authorizationCode": {"str": "str"}, "clientCredentials": {"str": "str"}}, + "keyVault": { + "lastStatus": {"code": "str", "message": "str", "timeStampUtc": "2020-02-20 00:00:00"}, + "secretIdentifier": "str", + "updated": "2020-02-20 00:00:00", + }, + "redirectUrl": "str", }, - "redirectUrl": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,13 +76,24 @@ async def test_authorization_provider_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", authorization_provider_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_authorization_provider_list_by_service(self, resource_group): + response = self.client.authorization_provider.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_authorization_provider_refresh_secret(self, resource_group): @@ -94,7 +101,6 @@ async def test_authorization_provider_refresh_secret(self, resource_group): resource_group_name=resource_group.name, service_name="str", authorization_provider_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations.py index 13b1f7a09fe3..083c1d6fbc19 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_authorization_server_list_by_service(self, resource_group): - response = self.client.authorization_server.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_authorization_server_get_entity_tag(self, resource_group): - response = self.client.authorization_server.get_entity_tag( + def test_authorization_server_get(self, resource_group): + response = self.client.authorization_server.get( resource_group_name=resource_group.name, service_name="str", authsid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_authorization_server_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_authorization_server_get(self, resource_group): - response = self.client.authorization_server.get( + def test_authorization_server_get_entity_tag(self, resource_group): + response = self.client.authorization_server.get_entity_tag( resource_group_name=resource_group.name, service_name="str", authsid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,29 +50,38 @@ def test_authorization_server_create_or_update(self, resource_group): service_name="str", authsid="str", parameters={ - "authorizationEndpoint": "str", - "authorizationMethods": ["str"], - "bearerTokenSendingMethods": ["str"], - "clientAuthenticationMethod": ["str"], - "clientId": "str", - "clientRegistrationEndpoint": "str", - "clientSecret": "str", - "defaultScope": "str", - "description": "str", - "displayName": "str", - "grantTypes": ["str"], "id": "str", "name": "str", - "resourceOwnerPassword": "str", - "resourceOwnerUsername": "str", - "supportState": bool, - "tokenBodyParameters": [{"name": "str", "value": "str"}], - "tokenEndpoint": "str", + "properties": { + "authorizationEndpoint": "str", + "clientId": "str", + "clientRegistrationEndpoint": "str", + "displayName": "str", + "grantTypes": ["str"], + "authorizationMethods": ["str"], + "bearerTokenSendingMethods": ["str"], + "clientAuthenticationMethod": ["str"], + "clientSecret": "str", + "defaultScope": "str", + "description": "str", + "resourceOwnerPassword": "str", + "resourceOwnerUsername": "str", + "supportState": bool, + "tokenBodyParameters": [{"name": "str", "value": "str"}], + "tokenEndpoint": "str", + "useInApiDocumentation": bool, + "useInTestConsole": bool, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "useInApiDocumentation": bool, - "useInTestConsole": bool, }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -99,31 +94,41 @@ def test_authorization_server_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", authsid="str", - if_match="str", parameters={ - "authorizationEndpoint": "str", - "authorizationMethods": ["str"], - "bearerTokenSendingMethods": ["str"], - "clientAuthenticationMethod": ["str"], - "clientId": "str", - "clientRegistrationEndpoint": "str", - "clientSecret": "str", - "defaultScope": "str", - "description": "str", - "displayName": "str", - "grantTypes": ["str"], "id": "str", "name": "str", - "resourceOwnerPassword": "str", - "resourceOwnerUsername": "str", - "supportState": bool, - "tokenBodyParameters": [{"name": "str", "value": "str"}], - "tokenEndpoint": "str", + "properties": { + "authorizationEndpoint": "str", + "authorizationMethods": ["str"], + "bearerTokenSendingMethods": ["str"], + "clientAuthenticationMethod": ["str"], + "clientId": "str", + "clientRegistrationEndpoint": "str", + "clientSecret": "str", + "defaultScope": "str", + "description": "str", + "displayName": "str", + "grantTypes": ["str"], + "resourceOwnerPassword": "str", + "resourceOwnerUsername": "str", + "supportState": bool, + "tokenBodyParameters": [{"name": "str", "value": "str"}], + "tokenEndpoint": "str", + "useInApiDocumentation": bool, + "useInTestConsole": bool, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "useInApiDocumentation": bool, - "useInTestConsole": bool, }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -136,13 +141,24 @@ def test_authorization_server_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", authsid="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_authorization_server_list_by_service(self, resource_group): + response = self.client.authorization_server.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_authorization_server_list_secrets(self, resource_group): @@ -150,7 +166,6 @@ def test_authorization_server_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", authsid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations_async.py index 545660aeb63f..f894243a6279 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_authorization_server_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_authorization_server_list_by_service(self, resource_group): - response = self.client.authorization_server.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_authorization_server_get_entity_tag(self, resource_group): - response = await self.client.authorization_server.get_entity_tag( + async def test_authorization_server_get(self, resource_group): + response = await self.client.authorization_server.get( resource_group_name=resource_group.name, service_name="str", authsid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_authorization_server_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_authorization_server_get(self, resource_group): - response = await self.client.authorization_server.get( + async def test_authorization_server_get_entity_tag(self, resource_group): + response = await self.client.authorization_server.get_entity_tag( resource_group_name=resource_group.name, service_name="str", authsid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,29 +51,38 @@ async def test_authorization_server_create_or_update(self, resource_group): service_name="str", authsid="str", parameters={ - "authorizationEndpoint": "str", - "authorizationMethods": ["str"], - "bearerTokenSendingMethods": ["str"], - "clientAuthenticationMethod": ["str"], - "clientId": "str", - "clientRegistrationEndpoint": "str", - "clientSecret": "str", - "defaultScope": "str", - "description": "str", - "displayName": "str", - "grantTypes": ["str"], "id": "str", "name": "str", - "resourceOwnerPassword": "str", - "resourceOwnerUsername": "str", - "supportState": bool, - "tokenBodyParameters": [{"name": "str", "value": "str"}], - "tokenEndpoint": "str", + "properties": { + "authorizationEndpoint": "str", + "clientId": "str", + "clientRegistrationEndpoint": "str", + "displayName": "str", + "grantTypes": ["str"], + "authorizationMethods": ["str"], + "bearerTokenSendingMethods": ["str"], + "clientAuthenticationMethod": ["str"], + "clientSecret": "str", + "defaultScope": "str", + "description": "str", + "resourceOwnerPassword": "str", + "resourceOwnerUsername": "str", + "supportState": bool, + "tokenBodyParameters": [{"name": "str", "value": "str"}], + "tokenEndpoint": "str", + "useInApiDocumentation": bool, + "useInTestConsole": bool, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "useInApiDocumentation": bool, - "useInTestConsole": bool, }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -100,31 +95,41 @@ async def test_authorization_server_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", authsid="str", - if_match="str", parameters={ - "authorizationEndpoint": "str", - "authorizationMethods": ["str"], - "bearerTokenSendingMethods": ["str"], - "clientAuthenticationMethod": ["str"], - "clientId": "str", - "clientRegistrationEndpoint": "str", - "clientSecret": "str", - "defaultScope": "str", - "description": "str", - "displayName": "str", - "grantTypes": ["str"], "id": "str", "name": "str", - "resourceOwnerPassword": "str", - "resourceOwnerUsername": "str", - "supportState": bool, - "tokenBodyParameters": [{"name": "str", "value": "str"}], - "tokenEndpoint": "str", + "properties": { + "authorizationEndpoint": "str", + "authorizationMethods": ["str"], + "bearerTokenSendingMethods": ["str"], + "clientAuthenticationMethod": ["str"], + "clientId": "str", + "clientRegistrationEndpoint": "str", + "clientSecret": "str", + "defaultScope": "str", + "description": "str", + "displayName": "str", + "grantTypes": ["str"], + "resourceOwnerPassword": "str", + "resourceOwnerUsername": "str", + "supportState": bool, + "tokenBodyParameters": [{"name": "str", "value": "str"}], + "tokenEndpoint": "str", + "useInApiDocumentation": bool, + "useInTestConsole": bool, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "useInApiDocumentation": bool, - "useInTestConsole": bool, }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -137,13 +142,24 @@ async def test_authorization_server_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", authsid="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_authorization_server_list_by_service(self, resource_group): + response = self.client.authorization_server.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_authorization_server_list_secrets(self, resource_group): @@ -151,7 +167,6 @@ async def test_authorization_server_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", authsid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations.py index c188b0e83572..b3dc7c505563 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_backend_list_by_service(self, resource_group): - response = self.client.backend.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_backend_get_entity_tag(self, resource_group): - response = self.client.backend.get_entity_tag( + def test_backend_get(self, resource_group): + response = self.client.backend.get( resource_group_name=resource_group.name, service_name="str", backend_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_backend_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_backend_get(self, resource_group): - response = self.client.backend.get( + def test_backend_get_entity_tag(self, resource_group): + response = self.client.backend.get_entity_tag( resource_group_name=resource_group.name, service_name="str", backend_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,63 +50,73 @@ def test_backend_create_or_update(self, resource_group): service_name="str", backend_id="str", parameters={ - "azureRegion": "str", - "circuitBreaker": { - "rules": [ - { - "acceptRetryAfter": bool, - "failureCondition": { - "count": 0, - "errorReasons": ["str"], - "interval": "1 day, 0:00:00", - "percentage": 0, - "statusCodeRanges": [{"max": 0, "min": 0}], - }, - "failureResponse": {"statusCode": 0}, - "name": "str", - "tripDuration": "1 day, 0:00:00", - } - ] - }, - "credentials": { - "authorization": {"parameter": "str", "scheme": "str"}, - "certificate": ["str"], - "certificateIds": ["str"], - "header": {"str": ["str"]}, - "query": {"str": ["str"]}, - }, - "description": "str", "id": "str", "name": "str", - "pool": { - "failureResponse": {"statusCode": 0}, - "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], - "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, - }, "properties": { - "serviceFabricCluster": { - "managementEndpoints": ["str"], - "clientCertificateId": "str", - "clientCertificatethumbprint": "str", - "maxPartitionResolutionRetries": 0, + "azureRegion": "str", + "circuitBreaker": { + "rules": [ + { + "acceptRetryAfter": bool, + "failureCondition": { + "count": 0, + "errorReasons": ["str"], + "interval": "1 day, 0:00:00", + "percentage": 0, + "statusCodeRanges": [{"max": 0, "min": 0}], + }, + "failureResponse": {"statusCode": 0}, + "name": "str", + "tripDuration": "1 day, 0:00:00", + } + ] + }, + "credentials": { + "authorization": {"parameter": "str", "scheme": "str"}, + "certificate": ["str"], + "certificateIds": ["str"], + "header": {"str": ["str"]}, + "query": {"str": ["str"]}, + }, + "description": "str", + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, + "properties": { + "serviceFabricCluster": { + "managementEndpoints": ["str"], + "clientCertificateId": "str", + "clientCertificatethumbprint": "str", + "maxPartitionResolutionRetries": 0, + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + } + }, + "protocol": "str", + "proxy": {"url": "str", "password": "str", "username": "str"}, + "resourceId": "str", + "title": "str", + "tls": { "serverCertificateThumbprints": ["str"], "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - } + "validateCertificateChain": bool, + "validateCertificateName": bool, + }, + "type": "str", + "url": "str", }, - "protocol": "str", - "proxy": {"url": "str", "password": "str", "username": "str"}, - "resourceId": "str", - "title": "str", - "tls": { - "serverCertificateThumbprints": ["str"], - "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - "validateCertificateChain": True, - "validateCertificateName": True, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", - "url": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -133,63 +129,65 @@ def test_backend_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", backend_id="str", - if_match="str", parameters={ - "azureRegion": "str", - "circuitBreaker": { - "rules": [ - { - "acceptRetryAfter": bool, - "failureCondition": { - "count": 0, - "errorReasons": ["str"], - "interval": "1 day, 0:00:00", - "percentage": 0, - "statusCodeRanges": [{"max": 0, "min": 0}], - }, - "failureResponse": {"statusCode": 0}, - "name": "str", - "tripDuration": "1 day, 0:00:00", - } - ] - }, - "credentials": { - "authorization": {"parameter": "str", "scheme": "str"}, - "certificate": ["str"], - "certificateIds": ["str"], - "header": {"str": ["str"]}, - "query": {"str": ["str"]}, - }, - "description": "str", - "pool": { - "failureResponse": {"statusCode": 0}, - "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], - "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, - }, "properties": { - "serviceFabricCluster": { - "managementEndpoints": ["str"], - "clientCertificateId": "str", - "clientCertificatethumbprint": "str", - "maxPartitionResolutionRetries": 0, + "azureRegion": "str", + "circuitBreaker": { + "rules": [ + { + "acceptRetryAfter": bool, + "failureCondition": { + "count": 0, + "errorReasons": ["str"], + "interval": "1 day, 0:00:00", + "percentage": 0, + "statusCodeRanges": [{"max": 0, "min": 0}], + }, + "failureResponse": {"statusCode": 0}, + "name": "str", + "tripDuration": "1 day, 0:00:00", + } + ] + }, + "credentials": { + "authorization": {"parameter": "str", "scheme": "str"}, + "certificate": ["str"], + "certificateIds": ["str"], + "header": {"str": ["str"]}, + "query": {"str": ["str"]}, + }, + "description": "str", + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, + "properties": { + "serviceFabricCluster": { + "managementEndpoints": ["str"], + "clientCertificateId": "str", + "clientCertificatethumbprint": "str", + "maxPartitionResolutionRetries": 0, + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + } + }, + "protocol": "str", + "proxy": {"url": "str", "password": "str", "username": "str"}, + "resourceId": "str", + "title": "str", + "tls": { "serverCertificateThumbprints": ["str"], "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - } - }, - "protocol": "str", - "proxy": {"url": "str", "password": "str", "username": "str"}, - "resourceId": "str", - "title": "str", - "tls": { - "serverCertificateThumbprints": ["str"], - "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - "validateCertificateChain": True, - "validateCertificateName": True, - }, - "type": "str", - "url": "str", + "validateCertificateChain": bool, + "validateCertificateName": bool, + }, + "type": "str", + "url": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -202,13 +200,24 @@ def test_backend_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", backend_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_backend_list_by_service(self, resource_group): + response = self.client.backend.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_backend_reconnect(self, resource_group): @@ -216,7 +225,6 @@ def test_backend_reconnect(self, resource_group): resource_group_name=resource_group.name, service_name="str", backend_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations_async.py index 2526fb42f4fa..70663739ec88 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_backend_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_backend_list_by_service(self, resource_group): - response = self.client.backend.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_backend_get_entity_tag(self, resource_group): - response = await self.client.backend.get_entity_tag( + async def test_backend_get(self, resource_group): + response = await self.client.backend.get( resource_group_name=resource_group.name, service_name="str", backend_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_backend_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_backend_get(self, resource_group): - response = await self.client.backend.get( + async def test_backend_get_entity_tag(self, resource_group): + response = await self.client.backend.get_entity_tag( resource_group_name=resource_group.name, service_name="str", backend_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,63 +51,73 @@ async def test_backend_create_or_update(self, resource_group): service_name="str", backend_id="str", parameters={ - "azureRegion": "str", - "circuitBreaker": { - "rules": [ - { - "acceptRetryAfter": bool, - "failureCondition": { - "count": 0, - "errorReasons": ["str"], - "interval": "1 day, 0:00:00", - "percentage": 0, - "statusCodeRanges": [{"max": 0, "min": 0}], - }, - "failureResponse": {"statusCode": 0}, - "name": "str", - "tripDuration": "1 day, 0:00:00", - } - ] - }, - "credentials": { - "authorization": {"parameter": "str", "scheme": "str"}, - "certificate": ["str"], - "certificateIds": ["str"], - "header": {"str": ["str"]}, - "query": {"str": ["str"]}, - }, - "description": "str", "id": "str", "name": "str", - "pool": { - "failureResponse": {"statusCode": 0}, - "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], - "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, - }, "properties": { - "serviceFabricCluster": { - "managementEndpoints": ["str"], - "clientCertificateId": "str", - "clientCertificatethumbprint": "str", - "maxPartitionResolutionRetries": 0, + "azureRegion": "str", + "circuitBreaker": { + "rules": [ + { + "acceptRetryAfter": bool, + "failureCondition": { + "count": 0, + "errorReasons": ["str"], + "interval": "1 day, 0:00:00", + "percentage": 0, + "statusCodeRanges": [{"max": 0, "min": 0}], + }, + "failureResponse": {"statusCode": 0}, + "name": "str", + "tripDuration": "1 day, 0:00:00", + } + ] + }, + "credentials": { + "authorization": {"parameter": "str", "scheme": "str"}, + "certificate": ["str"], + "certificateIds": ["str"], + "header": {"str": ["str"]}, + "query": {"str": ["str"]}, + }, + "description": "str", + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, + "properties": { + "serviceFabricCluster": { + "managementEndpoints": ["str"], + "clientCertificateId": "str", + "clientCertificatethumbprint": "str", + "maxPartitionResolutionRetries": 0, + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + } + }, + "protocol": "str", + "proxy": {"url": "str", "password": "str", "username": "str"}, + "resourceId": "str", + "title": "str", + "tls": { "serverCertificateThumbprints": ["str"], "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - } + "validateCertificateChain": bool, + "validateCertificateName": bool, + }, + "type": "str", + "url": "str", }, - "protocol": "str", - "proxy": {"url": "str", "password": "str", "username": "str"}, - "resourceId": "str", - "title": "str", - "tls": { - "serverCertificateThumbprints": ["str"], - "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - "validateCertificateChain": True, - "validateCertificateName": True, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", - "url": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -134,63 +130,65 @@ async def test_backend_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", backend_id="str", - if_match="str", parameters={ - "azureRegion": "str", - "circuitBreaker": { - "rules": [ - { - "acceptRetryAfter": bool, - "failureCondition": { - "count": 0, - "errorReasons": ["str"], - "interval": "1 day, 0:00:00", - "percentage": 0, - "statusCodeRanges": [{"max": 0, "min": 0}], - }, - "failureResponse": {"statusCode": 0}, - "name": "str", - "tripDuration": "1 day, 0:00:00", - } - ] - }, - "credentials": { - "authorization": {"parameter": "str", "scheme": "str"}, - "certificate": ["str"], - "certificateIds": ["str"], - "header": {"str": ["str"]}, - "query": {"str": ["str"]}, - }, - "description": "str", - "pool": { - "failureResponse": {"statusCode": 0}, - "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], - "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, - }, "properties": { - "serviceFabricCluster": { - "managementEndpoints": ["str"], - "clientCertificateId": "str", - "clientCertificatethumbprint": "str", - "maxPartitionResolutionRetries": 0, + "azureRegion": "str", + "circuitBreaker": { + "rules": [ + { + "acceptRetryAfter": bool, + "failureCondition": { + "count": 0, + "errorReasons": ["str"], + "interval": "1 day, 0:00:00", + "percentage": 0, + "statusCodeRanges": [{"max": 0, "min": 0}], + }, + "failureResponse": {"statusCode": 0}, + "name": "str", + "tripDuration": "1 day, 0:00:00", + } + ] + }, + "credentials": { + "authorization": {"parameter": "str", "scheme": "str"}, + "certificate": ["str"], + "certificateIds": ["str"], + "header": {"str": ["str"]}, + "query": {"str": ["str"]}, + }, + "description": "str", + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, + "properties": { + "serviceFabricCluster": { + "managementEndpoints": ["str"], + "clientCertificateId": "str", + "clientCertificatethumbprint": "str", + "maxPartitionResolutionRetries": 0, + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + } + }, + "protocol": "str", + "proxy": {"url": "str", "password": "str", "username": "str"}, + "resourceId": "str", + "title": "str", + "tls": { "serverCertificateThumbprints": ["str"], "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - } - }, - "protocol": "str", - "proxy": {"url": "str", "password": "str", "username": "str"}, - "resourceId": "str", - "title": "str", - "tls": { - "serverCertificateThumbprints": ["str"], - "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - "validateCertificateChain": True, - "validateCertificateName": True, - }, - "type": "str", - "url": "str", + "validateCertificateChain": bool, + "validateCertificateName": bool, + }, + "type": "str", + "url": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -203,13 +201,24 @@ async def test_backend_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", backend_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_backend_list_by_service(self, resource_group): + response = self.client.backend.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_backend_reconnect(self, resource_group): @@ -217,7 +226,6 @@ async def test_backend_reconnect(self, resource_group): resource_group_name=resource_group.name, service_name="str", backend_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations.py index 097108ed9c2a..61ec84586afb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_cache_list_by_service(self, resource_group): - response = self.client.cache.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_cache_get_entity_tag(self, resource_group): - response = self.client.cache.get_entity_tag( + def test_cache_get(self, resource_group): + response = self.client.cache.get( resource_group_name=resource_group.name, service_name="str", cache_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_cache_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_cache_get(self, resource_group): - response = self.client.cache.get( + def test_cache_get_entity_tag(self, resource_group): + response = self.client.cache.get_entity_tag( resource_group_name=resource_group.name, service_name="str", cache_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,15 +50,24 @@ def test_cache_create_or_update(self, resource_group): service_name="str", cache_id="str", parameters={ - "connectionString": "str", - "description": "str", "id": "str", "name": "str", - "resourceId": "str", + "properties": { + "connectionString": "str", + "useFromLocation": "str", + "description": "str", + "resourceId": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "useFromLocation": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -85,9 +80,16 @@ def test_cache_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", cache_id="str", - if_match="str", - parameters={"connectionString": "str", "description": "str", "resourceId": "str", "useFromLocation": "str"}, - api_version="2025-03-01-preview", + parameters={ + "properties": { + "connectionString": "str", + "description": "str", + "resourceId": "str", + "useFromLocation": "str", + } + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -100,9 +102,20 @@ def test_cache_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", cache_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_cache_list_by_service(self, resource_group): + response = self.client.cache.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations_async.py index 86b614e7be70..5c0dd5f3883a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_cache_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_cache_list_by_service(self, resource_group): - response = self.client.cache.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_cache_get_entity_tag(self, resource_group): - response = await self.client.cache.get_entity_tag( + async def test_cache_get(self, resource_group): + response = await self.client.cache.get( resource_group_name=resource_group.name, service_name="str", cache_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_cache_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_cache_get(self, resource_group): - response = await self.client.cache.get( + async def test_cache_get_entity_tag(self, resource_group): + response = await self.client.cache.get_entity_tag( resource_group_name=resource_group.name, service_name="str", cache_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,15 +51,24 @@ async def test_cache_create_or_update(self, resource_group): service_name="str", cache_id="str", parameters={ - "connectionString": "str", - "description": "str", "id": "str", "name": "str", - "resourceId": "str", + "properties": { + "connectionString": "str", + "useFromLocation": "str", + "description": "str", + "resourceId": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "useFromLocation": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -86,9 +81,16 @@ async def test_cache_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", cache_id="str", - if_match="str", - parameters={"connectionString": "str", "description": "str", "resourceId": "str", "useFromLocation": "str"}, - api_version="2025-03-01-preview", + parameters={ + "properties": { + "connectionString": "str", + "description": "str", + "resourceId": "str", + "useFromLocation": "str", + } + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -101,9 +103,20 @@ async def test_cache_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", cache_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_cache_list_by_service(self, resource_group): + response = self.client.cache.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations.py index 2b127ff89313..6ca0dddb4f25 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_certificate_list_by_service(self, resource_group): - response = self.client.certificate.list_by_service( + def test_certificate_get(self, resource_group): + response = self.client.certificate.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + certificate_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -37,7 +37,6 @@ def test_certificate_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", certificate_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +44,18 @@ def test_certificate_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_certificate_get(self, resource_group): - response = self.client.certificate.get( + def test_certificate_create_or_update(self, resource_group): + response = self.client.certificate.create_or_update( resource_group_name=resource_group.name, service_name="str", certificate_id="str", - api_version="2025-03-01-preview", + parameters={ + "properties": { + "data": "str", + "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, + "password": "str", + } + }, ) # please add some check logic here by yourself @@ -58,17 +63,13 @@ def test_certificate_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_certificate_create_or_update(self, resource_group): - response = self.client.certificate.create_or_update( + def test_certificate_delete(self, resource_group): + response = self.client.certificate.delete( resource_group_name=resource_group.name, service_name="str", certificate_id="str", - parameters={ - "data": "str", - "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, - "password": "str", - }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -76,15 +77,12 @@ def test_certificate_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_certificate_delete(self, resource_group): - response = self.client.certificate.delete( + def test_certificate_list_by_service(self, resource_group): + response = self.client.certificate.list_by_service( resource_group_name=resource_group.name, service_name="str", - certificate_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... @@ -95,7 +93,6 @@ def test_certificate_refresh_secret(self, resource_group): resource_group_name=resource_group.name, service_name="str", certificate_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations_async.py index 3a3ff9a47711..b62d93e24284 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_certificate_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_certificate_list_by_service(self, resource_group): - response = self.client.certificate.list_by_service( + async def test_certificate_get(self, resource_group): + response = await self.client.certificate.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + certificate_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -38,7 +38,6 @@ async def test_certificate_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", certificate_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +45,18 @@ async def test_certificate_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_certificate_get(self, resource_group): - response = await self.client.certificate.get( + async def test_certificate_create_or_update(self, resource_group): + response = await self.client.certificate.create_or_update( resource_group_name=resource_group.name, service_name="str", certificate_id="str", - api_version="2025-03-01-preview", + parameters={ + "properties": { + "data": "str", + "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, + "password": "str", + } + }, ) # please add some check logic here by yourself @@ -59,17 +64,13 @@ async def test_certificate_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_certificate_create_or_update(self, resource_group): - response = await self.client.certificate.create_or_update( + async def test_certificate_delete(self, resource_group): + response = await self.client.certificate.delete( resource_group_name=resource_group.name, service_name="str", certificate_id="str", - parameters={ - "data": "str", - "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, - "password": "str", - }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -77,15 +78,12 @@ async def test_certificate_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_certificate_delete(self, resource_group): - response = await self.client.certificate.delete( + async def test_certificate_list_by_service(self, resource_group): + response = self.client.certificate.list_by_service( resource_group_name=resource_group.name, service_name="str", - certificate_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... @@ -96,7 +94,6 @@ async def test_certificate_refresh_secret(self, resource_group): resource_group_name=resource_group.name, service_name="str", certificate_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations.py index ec71ade1b364..481bc7e564d8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_client_application_list_by_service(self, resource_group): - response = self.client.client_application.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_client_application_get_entity_tag(self, resource_group): - response = self.client.client_application.get_entity_tag( + def test_client_application_get(self, resource_group): + response = self.client.client_application.get( resource_group_name=resource_group.name, service_name="str", client_application_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_client_application_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_client_application_get(self, resource_group): - response = self.client.client_application.get( + def test_client_application_get_entity_tag(self, resource_group): + response = self.client.client_application.get_entity_tag( resource_group_name=resource_group.name, service_name="str", client_application_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,17 +50,26 @@ def test_client_application_create_or_update(self, resource_group): service_name="str", client_application_id="str", parameters={ - "description": "str", - "displayName": "str", - "entraApplicationId": "str", - "entraTenantId": "str", "id": "str", "name": "str", - "ownerId": "str", - "state": "str", + "properties": { + "displayName": "str", + "ownerId": "str", + "description": "str", + "entraApplicationId": "str", + "entraTenantId": "str", + "state": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -87,12 +82,22 @@ def test_client_application_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", client_application_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_client_application_list_by_service(self, resource_group): + response = self.client.client_application.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_client_application_list_secrets(self, resource_group): @@ -100,7 +105,6 @@ def test_client_application_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", client_application_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations_async.py index c7ed9f573d25..f9aabfd99abe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_client_application_list_by_service(self, resource_group): - response = self.client.client_application.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_client_application_get_entity_tag(self, resource_group): - response = await self.client.client_application.get_entity_tag( + async def test_client_application_get(self, resource_group): + response = await self.client.client_application.get( resource_group_name=resource_group.name, service_name="str", client_application_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_client_application_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_client_application_get(self, resource_group): - response = await self.client.client_application.get( + async def test_client_application_get_entity_tag(self, resource_group): + response = await self.client.client_application.get_entity_tag( resource_group_name=resource_group.name, service_name="str", client_application_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,17 +51,26 @@ async def test_client_application_create_or_update(self, resource_group): service_name="str", client_application_id="str", parameters={ - "description": "str", - "displayName": "str", - "entraApplicationId": "str", - "entraTenantId": "str", "id": "str", "name": "str", - "ownerId": "str", - "state": "str", + "properties": { + "displayName": "str", + "ownerId": "str", + "description": "str", + "entraApplicationId": "str", + "entraTenantId": "str", + "state": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -88,12 +83,22 @@ async def test_client_application_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", client_application_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_client_application_list_by_service(self, resource_group): + response = self.client.client_application.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_client_application_list_secrets(self, resource_group): @@ -101,7 +106,6 @@ async def test_client_application_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", client_application_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations.py index a6794c929542..9dc13fcb9cf2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,39 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_client_application_product_link_list_by_client_applications(self, resource_group): - response = self.client.client_application_product_link.list_by_client_applications( + def test_client_application_product_link_get(self, resource_group): + response = self.client.client_application_product_link.get( resource_group_name=resource_group.name, service_name="str", client_application_id="str", - api_version="2025-03-01-preview", + client_application_product_link_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_client_application_product_link_get(self, resource_group): - response = self.client.client_application_product_link.get( + def test_client_application_product_link_create(self, resource_group): + response = self.client.client_application_product_link.create( resource_group_name=resource_group.name, service_name="str", client_application_id="str", client_application_product_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"productId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -47,14 +60,12 @@ def test_client_application_product_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_client_application_product_link_create(self, resource_group): - response = self.client.client_application_product_link.create( + def test_client_application_product_link_delete(self, resource_group): + response = self.client.client_application_product_link.delete( resource_group_name=resource_group.name, service_name="str", client_application_id="str", client_application_product_link_id="str", - parameters={"id": "str", "name": "str", "productId": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -62,14 +73,12 @@ def test_client_application_product_link_create(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_client_application_product_link_delete(self, resource_group): - response = self.client.client_application_product_link.delete( + def test_client_application_product_link_list_by_client_applications(self, resource_group): + response = self.client.client_application_product_link.list_by_client_applications( resource_group_name=resource_group.name, service_name="str", client_application_id="str", - client_application_product_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations_async.py index b9208b26a3d0..162ae30d1d92 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_client_application_product_link_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,39 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_client_application_product_link_list_by_client_applications(self, resource_group): - response = self.client.client_application_product_link.list_by_client_applications( + async def test_client_application_product_link_get(self, resource_group): + response = await self.client.client_application_product_link.get( resource_group_name=resource_group.name, service_name="str", client_application_id="str", - api_version="2025-03-01-preview", + client_application_product_link_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_client_application_product_link_get(self, resource_group): - response = await self.client.client_application_product_link.get( + async def test_client_application_product_link_create(self, resource_group): + response = await self.client.client_application_product_link.create( resource_group_name=resource_group.name, service_name="str", client_application_id="str", client_application_product_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"productId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -48,14 +61,12 @@ async def test_client_application_product_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_client_application_product_link_create(self, resource_group): - response = await self.client.client_application_product_link.create( + async def test_client_application_product_link_delete(self, resource_group): + response = await self.client.client_application_product_link.delete( resource_group_name=resource_group.name, service_name="str", client_application_id="str", client_application_product_link_id="str", - parameters={"id": "str", "name": "str", "productId": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -63,14 +74,12 @@ async def test_client_application_product_link_create(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_client_application_product_link_delete(self, resource_group): - response = await self.client.client_application_product_link.delete( + async def test_client_application_product_link_list_by_client_applications(self, resource_group): + response = self.client.client_application_product_link.list_by_client_applications( resource_group_name=resource_group.name, service_name="str", client_application_id="str", - client_application_product_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations.py index 2bfb0cac3025..1dd71e7b2d9a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,14 +20,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_content_item_list_by_service(self, resource_group): - response = self.client.content_item.list_by_service( + def test_content_item_get(self, resource_group): + response = self.client.content_item.get( resource_group_name=resource_group.name, service_name="str", content_type_id="str", - api_version="2025-03-01-preview", + content_item_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -39,7 +39,6 @@ def test_content_item_get_entity_tag(self, resource_group): service_name="str", content_type_id="str", content_item_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +46,26 @@ def test_content_item_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_content_item_get(self, resource_group): - response = self.client.content_item.get( + def test_content_item_create_or_update(self, resource_group): + response = self.client.content_item.create_or_update( resource_group_name=resource_group.name, service_name="str", content_type_id="str", content_item_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"str": {}}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -61,14 +73,14 @@ def test_content_item_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_content_item_create_or_update(self, resource_group): - response = self.client.content_item.create_or_update( + def test_content_item_delete(self, resource_group): + response = self.client.content_item.delete( resource_group_name=resource_group.name, service_name="str", content_type_id="str", content_item_id="str", - parameters={"id": "str", "name": "str", "properties": {"str": {}}, "type": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -76,15 +88,12 @@ def test_content_item_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_content_item_delete(self, resource_group): - response = self.client.content_item.delete( + def test_content_item_list_by_service(self, resource_group): + response = self.client.content_item.list_by_service( resource_group_name=resource_group.name, service_name="str", content_type_id="str", - content_item_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations_async.py index ecb5a4b4f240..ccb14bca8b84 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_item_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,14 +21,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_content_item_list_by_service(self, resource_group): - response = self.client.content_item.list_by_service( + async def test_content_item_get(self, resource_group): + response = await self.client.content_item.get( resource_group_name=resource_group.name, service_name="str", content_type_id="str", - api_version="2025-03-01-preview", + content_item_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -40,7 +40,6 @@ async def test_content_item_get_entity_tag(self, resource_group): service_name="str", content_type_id="str", content_item_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +47,26 @@ async def test_content_item_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_content_item_get(self, resource_group): - response = await self.client.content_item.get( + async def test_content_item_create_or_update(self, resource_group): + response = await self.client.content_item.create_or_update( resource_group_name=resource_group.name, service_name="str", content_type_id="str", content_item_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"str": {}}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -62,14 +74,14 @@ async def test_content_item_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_content_item_create_or_update(self, resource_group): - response = await self.client.content_item.create_or_update( + async def test_content_item_delete(self, resource_group): + response = await self.client.content_item.delete( resource_group_name=resource_group.name, service_name="str", content_type_id="str", content_item_id="str", - parameters={"id": "str", "name": "str", "properties": {"str": {}}, "type": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -77,15 +89,12 @@ async def test_content_item_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_content_item_delete(self, resource_group): - response = await self.client.content_item.delete( + async def test_content_item_list_by_service(self, resource_group): + response = self.client.content_item.list_by_service( resource_group_name=resource_group.name, service_name="str", content_type_id="str", - content_item_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations.py index 1f3f4d679f13..4369860b3c8e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestApiManagementContentTypeOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_content_type_list_by_service(self, resource_group): - response = self.client.content_type.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_content_type_get(self, resource_group): @@ -37,7 +25,6 @@ def test_content_type_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", content_type_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,14 +38,19 @@ def test_content_type_create_or_update(self, resource_group): service_name="str", content_type_id="str", parameters={ - "description": "str", "id": "str", "name": "str", - "schema": {}, + "properties": {"description": "str", "id": "str", "name": "str", "schema": {}, "version": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "version": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -71,9 +63,20 @@ def test_content_type_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", content_type_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_content_type_list_by_service(self, resource_group): + response = self.client.content_type.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations_async.py index 2642c44ff7a3..c91aa61eb42e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_content_type_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestApiManagementContentTypeOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_content_type_list_by_service(self, resource_group): - response = self.client.content_type.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_content_type_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_content_type_get(self, resource_group): resource_group_name=resource_group.name, service_name="str", content_type_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -52,14 +39,19 @@ async def test_content_type_create_or_update(self, resource_group): service_name="str", content_type_id="str", parameters={ - "description": "str", "id": "str", "name": "str", - "schema": {}, + "properties": {"description": "str", "id": "str", "name": "str", "schema": {}, "version": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "version": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,9 +64,20 @@ async def test_content_type_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", content_type_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_content_type_list_by_service(self, resource_group): + response = self.client.content_type.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations.py index 270f55c5c882..c85eb5f55874 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,11 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delegation_settings_get_entity_tag(self, resource_group): - response = self.client.delegation_settings.get_entity_tag( + def test_delegation_settings_get(self, resource_group): + response = self.client.delegation_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -32,11 +31,10 @@ def test_delegation_settings_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delegation_settings_get(self, resource_group): - response = self.client.delegation_settings.get( + def test_delegation_settings_get_entity_tag(self, resource_group): + response = self.client.delegation_settings.get_entity_tag( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -44,21 +42,29 @@ def test_delegation_settings_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delegation_settings_update(self, resource_group): - response = self.client.delegation_settings.update( + def test_delegation_settings_create_or_update(self, resource_group): + response = self.client.delegation_settings.create_or_update( resource_group_name=resource_group.name, service_name="str", - if_match="str", parameters={ "id": "str", "name": "str", - "subscriptions": {"enabled": bool}, + "properties": { + "subscriptions": {"enabled": bool}, + "url": "str", + "userRegistration": {"enabled": bool}, + "validationKey": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "url": "str", - "userRegistration": {"enabled": bool}, - "validationKey": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,20 +72,31 @@ def test_delegation_settings_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delegation_settings_create_or_update(self, resource_group): - response = self.client.delegation_settings.create_or_update( + def test_delegation_settings_update(self, resource_group): + response = self.client.delegation_settings.update( resource_group_name=resource_group.name, service_name="str", parameters={ "id": "str", "name": "str", - "subscriptions": {"enabled": bool}, + "properties": { + "subscriptions": {"enabled": bool}, + "url": "str", + "userRegistration": {"enabled": bool}, + "validationKey": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "url": "str", - "userRegistration": {"enabled": bool}, - "validationKey": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -91,7 +108,6 @@ def test_delegation_settings_list_secrets(self, resource_group): response = self.client.delegation_settings.list_secrets( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations_async.py index 971c8f2ee362..b699a146c2d1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_delegation_settings_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,11 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delegation_settings_get_entity_tag(self, resource_group): - response = await self.client.delegation_settings.get_entity_tag( + async def test_delegation_settings_get(self, resource_group): + response = await self.client.delegation_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -33,11 +32,10 @@ async def test_delegation_settings_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delegation_settings_get(self, resource_group): - response = await self.client.delegation_settings.get( + async def test_delegation_settings_get_entity_tag(self, resource_group): + response = await self.client.delegation_settings.get_entity_tag( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,21 +43,29 @@ async def test_delegation_settings_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delegation_settings_update(self, resource_group): - response = await self.client.delegation_settings.update( + async def test_delegation_settings_create_or_update(self, resource_group): + response = await self.client.delegation_settings.create_or_update( resource_group_name=resource_group.name, service_name="str", - if_match="str", parameters={ "id": "str", "name": "str", - "subscriptions": {"enabled": bool}, + "properties": { + "subscriptions": {"enabled": bool}, + "url": "str", + "userRegistration": {"enabled": bool}, + "validationKey": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "url": "str", - "userRegistration": {"enabled": bool}, - "validationKey": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,20 +73,31 @@ async def test_delegation_settings_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delegation_settings_create_or_update(self, resource_group): - response = await self.client.delegation_settings.create_or_update( + async def test_delegation_settings_update(self, resource_group): + response = await self.client.delegation_settings.update( resource_group_name=resource_group.name, service_name="str", parameters={ "id": "str", "name": "str", - "subscriptions": {"enabled": bool}, + "properties": { + "subscriptions": {"enabled": bool}, + "url": "str", + "userRegistration": {"enabled": bool}, + "validationKey": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "url": "str", - "userRegistration": {"enabled": bool}, - "validationKey": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -92,7 +109,6 @@ async def test_delegation_settings_list_secrets(self, resource_group): response = await self.client.delegation_settings.list_secrets( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations.py index 29a0c9e4b7e2..19f931cb15a5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,23 +18,12 @@ class TestApiManagementDeletedServicesOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_deleted_services_list_by_subscription(self, resource_group): - response = self.client.deleted_services.list_by_subscription( - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_deleted_services_get_by_name(self, resource_group): response = self.client.deleted_services.get_by_name( - service_name="str", location="str", - api_version="2025-03-01-preview", + service_name="str", ) # please add some check logic here by yourself @@ -44,10 +33,17 @@ def test_deleted_services_get_by_name(self, resource_group): @recorded_by_proxy def test_deleted_services_begin_purge(self, resource_group): response = self.client.deleted_services.begin_purge( - service_name="str", location="str", - api_version="2025-03-01-preview", + service_name="str", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_deleted_services_list_by_subscription(self, resource_group): + response = self.client.deleted_services.list_by_subscription() + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations_async.py index 5ec47ace23ac..9af79cb6a818 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_deleted_services_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,23 +19,12 @@ class TestApiManagementDeletedServicesOperationsAsync(AzureMgmtRecordedTestCase) def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_deleted_services_list_by_subscription(self, resource_group): - response = self.client.deleted_services.list_by_subscription( - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_deleted_services_get_by_name(self, resource_group): response = await self.client.deleted_services.get_by_name( - service_name="str", location="str", - api_version="2025-03-01-preview", + service_name="str", ) # please add some check logic here by yourself @@ -46,11 +35,18 @@ async def test_deleted_services_get_by_name(self, resource_group): async def test_deleted_services_begin_purge(self, resource_group): response = await ( await self.client.deleted_services.begin_purge( - service_name="str", location="str", - api_version="2025-03-01-preview", + service_name="str", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_deleted_services_list_by_subscription(self, resource_group): + response = self.client.deleted_services.list_by_subscription() + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations.py index 5f13e9846f77..91ca7c3b44a6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_diagnostic_list_by_service(self, resource_group): - response = self.client.diagnostic.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_diagnostic_get_entity_tag(self, resource_group): - response = self.client.diagnostic.get_entity_tag( + def test_diagnostic_get(self, resource_group): + response = self.client.diagnostic.get( resource_group_name=resource_group.name, service_name="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_diagnostic_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_diagnostic_get(self, resource_group): - response = self.client.diagnostic.get( + def test_diagnostic_get_entity_tag(self, resource_group): + response = self.client.diagnostic.get_entity_tag( resource_group_name=resource_group.name, service_name="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,60 +50,69 @@ def test_diagnostic_create_or_update(self, resource_group): service_name="str", diagnostic_id="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "loggerId": "str", + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, + "logClientIp": bool, + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "largeLanguageModel": { - "logs": "str", - "requests": {"maxSizeInBytes": 0, "messages": "str"}, - "responses": {"maxSizeInBytes": 0, "messages": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -130,62 +125,72 @@ def test_diagnostic_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", diagnostic_id="str", - if_match="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "loggerId": "str", + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, + "logClientIp": bool, + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "largeLanguageModel": { - "logs": "str", - "requests": {"maxSizeInBytes": 0, "messages": "str"}, - "responses": {"maxSizeInBytes": 0, "messages": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -198,9 +203,20 @@ def test_diagnostic_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", diagnostic_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_diagnostic_list_by_service(self, resource_group): + response = self.client.diagnostic.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations_async.py index 03cb0924291d..c1a8a8eeeae4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_diagnostic_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_diagnostic_list_by_service(self, resource_group): - response = self.client.diagnostic.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_diagnostic_get_entity_tag(self, resource_group): - response = await self.client.diagnostic.get_entity_tag( + async def test_diagnostic_get(self, resource_group): + response = await self.client.diagnostic.get( resource_group_name=resource_group.name, service_name="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_diagnostic_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_diagnostic_get(self, resource_group): - response = await self.client.diagnostic.get( + async def test_diagnostic_get_entity_tag(self, resource_group): + response = await self.client.diagnostic.get_entity_tag( resource_group_name=resource_group.name, service_name="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,60 +51,69 @@ async def test_diagnostic_create_or_update(self, resource_group): service_name="str", diagnostic_id="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "loggerId": "str", + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, + "logClientIp": bool, + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "largeLanguageModel": { - "logs": "str", - "requests": {"maxSizeInBytes": 0, "messages": "str"}, - "responses": {"maxSizeInBytes": 0, "messages": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -131,62 +126,72 @@ async def test_diagnostic_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", diagnostic_id="str", - if_match="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "loggerId": "str", + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, + "logClientIp": bool, + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "largeLanguageModel": { - "logs": "str", - "requests": {"maxSizeInBytes": 0, "messages": "str"}, - "responses": {"maxSizeInBytes": 0, "messages": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -199,9 +204,20 @@ async def test_diagnostic_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", diagnostic_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_diagnostic_list_by_service(self, resource_group): + response = self.client.diagnostic.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations.py index 4561bc6f4fba..9ef58f62d524 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_documentation_list_by_service(self, resource_group): - response = self.client.documentation.list_by_service( + def test_documentation_get(self, resource_group): + response = self.client.documentation.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + documentation_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -37,7 +37,6 @@ def test_documentation_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", documentation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +44,25 @@ def test_documentation_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_documentation_get(self, resource_group): - response = self.client.documentation.get( + def test_documentation_create_or_update(self, resource_group): + response = self.client.documentation.create_or_update( resource_group_name=resource_group.name, service_name="str", documentation_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"content": "str", "title": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -58,13 +70,14 @@ def test_documentation_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_documentation_create_or_update(self, resource_group): - response = self.client.documentation.create_or_update( + def test_documentation_update(self, resource_group): + response = self.client.documentation.update( resource_group_name=resource_group.name, service_name="str", documentation_id="str", - parameters={"content": "str", "id": "str", "name": "str", "title": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"content": "str", "title": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -72,14 +85,13 @@ def test_documentation_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_documentation_update(self, resource_group): - response = self.client.documentation.update( + def test_documentation_delete(self, resource_group): + response = self.client.documentation.delete( resource_group_name=resource_group.name, service_name="str", documentation_id="str", - if_match="str", - parameters={"content": "str", "title": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -87,14 +99,11 @@ def test_documentation_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_documentation_delete(self, resource_group): - response = self.client.documentation.delete( + def test_documentation_list_by_service(self, resource_group): + response = self.client.documentation.list_by_service( resource_group_name=resource_group.name, service_name="str", - documentation_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations_async.py index 4225acca5aa5..b75518062063 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_documentation_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_documentation_list_by_service(self, resource_group): - response = self.client.documentation.list_by_service( + async def test_documentation_get(self, resource_group): + response = await self.client.documentation.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + documentation_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -38,7 +38,6 @@ async def test_documentation_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", documentation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +45,25 @@ async def test_documentation_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_documentation_get(self, resource_group): - response = await self.client.documentation.get( + async def test_documentation_create_or_update(self, resource_group): + response = await self.client.documentation.create_or_update( resource_group_name=resource_group.name, service_name="str", documentation_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"content": "str", "title": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -59,13 +71,14 @@ async def test_documentation_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_documentation_create_or_update(self, resource_group): - response = await self.client.documentation.create_or_update( + async def test_documentation_update(self, resource_group): + response = await self.client.documentation.update( resource_group_name=resource_group.name, service_name="str", documentation_id="str", - parameters={"content": "str", "id": "str", "name": "str", "title": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"content": "str", "title": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -73,14 +86,13 @@ async def test_documentation_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_documentation_update(self, resource_group): - response = await self.client.documentation.update( + async def test_documentation_delete(self, resource_group): + response = await self.client.documentation.delete( resource_group_name=resource_group.name, service_name="str", documentation_id="str", - if_match="str", - parameters={"content": "str", "title": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -88,14 +100,11 @@ async def test_documentation_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_documentation_delete(self, resource_group): - response = await self.client.documentation.delete( + async def test_documentation_list_by_service(self, resource_group): + response = self.client.documentation.list_by_service( resource_group_name=resource_group.name, service_name="str", - documentation_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations.py index e023f5c9fc18..2cb5a614ae5f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_email_template_list_by_service(self, resource_group): - response = self.client.email_template.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_email_template_get_entity_tag(self, resource_group): - response = self.client.email_template.get_entity_tag( + def test_email_template_get(self, resource_group): + response = self.client.email_template.get( resource_group_name=resource_group.name, service_name="str", template_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_email_template_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_email_template_get(self, resource_group): - response = self.client.email_template.get( + def test_email_template_get_entity_tag(self, resource_group): + response = self.client.email_template.get_entity_tag( resource_group_name=resource_group.name, service_name="str", template_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,13 +50,14 @@ def test_email_template_create_or_update(self, resource_group): service_name="str", template_name="str", parameters={ - "body": "str", - "description": "str", - "parameters": [{"description": "str", "name": "str", "title": "str"}], - "subject": "str", - "title": "str", + "properties": { + "body": "str", + "description": "str", + "parameters": [{"description": "str", "name": "str", "title": "str"}], + "subject": "str", + "title": "str", + } }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -83,15 +70,17 @@ def test_email_template_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", template_name="str", - if_match="str", parameters={ - "body": "str", - "description": "str", - "parameters": [{"description": "str", "name": "str", "title": "str"}], - "subject": "str", - "title": "str", + "properties": { + "body": "str", + "description": "str", + "parameters": [{"description": "str", "name": "str", "title": "str"}], + "subject": "str", + "title": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -104,9 +93,20 @@ def test_email_template_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", template_name="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_email_template_list_by_service(self, resource_group): + response = self.client.email_template.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations_async.py index c83345ca4410..51299ab46724 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_email_template_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_email_template_list_by_service(self, resource_group): - response = self.client.email_template.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_email_template_get_entity_tag(self, resource_group): - response = await self.client.email_template.get_entity_tag( + async def test_email_template_get(self, resource_group): + response = await self.client.email_template.get( resource_group_name=resource_group.name, service_name="str", template_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_email_template_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_email_template_get(self, resource_group): - response = await self.client.email_template.get( + async def test_email_template_get_entity_tag(self, resource_group): + response = await self.client.email_template.get_entity_tag( resource_group_name=resource_group.name, service_name="str", template_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,13 +51,14 @@ async def test_email_template_create_or_update(self, resource_group): service_name="str", template_name="str", parameters={ - "body": "str", - "description": "str", - "parameters": [{"description": "str", "name": "str", "title": "str"}], - "subject": "str", - "title": "str", + "properties": { + "body": "str", + "description": "str", + "parameters": [{"description": "str", "name": "str", "title": "str"}], + "subject": "str", + "title": "str", + } }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -84,15 +71,17 @@ async def test_email_template_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", template_name="str", - if_match="str", parameters={ - "body": "str", - "description": "str", - "parameters": [{"description": "str", "name": "str", "title": "str"}], - "subject": "str", - "title": "str", + "properties": { + "body": "str", + "description": "str", + "parameters": [{"description": "str", "name": "str", "title": "str"}], + "subject": "str", + "title": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -105,9 +94,20 @@ async def test_email_template_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", template_name="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_email_template_list_by_service(self, resource_group): + response = self.client.email_template.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations.py index 264d416b35c7..fc7044e7d150 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_gateway_api_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +38,6 @@ def test_gateway_api_get_entity_tag(self, resource_group): service_name="str", gateway_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +51,6 @@ def test_gateway_api_create_or_update(self, resource_group): service_name="str", gateway_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +64,6 @@ def test_gateway_api_delete(self, resource_group): service_name="str", gateway_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations_async.py index 7174c3c59052..5aa86c3703b6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_api_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_gateway_api_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +39,6 @@ async def test_gateway_api_get_entity_tag(self, resource_group): service_name="str", gateway_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +52,6 @@ async def test_gateway_api_create_or_update(self, resource_group): service_name="str", gateway_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +65,6 @@ async def test_gateway_api_delete(self, resource_group): service_name="str", gateway_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations.py index b05e332667c0..b9082f3d8e55 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,14 +20,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_gateway_certificate_authority_list_by_service(self, resource_group): - response = self.client.gateway_certificate_authority.list_by_service( + def test_gateway_certificate_authority_get(self, resource_group): + response = self.client.gateway_certificate_authority.get( resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2025-03-01-preview", + certificate_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -39,7 +39,6 @@ def test_gateway_certificate_authority_get_entity_tag(self, resource_group): service_name="str", gateway_id="str", certificate_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +46,26 @@ def test_gateway_certificate_authority_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_gateway_certificate_authority_get(self, resource_group): - response = self.client.gateway_certificate_authority.get( + def test_gateway_certificate_authority_create_or_update(self, resource_group): + response = self.client.gateway_certificate_authority.create_or_update( resource_group_name=resource_group.name, service_name="str", gateway_id="str", certificate_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"isTrusted": bool}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -61,14 +73,14 @@ def test_gateway_certificate_authority_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_gateway_certificate_authority_create_or_update(self, resource_group): - response = self.client.gateway_certificate_authority.create_or_update( + def test_gateway_certificate_authority_delete(self, resource_group): + response = self.client.gateway_certificate_authority.delete( resource_group_name=resource_group.name, service_name="str", gateway_id="str", certificate_id="str", - parameters={"id": "str", "isTrusted": bool, "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -76,15 +88,12 @@ def test_gateway_certificate_authority_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_gateway_certificate_authority_delete(self, resource_group): - response = self.client.gateway_certificate_authority.delete( + def test_gateway_certificate_authority_list_by_service(self, resource_group): + response = self.client.gateway_certificate_authority.list_by_service( resource_group_name=resource_group.name, service_name="str", gateway_id="str", - certificate_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations_async.py index 3f7b99a24789..e870a91c0fa0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_certificate_authority_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,14 +21,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_gateway_certificate_authority_list_by_service(self, resource_group): - response = self.client.gateway_certificate_authority.list_by_service( + async def test_gateway_certificate_authority_get(self, resource_group): + response = await self.client.gateway_certificate_authority.get( resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2025-03-01-preview", + certificate_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -40,7 +40,6 @@ async def test_gateway_certificate_authority_get_entity_tag(self, resource_group service_name="str", gateway_id="str", certificate_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +47,26 @@ async def test_gateway_certificate_authority_get_entity_tag(self, resource_group @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_gateway_certificate_authority_get(self, resource_group): - response = await self.client.gateway_certificate_authority.get( + async def test_gateway_certificate_authority_create_or_update(self, resource_group): + response = await self.client.gateway_certificate_authority.create_or_update( resource_group_name=resource_group.name, service_name="str", gateway_id="str", certificate_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"isTrusted": bool}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -62,14 +74,14 @@ async def test_gateway_certificate_authority_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_gateway_certificate_authority_create_or_update(self, resource_group): - response = await self.client.gateway_certificate_authority.create_or_update( + async def test_gateway_certificate_authority_delete(self, resource_group): + response = await self.client.gateway_certificate_authority.delete( resource_group_name=resource_group.name, service_name="str", gateway_id="str", certificate_id="str", - parameters={"id": "str", "isTrusted": bool, "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -77,15 +89,12 @@ async def test_gateway_certificate_authority_create_or_update(self, resource_gro @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_gateway_certificate_authority_delete(self, resource_group): - response = await self.client.gateway_certificate_authority.delete( + async def test_gateway_certificate_authority_list_by_service(self, resource_group): + response = self.client.gateway_certificate_authority.list_by_service( resource_group_name=resource_group.name, service_name="str", gateway_id="str", - certificate_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations.py index 9bdee119c95b..9cefcd3eb640 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_gateway_hostname_configuration_list_by_service(self, resource_group): - response = self.client.gateway_hostname_configuration.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - gateway_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_gateway_hostname_configuration_get_entity_tag(self, resource_group): - response = self.client.gateway_hostname_configuration.get_entity_tag( + def test_gateway_hostname_configuration_get(self, resource_group): + response = self.client.gateway_hostname_configuration.get( resource_group_name=resource_group.name, service_name="str", gateway_id="str", hc_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_gateway_hostname_configuration_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_gateway_hostname_configuration_get(self, resource_group): - response = self.client.gateway_hostname_configuration.get( + def test_gateway_hostname_configuration_get_entity_tag(self, resource_group): + response = self.client.gateway_hostname_configuration.get_entity_tag( resource_group_name=resource_group.name, service_name="str", gateway_id="str", hc_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,17 +53,26 @@ def test_gateway_hostname_configuration_create_or_update(self, resource_group): gateway_id="str", hc_id="str", parameters={ - "certificateId": "str", - "hostname": "str", - "http2Enabled": bool, "id": "str", "name": "str", - "negotiateClientCertificate": bool, - "tls10Enabled": bool, - "tls11Enabled": bool, + "properties": { + "certificateId": "str", + "hostname": "str", + "http2Enabled": bool, + "negotiateClientCertificate": bool, + "tls10Enabled": bool, + "tls11Enabled": bool, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -92,9 +86,21 @@ def test_gateway_hostname_configuration_delete(self, resource_group): service_name="str", gateway_id="str", hc_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_gateway_hostname_configuration_list_by_service(self, resource_group): + response = self.client.gateway_hostname_configuration.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + gateway_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations_async.py index 1cf09e15c6a5..c32c2802d2a4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_hostname_configuration_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_gateway_hostname_configuration_list_by_service(self, resource_group): - response = self.client.gateway_hostname_configuration.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - gateway_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_gateway_hostname_configuration_get_entity_tag(self, resource_group): - response = await self.client.gateway_hostname_configuration.get_entity_tag( + async def test_gateway_hostname_configuration_get(self, resource_group): + response = await self.client.gateway_hostname_configuration.get( resource_group_name=resource_group.name, service_name="str", gateway_id="str", hc_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_gateway_hostname_configuration_get_entity_tag(self, resource_grou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_gateway_hostname_configuration_get(self, resource_group): - response = await self.client.gateway_hostname_configuration.get( + async def test_gateway_hostname_configuration_get_entity_tag(self, resource_group): + response = await self.client.gateway_hostname_configuration.get_entity_tag( resource_group_name=resource_group.name, service_name="str", gateway_id="str", hc_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,17 +54,26 @@ async def test_gateway_hostname_configuration_create_or_update(self, resource_gr gateway_id="str", hc_id="str", parameters={ - "certificateId": "str", - "hostname": "str", - "http2Enabled": bool, "id": "str", "name": "str", - "negotiateClientCertificate": bool, - "tls10Enabled": bool, - "tls11Enabled": bool, + "properties": { + "certificateId": "str", + "hostname": "str", + "http2Enabled": bool, + "negotiateClientCertificate": bool, + "tls10Enabled": bool, + "tls11Enabled": bool, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -93,9 +87,21 @@ async def test_gateway_hostname_configuration_delete(self, resource_group): service_name="str", gateway_id="str", hc_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_gateway_hostname_configuration_list_by_service(self, resource_group): + response = self.client.gateway_hostname_configuration.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + gateway_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations.py index 53fb1864ea99..f180e409c9a0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_gateway_list_by_service(self, resource_group): - response = self.client.gateway.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_gateway_get_entity_tag(self, resource_group): - response = self.client.gateway.get_entity_tag( + def test_gateway_get(self, resource_group): + response = self.client.gateway.get( resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_gateway_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_gateway_get(self, resource_group): - response = self.client.gateway.get( + def test_gateway_get_entity_tag(self, resource_group): + response = self.client.gateway.get_entity_tag( resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,7 +50,6 @@ def test_gateway_create_or_update(self, resource_group): service_name="str", gateway_id="str", parameters={ - "description": "str", "id": "str", "identity": { "type": "str", @@ -72,11 +57,21 @@ def test_gateway_create_or_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "locationData": {"name": "str", "city": "str", "countryOrRegion": "str", "district": "str"}, "name": "str", + "properties": { + "description": "str", + "locationData": {"name": "str", "city": "str", "countryOrRegion": "str", "district": "str"}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -89,9 +84,7 @@ def test_gateway_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - if_match="str", parameters={ - "description": "str", "id": "str", "identity": { "type": "str", @@ -99,11 +92,23 @@ def test_gateway_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "locationData": {"name": "str", "city": "str", "countryOrRegion": "str", "district": "str"}, "name": "str", + "properties": { + "description": "str", + "locationData": {"name": "str", "city": "str", "countryOrRegion": "str", "district": "str"}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -116,13 +121,24 @@ def test_gateway_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_gateway_list_by_service(self, resource_group): + response = self.client.gateway.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_gateway_list_keys(self, resource_group): @@ -130,7 +146,6 @@ def test_gateway_list_keys(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -144,7 +159,6 @@ def test_gateway_regenerate_key(self, resource_group): service_name="str", gateway_id="str", parameters={"keyType": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -158,7 +172,6 @@ def test_gateway_generate_token(self, resource_group): service_name="str", gateway_id="str", parameters={"expiry": "2020-02-20 00:00:00", "keyType": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -171,7 +184,6 @@ def test_gateway_invalidate_debug_credentials(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -185,7 +197,6 @@ def test_gateway_list_debug_credentials(self, resource_group): service_name="str", gateway_id="str", parameters={"apiId": "str", "purposes": ["str"], "credentialsExpireAfter": "1 day, 0:00:00"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -199,7 +210,6 @@ def test_gateway_list_trace(self, resource_group): service_name="str", gateway_id="str", parameters={"traceId": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations_async.py index 2db74d54fdfc..d0e5a8ae4ff1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_gateway_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_gateway_list_by_service(self, resource_group): - response = self.client.gateway.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_gateway_get_entity_tag(self, resource_group): - response = await self.client.gateway.get_entity_tag( + async def test_gateway_get(self, resource_group): + response = await self.client.gateway.get( resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_gateway_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_gateway_get(self, resource_group): - response = await self.client.gateway.get( + async def test_gateway_get_entity_tag(self, resource_group): + response = await self.client.gateway.get_entity_tag( resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,7 +51,6 @@ async def test_gateway_create_or_update(self, resource_group): service_name="str", gateway_id="str", parameters={ - "description": "str", "id": "str", "identity": { "type": "str", @@ -73,11 +58,21 @@ async def test_gateway_create_or_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "locationData": {"name": "str", "city": "str", "countryOrRegion": "str", "district": "str"}, "name": "str", + "properties": { + "description": "str", + "locationData": {"name": "str", "city": "str", "countryOrRegion": "str", "district": "str"}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -90,9 +85,7 @@ async def test_gateway_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - if_match="str", parameters={ - "description": "str", "id": "str", "identity": { "type": "str", @@ -100,11 +93,23 @@ async def test_gateway_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "locationData": {"name": "str", "city": "str", "countryOrRegion": "str", "district": "str"}, "name": "str", + "properties": { + "description": "str", + "locationData": {"name": "str", "city": "str", "countryOrRegion": "str", "district": "str"}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -117,13 +122,24 @@ async def test_gateway_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_gateway_list_by_service(self, resource_group): + response = self.client.gateway.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_gateway_list_keys(self, resource_group): @@ -131,7 +147,6 @@ async def test_gateway_list_keys(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -145,7 +160,6 @@ async def test_gateway_regenerate_key(self, resource_group): service_name="str", gateway_id="str", parameters={"keyType": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -159,7 +173,6 @@ async def test_gateway_generate_token(self, resource_group): service_name="str", gateway_id="str", parameters={"expiry": "2020-02-20 00:00:00", "keyType": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -172,7 +185,6 @@ async def test_gateway_invalidate_debug_credentials(self, resource_group): resource_group_name=resource_group.name, service_name="str", gateway_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -186,7 +198,6 @@ async def test_gateway_list_debug_credentials(self, resource_group): service_name="str", gateway_id="str", parameters={"apiId": "str", "purposes": ["str"], "credentialsExpireAfter": "1 day, 0:00:00"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -200,7 +211,6 @@ async def test_gateway_list_trace(self, resource_group): service_name="str", gateway_id="str", parameters={"traceId": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations.py index c19abc0f52a0..b99e79da2e55 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_global_schema_list_by_service(self, resource_group): - response = self.client.global_schema.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_global_schema_get_entity_tag(self, resource_group): - response = self.client.global_schema.get_entity_tag( + def test_global_schema_get(self, resource_group): + response = self.client.global_schema.get( resource_group_name=resource_group.name, service_name="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_global_schema_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_global_schema_get(self, resource_group): - response = self.client.global_schema.get( + def test_global_schema_get_entity_tag(self, resource_group): + response = self.client.global_schema.get_entity_tag( resource_group_name=resource_group.name, service_name="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,16 +50,25 @@ def test_global_schema_begin_create_or_update(self, resource_group): service_name="str", schema_id="str", parameters={ - "description": "str", - "document": {}, "id": "str", "name": "str", - "provisioningState": "str", - "schemaType": "str", + "properties": { + "schemaType": "str", + "description": "str", + "document": {}, + "provisioningState": "str", + "value": {}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": {}, }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -86,9 +81,20 @@ def test_global_schema_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", schema_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_global_schema_list_by_service(self, resource_group): + response = self.client.global_schema.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations_async.py index c42ef54b9424..d03e48c81342 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_global_schema_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_global_schema_list_by_service(self, resource_group): - response = self.client.global_schema.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_global_schema_get_entity_tag(self, resource_group): - response = await self.client.global_schema.get_entity_tag( + async def test_global_schema_get(self, resource_group): + response = await self.client.global_schema.get( resource_group_name=resource_group.name, service_name="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_global_schema_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_global_schema_get(self, resource_group): - response = await self.client.global_schema.get( + async def test_global_schema_get_entity_tag(self, resource_group): + response = await self.client.global_schema.get_entity_tag( resource_group_name=resource_group.name, service_name="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,16 +52,25 @@ async def test_global_schema_begin_create_or_update(self, resource_group): service_name="str", schema_id="str", parameters={ - "description": "str", - "document": {}, "id": "str", "name": "str", - "provisioningState": "str", - "schemaType": "str", + "properties": { + "schemaType": "str", + "description": "str", + "document": {}, + "provisioningState": "str", + "value": {}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": {}, }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -89,9 +84,20 @@ async def test_global_schema_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", schema_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_global_schema_list_by_service(self, resource_group): + response = self.client.global_schema.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations.py index 2dc519e11473..bbaa92ef7000 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_graph_ql_api_resolver_list_by_api(self, resource_group): - response = self.client.graph_ql_api_resolver.list_by_api( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_graph_ql_api_resolver_get_entity_tag(self, resource_group): - response = self.client.graph_ql_api_resolver.get_entity_tag( + def test_graph_ql_api_resolver_get(self, resource_group): + response = self.client.graph_ql_api_resolver.get( resource_group_name=resource_group.name, service_name="str", api_id="str", resolver_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_graph_ql_api_resolver_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_graph_ql_api_resolver_get(self, resource_group): - response = self.client.graph_ql_api_resolver.get( + def test_graph_ql_api_resolver_get_entity_tag(self, resource_group): + response = self.client.graph_ql_api_resolver.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", resolver_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,14 +53,19 @@ def test_graph_ql_api_resolver_create_or_update(self, resource_group): api_id="str", resolver_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", "name": "str", - "path": "str", + "properties": {"description": "str", "displayName": "str", "path": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -89,9 +79,9 @@ def test_graph_ql_api_resolver_update(self, resource_group): service_name="str", api_id="str", resolver_id="str", - if_match="str", - parameters={"description": "str", "displayName": "str", "path": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"description": "str", "displayName": "str", "path": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -105,9 +95,21 @@ def test_graph_ql_api_resolver_delete(self, resource_group): service_name="str", api_id="str", resolver_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_graph_ql_api_resolver_list_by_api(self, resource_group): + response = self.client.graph_ql_api_resolver.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations_async.py index 3e320753a496..3c890cde9942 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_graph_ql_api_resolver_list_by_api(self, resource_group): - response = self.client.graph_ql_api_resolver.list_by_api( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_graph_ql_api_resolver_get_entity_tag(self, resource_group): - response = await self.client.graph_ql_api_resolver.get_entity_tag( + async def test_graph_ql_api_resolver_get(self, resource_group): + response = await self.client.graph_ql_api_resolver.get( resource_group_name=resource_group.name, service_name="str", api_id="str", resolver_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_graph_ql_api_resolver_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_graph_ql_api_resolver_get(self, resource_group): - response = await self.client.graph_ql_api_resolver.get( + async def test_graph_ql_api_resolver_get_entity_tag(self, resource_group): + response = await self.client.graph_ql_api_resolver.get_entity_tag( resource_group_name=resource_group.name, service_name="str", api_id="str", resolver_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,14 +54,19 @@ async def test_graph_ql_api_resolver_create_or_update(self, resource_group): api_id="str", resolver_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", "name": "str", - "path": "str", + "properties": {"description": "str", "displayName": "str", "path": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -90,9 +80,9 @@ async def test_graph_ql_api_resolver_update(self, resource_group): service_name="str", api_id="str", resolver_id="str", - if_match="str", - parameters={"description": "str", "displayName": "str", "path": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"description": "str", "displayName": "str", "path": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -106,9 +96,21 @@ async def test_graph_ql_api_resolver_delete(self, resource_group): service_name="str", api_id="str", resolver_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_graph_ql_api_resolver_list_by_api(self, resource_group): + response = self.client.graph_ql_api_resolver.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + api_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations.py index b6e61a45b368..9f53c6f2c9ba 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,15 +20,15 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_graph_ql_api_resolver_policy_list_by_resolver(self, resource_group): - response = self.client.graph_ql_api_resolver_policy.list_by_resolver( + def test_graph_ql_api_resolver_policy_get(self, resource_group): + response = self.client.graph_ql_api_resolver_policy.get( resource_group_name=resource_group.name, service_name="str", api_id="str", resolver_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -41,7 +41,6 @@ def test_graph_ql_api_resolver_policy_get_entity_tag(self, resource_group): api_id="str", resolver_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -49,14 +48,27 @@ def test_graph_ql_api_resolver_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_graph_ql_api_resolver_policy_get(self, resource_group): - response = self.client.graph_ql_api_resolver_policy.get( + def test_graph_ql_api_resolver_policy_create_or_update(self, resource_group): + response = self.client.graph_ql_api_resolver_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", api_id="str", resolver_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -64,15 +76,15 @@ def test_graph_ql_api_resolver_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_graph_ql_api_resolver_policy_create_or_update(self, resource_group): - response = self.client.graph_ql_api_resolver_policy.create_or_update( + def test_graph_ql_api_resolver_policy_delete(self, resource_group): + response = self.client.graph_ql_api_resolver_policy.delete( resource_group_name=resource_group.name, service_name="str", api_id="str", resolver_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -80,16 +92,13 @@ def test_graph_ql_api_resolver_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_graph_ql_api_resolver_policy_delete(self, resource_group): - response = self.client.graph_ql_api_resolver_policy.delete( + def test_graph_ql_api_resolver_policy_list_by_resolver(self, resource_group): + response = self.client.graph_ql_api_resolver_policy.list_by_resolver( resource_group_name=resource_group.name, service_name="str", api_id="str", resolver_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations_async.py index 03653fe51072..68fe82d9807f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_graph_ql_api_resolver_policy_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,15 +21,15 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_graph_ql_api_resolver_policy_list_by_resolver(self, resource_group): - response = self.client.graph_ql_api_resolver_policy.list_by_resolver( + async def test_graph_ql_api_resolver_policy_get(self, resource_group): + response = await self.client.graph_ql_api_resolver_policy.get( resource_group_name=resource_group.name, service_name="str", api_id="str", resolver_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -42,7 +42,6 @@ async def test_graph_ql_api_resolver_policy_get_entity_tag(self, resource_group) api_id="str", resolver_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,14 +49,27 @@ async def test_graph_ql_api_resolver_policy_get_entity_tag(self, resource_group) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_graph_ql_api_resolver_policy_get(self, resource_group): - response = await self.client.graph_ql_api_resolver_policy.get( + async def test_graph_ql_api_resolver_policy_create_or_update(self, resource_group): + response = await self.client.graph_ql_api_resolver_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", api_id="str", resolver_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -65,15 +77,15 @@ async def test_graph_ql_api_resolver_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_graph_ql_api_resolver_policy_create_or_update(self, resource_group): - response = await self.client.graph_ql_api_resolver_policy.create_or_update( + async def test_graph_ql_api_resolver_policy_delete(self, resource_group): + response = await self.client.graph_ql_api_resolver_policy.delete( resource_group_name=resource_group.name, service_name="str", api_id="str", resolver_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -81,16 +93,13 @@ async def test_graph_ql_api_resolver_policy_create_or_update(self, resource_grou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_graph_ql_api_resolver_policy_delete(self, resource_group): - response = await self.client.graph_ql_api_resolver_policy.delete( + async def test_graph_ql_api_resolver_policy_list_by_resolver(self, resource_group): + response = self.client.graph_ql_api_resolver_policy.list_by_resolver( resource_group_name=resource_group.name, service_name="str", api_id="str", resolver_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations.py index b7afebb0bde7..44e9e20ea0d1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_group_list_by_service(self, resource_group): - response = self.client.group.list_by_service( + def test_group_get(self, resource_group): + response = self.client.group.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + group_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -37,7 +37,6 @@ def test_group_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", group_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +44,12 @@ def test_group_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_group_get(self, resource_group): - response = self.client.group.get( + def test_group_create_or_update(self, resource_group): + response = self.client.group.create_or_update( resource_group_name=resource_group.name, service_name="str", group_id="str", - api_version="2025-03-01-preview", + parameters={"properties": {"displayName": "str", "description": "str", "externalId": "str", "type": "str"}}, ) # please add some check logic here by yourself @@ -58,13 +57,14 @@ def test_group_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_group_create_or_update(self, resource_group): - response = self.client.group.create_or_update( + def test_group_update(self, resource_group): + response = self.client.group.update( resource_group_name=resource_group.name, service_name="str", group_id="str", - parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"description": "str", "displayName": "str", "externalId": "str", "type": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -72,14 +72,13 @@ def test_group_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_group_update(self, resource_group): - response = self.client.group.update( + def test_group_delete(self, resource_group): + response = self.client.group.delete( resource_group_name=resource_group.name, service_name="str", group_id="str", - if_match="str", - parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -87,14 +86,11 @@ def test_group_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_group_delete(self, resource_group): - response = self.client.group.delete( + def test_group_list_by_service(self, resource_group): + response = self.client.group.list_by_service( resource_group_name=resource_group.name, service_name="str", - group_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations_async.py index 268921615a2a..7f057e65ba64 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_group_list_by_service(self, resource_group): - response = self.client.group.list_by_service( + async def test_group_get(self, resource_group): + response = await self.client.group.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + group_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -38,7 +38,6 @@ async def test_group_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", group_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +45,12 @@ async def test_group_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_group_get(self, resource_group): - response = await self.client.group.get( + async def test_group_create_or_update(self, resource_group): + response = await self.client.group.create_or_update( resource_group_name=resource_group.name, service_name="str", group_id="str", - api_version="2025-03-01-preview", + parameters={"properties": {"displayName": "str", "description": "str", "externalId": "str", "type": "str"}}, ) # please add some check logic here by yourself @@ -59,13 +58,14 @@ async def test_group_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_group_create_or_update(self, resource_group): - response = await self.client.group.create_or_update( + async def test_group_update(self, resource_group): + response = await self.client.group.update( resource_group_name=resource_group.name, service_name="str", group_id="str", - parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"description": "str", "displayName": "str", "externalId": "str", "type": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -73,14 +73,13 @@ async def test_group_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_group_update(self, resource_group): - response = await self.client.group.update( + async def test_group_delete(self, resource_group): + response = await self.client.group.delete( resource_group_name=resource_group.name, service_name="str", group_id="str", - if_match="str", - parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -88,14 +87,11 @@ async def test_group_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_group_delete(self, resource_group): - response = await self.client.group.delete( + async def test_group_list_by_service(self, resource_group): + response = self.client.group.list_by_service( resource_group_name=resource_group.name, service_name="str", - group_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations.py index 528119fbead4..b58b040ffe99 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_group_user_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", group_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +38,6 @@ def test_group_user_check_entity_exists(self, resource_group): service_name="str", group_id="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +51,6 @@ def test_group_user_create(self, resource_group): service_name="str", group_id="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +64,6 @@ def test_group_user_delete(self, resource_group): service_name="str", group_id="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations_async.py index 477428647cf3..1511dbdeda4a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_group_user_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_group_user_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", group_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +39,6 @@ async def test_group_user_check_entity_exists(self, resource_group): service_name="str", group_id="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +52,6 @@ async def test_group_user_create(self, resource_group): service_name="str", group_id="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +65,6 @@ async def test_group_user_delete(self, resource_group): service_name="str", group_id="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations.py index 27d0fe9405be..450f2f790a98 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_identity_provider_list_by_service(self, resource_group): - response = self.client.identity_provider.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_identity_provider_get_entity_tag(self, resource_group): - response = self.client.identity_provider.get_entity_tag( + def test_identity_provider_get(self, resource_group): + response = self.client.identity_provider.get( resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_identity_provider_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_identity_provider_get(self, resource_group): - response = self.client.identity_provider.get( + def test_identity_provider_get_entity_tag(self, resource_group): + response = self.client.identity_provider.get_entity_tag( resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,22 +50,32 @@ def test_identity_provider_create_or_update(self, resource_group): service_name="str", identity_provider_name="str", parameters={ - "allowedTenants": ["str"], - "authority": "str", - "certificateId": "str", - "clientId": "str", - "clientLibrary": "str", - "clientSecret": "str", "id": "str", "name": "str", - "passwordResetPolicyName": "str", - "profileEditingPolicyName": "str", - "signinPolicyName": "str", - "signinTenant": "str", - "signupPolicyName": "str", + "properties": { + "clientId": "str", + "clientSecret": "str", + "allowedTenants": ["str"], + "authority": "str", + "certificateId": "str", + "clientLibrary": "str", + "passwordResetPolicyName": "str", + "profileEditingPolicyName": "str", + "signinPolicyName": "str", + "signinTenant": "str", + "signupPolicyName": "str", + "type": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -92,22 +88,24 @@ def test_identity_provider_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - if_match="str", parameters={ - "allowedTenants": ["str"], - "authority": "str", - "certificateId": "str", - "clientId": "str", - "clientLibrary": "str", - "clientSecret": "str", - "passwordResetPolicyName": "str", - "profileEditingPolicyName": "str", - "signinPolicyName": "str", - "signinTenant": "str", - "signupPolicyName": "str", - "type": "str", + "properties": { + "allowedTenants": ["str"], + "authority": "str", + "certificateId": "str", + "clientId": "str", + "clientLibrary": "str", + "clientSecret": "str", + "passwordResetPolicyName": "str", + "profileEditingPolicyName": "str", + "signinPolicyName": "str", + "signinTenant": "str", + "signupPolicyName": "str", + "type": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -120,13 +118,24 @@ def test_identity_provider_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_identity_provider_list_by_service(self, resource_group): + response = self.client.identity_provider.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_identity_provider_list_secrets(self, resource_group): @@ -134,7 +143,6 @@ def test_identity_provider_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations_async.py index 80d5b808b6eb..25f4f4b88910 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_identity_provider_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_identity_provider_list_by_service(self, resource_group): - response = self.client.identity_provider.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_identity_provider_get_entity_tag(self, resource_group): - response = await self.client.identity_provider.get_entity_tag( + async def test_identity_provider_get(self, resource_group): + response = await self.client.identity_provider.get( resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_identity_provider_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_identity_provider_get(self, resource_group): - response = await self.client.identity_provider.get( + async def test_identity_provider_get_entity_tag(self, resource_group): + response = await self.client.identity_provider.get_entity_tag( resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,22 +51,32 @@ async def test_identity_provider_create_or_update(self, resource_group): service_name="str", identity_provider_name="str", parameters={ - "allowedTenants": ["str"], - "authority": "str", - "certificateId": "str", - "clientId": "str", - "clientLibrary": "str", - "clientSecret": "str", "id": "str", "name": "str", - "passwordResetPolicyName": "str", - "profileEditingPolicyName": "str", - "signinPolicyName": "str", - "signinTenant": "str", - "signupPolicyName": "str", + "properties": { + "clientId": "str", + "clientSecret": "str", + "allowedTenants": ["str"], + "authority": "str", + "certificateId": "str", + "clientLibrary": "str", + "passwordResetPolicyName": "str", + "profileEditingPolicyName": "str", + "signinPolicyName": "str", + "signinTenant": "str", + "signupPolicyName": "str", + "type": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -93,22 +89,24 @@ async def test_identity_provider_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - if_match="str", parameters={ - "allowedTenants": ["str"], - "authority": "str", - "certificateId": "str", - "clientId": "str", - "clientLibrary": "str", - "clientSecret": "str", - "passwordResetPolicyName": "str", - "profileEditingPolicyName": "str", - "signinPolicyName": "str", - "signinTenant": "str", - "signupPolicyName": "str", - "type": "str", + "properties": { + "allowedTenants": ["str"], + "authority": "str", + "certificateId": "str", + "clientId": "str", + "clientLibrary": "str", + "clientSecret": "str", + "passwordResetPolicyName": "str", + "profileEditingPolicyName": "str", + "signinPolicyName": "str", + "signinTenant": "str", + "signupPolicyName": "str", + "type": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -121,13 +119,24 @@ async def test_identity_provider_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_identity_provider_list_by_service(self, resource_group): + response = self.client.identity_provider.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_identity_provider_list_secrets(self, resource_group): @@ -135,7 +144,6 @@ async def test_identity_provider_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", identity_provider_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations.py index 66072e3a6f32..4c6d94d5795f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,25 +20,23 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_issue_list_by_service(self, resource_group): - response = self.client.issue.list_by_service( + def test_issue_get(self, resource_group): + response = self.client.issue.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + issue_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_issue_get(self, resource_group): - response = self.client.issue.get( + def test_issue_list_by_service(self, resource_group): + response = self.client.issue.list_by_service( resource_group_name=resource_group.name, service_name="str", - issue_id="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations_async.py index 5d6783e64910..1c759e1a18dc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_issue_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,25 +21,23 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_issue_list_by_service(self, resource_group): - response = self.client.issue.list_by_service( + async def test_issue_get(self, resource_group): + response = await self.client.issue.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + issue_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_issue_get(self, resource_group): - response = await self.client.issue.get( + async def test_issue_list_by_service(self, resource_group): + response = self.client.issue.list_by_service( resource_group_name=resource_group.name, service_name="str", - issue_id="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations.py index 9b59427ce99f..1cddcbc781b3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_logger_list_by_service(self, resource_group): - response = self.client.logger.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_logger_get_entity_tag(self, resource_group): - response = self.client.logger.get_entity_tag( + def test_logger_get(self, resource_group): + response = self.client.logger.get( resource_group_name=resource_group.name, service_name="str", logger_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_logger_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_logger_get(self, resource_group): - response = self.client.logger.get( + def test_logger_get_entity_tag(self, resource_group): + response = self.client.logger.get_entity_tag( resource_group_name=resource_group.name, service_name="str", logger_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,16 +50,25 @@ def test_logger_create_or_update(self, resource_group): service_name="str", logger_id="str", parameters={ - "credentials": {"str": "str"}, - "description": "str", "id": "str", - "isBuffered": bool, - "loggerType": "str", "name": "str", - "resourceId": "str", + "properties": { + "loggerType": "str", + "credentials": {"str": "str"}, + "description": "str", + "isBuffered": bool, + "resourceId": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -86,9 +81,16 @@ def test_logger_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", logger_id="str", - if_match="str", - parameters={"credentials": {"str": "str"}, "description": "str", "isBuffered": bool, "loggerType": "str"}, - api_version="2025-03-01-preview", + parameters={ + "properties": { + "credentials": {"str": "str"}, + "description": "str", + "isBuffered": bool, + "loggerType": "str", + } + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -101,9 +103,20 @@ def test_logger_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", logger_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_logger_list_by_service(self, resource_group): + response = self.client.logger.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations_async.py index e10085ec90b9..989f609ea056 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_logger_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_logger_list_by_service(self, resource_group): - response = self.client.logger.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_logger_get_entity_tag(self, resource_group): - response = await self.client.logger.get_entity_tag( + async def test_logger_get(self, resource_group): + response = await self.client.logger.get( resource_group_name=resource_group.name, service_name="str", logger_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_logger_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_logger_get(self, resource_group): - response = await self.client.logger.get( + async def test_logger_get_entity_tag(self, resource_group): + response = await self.client.logger.get_entity_tag( resource_group_name=resource_group.name, service_name="str", logger_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,16 +51,25 @@ async def test_logger_create_or_update(self, resource_group): service_name="str", logger_id="str", parameters={ - "credentials": {"str": "str"}, - "description": "str", "id": "str", - "isBuffered": bool, - "loggerType": "str", "name": "str", - "resourceId": "str", + "properties": { + "loggerType": "str", + "credentials": {"str": "str"}, + "description": "str", + "isBuffered": bool, + "resourceId": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -87,9 +82,16 @@ async def test_logger_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", logger_id="str", - if_match="str", - parameters={"credentials": {"str": "str"}, "description": "str", "isBuffered": bool, "loggerType": "str"}, - api_version="2025-03-01-preview", + parameters={ + "properties": { + "credentials": {"str": "str"}, + "description": "str", + "isBuffered": bool, + "loggerType": "str", + } + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -102,9 +104,20 @@ async def test_logger_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", logger_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_logger_list_by_service(self, resource_group): + response = self.client.logger.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations.py index c13cd7320166..5588643bb021 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_named_value_list_by_service(self, resource_group): - response = self.client.named_value.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_named_value_get_entity_tag(self, resource_group): - response = self.client.named_value.get_entity_tag( + def test_named_value_get(self, resource_group): + response = self.client.named_value.get( resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_named_value_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_named_value_get(self, resource_group): - response = self.client.named_value.get( + def test_named_value_get_entity_tag(self, resource_group): + response = self.client.named_value.get_entity_tag( resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,16 +50,25 @@ def test_named_value_begin_create_or_update(self, resource_group): service_name="str", named_value_id="str", parameters={ - "displayName": "str", "id": "str", - "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, "name": "str", - "secret": bool, - "tags": ["str"], + "properties": { + "displayName": "str", + "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, + "secret": bool, + "tags": ["str"], + "value": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": "str", }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -86,15 +81,17 @@ def test_named_value_begin_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - if_match="str", parameters={ - "displayName": "str", - "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, - "secret": bool, - "tags": ["str"], - "value": "str", + "properties": { + "displayName": "str", + "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, + "secret": bool, + "tags": ["str"], + "value": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -107,13 +104,24 @@ def test_named_value_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_named_value_list_by_service(self, resource_group): + response = self.client.named_value.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_named_value_list_value(self, resource_group): @@ -121,7 +129,6 @@ def test_named_value_list_value(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -134,7 +141,6 @@ def test_named_value_begin_refresh_secret(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations_async.py index e5e5f65a4a09..9c9736c7fb26 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_named_value_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_named_value_list_by_service(self, resource_group): - response = self.client.named_value.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_named_value_get_entity_tag(self, resource_group): - response = await self.client.named_value.get_entity_tag( + async def test_named_value_get(self, resource_group): + response = await self.client.named_value.get( resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_named_value_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_named_value_get(self, resource_group): - response = await self.client.named_value.get( + async def test_named_value_get_entity_tag(self, resource_group): + response = await self.client.named_value.get_entity_tag( resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,16 +52,25 @@ async def test_named_value_begin_create_or_update(self, resource_group): service_name="str", named_value_id="str", parameters={ - "displayName": "str", "id": "str", - "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, "name": "str", - "secret": bool, - "tags": ["str"], + "properties": { + "displayName": "str", + "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, + "secret": bool, + "tags": ["str"], + "value": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": "str", }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -90,15 +85,17 @@ async def test_named_value_begin_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - if_match="str", parameters={ - "displayName": "str", - "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, - "secret": bool, - "tags": ["str"], - "value": "str", + "properties": { + "displayName": "str", + "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, + "secret": bool, + "tags": ["str"], + "value": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) ).result() # call '.result()' to poll until service return final result @@ -112,13 +109,24 @@ async def test_named_value_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_named_value_list_by_service(self, resource_group): + response = self.client.named_value.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_named_value_list_value(self, resource_group): @@ -126,7 +134,6 @@ async def test_named_value_list_value(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -140,7 +147,6 @@ async def test_named_value_begin_refresh_secret(self, resource_group): resource_group_name=resource_group.name, service_name="str", named_value_id="str", - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations.py index 4218a8f8d30b..fd166d3a0bf1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_network_status_list_by_service(self, resource_group): response = self.client.network_status.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -37,7 +36,6 @@ def test_network_status_list_by_location(self, resource_group): resource_group_name=resource_group.name, service_name="str", location_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations_async.py index e339bd8db2bb..4fbc54b54317 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_network_status_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_network_status_list_by_service(self, resource_group): response = await self.client.network_status.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -38,7 +37,6 @@ async def test_network_status_list_by_location(self, resource_group): resource_group_name=resource_group.name, service_name="str", location_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations.py index f402d68d49ee..3266d3b32d90 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,23 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_notification_list_by_service(self, resource_group): - response = self.client.notification.list_by_service( + def test_notification_get(self, resource_group): + response = self.client.notification.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + notification_name="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_notification_get(self, resource_group): - response = self.client.notification.get( + def test_notification_create_or_update(self, resource_group): + response = self.client.notification.create_or_update( resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,13 +44,11 @@ def test_notification_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_notification_create_or_update(self, resource_group): - response = self.client.notification.create_or_update( + def test_notification_list_by_service(self, resource_group): + response = self.client.notification.list_by_service( resource_group_name=resource_group.name, service_name="str", - notification_name="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations_async.py index 4ee07f2b3457..358dd5b92e88 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,23 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_notification_list_by_service(self, resource_group): - response = self.client.notification.list_by_service( + async def test_notification_get(self, resource_group): + response = await self.client.notification.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + notification_name="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_notification_get(self, resource_group): - response = await self.client.notification.get( + async def test_notification_create_or_update(self, resource_group): + response = await self.client.notification.create_or_update( resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,13 +45,11 @@ async def test_notification_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_notification_create_or_update(self, resource_group): - response = await self.client.notification.create_or_update( + async def test_notification_list_by_service(self, resource_group): + response = self.client.notification.list_by_service( resource_group_name=resource_group.name, service_name="str", - notification_name="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations.py index e659551b425f..a1fd5e8da69e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_notification_recipient_email_list_by_notification(self, resource_group) resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -39,7 +38,6 @@ def test_notification_recipient_email_check_entity_exists(self, resource_group): service_name="str", notification_name="str", email="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +51,6 @@ def test_notification_recipient_email_create_or_update(self, resource_group): service_name="str", notification_name="str", email="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +64,6 @@ def test_notification_recipient_email_delete(self, resource_group): service_name="str", notification_name="str", email="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations_async.py index 03e8dbff1d23..0e3a4bc685e7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_email_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_notification_recipient_email_list_by_notification(self, resource_ resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -40,7 +39,6 @@ async def test_notification_recipient_email_check_entity_exists(self, resource_g service_name="str", notification_name="str", email="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +52,6 @@ async def test_notification_recipient_email_create_or_update(self, resource_grou service_name="str", notification_name="str", email="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +65,6 @@ async def test_notification_recipient_email_delete(self, resource_group): service_name="str", notification_name="str", email="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations.py index c7cfee1488b5..09c44893299e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_notification_recipient_user_list_by_notification(self, resource_group): resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -39,7 +38,6 @@ def test_notification_recipient_user_check_entity_exists(self, resource_group): service_name="str", notification_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +51,6 @@ def test_notification_recipient_user_create_or_update(self, resource_group): service_name="str", notification_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +64,6 @@ def test_notification_recipient_user_delete(self, resource_group): service_name="str", notification_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations_async.py index 8cbce1dd56fb..f9144250598c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_notification_recipient_user_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_notification_recipient_user_list_by_notification(self, resource_g resource_group_name=resource_group.name, service_name="str", notification_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -40,7 +39,6 @@ async def test_notification_recipient_user_check_entity_exists(self, resource_gr service_name="str", notification_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +52,6 @@ async def test_notification_recipient_user_create_or_update(self, resource_group service_name="str", notification_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +65,6 @@ async def test_notification_recipient_user_delete(self, resource_group): service_name="str", notification_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations.py index 109fe7fa96f9..b2f02b0c6f7b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_open_id_connect_provider_list_by_service(self, resource_group): - response = self.client.open_id_connect_provider.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_open_id_connect_provider_get_entity_tag(self, resource_group): - response = self.client.open_id_connect_provider.get_entity_tag( + def test_open_id_connect_provider_get(self, resource_group): + response = self.client.open_id_connect_provider.get( resource_group_name=resource_group.name, service_name="str", opid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_open_id_connect_provider_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_open_id_connect_provider_get(self, resource_group): - response = self.client.open_id_connect_provider.get( + def test_open_id_connect_provider_get_entity_tag(self, resource_group): + response = self.client.open_id_connect_provider.get_entity_tag( resource_group_name=resource_group.name, service_name="str", opid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,18 +50,27 @@ def test_open_id_connect_provider_create_or_update(self, resource_group): service_name="str", opid="str", parameters={ - "clientId": "str", - "clientSecret": "str", - "description": "str", - "displayName": "str", "id": "str", - "metadataEndpoint": "str", "name": "str", + "properties": { + "clientId": "str", + "displayName": "str", + "metadataEndpoint": "str", + "clientSecret": "str", + "description": "str", + "useInApiDocumentation": bool, + "useInTestConsole": bool, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "useInApiDocumentation": bool, - "useInTestConsole": bool, }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -88,17 +83,19 @@ def test_open_id_connect_provider_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", opid="str", - if_match="str", parameters={ - "clientId": "str", - "clientSecret": "str", - "description": "str", - "displayName": "str", - "metadataEndpoint": "str", - "useInApiDocumentation": bool, - "useInTestConsole": bool, + "properties": { + "clientId": "str", + "clientSecret": "str", + "description": "str", + "displayName": "str", + "metadataEndpoint": "str", + "useInApiDocumentation": bool, + "useInTestConsole": bool, + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -111,13 +108,24 @@ def test_open_id_connect_provider_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", opid="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_open_id_connect_provider_list_by_service(self, resource_group): + response = self.client.open_id_connect_provider.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_open_id_connect_provider_list_secrets(self, resource_group): @@ -125,7 +133,6 @@ def test_open_id_connect_provider_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", opid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations_async.py index 3018bf692f88..6e52c40af51a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_open_id_connect_provider_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_open_id_connect_provider_list_by_service(self, resource_group): - response = self.client.open_id_connect_provider.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_open_id_connect_provider_get_entity_tag(self, resource_group): - response = await self.client.open_id_connect_provider.get_entity_tag( + async def test_open_id_connect_provider_get(self, resource_group): + response = await self.client.open_id_connect_provider.get( resource_group_name=resource_group.name, service_name="str", opid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_open_id_connect_provider_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_open_id_connect_provider_get(self, resource_group): - response = await self.client.open_id_connect_provider.get( + async def test_open_id_connect_provider_get_entity_tag(self, resource_group): + response = await self.client.open_id_connect_provider.get_entity_tag( resource_group_name=resource_group.name, service_name="str", opid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,18 +51,27 @@ async def test_open_id_connect_provider_create_or_update(self, resource_group): service_name="str", opid="str", parameters={ - "clientId": "str", - "clientSecret": "str", - "description": "str", - "displayName": "str", "id": "str", - "metadataEndpoint": "str", "name": "str", + "properties": { + "clientId": "str", + "displayName": "str", + "metadataEndpoint": "str", + "clientSecret": "str", + "description": "str", + "useInApiDocumentation": bool, + "useInTestConsole": bool, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "useInApiDocumentation": bool, - "useInTestConsole": bool, }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -89,17 +84,19 @@ async def test_open_id_connect_provider_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", opid="str", - if_match="str", parameters={ - "clientId": "str", - "clientSecret": "str", - "description": "str", - "displayName": "str", - "metadataEndpoint": "str", - "useInApiDocumentation": bool, - "useInTestConsole": bool, + "properties": { + "clientId": "str", + "clientSecret": "str", + "description": "str", + "displayName": "str", + "metadataEndpoint": "str", + "useInApiDocumentation": bool, + "useInTestConsole": bool, + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -112,13 +109,24 @@ async def test_open_id_connect_provider_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", opid="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_open_id_connect_provider_list_by_service(self, resource_group): + response = self.client.open_id_connect_provider.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_open_id_connect_provider_list_secrets(self, resource_group): @@ -126,7 +134,6 @@ async def test_open_id_connect_provider_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", opid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations.py index 1b0badddf843..8b4c0a4ff3c7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_operation_list_by_tags(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations_async.py index 2e78b599f605..c77fe7c2ffac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_operation_list_by_tags(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations.py index 877e73f6ad3d..b563b98e790b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_operation_status_get(self, resource_group): response = self.client.operation_status.get( location="str", operation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations_async.py index 326092232846..b33242dd941f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operation_status_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_operation_status_get(self, resource_group): response = await self.client.operation_status.get( location="str", operation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations.py index cb88f679f5b5..483365b1ee65 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_operations_results_get(self, resource_group): response = self.client.operations_results.get( location="str", operation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations_async.py index 13d245b77ddb..cf1d018349ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_operations_results_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_operations_results_get(self, resource_group): response = await self.client.operations_results.get( location="str", operation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations.py index 2988c30e67b3..e379341dadf2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_outbound_network_dependencies_endpoints_list_by_service(self, resource_ response = self.client.outbound_network_dependencies_endpoints.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations_async.py index 5cba0905f60f..345eb789aa3c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_outbound_network_dependencies_endpoints_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_outbound_network_dependencies_endpoints_list_by_service(self, res response = await self.client.outbound_network_dependencies_endpoints.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations.py index 65c352e1cc20..2f980eb3c335 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_policy_description_list_by_service(self, resource_group): response = self.client.policy_description.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations_async.py index 2912ffaecbcf..68b5aa4ae7ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_description_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_policy_description_list_by_service(self, resource_group): response = await self.client.policy_description.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations.py index 99c23ec9559e..7612a48e5bcb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_policy_fragment_list_by_service(self, resource_group): - response = self.client.policy_fragment.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_policy_fragment_get_entity_tag(self, resource_group): - response = self.client.policy_fragment.get_entity_tag( + def test_policy_fragment_get(self, resource_group): + response = self.client.policy_fragment.get( resource_group_name=resource_group.name, service_name="str", id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_policy_fragment_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_policy_fragment_get(self, resource_group): - response = self.client.policy_fragment.get( + def test_policy_fragment_get_entity_tag(self, resource_group): + response = self.client.policy_fragment.get_entity_tag( resource_group_name=resource_group.name, service_name="str", id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,15 +50,19 @@ def test_policy_fragment_begin_create_or_update(self, resource_group): service_name="str", id="str", parameters={ - "description": "str", - "format": "str", "id": "str", "name": "str", - "provisioningState": "str", + "properties": {"value": "str", "description": "str", "format": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": "str", }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -85,13 +75,24 @@ def test_policy_fragment_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_policy_fragment_list_by_service(self, resource_group): + response = self.client.policy_fragment.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_policy_fragment_list_references(self, resource_group): @@ -99,7 +100,6 @@ def test_policy_fragment_list_references(self, resource_group): resource_group_name=resource_group.name, service_name="str", id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations_async.py index 7da555cc644a..c5e7b5df3703 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_fragment_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_policy_fragment_list_by_service(self, resource_group): - response = self.client.policy_fragment.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_policy_fragment_get_entity_tag(self, resource_group): - response = await self.client.policy_fragment.get_entity_tag( + async def test_policy_fragment_get(self, resource_group): + response = await self.client.policy_fragment.get( resource_group_name=resource_group.name, service_name="str", id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_policy_fragment_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_policy_fragment_get(self, resource_group): - response = await self.client.policy_fragment.get( + async def test_policy_fragment_get_entity_tag(self, resource_group): + response = await self.client.policy_fragment.get_entity_tag( resource_group_name=resource_group.name, service_name="str", id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,15 +52,19 @@ async def test_policy_fragment_begin_create_or_update(self, resource_group): service_name="str", id="str", parameters={ - "description": "str", - "format": "str", "id": "str", "name": "str", - "provisioningState": "str", + "properties": {"value": "str", "description": "str", "format": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": "str", }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -88,13 +78,24 @@ async def test_policy_fragment_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_policy_fragment_list_by_service(self, resource_group): + response = self.client.policy_fragment.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_policy_fragment_list_references(self, resource_group): @@ -102,7 +103,6 @@ async def test_policy_fragment_list_references(self, resource_group): resource_group_name=resource_group.name, service_name="str", id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations.py index 7bbab52e8f57..6fafb9a84074 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_policy_list_by_service(self, resource_group): - response = self.client.policy.list_by_service( + def test_policy_get(self, resource_group): + response = self.client.policy.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + policy_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -37,7 +37,6 @@ def test_policy_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +44,25 @@ def test_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_policy_get(self, resource_group): - response = self.client.policy.get( + def test_policy_create_or_update(self, resource_group): + response = self.client.policy.create_or_update( resource_group_name=resource_group.name, service_name="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -58,13 +70,13 @@ def test_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_policy_create_or_update(self, resource_group): - response = self.client.policy.create_or_update( + def test_policy_delete(self, resource_group): + response = self.client.policy.delete( resource_group_name=resource_group.name, service_name="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -72,14 +84,11 @@ def test_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_policy_delete(self, resource_group): - response = self.client.policy.delete( + def test_policy_list_by_service(self, resource_group): + response = self.client.policy.list_by_service( resource_group_name=resource_group.name, service_name="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations_async.py index 990c8d797b5e..90fccc7cd8bc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_policy_list_by_service(self, resource_group): - response = self.client.policy.list_by_service( + async def test_policy_get(self, resource_group): + response = await self.client.policy.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + policy_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -38,7 +38,6 @@ async def test_policy_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +45,25 @@ async def test_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_policy_get(self, resource_group): - response = await self.client.policy.get( + async def test_policy_create_or_update(self, resource_group): + response = await self.client.policy.create_or_update( resource_group_name=resource_group.name, service_name="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -59,13 +71,13 @@ async def test_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_policy_create_or_update(self, resource_group): - response = await self.client.policy.create_or_update( + async def test_policy_delete(self, resource_group): + response = await self.client.policy.delete( resource_group_name=resource_group.name, service_name="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -73,14 +85,11 @@ async def test_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_policy_delete(self, resource_group): - response = await self.client.policy.delete( + async def test_policy_list_by_service(self, resource_group): + response = self.client.policy.list_by_service( resource_group_name=resource_group.name, service_name="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations.py index 0514833caee4..e1569eabf289 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_policy_restriction_list_by_service(self, resource_group): - response = self.client.policy_restriction.list_by_service( + def test_policy_restriction_get(self, resource_group): + response = self.client.policy_restriction.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + policy_restriction_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -37,7 +37,6 @@ def test_policy_restriction_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +44,25 @@ def test_policy_restriction_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_policy_restriction_get(self, resource_group): - response = self.client.policy_restriction.get( + def test_policy_restriction_create_or_update(self, resource_group): + response = self.client.policy_restriction.create_or_update( resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"requireBase": "str", "scope": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -58,13 +70,14 @@ def test_policy_restriction_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_policy_restriction_create_or_update(self, resource_group): - response = self.client.policy_restriction.create_or_update( + def test_policy_restriction_update(self, resource_group): + response = self.client.policy_restriction.update( resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - parameters={"id": "str", "name": "str", "requireBase": "false", "scope": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"requireBase": "str", "scope": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -72,14 +85,11 @@ def test_policy_restriction_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_policy_restriction_update(self, resource_group): - response = self.client.policy_restriction.update( + def test_policy_restriction_delete(self, resource_group): + response = self.client.policy_restriction.delete( resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - if_match="str", - parameters={"requireBase": "false", "scope": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -87,13 +97,11 @@ def test_policy_restriction_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_policy_restriction_delete(self, resource_group): - response = self.client.policy_restriction.delete( + def test_policy_restriction_list_by_service(self, resource_group): + response = self.client.policy_restriction.list_by_service( resource_group_name=resource_group.name, service_name="str", - policy_restriction_id="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations_async.py index bea5266cc71a..b89a42ac7905 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_policy_restriction_list_by_service(self, resource_group): - response = self.client.policy_restriction.list_by_service( + async def test_policy_restriction_get(self, resource_group): + response = await self.client.policy_restriction.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + policy_restriction_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -38,7 +38,6 @@ async def test_policy_restriction_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +45,25 @@ async def test_policy_restriction_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_policy_restriction_get(self, resource_group): - response = await self.client.policy_restriction.get( + async def test_policy_restriction_create_or_update(self, resource_group): + response = await self.client.policy_restriction.create_or_update( resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"requireBase": "str", "scope": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -59,13 +71,14 @@ async def test_policy_restriction_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_policy_restriction_create_or_update(self, resource_group): - response = await self.client.policy_restriction.create_or_update( + async def test_policy_restriction_update(self, resource_group): + response = await self.client.policy_restriction.update( resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - parameters={"id": "str", "name": "str", "requireBase": "false", "scope": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"requireBase": "str", "scope": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -73,14 +86,11 @@ async def test_policy_restriction_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_policy_restriction_update(self, resource_group): - response = await self.client.policy_restriction.update( + async def test_policy_restriction_delete(self, resource_group): + response = await self.client.policy_restriction.delete( resource_group_name=resource_group.name, service_name="str", policy_restriction_id="str", - if_match="str", - parameters={"requireBase": "false", "scope": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -88,13 +98,11 @@ async def test_policy_restriction_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_policy_restriction_delete(self, resource_group): - response = await self.client.policy_restriction.delete( + async def test_policy_restriction_list_by_service(self, resource_group): + response = self.client.policy_restriction.list_by_service( resource_group_name=resource_group.name, service_name="str", - policy_restriction_id="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations.py index 05af1d56f832..90e0b369728e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_policy_restriction_validations_begin_by_service(self, resource_group): response = self.client.policy_restriction_validations.begin_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations_async.py index 8451ba53b068..4ae534e01c9b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_policy_restriction_validations_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_policy_restriction_validations_begin_by_service(self, resource_gr await self.client.policy_restriction_validations.begin_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations.py index f203ae303676..264e02058e70 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_portal_config_list_by_service(self, resource_group): - response = self.client.portal_config.list_by_service( + def test_portal_config_get(self, resource_group): + response = self.client.portal_config.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + portal_config_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -37,7 +37,6 @@ def test_portal_config_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_config_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +44,39 @@ def test_portal_config_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_portal_config_get(self, resource_group): - response = self.client.portal_config.get( + def test_portal_config_create_or_update(self, resource_group): + response = self.client.portal_config.create_or_update( resource_group_name=resource_group.name, service_name="str", portal_config_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": { + "cors": {"allowedOrigins": ["str"]}, + "csp": {"allowedSources": ["str"], "mode": "str", "reportUri": ["str"]}, + "delegation": { + "delegateRegistration": bool, + "delegateSubscription": bool, + "delegationUrl": "str", + "validationKey": "str", + }, + "enableBasicAuth": bool, + "signin": {"require": bool}, + "signup": {"termsOfService": {"requireConsent": bool, "text": "str"}}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -63,24 +89,34 @@ def test_portal_config_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_config_id="str", - if_match="str", parameters={ - "cors": {"allowedOrigins": ["str"]}, - "csp": {"allowedSources": ["str"], "mode": "disabled", "reportUri": ["str"]}, - "delegation": { - "delegateRegistration": False, - "delegateSubscription": False, - "delegationUrl": "str", - "validationKey": "str", - }, - "enableBasicAuth": True, "id": "str", "name": "str", - "signin": {"require": False}, - "signup": {"termsOfService": {"requireConsent": False, "text": "str"}}, + "properties": { + "cors": {"allowedOrigins": ["str"]}, + "csp": {"allowedSources": ["str"], "mode": "str", "reportUri": ["str"]}, + "delegation": { + "delegateRegistration": bool, + "delegateSubscription": bool, + "delegationUrl": "str", + "validationKey": "str", + }, + "enableBasicAuth": bool, + "signin": {"require": bool}, + "signup": {"termsOfService": {"requireConsent": bool, "text": "str"}}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -88,30 +124,11 @@ def test_portal_config_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_portal_config_create_or_update(self, resource_group): - response = self.client.portal_config.create_or_update( + def test_portal_config_list_by_service(self, resource_group): + response = self.client.portal_config.list_by_service( resource_group_name=resource_group.name, service_name="str", - portal_config_id="str", - if_match="str", - parameters={ - "cors": {"allowedOrigins": ["str"]}, - "csp": {"allowedSources": ["str"], "mode": "disabled", "reportUri": ["str"]}, - "delegation": { - "delegateRegistration": False, - "delegateSubscription": False, - "delegationUrl": "str", - "validationKey": "str", - }, - "enableBasicAuth": True, - "id": "str", - "name": "str", - "signin": {"require": False}, - "signup": {"termsOfService": {"requireConsent": False, "text": "str"}}, - "type": "str", - }, - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations_async.py index 955e45db278c..4e03bc4584bb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_config_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_portal_config_list_by_service(self, resource_group): - response = self.client.portal_config.list_by_service( + async def test_portal_config_get(self, resource_group): + response = await self.client.portal_config.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + portal_config_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -38,7 +38,6 @@ async def test_portal_config_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_config_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +45,39 @@ async def test_portal_config_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_portal_config_get(self, resource_group): - response = await self.client.portal_config.get( + async def test_portal_config_create_or_update(self, resource_group): + response = await self.client.portal_config.create_or_update( resource_group_name=resource_group.name, service_name="str", portal_config_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": { + "cors": {"allowedOrigins": ["str"]}, + "csp": {"allowedSources": ["str"], "mode": "str", "reportUri": ["str"]}, + "delegation": { + "delegateRegistration": bool, + "delegateSubscription": bool, + "delegationUrl": "str", + "validationKey": "str", + }, + "enableBasicAuth": bool, + "signin": {"require": bool}, + "signup": {"termsOfService": {"requireConsent": bool, "text": "str"}}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -64,24 +90,34 @@ async def test_portal_config_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_config_id="str", - if_match="str", parameters={ - "cors": {"allowedOrigins": ["str"]}, - "csp": {"allowedSources": ["str"], "mode": "disabled", "reportUri": ["str"]}, - "delegation": { - "delegateRegistration": False, - "delegateSubscription": False, - "delegationUrl": "str", - "validationKey": "str", - }, - "enableBasicAuth": True, "id": "str", "name": "str", - "signin": {"require": False}, - "signup": {"termsOfService": {"requireConsent": False, "text": "str"}}, + "properties": { + "cors": {"allowedOrigins": ["str"]}, + "csp": {"allowedSources": ["str"], "mode": "str", "reportUri": ["str"]}, + "delegation": { + "delegateRegistration": bool, + "delegateSubscription": bool, + "delegationUrl": "str", + "validationKey": "str", + }, + "enableBasicAuth": bool, + "signin": {"require": bool}, + "signup": {"termsOfService": {"requireConsent": bool, "text": "str"}}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -89,30 +125,11 @@ async def test_portal_config_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_portal_config_create_or_update(self, resource_group): - response = await self.client.portal_config.create_or_update( + async def test_portal_config_list_by_service(self, resource_group): + response = self.client.portal_config.list_by_service( resource_group_name=resource_group.name, service_name="str", - portal_config_id="str", - if_match="str", - parameters={ - "cors": {"allowedOrigins": ["str"]}, - "csp": {"allowedSources": ["str"], "mode": "disabled", "reportUri": ["str"]}, - "delegation": { - "delegateRegistration": False, - "delegateSubscription": False, - "delegationUrl": "str", - "validationKey": "str", - }, - "enableBasicAuth": True, - "id": "str", - "name": "str", - "signin": {"require": False}, - "signup": {"termsOfService": {"requireConsent": False, "text": "str"}}, - "type": "str", - }, - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations.py index 9f2184833def..2219dff04581 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_portal_revision_list_by_service(self, resource_group): - response = self.client.portal_revision.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_portal_revision_get_entity_tag(self, resource_group): - response = self.client.portal_revision.get_entity_tag( + def test_portal_revision_get(self, resource_group): + response = self.client.portal_revision.get( resource_group_name=resource_group.name, service_name="str", portal_revision_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_portal_revision_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_portal_revision_get(self, resource_group): - response = self.client.portal_revision.get( + def test_portal_revision_get_entity_tag(self, resource_group): + response = self.client.portal_revision.get_entity_tag( resource_group_name=resource_group.name, service_name="str", portal_revision_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,18 +50,27 @@ def test_portal_revision_begin_create_or_update(self, resource_group): service_name="str", portal_revision_id="str", parameters={ - "createdDateTime": "2020-02-20 00:00:00", - "description": "str", "id": "str", - "isCurrent": bool, "name": "str", - "provisioningState": "str", - "status": "str", - "statusDetails": "str", + "properties": { + "createdDateTime": "2020-02-20 00:00:00", + "description": "str", + "isCurrent": bool, + "provisioningState": "str", + "status": "str", + "statusDetails": "str", + "updatedDateTime": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -88,21 +83,42 @@ def test_portal_revision_begin_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_revision_id="str", - if_match="str", parameters={ - "createdDateTime": "2020-02-20 00:00:00", - "description": "str", "id": "str", - "isCurrent": bool, "name": "str", - "provisioningState": "str", - "status": "str", - "statusDetails": "str", + "properties": { + "createdDateTime": "2020-02-20 00:00:00", + "description": "str", + "isCurrent": bool, + "provisioningState": "str", + "status": "str", + "statusDetails": "str", + "updatedDateTime": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_portal_revision_list_by_service(self, resource_group): + response = self.client.portal_revision.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations_async.py index 650e93217ea2..a1eabdd812dd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_revision_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_portal_revision_list_by_service(self, resource_group): - response = self.client.portal_revision.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_portal_revision_get_entity_tag(self, resource_group): - response = await self.client.portal_revision.get_entity_tag( + async def test_portal_revision_get(self, resource_group): + response = await self.client.portal_revision.get( resource_group_name=resource_group.name, service_name="str", portal_revision_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_portal_revision_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_portal_revision_get(self, resource_group): - response = await self.client.portal_revision.get( + async def test_portal_revision_get_entity_tag(self, resource_group): + response = await self.client.portal_revision.get_entity_tag( resource_group_name=resource_group.name, service_name="str", portal_revision_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,18 +52,27 @@ async def test_portal_revision_begin_create_or_update(self, resource_group): service_name="str", portal_revision_id="str", parameters={ - "createdDateTime": "2020-02-20 00:00:00", - "description": "str", "id": "str", - "isCurrent": bool, "name": "str", - "provisioningState": "str", - "status": "str", - "statusDetails": "str", + "properties": { + "createdDateTime": "2020-02-20 00:00:00", + "description": "str", + "isCurrent": bool, + "provisioningState": "str", + "status": "str", + "statusDetails": "str", + "updatedDateTime": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -92,22 +87,43 @@ async def test_portal_revision_begin_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", portal_revision_id="str", - if_match="str", parameters={ - "createdDateTime": "2020-02-20 00:00:00", - "description": "str", "id": "str", - "isCurrent": bool, "name": "str", - "provisioningState": "str", - "status": "str", - "statusDetails": "str", + "properties": { + "createdDateTime": "2020-02-20 00:00:00", + "description": "str", + "isCurrent": bool, + "provisioningState": "str", + "status": "str", + "statusDetails": "str", + "updatedDateTime": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_portal_revision_list_by_service(self, resource_group): + response = self.client.portal_revision.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations.py index 36eaae3141a2..42a6cd6ffc29 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_portal_settings_list_by_service(self, resource_group): response = self.client.portal_settings.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations_async.py index 32915237749b..e8d9a38f3042 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_portal_settings_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_portal_settings_list_by_service(self, resource_group): response = await self.client.portal_settings.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations.py index 4a8f612abd98..3b773906cd71 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestApiManagementPrivateEndpointConnectionOperations(AzureMgmtRecordedTest def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_private_endpoint_connection_list_by_service(self, resource_group): - response = self.client.private_endpoint_connection.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_private_endpoint_connection_get_by_name(self, resource_group): @@ -37,7 +25,6 @@ def test_private_endpoint_connection_get_by_name(self, resource_group): resource_group_name=resource_group.name, service_name="str", private_endpoint_connection_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -60,7 +47,6 @@ def test_private_endpoint_connection_begin_create_or_update(self, resource_group } }, }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -73,7 +59,6 @@ def test_private_endpoint_connection_begin_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", private_endpoint_connection_name="str", - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -81,13 +66,12 @@ def test_private_endpoint_connection_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_private_endpoint_connection_list_private_link_resources(self, resource_group): - response = self.client.private_endpoint_connection.list_private_link_resources( + def test_private_endpoint_connection_list_by_service(self, resource_group): + response = self.client.private_endpoint_connection.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... @@ -98,7 +82,17 @@ def test_private_endpoint_connection_get_private_link_resource(self, resource_gr resource_group_name=resource_group.name, service_name="str", private_link_sub_resource_name="str", - api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_private_endpoint_connection_list_private_link_resources(self, resource_group): + response = self.client.private_endpoint_connection.list_private_link_resources( + resource_group_name=resource_group.name, + service_name="str", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations_async.py index 7ac38d3d8942..473c7b605153 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_private_endpoint_connection_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestApiManagementPrivateEndpointConnectionOperationsAsync(AzureMgmtRecorde def setup_method(self, method): self.client = self.create_mgmt_client(ApiManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_private_endpoint_connection_list_by_service(self, resource_group): - response = self.client.private_endpoint_connection.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_private_endpoint_connection_get_by_name(self, resource_group): @@ -38,7 +26,6 @@ async def test_private_endpoint_connection_get_by_name(self, resource_group): resource_group_name=resource_group.name, service_name="str", private_endpoint_connection_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -62,7 +49,6 @@ async def test_private_endpoint_connection_begin_create_or_update(self, resource } }, }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -77,7 +63,6 @@ async def test_private_endpoint_connection_begin_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", private_endpoint_connection_name="str", - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -86,13 +71,12 @@ async def test_private_endpoint_connection_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_private_endpoint_connection_list_private_link_resources(self, resource_group): - response = await self.client.private_endpoint_connection.list_private_link_resources( + async def test_private_endpoint_connection_list_by_service(self, resource_group): + response = self.client.private_endpoint_connection.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... @@ -103,7 +87,17 @@ async def test_private_endpoint_connection_get_private_link_resource(self, resou resource_group_name=resource_group.name, service_name="str", private_link_sub_resource_name="str", - api_version="2025-03-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_private_endpoint_connection_list_private_link_resources(self, resource_group): + response = await self.client.private_endpoint_connection.list_private_link_resources( + resource_group_name=resource_group.name, + service_name="str", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations.py index 82d2f4f665e4..c1895f469c67 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,39 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_api_link_list_by_product(self, resource_group): - response = self.client.product_api_link.list_by_product( + def test_product_api_link_get(self, resource_group): + response = self.client.product_api_link.get( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", + api_link_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_api_link_get(self, resource_group): - response = self.client.product_api_link.get( + def test_product_api_link_create_or_update(self, resource_group): + response = self.client.product_api_link.create_or_update( resource_group_name=resource_group.name, service_name="str", product_id="str", api_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"apiId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -47,14 +60,12 @@ def test_product_api_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_api_link_create_or_update(self, resource_group): - response = self.client.product_api_link.create_or_update( + def test_product_api_link_delete(self, resource_group): + response = self.client.product_api_link.delete( resource_group_name=resource_group.name, service_name="str", product_id="str", api_link_id="str", - parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -62,14 +73,12 @@ def test_product_api_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_api_link_delete(self, resource_group): - response = self.client.product_api_link.delete( + def test_product_api_link_list_by_product(self, resource_group): + response = self.client.product_api_link.list_by_product( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations_async.py index 09cc3bf41e0f..94ba561a1d95 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_link_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,39 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_api_link_list_by_product(self, resource_group): - response = self.client.product_api_link.list_by_product( + async def test_product_api_link_get(self, resource_group): + response = await self.client.product_api_link.get( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", + api_link_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_api_link_get(self, resource_group): - response = await self.client.product_api_link.get( + async def test_product_api_link_create_or_update(self, resource_group): + response = await self.client.product_api_link.create_or_update( resource_group_name=resource_group.name, service_name="str", product_id="str", api_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"apiId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -48,14 +61,12 @@ async def test_product_api_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_api_link_create_or_update(self, resource_group): - response = await self.client.product_api_link.create_or_update( + async def test_product_api_link_delete(self, resource_group): + response = await self.client.product_api_link.delete( resource_group_name=resource_group.name, service_name="str", product_id="str", api_link_id="str", - parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -63,14 +74,12 @@ async def test_product_api_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_api_link_delete(self, resource_group): - response = await self.client.product_api_link.delete( + async def test_product_api_link_list_by_product(self, resource_group): + response = self.client.product_api_link.list_by_product( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations.py index 0828a55acbbc..e1bc6ccc21df 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_product_api_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +38,6 @@ def test_product_api_check_entity_exists(self, resource_group): service_name="str", product_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +51,6 @@ def test_product_api_create_or_update(self, resource_group): service_name="str", product_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +64,6 @@ def test_product_api_delete(self, resource_group): service_name="str", product_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations_async.py index 88a43d1beb2a..0bdbf7ea8531 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_api_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_product_api_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +39,6 @@ async def test_product_api_check_entity_exists(self, resource_group): service_name="str", product_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +52,6 @@ async def test_product_api_create_or_update(self, resource_group): service_name="str", product_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +65,6 @@ async def test_product_api_delete(self, resource_group): service_name="str", product_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations.py index 5a2505d0ff07..db8031e493fe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,39 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_group_link_list_by_product(self, resource_group): - response = self.client.product_group_link.list_by_product( + def test_product_group_link_get(self, resource_group): + response = self.client.product_group_link.get( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", + group_link_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_group_link_get(self, resource_group): - response = self.client.product_group_link.get( + def test_product_group_link_create_or_update(self, resource_group): + response = self.client.product_group_link.create_or_update( resource_group_name=resource_group.name, service_name="str", product_id="str", group_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"groupId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -47,14 +60,12 @@ def test_product_group_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_group_link_create_or_update(self, resource_group): - response = self.client.product_group_link.create_or_update( + def test_product_group_link_delete(self, resource_group): + response = self.client.product_group_link.delete( resource_group_name=resource_group.name, service_name="str", product_id="str", group_link_id="str", - parameters={"groupId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -62,14 +73,12 @@ def test_product_group_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_group_link_delete(self, resource_group): - response = self.client.product_group_link.delete( + def test_product_group_link_list_by_product(self, resource_group): + response = self.client.product_group_link.list_by_product( resource_group_name=resource_group.name, service_name="str", product_id="str", - group_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations_async.py index 13c7709b18a0..eaed62e3a08b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_link_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,39 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_group_link_list_by_product(self, resource_group): - response = self.client.product_group_link.list_by_product( + async def test_product_group_link_get(self, resource_group): + response = await self.client.product_group_link.get( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", + group_link_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_group_link_get(self, resource_group): - response = await self.client.product_group_link.get( + async def test_product_group_link_create_or_update(self, resource_group): + response = await self.client.product_group_link.create_or_update( resource_group_name=resource_group.name, service_name="str", product_id="str", group_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"groupId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -48,14 +61,12 @@ async def test_product_group_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_group_link_create_or_update(self, resource_group): - response = await self.client.product_group_link.create_or_update( + async def test_product_group_link_delete(self, resource_group): + response = await self.client.product_group_link.delete( resource_group_name=resource_group.name, service_name="str", product_id="str", group_link_id="str", - parameters={"groupId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -63,14 +74,12 @@ async def test_product_group_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_group_link_delete(self, resource_group): - response = await self.client.product_group_link.delete( + async def test_product_group_link_list_by_product(self, resource_group): + response = self.client.product_group_link.list_by_product( resource_group_name=resource_group.name, service_name="str", product_id="str", - group_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations.py index dfdcafc032fc..4521e07a4e6b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_product_group_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +38,6 @@ def test_product_group_check_entity_exists(self, resource_group): service_name="str", product_id="str", group_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -53,7 +51,6 @@ def test_product_group_create_or_update(self, resource_group): service_name="str", product_id="str", group_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -67,7 +64,6 @@ def test_product_group_delete(self, resource_group): service_name="str", product_id="str", group_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations_async.py index 7226cdd1d8c2..6d0848463b77 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_group_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_product_group_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +39,6 @@ async def test_product_group_check_entity_exists(self, resource_group): service_name="str", product_id="str", group_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -54,7 +52,6 @@ async def test_product_group_create_or_update(self, resource_group): service_name="str", product_id="str", group_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,7 +65,6 @@ async def test_product_group_delete(self, resource_group): service_name="str", product_id="str", group_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations.py index f7be3d8fd392..b51431542903 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,11 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_list_by_service(self, resource_group): - response = self.client.product.list_by_service( + def test_product_list_by_tags(self, resource_group): + response = self.client.product.list_by_tags( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +31,11 @@ def test_product_list_by_service(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_get_entity_tag(self, resource_group): - response = self.client.product.get_entity_tag( + def test_product_get(self, resource_group): + response = self.client.product.get( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +43,11 @@ def test_product_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_get(self, resource_group): - response = self.client.product.get( + def test_product_get_entity_tag(self, resource_group): + response = self.client.product.get_entity_tag( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,20 +61,29 @@ def test_product_create_or_update(self, resource_group): service_name="str", product_id="str", parameters={ - "application": {"entra": {"applicationId": "str", "audience": "str"}}, - "approvalRequired": bool, - "authenticationType": ["str"], - "description": "str", - "displayName": "str", "id": "str", "name": "str", - "state": "str", - "subscriptionRequired": bool, - "subscriptionsLimit": 0, - "terms": "str", + "properties": { + "displayName": "str", + "application": {"entra": {"applicationId": "str", "audience": "str"}}, + "approvalRequired": bool, + "authenticationType": ["str"], + "description": "str", + "state": "str", + "subscriptionRequired": bool, + "subscriptionsLimit": 0, + "terms": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -90,19 +96,21 @@ def test_product_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - if_match="str", parameters={ - "application": {"entra": {"applicationId": "str", "audience": "str"}}, - "approvalRequired": bool, - "authenticationType": ["str"], - "description": "str", - "displayName": "str", - "state": "str", - "subscriptionRequired": bool, - "subscriptionsLimit": 0, - "terms": "str", + "properties": { + "application": {"entra": {"applicationId": "str", "audience": "str"}}, + "approvalRequired": bool, + "authenticationType": ["str"], + "description": "str", + "displayName": "str", + "state": "str", + "subscriptionRequired": bool, + "subscriptionsLimit": 0, + "terms": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -115,8 +123,8 @@ def test_product_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -124,11 +132,10 @@ def test_product_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_list_by_tags(self, resource_group): - response = self.client.product.list_by_tags( + def test_product_list_by_service(self, resource_group): + response = self.client.product.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations_async.py index 2deb1d06ec0d..941227839c5f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,11 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_list_by_service(self, resource_group): - response = self.client.product.list_by_service( + async def test_product_list_by_tags(self, resource_group): + response = self.client.product.list_by_tags( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,12 +32,11 @@ async def test_product_list_by_service(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_get_entity_tag(self, resource_group): - response = await self.client.product.get_entity_tag( + async def test_product_get(self, resource_group): + response = await self.client.product.get( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +44,11 @@ async def test_product_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_get(self, resource_group): - response = await self.client.product.get( + async def test_product_get_entity_tag(self, resource_group): + response = await self.client.product.get_entity_tag( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,20 +62,29 @@ async def test_product_create_or_update(self, resource_group): service_name="str", product_id="str", parameters={ - "application": {"entra": {"applicationId": "str", "audience": "str"}}, - "approvalRequired": bool, - "authenticationType": ["str"], - "description": "str", - "displayName": "str", "id": "str", "name": "str", - "state": "str", - "subscriptionRequired": bool, - "subscriptionsLimit": 0, - "terms": "str", + "properties": { + "displayName": "str", + "application": {"entra": {"applicationId": "str", "audience": "str"}}, + "approvalRequired": bool, + "authenticationType": ["str"], + "description": "str", + "state": "str", + "subscriptionRequired": bool, + "subscriptionsLimit": 0, + "terms": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -91,19 +97,21 @@ async def test_product_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - if_match="str", parameters={ - "application": {"entra": {"applicationId": "str", "audience": "str"}}, - "approvalRequired": bool, - "authenticationType": ["str"], - "description": "str", - "displayName": "str", - "state": "str", - "subscriptionRequired": bool, - "subscriptionsLimit": 0, - "terms": "str", + "properties": { + "application": {"entra": {"applicationId": "str", "audience": "str"}}, + "approvalRequired": bool, + "authenticationType": ["str"], + "description": "str", + "displayName": "str", + "state": "str", + "subscriptionRequired": bool, + "subscriptionsLimit": 0, + "terms": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -116,8 +124,8 @@ async def test_product_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -125,11 +133,10 @@ async def test_product_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_list_by_tags(self, resource_group): - response = self.client.product.list_by_tags( + async def test_product_list_by_service(self, resource_group): + response = self.client.product.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations.py index 24c0560667ab..4a11ea84a519 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,14 +20,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_policy_list_by_product(self, resource_group): - response = self.client.product_policy.list_by_product( + def test_product_policy_get(self, resource_group): + response = self.client.product_policy.get( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -39,7 +39,6 @@ def test_product_policy_get_entity_tag(self, resource_group): service_name="str", product_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +46,26 @@ def test_product_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_policy_get(self, resource_group): - response = self.client.product_policy.get( + def test_product_policy_create_or_update(self, resource_group): + response = self.client.product_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", product_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -61,14 +73,14 @@ def test_product_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_policy_create_or_update(self, resource_group): - response = self.client.product_policy.create_or_update( + def test_product_policy_delete(self, resource_group): + response = self.client.product_policy.delete( resource_group_name=resource_group.name, service_name="str", product_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -76,15 +88,12 @@ def test_product_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_policy_delete(self, resource_group): - response = self.client.product_policy.delete( + def test_product_policy_list_by_product(self, resource_group): + response = self.client.product_policy.list_by_product( resource_group_name=resource_group.name, service_name="str", product_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations_async.py index 7bb0ae0f656c..fd14586f8c9b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_policy_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,14 +21,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_policy_list_by_product(self, resource_group): - response = self.client.product_policy.list_by_product( + async def test_product_policy_get(self, resource_group): + response = await self.client.product_policy.get( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -40,7 +40,6 @@ async def test_product_policy_get_entity_tag(self, resource_group): service_name="str", product_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +47,26 @@ async def test_product_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_policy_get(self, resource_group): - response = await self.client.product_policy.get( + async def test_product_policy_create_or_update(self, resource_group): + response = await self.client.product_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", product_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -62,14 +74,14 @@ async def test_product_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_policy_create_or_update(self, resource_group): - response = await self.client.product_policy.create_or_update( + async def test_product_policy_delete(self, resource_group): + response = await self.client.product_policy.delete( resource_group_name=resource_group.name, service_name="str", product_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -77,15 +89,12 @@ async def test_product_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_policy_delete(self, resource_group): - response = await self.client.product_policy.delete( + async def test_product_policy_list_by_product(self, resource_group): + response = self.client.product_policy.list_by_product( resource_group_name=resource_group.name, service_name="str", product_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations.py index 291b85ac4b0e..c8f64590865c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_product_subscriptions_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations_async.py index d6555cfd4821..5275250d70ea 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_subscriptions_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_product_subscriptions_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations.py index 48245be9e4f2..73a049f9887e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,12 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_wiki_get_entity_tag(self, resource_group): - response = self.client.product_wiki.get_entity_tag( + def test_product_wiki_get(self, resource_group): + response = self.client.product_wiki.get( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -33,12 +32,11 @@ def test_product_wiki_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_product_wiki_get(self, resource_group): - response = self.client.product_wiki.get( + def test_product_wiki_get_entity_tag(self, resource_group): + response = self.client.product_wiki.get_entity_tag( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,8 +49,20 @@ def test_product_wiki_create_or_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - parameters={"documents": [{"documentationId": "str"}], "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"documents": [{"documentationId": "str"}]}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -65,9 +75,9 @@ def test_product_wiki_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - if_match="str", - parameters={"documents": [{"documentationId": "str"}]}, - api_version="2025-03-01-preview", + parameters={"properties": {"documents": [{"documentationId": "str"}]}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -80,8 +90,8 @@ def test_product_wiki_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations_async.py index ff3d664d14bc..0d2aa393a326 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wiki_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,12 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_wiki_get_entity_tag(self, resource_group): - response = await self.client.product_wiki.get_entity_tag( + async def test_product_wiki_get(self, resource_group): + response = await self.client.product_wiki.get( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -34,12 +33,11 @@ async def test_product_wiki_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_product_wiki_get(self, resource_group): - response = await self.client.product_wiki.get( + async def test_product_wiki_get_entity_tag(self, resource_group): + response = await self.client.product_wiki.get_entity_tag( resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -52,8 +50,20 @@ async def test_product_wiki_create_or_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - parameters={"documents": [{"documentationId": "str"}], "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"documents": [{"documentationId": "str"}]}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -66,9 +76,9 @@ async def test_product_wiki_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - if_match="str", - parameters={"documents": [{"documentationId": "str"}]}, - api_version="2025-03-01-preview", + parameters={"properties": {"documents": [{"documentationId": "str"}]}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -81,8 +91,8 @@ async def test_product_wiki_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations.py index b60b52f9ee6e..c76c3b6aad90 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_product_wikis_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations_async.py index 3baf9c683000..5eea6965459e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_product_wikis_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_product_wikis_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", product_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations.py index ff4c02816551..1d6914bd1adc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_quota_by_counter_keys_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", quota_counter_key="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -38,8 +37,7 @@ def test_quota_by_counter_keys_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", quota_counter_key="str", - parameters={"callsCount": 0, "kbTransferred": 0.0}, - api_version="2025-03-01-preview", + parameters={"properties": {"callsCount": 0, "kbTransferred": 0.0}}, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations_async.py index 515137e6d2fc..555c1bd317d0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_counter_keys_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_quota_by_counter_keys_list_by_service(self, resource_group): resource_group_name=resource_group.name, service_name="str", quota_counter_key="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -39,8 +38,7 @@ async def test_quota_by_counter_keys_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", quota_counter_key="str", - parameters={"callsCount": 0, "kbTransferred": 0.0}, - api_version="2025-03-01-preview", + parameters={"properties": {"callsCount": 0, "kbTransferred": 0.0}}, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations.py index 53bf7f854d2a..9c8e4fec5a7a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ def test_quota_by_period_keys_get(self, resource_group): service_name="str", quota_counter_key="str", quota_period_key="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -40,8 +39,7 @@ def test_quota_by_period_keys_update(self, resource_group): service_name="str", quota_counter_key="str", quota_period_key="str", - parameters={"callsCount": 0, "kbTransferred": 0.0}, - api_version="2025-03-01-preview", + parameters={"properties": {"callsCount": 0, "kbTransferred": 0.0}}, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations_async.py index a463289ae6b1..5e94845cac58 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_quota_by_period_keys_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -27,7 +27,6 @@ async def test_quota_by_period_keys_get(self, resource_group): service_name="str", quota_counter_key="str", quota_period_key="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -41,8 +40,7 @@ async def test_quota_by_period_keys_update(self, resource_group): service_name="str", quota_counter_key="str", quota_period_key="str", - parameters={"callsCount": 0, "kbTransferred": 0.0}, - api_version="2025-03-01-preview", + parameters={"properties": {"callsCount": 0, "kbTransferred": 0.0}}, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations.py index 4e96b7837161..da1308c178a6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_region_list_by_service(self, resource_group): response = self.client.region.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations_async.py index 1453805f300d..e253a2773325 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_region_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_region_list_by_service(self, resource_group): response = self.client.region.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations.py index 143ce58d2724..75e8d665459d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_reports_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -38,7 +37,6 @@ def test_reports_list_by_user(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -51,7 +49,6 @@ def test_reports_list_by_operation(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -64,7 +61,6 @@ def test_reports_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -77,7 +73,6 @@ def test_reports_list_by_geo(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -90,7 +85,6 @@ def test_reports_list_by_subscription(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -104,7 +98,6 @@ def test_reports_list_by_time(self, resource_group): service_name="str", filter="str", interval="1 day, 0:00:00", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -117,7 +110,6 @@ def test_reports_list_by_request(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations_async.py index d49f7a470542..faa6460d2cd8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_reports_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_reports_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -39,7 +38,6 @@ async def test_reports_list_by_user(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -52,7 +50,6 @@ async def test_reports_list_by_operation(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -65,7 +62,6 @@ async def test_reports_list_by_product(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -78,7 +74,6 @@ async def test_reports_list_by_geo(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -91,7 +86,6 @@ async def test_reports_list_by_subscription(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -105,7 +99,6 @@ async def test_reports_list_by_time(self, resource_group): service_name="str", filter="str", interval="1 day, 0:00:00", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -118,7 +111,6 @@ async def test_reports_list_by_request(self, resource_group): resource_group_name=resource_group.name, service_name="str", filter="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations.py index c21912332137..9224b645cc4e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,11 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_sign_in_settings_get_entity_tag(self, resource_group): - response = self.client.sign_in_settings.get_entity_tag( + def test_sign_in_settings_get(self, resource_group): + response = self.client.sign_in_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -32,11 +31,10 @@ def test_sign_in_settings_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_sign_in_settings_get(self, resource_group): - response = self.client.sign_in_settings.get( + def test_sign_in_settings_get_entity_tag(self, resource_group): + response = self.client.sign_in_settings.get_entity_tag( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -44,13 +42,24 @@ def test_sign_in_settings_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_sign_in_settings_update(self, resource_group): - response = self.client.sign_in_settings.update( + def test_sign_in_settings_create_or_update(self, resource_group): + response = self.client.sign_in_settings.create_or_update( resource_group_name=resource_group.name, service_name="str", - if_match="str", - parameters={"enabled": bool, "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"enabled": bool}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -58,12 +67,26 @@ def test_sign_in_settings_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_sign_in_settings_create_or_update(self, resource_group): - response = self.client.sign_in_settings.create_or_update( + def test_sign_in_settings_update(self, resource_group): + response = self.client.sign_in_settings.update( resource_group_name=resource_group.name, service_name="str", - parameters={"enabled": bool, "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"enabled": bool}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations_async.py index 8868b41ac1b2..0296c2ee9de3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_in_settings_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,11 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_sign_in_settings_get_entity_tag(self, resource_group): - response = await self.client.sign_in_settings.get_entity_tag( + async def test_sign_in_settings_get(self, resource_group): + response = await self.client.sign_in_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -33,11 +32,10 @@ async def test_sign_in_settings_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_sign_in_settings_get(self, resource_group): - response = await self.client.sign_in_settings.get( + async def test_sign_in_settings_get_entity_tag(self, resource_group): + response = await self.client.sign_in_settings.get_entity_tag( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,13 +43,24 @@ async def test_sign_in_settings_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_sign_in_settings_update(self, resource_group): - response = await self.client.sign_in_settings.update( + async def test_sign_in_settings_create_or_update(self, resource_group): + response = await self.client.sign_in_settings.create_or_update( resource_group_name=resource_group.name, service_name="str", - if_match="str", - parameters={"enabled": bool, "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"enabled": bool}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -59,12 +68,26 @@ async def test_sign_in_settings_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_sign_in_settings_create_or_update(self, resource_group): - response = await self.client.sign_in_settings.create_or_update( + async def test_sign_in_settings_update(self, resource_group): + response = await self.client.sign_in_settings.update( resource_group_name=resource_group.name, service_name="str", - parameters={"enabled": bool, "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"enabled": bool}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations.py index 2059135f3c3f..a3d4e106f5c6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,11 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_sign_up_settings_get_entity_tag(self, resource_group): - response = self.client.sign_up_settings.get_entity_tag( + def test_sign_up_settings_get(self, resource_group): + response = self.client.sign_up_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -32,11 +31,10 @@ def test_sign_up_settings_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_sign_up_settings_get(self, resource_group): - response = self.client.sign_up_settings.get( + def test_sign_up_settings_get_entity_tag(self, resource_group): + response = self.client.sign_up_settings.get_entity_tag( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -44,19 +42,27 @@ def test_sign_up_settings_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_sign_up_settings_update(self, resource_group): - response = self.client.sign_up_settings.update( + def test_sign_up_settings_create_or_update(self, resource_group): + response = self.client.sign_up_settings.create_or_update( resource_group_name=resource_group.name, service_name="str", - if_match="str", parameters={ - "enabled": bool, "id": "str", "name": "str", - "termsOfService": {"consentRequired": bool, "enabled": bool, "text": "str"}, + "properties": { + "enabled": bool, + "termsOfService": {"consentRequired": bool, "enabled": bool, "text": "str"}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,18 +70,29 @@ def test_sign_up_settings_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_sign_up_settings_create_or_update(self, resource_group): - response = self.client.sign_up_settings.create_or_update( + def test_sign_up_settings_update(self, resource_group): + response = self.client.sign_up_settings.update( resource_group_name=resource_group.name, service_name="str", parameters={ - "enabled": bool, "id": "str", "name": "str", - "termsOfService": {"consentRequired": bool, "enabled": bool, "text": "str"}, + "properties": { + "enabled": bool, + "termsOfService": {"consentRequired": bool, "enabled": bool, "text": "str"}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations_async.py index 429cd2346718..aac54b295f55 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_sign_up_settings_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,11 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_sign_up_settings_get_entity_tag(self, resource_group): - response = await self.client.sign_up_settings.get_entity_tag( + async def test_sign_up_settings_get(self, resource_group): + response = await self.client.sign_up_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -33,11 +32,10 @@ async def test_sign_up_settings_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_sign_up_settings_get(self, resource_group): - response = await self.client.sign_up_settings.get( + async def test_sign_up_settings_get_entity_tag(self, resource_group): + response = await self.client.sign_up_settings.get_entity_tag( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,19 +43,27 @@ async def test_sign_up_settings_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_sign_up_settings_update(self, resource_group): - response = await self.client.sign_up_settings.update( + async def test_sign_up_settings_create_or_update(self, resource_group): + response = await self.client.sign_up_settings.create_or_update( resource_group_name=resource_group.name, service_name="str", - if_match="str", parameters={ - "enabled": bool, "id": "str", "name": "str", - "termsOfService": {"consentRequired": bool, "enabled": bool, "text": "str"}, + "properties": { + "enabled": bool, + "termsOfService": {"consentRequired": bool, "enabled": bool, "text": "str"}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,18 +71,29 @@ async def test_sign_up_settings_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_sign_up_settings_create_or_update(self, resource_group): - response = await self.client.sign_up_settings.create_or_update( + async def test_sign_up_settings_update(self, resource_group): + response = await self.client.sign_up_settings.update( resource_group_name=resource_group.name, service_name="str", parameters={ - "enabled": bool, "id": "str", "name": "str", - "termsOfService": {"consentRequired": bool, "enabled": bool, "text": "str"}, + "properties": { + "enabled": bool, + "termsOfService": {"consentRequired": bool, "enabled": bool, "text": "str"}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations.py index 25a439ae3a4d..38f853e961f3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_subscription_list(self, resource_group): - response = self.client.subscription.list( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_subscription_get_entity_tag(self, resource_group): - response = self.client.subscription.get_entity_tag( + def test_subscription_get(self, resource_group): + response = self.client.subscription.get( resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_subscription_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_subscription_get(self, resource_group): - response = self.client.subscription.get( + def test_subscription_get_entity_tag(self, resource_group): + response = self.client.subscription.get_entity_tag( resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,15 +50,16 @@ def test_subscription_create_or_update(self, resource_group): service_name="str", sid="str", parameters={ - "allowTracing": bool, - "displayName": "str", - "ownerId": "str", - "primaryKey": "str", - "scope": "str", - "secondaryKey": "str", - "state": "str", + "properties": { + "displayName": "str", + "scope": "str", + "allowTracing": bool, + "ownerId": "str", + "primaryKey": "str", + "secondaryKey": "str", + "state": "str", + } }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -85,19 +72,21 @@ def test_subscription_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - if_match="str", parameters={ - "allowTracing": bool, - "displayName": "str", - "expirationDate": "2020-02-20 00:00:00", - "ownerId": "str", - "primaryKey": "str", - "scope": "str", - "secondaryKey": "str", - "state": "str", - "stateComment": "str", + "properties": { + "allowTracing": bool, + "displayName": "str", + "expirationDate": "2020-02-20 00:00:00", + "ownerId": "str", + "primaryKey": "str", + "scope": "str", + "secondaryKey": "str", + "state": "str", + "stateComment": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -110,13 +99,24 @@ def test_subscription_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_subscription_list(self, resource_group): + response = self.client.subscription.list( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_subscription_regenerate_primary_key(self, resource_group): @@ -124,7 +124,6 @@ def test_subscription_regenerate_primary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -137,7 +136,6 @@ def test_subscription_regenerate_secondary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -150,7 +148,6 @@ def test_subscription_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations_async.py index b7ebc06acacb..7fb071b0f72d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_subscription_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_subscription_list(self, resource_group): - response = self.client.subscription.list( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_subscription_get_entity_tag(self, resource_group): - response = await self.client.subscription.get_entity_tag( + async def test_subscription_get(self, resource_group): + response = await self.client.subscription.get( resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_subscription_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_subscription_get(self, resource_group): - response = await self.client.subscription.get( + async def test_subscription_get_entity_tag(self, resource_group): + response = await self.client.subscription.get_entity_tag( resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,15 +51,16 @@ async def test_subscription_create_or_update(self, resource_group): service_name="str", sid="str", parameters={ - "allowTracing": bool, - "displayName": "str", - "ownerId": "str", - "primaryKey": "str", - "scope": "str", - "secondaryKey": "str", - "state": "str", + "properties": { + "displayName": "str", + "scope": "str", + "allowTracing": bool, + "ownerId": "str", + "primaryKey": "str", + "secondaryKey": "str", + "state": "str", + } }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -86,19 +73,21 @@ async def test_subscription_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - if_match="str", parameters={ - "allowTracing": bool, - "displayName": "str", - "expirationDate": "2020-02-20 00:00:00", - "ownerId": "str", - "primaryKey": "str", - "scope": "str", - "secondaryKey": "str", - "state": "str", - "stateComment": "str", + "properties": { + "allowTracing": bool, + "displayName": "str", + "expirationDate": "2020-02-20 00:00:00", + "ownerId": "str", + "primaryKey": "str", + "scope": "str", + "secondaryKey": "str", + "state": "str", + "stateComment": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -111,13 +100,24 @@ async def test_subscription_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_subscription_list(self, resource_group): + response = self.client.subscription.list( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_subscription_regenerate_primary_key(self, resource_group): @@ -125,7 +125,6 @@ async def test_subscription_regenerate_primary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -138,7 +137,6 @@ async def test_subscription_regenerate_secondary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -151,7 +149,6 @@ async def test_subscription_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations.py index 2ee429495988..370e41b5a4aa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,39 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_api_link_list_by_product(self, resource_group): - response = self.client.tag_api_link.list_by_product( + def test_tag_api_link_get(self, resource_group): + response = self.client.tag_api_link.get( resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2025-03-01-preview", + api_link_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_api_link_get(self, resource_group): - response = self.client.tag_api_link.get( + def test_tag_api_link_create_or_update(self, resource_group): + response = self.client.tag_api_link.create_or_update( resource_group_name=resource_group.name, service_name="str", tag_id="str", api_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"apiId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -47,14 +60,12 @@ def test_tag_api_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_api_link_create_or_update(self, resource_group): - response = self.client.tag_api_link.create_or_update( + def test_tag_api_link_delete(self, resource_group): + response = self.client.tag_api_link.delete( resource_group_name=resource_group.name, service_name="str", tag_id="str", api_link_id="str", - parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -62,14 +73,12 @@ def test_tag_api_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_api_link_delete(self, resource_group): - response = self.client.tag_api_link.delete( + def test_tag_api_link_list_by_product(self, resource_group): + response = self.client.tag_api_link.list_by_product( resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations_async.py index e6d70ca78b75..347c8c7acd1e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_api_link_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,39 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_api_link_list_by_product(self, resource_group): - response = self.client.tag_api_link.list_by_product( + async def test_tag_api_link_get(self, resource_group): + response = await self.client.tag_api_link.get( resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2025-03-01-preview", + api_link_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_api_link_get(self, resource_group): - response = await self.client.tag_api_link.get( + async def test_tag_api_link_create_or_update(self, resource_group): + response = await self.client.tag_api_link.create_or_update( resource_group_name=resource_group.name, service_name="str", tag_id="str", api_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"apiId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -48,14 +61,12 @@ async def test_tag_api_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_api_link_create_or_update(self, resource_group): - response = await self.client.tag_api_link.create_or_update( + async def test_tag_api_link_delete(self, resource_group): + response = await self.client.tag_api_link.delete( resource_group_name=resource_group.name, service_name="str", tag_id="str", api_link_id="str", - parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -63,14 +74,12 @@ async def test_tag_api_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_api_link_delete(self, resource_group): - response = await self.client.tag_api_link.delete( + async def test_tag_api_link_list_by_product(self, resource_group): + response = self.client.tag_api_link.list_by_product( resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations.py index 18cd9b38aa1f..b6524e8d2499 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,39 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_operation_link_list_by_product(self, resource_group): - response = self.client.tag_operation_link.list_by_product( + def test_tag_operation_link_get(self, resource_group): + response = self.client.tag_operation_link.get( resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2025-03-01-preview", + operation_link_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_operation_link_get(self, resource_group): - response = self.client.tag_operation_link.get( + def test_tag_operation_link_create_or_update(self, resource_group): + response = self.client.tag_operation_link.create_or_update( resource_group_name=resource_group.name, service_name="str", tag_id="str", operation_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"operationId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -47,14 +60,12 @@ def test_tag_operation_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_operation_link_create_or_update(self, resource_group): - response = self.client.tag_operation_link.create_or_update( + def test_tag_operation_link_delete(self, resource_group): + response = self.client.tag_operation_link.delete( resource_group_name=resource_group.name, service_name="str", tag_id="str", operation_link_id="str", - parameters={"id": "str", "name": "str", "operationId": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -62,14 +73,12 @@ def test_tag_operation_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_operation_link_delete(self, resource_group): - response = self.client.tag_operation_link.delete( + def test_tag_operation_link_list_by_product(self, resource_group): + response = self.client.tag_operation_link.list_by_product( resource_group_name=resource_group.name, service_name="str", tag_id="str", - operation_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations_async.py index e74f7de0ae9f..f73214ec8924 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operation_link_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,39 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_operation_link_list_by_product(self, resource_group): - response = self.client.tag_operation_link.list_by_product( + async def test_tag_operation_link_get(self, resource_group): + response = await self.client.tag_operation_link.get( resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2025-03-01-preview", + operation_link_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_operation_link_get(self, resource_group): - response = await self.client.tag_operation_link.get( + async def test_tag_operation_link_create_or_update(self, resource_group): + response = await self.client.tag_operation_link.create_or_update( resource_group_name=resource_group.name, service_name="str", tag_id="str", operation_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"operationId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -48,14 +61,12 @@ async def test_tag_operation_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_operation_link_create_or_update(self, resource_group): - response = await self.client.tag_operation_link.create_or_update( + async def test_tag_operation_link_delete(self, resource_group): + response = await self.client.tag_operation_link.delete( resource_group_name=resource_group.name, service_name="str", tag_id="str", operation_link_id="str", - parameters={"id": "str", "name": "str", "operationId": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -63,14 +74,12 @@ async def test_tag_operation_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_operation_link_delete(self, resource_group): - response = await self.client.tag_operation_link.delete( + async def test_tag_operation_link_list_by_product(self, resource_group): + response = self.client.tag_operation_link.list_by_product( resource_group_name=resource_group.name, service_name="str", tag_id="str", - operation_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations.py index 9168c4f63d22..4bfb1ea2b46d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,28 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_list_by_operation(self, resource_group): - response = self.client.tag.list_by_operation( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - operation_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_tag_get_entity_state_by_operation(self, resource_group): - response = self.client.tag.get_entity_state_by_operation( + def test_tag_get_by_api(self, resource_group): + response = self.client.tag.get_by_api( resource_group_name=resource_group.name, service_name="str", api_id="str", - operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -49,14 +33,12 @@ def test_tag_get_entity_state_by_operation(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_get_by_operation(self, resource_group): - response = self.client.tag.get_by_operation( + def test_tag_get_entity_state_by_api(self, resource_group): + response = self.client.tag.get_entity_state_by_api( resource_group_name=resource_group.name, service_name="str", api_id="str", - operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,14 +46,12 @@ def test_tag_get_by_operation(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_assign_to_operation(self, resource_group): - response = self.client.tag.assign_to_operation( + def test_tag_assign_to_api(self, resource_group): + response = self.client.tag.assign_to_api( resource_group_name=resource_group.name, service_name="str", api_id="str", - operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -79,14 +59,12 @@ def test_tag_assign_to_operation(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_detach_from_operation(self, resource_group): - response = self.client.tag.detach_from_operation( + def test_tag_detach_from_api(self, resource_group): + response = self.client.tag.detach_from_api( resource_group_name=resource_group.name, service_name="str", api_id="str", - operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -99,7 +77,6 @@ def test_tag_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -107,13 +84,13 @@ def test_tag_list_by_api(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_get_entity_state_by_api(self, resource_group): - response = self.client.tag.get_entity_state_by_api( + def test_tag_get_by_operation(self, resource_group): + response = self.client.tag.get_by_operation( resource_group_name=resource_group.name, service_name="str", api_id="str", + operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -121,13 +98,13 @@ def test_tag_get_entity_state_by_api(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_get_by_api(self, resource_group): - response = self.client.tag.get_by_api( + def test_tag_get_entity_state_by_operation(self, resource_group): + response = self.client.tag.get_entity_state_by_operation( resource_group_name=resource_group.name, service_name="str", api_id="str", + operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -135,13 +112,13 @@ def test_tag_get_by_api(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_assign_to_api(self, resource_group): - response = self.client.tag.assign_to_api( + def test_tag_assign_to_operation(self, resource_group): + response = self.client.tag.assign_to_operation( resource_group_name=resource_group.name, service_name="str", api_id="str", + operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -149,13 +126,13 @@ def test_tag_assign_to_api(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_detach_from_api(self, resource_group): - response = self.client.tag.detach_from_api( + def test_tag_detach_from_operation(self, resource_group): + response = self.client.tag.detach_from_operation( resource_group_name=resource_group.name, service_name="str", api_id="str", + operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -163,12 +140,12 @@ def test_tag_detach_from_api(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_list_by_product(self, resource_group): - response = self.client.tag.list_by_product( + def test_tag_list_by_operation(self, resource_group): + response = self.client.tag.list_by_operation( resource_group_name=resource_group.name, service_name="str", - product_id="str", - api_version="2025-03-01-preview", + api_id="str", + operation_id="str", ) result = [r for r in response] # please add some check logic here by yourself @@ -176,13 +153,12 @@ def test_tag_list_by_product(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_get_entity_state_by_product(self, resource_group): - response = self.client.tag.get_entity_state_by_product( + def test_tag_get_by_product(self, resource_group): + response = self.client.tag.get_by_product( resource_group_name=resource_group.name, service_name="str", product_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -190,13 +166,12 @@ def test_tag_get_entity_state_by_product(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_get_by_product(self, resource_group): - response = self.client.tag.get_by_product( + def test_tag_get_entity_state_by_product(self, resource_group): + response = self.client.tag.get_entity_state_by_product( resource_group_name=resource_group.name, service_name="str", product_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -210,7 +185,6 @@ def test_tag_assign_to_product(self, resource_group): service_name="str", product_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -224,7 +198,6 @@ def test_tag_detach_from_product(self, resource_group): service_name="str", product_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -232,11 +205,11 @@ def test_tag_detach_from_product(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_list_by_service(self, resource_group): - response = self.client.tag.list_by_service( + def test_tag_list_by_product(self, resource_group): + response = self.client.tag.list_by_product( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + product_id="str", ) result = [r for r in response] # please add some check logic here by yourself @@ -244,12 +217,11 @@ def test_tag_list_by_service(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_get_entity_state(self, resource_group): - response = self.client.tag.get_entity_state( + def test_tag_get(self, resource_group): + response = self.client.tag.get( resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -257,12 +229,11 @@ def test_tag_get_entity_state(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_get(self, resource_group): - response = self.client.tag.get( + def test_tag_get_entity_state(self, resource_group): + response = self.client.tag.get_entity_state( resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -275,8 +246,7 @@ def test_tag_create_or_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - parameters={"displayName": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"displayName": "str"}}, ) # please add some check logic here by yourself @@ -289,9 +259,9 @@ def test_tag_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - if_match="str", - parameters={"displayName": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"displayName": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -304,9 +274,20 @@ def test_tag_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_tag_list_by_service(self, resource_group): + response = self.client.tag.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations_async.py index e9a6d6b1f86b..de6fcf547c9f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,28 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_list_by_operation(self, resource_group): - response = self.client.tag.list_by_operation( - resource_group_name=resource_group.name, - service_name="str", - api_id="str", - operation_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_tag_get_entity_state_by_operation(self, resource_group): - response = await self.client.tag.get_entity_state_by_operation( + async def test_tag_get_by_api(self, resource_group): + response = await self.client.tag.get_by_api( resource_group_name=resource_group.name, service_name="str", api_id="str", - operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,14 +34,12 @@ async def test_tag_get_entity_state_by_operation(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_get_by_operation(self, resource_group): - response = await self.client.tag.get_by_operation( + async def test_tag_get_entity_state_by_api(self, resource_group): + response = await self.client.tag.get_entity_state_by_api( resource_group_name=resource_group.name, service_name="str", api_id="str", - operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,14 +47,12 @@ async def test_tag_get_by_operation(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_assign_to_operation(self, resource_group): - response = await self.client.tag.assign_to_operation( + async def test_tag_assign_to_api(self, resource_group): + response = await self.client.tag.assign_to_api( resource_group_name=resource_group.name, service_name="str", api_id="str", - operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -80,14 +60,12 @@ async def test_tag_assign_to_operation(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_detach_from_operation(self, resource_group): - response = await self.client.tag.detach_from_operation( + async def test_tag_detach_from_api(self, resource_group): + response = await self.client.tag.detach_from_api( resource_group_name=resource_group.name, service_name="str", api_id="str", - operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -100,7 +78,6 @@ async def test_tag_list_by_api(self, resource_group): resource_group_name=resource_group.name, service_name="str", api_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -108,13 +85,13 @@ async def test_tag_list_by_api(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_get_entity_state_by_api(self, resource_group): - response = await self.client.tag.get_entity_state_by_api( + async def test_tag_get_by_operation(self, resource_group): + response = await self.client.tag.get_by_operation( resource_group_name=resource_group.name, service_name="str", api_id="str", + operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -122,13 +99,13 @@ async def test_tag_get_entity_state_by_api(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_get_by_api(self, resource_group): - response = await self.client.tag.get_by_api( + async def test_tag_get_entity_state_by_operation(self, resource_group): + response = await self.client.tag.get_entity_state_by_operation( resource_group_name=resource_group.name, service_name="str", api_id="str", + operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -136,13 +113,13 @@ async def test_tag_get_by_api(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_assign_to_api(self, resource_group): - response = await self.client.tag.assign_to_api( + async def test_tag_assign_to_operation(self, resource_group): + response = await self.client.tag.assign_to_operation( resource_group_name=resource_group.name, service_name="str", api_id="str", + operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -150,13 +127,13 @@ async def test_tag_assign_to_api(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_detach_from_api(self, resource_group): - response = await self.client.tag.detach_from_api( + async def test_tag_detach_from_operation(self, resource_group): + response = await self.client.tag.detach_from_operation( resource_group_name=resource_group.name, service_name="str", api_id="str", + operation_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -164,12 +141,12 @@ async def test_tag_detach_from_api(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_list_by_product(self, resource_group): - response = self.client.tag.list_by_product( + async def test_tag_list_by_operation(self, resource_group): + response = self.client.tag.list_by_operation( resource_group_name=resource_group.name, service_name="str", - product_id="str", - api_version="2025-03-01-preview", + api_id="str", + operation_id="str", ) result = [r async for r in response] # please add some check logic here by yourself @@ -177,13 +154,12 @@ async def test_tag_list_by_product(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_get_entity_state_by_product(self, resource_group): - response = await self.client.tag.get_entity_state_by_product( + async def test_tag_get_by_product(self, resource_group): + response = await self.client.tag.get_by_product( resource_group_name=resource_group.name, service_name="str", product_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -191,13 +167,12 @@ async def test_tag_get_entity_state_by_product(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_get_by_product(self, resource_group): - response = await self.client.tag.get_by_product( + async def test_tag_get_entity_state_by_product(self, resource_group): + response = await self.client.tag.get_entity_state_by_product( resource_group_name=resource_group.name, service_name="str", product_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -211,7 +186,6 @@ async def test_tag_assign_to_product(self, resource_group): service_name="str", product_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -225,7 +199,6 @@ async def test_tag_detach_from_product(self, resource_group): service_name="str", product_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -233,11 +206,11 @@ async def test_tag_detach_from_product(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_list_by_service(self, resource_group): - response = self.client.tag.list_by_service( + async def test_tag_list_by_product(self, resource_group): + response = self.client.tag.list_by_product( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + product_id="str", ) result = [r async for r in response] # please add some check logic here by yourself @@ -245,12 +218,11 @@ async def test_tag_list_by_service(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_get_entity_state(self, resource_group): - response = await self.client.tag.get_entity_state( + async def test_tag_get(self, resource_group): + response = await self.client.tag.get( resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -258,12 +230,11 @@ async def test_tag_get_entity_state(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_get(self, resource_group): - response = await self.client.tag.get( + async def test_tag_get_entity_state(self, resource_group): + response = await self.client.tag.get_entity_state( resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -276,8 +247,7 @@ async def test_tag_create_or_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - parameters={"displayName": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"displayName": "str"}}, ) # please add some check logic here by yourself @@ -290,9 +260,9 @@ async def test_tag_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - if_match="str", - parameters={"displayName": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"displayName": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -305,9 +275,20 @@ async def test_tag_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", tag_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_tag_list_by_service(self, resource_group): + response = self.client.tag.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations.py index f82f3693443c..ac77091200d2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,39 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_product_link_list_by_product(self, resource_group): - response = self.client.tag_product_link.list_by_product( + def test_tag_product_link_get(self, resource_group): + response = self.client.tag_product_link.get( resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2025-03-01-preview", + product_link_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_product_link_get(self, resource_group): - response = self.client.tag_product_link.get( + def test_tag_product_link_create_or_update(self, resource_group): + response = self.client.tag_product_link.create_or_update( resource_group_name=resource_group.name, service_name="str", tag_id="str", product_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"productId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -47,14 +60,12 @@ def test_tag_product_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_product_link_create_or_update(self, resource_group): - response = self.client.tag_product_link.create_or_update( + def test_tag_product_link_delete(self, resource_group): + response = self.client.tag_product_link.delete( resource_group_name=resource_group.name, service_name="str", tag_id="str", product_link_id="str", - parameters={"id": "str", "name": "str", "productId": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -62,14 +73,12 @@ def test_tag_product_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tag_product_link_delete(self, resource_group): - response = self.client.tag_product_link.delete( + def test_tag_product_link_list_by_product(self, resource_group): + response = self.client.tag_product_link.list_by_product( resource_group_name=resource_group.name, service_name="str", tag_id="str", - product_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations_async.py index 05065b3124c7..527a69fc6202 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_product_link_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,39 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_product_link_list_by_product(self, resource_group): - response = self.client.tag_product_link.list_by_product( + async def test_tag_product_link_get(self, resource_group): + response = await self.client.tag_product_link.get( resource_group_name=resource_group.name, service_name="str", tag_id="str", - api_version="2025-03-01-preview", + product_link_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_product_link_get(self, resource_group): - response = await self.client.tag_product_link.get( + async def test_tag_product_link_create_or_update(self, resource_group): + response = await self.client.tag_product_link.create_or_update( resource_group_name=resource_group.name, service_name="str", tag_id="str", product_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"productId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -48,14 +61,12 @@ async def test_tag_product_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_product_link_create_or_update(self, resource_group): - response = await self.client.tag_product_link.create_or_update( + async def test_tag_product_link_delete(self, resource_group): + response = await self.client.tag_product_link.delete( resource_group_name=resource_group.name, service_name="str", tag_id="str", product_link_id="str", - parameters={"id": "str", "name": "str", "productId": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -63,14 +74,12 @@ async def test_tag_product_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tag_product_link_delete(self, resource_group): - response = await self.client.tag_product_link.delete( + async def test_tag_product_link_list_by_product(self, resource_group): + response = self.client.tag_product_link.list_by_product( resource_group_name=resource_group.name, service_name="str", tag_id="str", - product_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations.py index d41e0d0a724e..89194f969049 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_tag_resource_list_by_service(self, resource_group): response = self.client.tag_resource.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations_async.py index eba724d7aab1..c69bd33dd90d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tag_resource_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_tag_resource_list_by_service(self, resource_group): response = self.client.tag_resource.list_by_service( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations.py index 66254f1be51f..a12358d4faad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_tenant_access_git_regenerate_primary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -38,7 +37,6 @@ def test_tenant_access_git_regenerate_secondary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations_async.py index 5efd63819eb8..2e801dc47bda 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_git_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_tenant_access_git_regenerate_primary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -39,7 +38,6 @@ async def test_tenant_access_git_regenerate_secondary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations.py index 4b5c77c1cc8d..d71646747ea1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tenant_access_list_by_service(self, resource_group): - response = self.client.tenant_access.list_by_service( + def test_tenant_access_get(self, resource_group): + response = self.client.tenant_access.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + access_name="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -37,7 +37,6 @@ def test_tenant_access_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +44,16 @@ def test_tenant_access_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tenant_access_get(self, resource_group): - response = self.client.tenant_access.get( + def test_tenant_access_create(self, resource_group): + response = self.client.tenant_access.create( resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", + parameters={ + "properties": {"enabled": bool, "primaryKey": "str", "principalId": "str", "secondaryKey": "str"} + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -58,14 +61,14 @@ def test_tenant_access_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tenant_access_create(self, resource_group): - response = self.client.tenant_access.create( + def test_tenant_access_update(self, resource_group): + response = self.client.tenant_access.update( resource_group_name=resource_group.name, service_name="str", access_name="str", - if_match="str", - parameters={"enabled": bool, "primaryKey": "str", "principalId": "str", "secondaryKey": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"enabled": bool}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -73,16 +76,12 @@ def test_tenant_access_create(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tenant_access_update(self, resource_group): - response = self.client.tenant_access.update( + def test_tenant_access_list_by_service(self, resource_group): + response = self.client.tenant_access.list_by_service( resource_group_name=resource_group.name, service_name="str", - access_name="str", - if_match="str", - parameters={"enabled": bool}, - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... @@ -93,7 +92,6 @@ def test_tenant_access_regenerate_primary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -106,7 +104,6 @@ def test_tenant_access_regenerate_secondary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -119,7 +116,6 @@ def test_tenant_access_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations_async.py index 522b2b7848fa..7091cf225ec7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_access_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tenant_access_list_by_service(self, resource_group): - response = self.client.tenant_access.list_by_service( + async def test_tenant_access_get(self, resource_group): + response = await self.client.tenant_access.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + access_name="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -38,7 +38,6 @@ async def test_tenant_access_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +45,16 @@ async def test_tenant_access_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tenant_access_get(self, resource_group): - response = await self.client.tenant_access.get( + async def test_tenant_access_create(self, resource_group): + response = await self.client.tenant_access.create( resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", + parameters={ + "properties": {"enabled": bool, "primaryKey": "str", "principalId": "str", "secondaryKey": "str"} + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -59,14 +62,14 @@ async def test_tenant_access_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tenant_access_create(self, resource_group): - response = await self.client.tenant_access.create( + async def test_tenant_access_update(self, resource_group): + response = await self.client.tenant_access.update( resource_group_name=resource_group.name, service_name="str", access_name="str", - if_match="str", - parameters={"enabled": bool, "primaryKey": "str", "principalId": "str", "secondaryKey": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"enabled": bool}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -74,16 +77,12 @@ async def test_tenant_access_create(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tenant_access_update(self, resource_group): - response = await self.client.tenant_access.update( + async def test_tenant_access_list_by_service(self, resource_group): + response = self.client.tenant_access.list_by_service( resource_group_name=resource_group.name, service_name="str", - access_name="str", - if_match="str", - parameters={"enabled": bool}, - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... @@ -94,7 +93,6 @@ async def test_tenant_access_regenerate_primary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -107,7 +105,6 @@ async def test_tenant_access_regenerate_secondary_key(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -120,7 +117,6 @@ async def test_tenant_access_list_secrets(self, resource_group): resource_group_name=resource_group.name, service_name="str", access_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations.py index fb240e4632c8..7ef9fa54c7f8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,8 +25,7 @@ def test_tenant_configuration_begin_deploy(self, resource_group): resource_group_name=resource_group.name, service_name="str", configuration_name="str", - parameters={"branch": "str", "force": bool}, - api_version="2025-03-01-preview", + parameters={"properties": {"branch": "str", "force": bool}}, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -39,8 +38,7 @@ def test_tenant_configuration_begin_save(self, resource_group): resource_group_name=resource_group.name, service_name="str", configuration_name="str", - parameters={"branch": "str", "force": bool}, - api_version="2025-03-01-preview", + parameters={"properties": {"branch": "str", "force": bool}}, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -53,8 +51,7 @@ def test_tenant_configuration_begin_validate(self, resource_group): resource_group_name=resource_group.name, service_name="str", configuration_name="str", - parameters={"branch": "str", "force": bool}, - api_version="2025-03-01-preview", + parameters={"properties": {"branch": "str", "force": bool}}, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -67,7 +64,6 @@ def test_tenant_configuration_get_sync_state(self, resource_group): resource_group_name=resource_group.name, service_name="str", configuration_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations_async.py index 2961a76d1d6f..86aebbf6acf7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_configuration_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -27,8 +27,7 @@ async def test_tenant_configuration_begin_deploy(self, resource_group): resource_group_name=resource_group.name, service_name="str", configuration_name="str", - parameters={"branch": "str", "force": bool}, - api_version="2025-03-01-preview", + parameters={"properties": {"branch": "str", "force": bool}}, ) ).result() # call '.result()' to poll until service return final result @@ -43,8 +42,7 @@ async def test_tenant_configuration_begin_save(self, resource_group): resource_group_name=resource_group.name, service_name="str", configuration_name="str", - parameters={"branch": "str", "force": bool}, - api_version="2025-03-01-preview", + parameters={"properties": {"branch": "str", "force": bool}}, ) ).result() # call '.result()' to poll until service return final result @@ -59,8 +57,7 @@ async def test_tenant_configuration_begin_validate(self, resource_group): resource_group_name=resource_group.name, service_name="str", configuration_name="str", - parameters={"branch": "str", "force": bool}, - api_version="2025-03-01-preview", + parameters={"properties": {"branch": "str", "force": bool}}, ) ).result() # call '.result()' to poll until service return final result @@ -74,7 +71,6 @@ async def test_tenant_configuration_get_sync_state(self, resource_group): resource_group_name=resource_group.name, service_name="str", configuration_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations.py index 2239714dc814..520422d1a2d3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,25 +20,23 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tenant_settings_list_by_service(self, resource_group): - response = self.client.tenant_settings.list_by_service( + def test_tenant_settings_get(self, resource_group): + response = self.client.tenant_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + settings_type="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_tenant_settings_get(self, resource_group): - response = self.client.tenant_settings.get( + def test_tenant_settings_list_by_service(self, resource_group): + response = self.client.tenant_settings.list_by_service( resource_group_name=resource_group.name, service_name="str", - settings_type="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations_async.py index dbd370b0ab63..bacf93ce0d81 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_tenant_settings_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,25 +21,23 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tenant_settings_list_by_service(self, resource_group): - response = self.client.tenant_settings.list_by_service( + async def test_tenant_settings_get(self, resource_group): + response = await self.client.tenant_settings.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + settings_type="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_tenant_settings_get(self, resource_group): - response = await self.client.tenant_settings.get( + async def test_tenant_settings_list_by_service(self, resource_group): + response = self.client.tenant_settings.list_by_service( resource_group_name=resource_group.name, service_name="str", - settings_type="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations.py index 89f0345782c1..a28ef0076416 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_user_confirmation_password_send(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations_async.py index f94a6721f2d5..929255fc1b48 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_confirmation_password_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_user_confirmation_password_send(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations.py index 384a20b069c4..835a33b35b2e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_user_group_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations_async.py index 0fe8b552da73..ee682f005d59 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_group_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_user_group_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations.py index 26ace55d9c20..134c55cdc954 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_user_identities_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations_async.py index 413a849653fc..28ab59692cd3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_identities_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_user_identities_list(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations.py index ab088cd589ef..55e28db2f7af 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,24 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_user_list_by_service(self, resource_group): - response = self.client.user.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_user_get_entity_tag(self, resource_group): - response = self.client.user.get_entity_tag( + def test_user_get(self, resource_group): + response = self.client.user.get( resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +32,11 @@ def test_user_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_user_get(self, resource_group): - response = self.client.user.get( + def test_user_get_entity_tag(self, resource_group): + response = self.client.user.get_entity_tag( resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -64,17 +50,18 @@ def test_user_create_or_update(self, resource_group): service_name="str", user_id="str", parameters={ - "appType": "str", - "confirmation": "str", - "email": "str", - "firstName": "str", - "identities": [{"id": "str", "provider": "str"}], - "lastName": "str", - "note": "str", - "password": "str", - "state": "active", + "properties": { + "email": "str", + "firstName": "str", + "lastName": "str", + "appType": "str", + "confirmation": "str", + "identities": [{"id": "str", "provider": "str"}], + "note": "str", + "password": "str", + "state": "str", + } }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -87,17 +74,19 @@ def test_user_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - if_match="str", parameters={ - "email": "str", - "firstName": "str", - "identities": [{"id": "str", "provider": "str"}], - "lastName": "str", - "note": "str", - "password": "str", - "state": "active", + "properties": { + "email": "str", + "firstName": "str", + "identities": [{"id": "str", "provider": "str"}], + "lastName": "str", + "note": "str", + "password": "str", + "state": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -110,13 +99,24 @@ def test_user_begin_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_user_list_by_service(self, resource_group): + response = self.client.user.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_user_generate_sso_url(self, resource_group): @@ -124,7 +124,6 @@ def test_user_generate_sso_url(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -137,8 +136,7 @@ def test_user_get_shared_access_token(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - parameters={"expiry": "2020-02-20 00:00:00", "keyType": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"expiry": "2020-02-20 00:00:00", "keyType": "str"}}, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations_async.py index f50fce05932f..86f56eef2678 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,24 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_user_list_by_service(self, resource_group): - response = self.client.user.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_user_get_entity_tag(self, resource_group): - response = await self.client.user.get_entity_tag( + async def test_user_get(self, resource_group): + response = await self.client.user.get( resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +33,11 @@ async def test_user_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_user_get(self, resource_group): - response = await self.client.user.get( + async def test_user_get_entity_tag(self, resource_group): + response = await self.client.user.get_entity_tag( resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,17 +51,18 @@ async def test_user_create_or_update(self, resource_group): service_name="str", user_id="str", parameters={ - "appType": "str", - "confirmation": "str", - "email": "str", - "firstName": "str", - "identities": [{"id": "str", "provider": "str"}], - "lastName": "str", - "note": "str", - "password": "str", - "state": "active", + "properties": { + "email": "str", + "firstName": "str", + "lastName": "str", + "appType": "str", + "confirmation": "str", + "identities": [{"id": "str", "provider": "str"}], + "note": "str", + "password": "str", + "state": "str", + } }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -88,17 +75,19 @@ async def test_user_update(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - if_match="str", parameters={ - "email": "str", - "firstName": "str", - "identities": [{"id": "str", "provider": "str"}], - "lastName": "str", - "note": "str", - "password": "str", - "state": "active", + "properties": { + "email": "str", + "firstName": "str", + "identities": [{"id": "str", "provider": "str"}], + "lastName": "str", + "note": "str", + "password": "str", + "state": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -112,14 +101,25 @@ async def test_user_begin_delete(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_user_list_by_service(self, resource_group): + response = self.client.user.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_user_generate_sso_url(self, resource_group): @@ -127,7 +127,6 @@ async def test_user_generate_sso_url(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -140,8 +139,7 @@ async def test_user_get_shared_access_token(self, resource_group): resource_group_name=resource_group.name, service_name="str", user_id="str", - parameters={"expiry": "2020-02-20 00:00:00", "keyType": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"expiry": "2020-02-20 00:00:00", "keyType": "str"}}, ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations.py index b9c8b55bf9f6..538d93896967 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,27 +20,25 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_user_subscription_list(self, resource_group): - response = self.client.user_subscription.list( + def test_user_subscription_get(self, resource_group): + response = self.client.user_subscription.get( resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", + sid="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_user_subscription_get(self, resource_group): - response = self.client.user_subscription.get( + def test_user_subscription_list(self, resource_group): + response = self.client.user_subscription.list( resource_group_name=resource_group.name, service_name="str", user_id="str", - sid="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations_async.py index 93ac5b7df813..506e29d4699a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_user_subscription_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,27 +21,25 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_user_subscription_list(self, resource_group): - response = self.client.user_subscription.list( + async def test_user_subscription_get(self, resource_group): + response = await self.client.user_subscription.get( resource_group_name=resource_group.name, service_name="str", user_id="str", - api_version="2025-03-01-preview", + sid="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_user_subscription_get(self, resource_group): - response = await self.client.user_subscription.get( + async def test_user_subscription_list(self, resource_group): + response = self.client.user_subscription.list( resource_group_name=resource_group.name, service_name="str", user_id="str", - sid="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations.py index 60dba95b0554..138a11167d3e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,28 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_diagnostic_list_by_workspace(self, resource_group): - response = self.client.workspace_api_diagnostic.list_by_workspace( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_api_diagnostic_get_entity_tag(self, resource_group): - response = self.client.workspace_api_diagnostic.get_entity_tag( + def test_workspace_api_diagnostic_get(self, resource_group): + response = self.client.workspace_api_diagnostic.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -49,14 +34,13 @@ def test_workspace_api_diagnostic_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_diagnostic_get(self, resource_group): - response = self.client.workspace_api_diagnostic.get( + def test_workspace_api_diagnostic_get_entity_tag(self, resource_group): + response = self.client.workspace_api_diagnostic.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,60 +56,69 @@ def test_workspace_api_diagnostic_create_or_update(self, resource_group): api_id="str", diagnostic_id="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "loggerId": "str", + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, + "logClientIp": bool, + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "largeLanguageModel": { - "logs": "str", - "requests": {"maxSizeInBytes": 0, "messages": "str"}, - "responses": {"maxSizeInBytes": 0, "messages": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -140,57 +133,67 @@ def test_workspace_api_diagnostic_update(self, resource_group): workspace_id="str", api_id="str", diagnostic_id="str", - if_match="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "logClientIp": bool, + "loggerId": "str", + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -205,9 +208,22 @@ def test_workspace_api_diagnostic_delete(self, resource_group): workspace_id="str", api_id="str", diagnostic_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_api_diagnostic_list_by_workspace(self, resource_group): + response = self.client.workspace_api_diagnostic.list_by_workspace( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + api_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations_async.py index 1f768182bca8..a824f8fec08f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_diagnostic_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,28 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_diagnostic_list_by_workspace(self, resource_group): - response = self.client.workspace_api_diagnostic.list_by_workspace( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_api_diagnostic_get_entity_tag(self, resource_group): - response = await self.client.workspace_api_diagnostic.get_entity_tag( + async def test_workspace_api_diagnostic_get(self, resource_group): + response = await self.client.workspace_api_diagnostic.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,14 +35,13 @@ async def test_workspace_api_diagnostic_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_diagnostic_get(self, resource_group): - response = await self.client.workspace_api_diagnostic.get( + async def test_workspace_api_diagnostic_get_entity_tag(self, resource_group): + response = await self.client.workspace_api_diagnostic.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,60 +57,69 @@ async def test_workspace_api_diagnostic_create_or_update(self, resource_group): api_id="str", diagnostic_id="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "loggerId": "str", + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, + "logClientIp": bool, + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "largeLanguageModel": { - "logs": "str", - "requests": {"maxSizeInBytes": 0, "messages": "str"}, - "responses": {"maxSizeInBytes": 0, "messages": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -141,57 +134,67 @@ async def test_workspace_api_diagnostic_update(self, resource_group): workspace_id="str", api_id="str", diagnostic_id="str", - if_match="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "logClientIp": bool, + "loggerId": "str", + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -206,9 +209,22 @@ async def test_workspace_api_diagnostic_delete(self, resource_group): workspace_id="str", api_id="str", diagnostic_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_api_diagnostic_list_by_workspace(self, resource_group): + response = self.client.workspace_api_diagnostic.list_by_workspace( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + api_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations.py index 2275ab877e1e..ce2fba5d76f8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -28,7 +28,6 @@ def test_workspace_api_export_get(self, resource_group): api_id="str", format="str", export="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations_async.py index b7da7f174d32..6f2a1e45040f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_export_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -29,7 +29,6 @@ async def test_workspace_api_export_get(self, resource_group): api_id="str", format="str", export="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations.py index 4ee9c57ef144..8e7b827e342d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,28 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_operation_list_by_api(self, resource_group): - response = self.client.workspace_api_operation.list_by_api( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_api_operation_get_entity_tag(self, resource_group): - response = self.client.workspace_api_operation.get_entity_tag( + def test_workspace_api_operation_get(self, resource_group): + response = self.client.workspace_api_operation.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", operation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -49,14 +34,13 @@ def test_workspace_api_operation_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_operation_get(self, resource_group): - response = self.client.workspace_api_operation.get( + def test_workspace_api_operation_get_entity_tag(self, resource_group): + response = self.client.workspace_api_operation.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", operation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,78 +56,15 @@ def test_workspace_api_operation_create_or_update(self, resource_group): api_id="str", operation_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", - "method": "str", "name": "str", - "policies": "str", - "request": { + "properties": { + "displayName": "str", + "method": "str", + "urlTemplate": "str", "description": "str", - "headers": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "queryParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "representations": [ - { - "contentType": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "formParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": { - "description": "str", - "externalValue": "str", - "summary": "str", - "value": {}, - } - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "schemaId": "str", - "typeName": "str", - } - ], - }, - "responses": [ - { - "statusCode": 0, + "policies": "str", + "request": { "description": "str", "headers": [ { @@ -160,6 +81,21 @@ def test_workspace_api_operation_create_or_update(self, resource_group): "values": ["str"], } ], + "queryParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], "representations": [ { "contentType": "str", @@ -190,86 +126,12 @@ def test_workspace_api_operation_create_or_update(self, resource_group): "typeName": "str", } ], - } - ], - "templateParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "type": "str", - "urlTemplate": "str", - }, - api_version="2025-03-01-preview", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_api_operation_update(self, resource_group): - response = self.client.workspace_api_operation.update( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_id="str", - operation_id="str", - if_match="str", - parameters={ - "description": "str", - "displayName": "str", - "method": "str", - "policies": "str", - "request": { - "description": "str", - "headers": [ + }, + "responses": [ { - "name": "str", - "type": "str", - "defaultValue": "str", + "statusCode": 0, "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "queryParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "representations": [ - { - "contentType": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "formParameters": [ + "headers": [ { "name": "str", "type": "str", @@ -289,14 +151,90 @@ def test_workspace_api_operation_update(self, resource_group): "values": ["str"], } ], + "representations": [ + { + "contentType": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "formParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "schemaId": "str", + "typeName": "str", + } + ], + } + ], + "templateParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, "schemaId": "str", "typeName": "str", + "values": ["str"], } ], }, - "responses": [ - { - "statusCode": 0, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_api_operation_update(self, resource_group): + response = self.client.workspace_api_operation.update( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + api_id="str", + operation_id="str", + parameters={ + "properties": { + "description": "str", + "displayName": "str", + "method": "str", + "policies": "str", + "request": { "description": "str", "headers": [ { @@ -313,6 +251,21 @@ def test_workspace_api_operation_update(self, resource_group): "values": ["str"], } ], + "queryParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], "representations": [ { "contentType": "str", @@ -343,26 +296,88 @@ def test_workspace_api_operation_update(self, resource_group): "typeName": "str", } ], - } - ], - "templateParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "urlTemplate": "str", + }, + "responses": [ + { + "statusCode": 0, + "description": "str", + "headers": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "representations": [ + { + "contentType": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "formParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "schemaId": "str", + "typeName": "str", + } + ], + } + ], + "templateParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "urlTemplate": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -377,9 +392,22 @@ def test_workspace_api_operation_delete(self, resource_group): workspace_id="str", api_id="str", operation_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_api_operation_list_by_api(self, resource_group): + response = self.client.workspace_api_operation.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + api_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations_async.py index 18fb39c916f6..4f477607fc4e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,28 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_operation_list_by_api(self, resource_group): - response = self.client.workspace_api_operation.list_by_api( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_api_operation_get_entity_tag(self, resource_group): - response = await self.client.workspace_api_operation.get_entity_tag( + async def test_workspace_api_operation_get(self, resource_group): + response = await self.client.workspace_api_operation.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", operation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,14 +35,13 @@ async def test_workspace_api_operation_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_operation_get(self, resource_group): - response = await self.client.workspace_api_operation.get( + async def test_workspace_api_operation_get_entity_tag(self, resource_group): + response = await self.client.workspace_api_operation.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", operation_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,78 +57,15 @@ async def test_workspace_api_operation_create_or_update(self, resource_group): api_id="str", operation_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", - "method": "str", "name": "str", - "policies": "str", - "request": { + "properties": { + "displayName": "str", + "method": "str", + "urlTemplate": "str", "description": "str", - "headers": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "queryParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "representations": [ - { - "contentType": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "formParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": { - "description": "str", - "externalValue": "str", - "summary": "str", - "value": {}, - } - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "schemaId": "str", - "typeName": "str", - } - ], - }, - "responses": [ - { - "statusCode": 0, + "policies": "str", + "request": { "description": "str", "headers": [ { @@ -161,6 +82,21 @@ async def test_workspace_api_operation_create_or_update(self, resource_group): "values": ["str"], } ], + "queryParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], "representations": [ { "contentType": "str", @@ -191,86 +127,12 @@ async def test_workspace_api_operation_create_or_update(self, resource_group): "typeName": "str", } ], - } - ], - "templateParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "type": "str", - "urlTemplate": "str", - }, - api_version="2025-03-01-preview", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_api_operation_update(self, resource_group): - response = await self.client.workspace_api_operation.update( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_id="str", - operation_id="str", - if_match="str", - parameters={ - "description": "str", - "displayName": "str", - "method": "str", - "policies": "str", - "request": { - "description": "str", - "headers": [ + }, + "responses": [ { - "name": "str", - "type": "str", - "defaultValue": "str", + "statusCode": 0, "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "queryParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "representations": [ - { - "contentType": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "formParameters": [ + "headers": [ { "name": "str", "type": "str", @@ -290,14 +152,90 @@ async def test_workspace_api_operation_update(self, resource_group): "values": ["str"], } ], + "representations": [ + { + "contentType": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "formParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "schemaId": "str", + "typeName": "str", + } + ], + } + ], + "templateParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, "schemaId": "str", "typeName": "str", + "values": ["str"], } ], }, - "responses": [ - { - "statusCode": 0, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_api_operation_update(self, resource_group): + response = await self.client.workspace_api_operation.update( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + api_id="str", + operation_id="str", + parameters={ + "properties": { + "description": "str", + "displayName": "str", + "method": "str", + "policies": "str", + "request": { "description": "str", "headers": [ { @@ -314,6 +252,21 @@ async def test_workspace_api_operation_update(self, resource_group): "values": ["str"], } ], + "queryParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], "representations": [ { "contentType": "str", @@ -344,26 +297,88 @@ async def test_workspace_api_operation_update(self, resource_group): "typeName": "str", } ], - } - ], - "templateParameters": [ - { - "name": "str", - "type": "str", - "defaultValue": "str", - "description": "str", - "examples": { - "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} - }, - "required": bool, - "schemaId": "str", - "typeName": "str", - "values": ["str"], - } - ], - "urlTemplate": "str", + }, + "responses": [ + { + "statusCode": 0, + "description": "str", + "headers": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "representations": [ + { + "contentType": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "formParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": { + "description": "str", + "externalValue": "str", + "summary": "str", + "value": {}, + } + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "schemaId": "str", + "typeName": "str", + } + ], + } + ], + "templateParameters": [ + { + "name": "str", + "type": "str", + "defaultValue": "str", + "description": "str", + "examples": { + "str": {"description": "str", "externalValue": "str", "summary": "str", "value": {}} + }, + "required": bool, + "schemaId": "str", + "typeName": "str", + "values": ["str"], + } + ], + "urlTemplate": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -378,9 +393,22 @@ async def test_workspace_api_operation_delete(self, resource_group): workspace_id="str", api_id="str", operation_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_api_operation_list_by_api(self, resource_group): + response = self.client.workspace_api_operation.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + api_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations.py index fe3d99cd03aa..ab9ec6a90c02 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,16 +20,16 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_operation_policy_list_by_operation(self, resource_group): - response = self.client.workspace_api_operation_policy.list_by_operation( + def test_workspace_api_operation_policy_get(self, resource_group): + response = self.client.workspace_api_operation_policy.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", operation_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -43,7 +43,6 @@ def test_workspace_api_operation_policy_get_entity_tag(self, resource_group): api_id="str", operation_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -51,15 +50,28 @@ def test_workspace_api_operation_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_operation_policy_get(self, resource_group): - response = self.client.workspace_api_operation_policy.get( + def test_workspace_api_operation_policy_create_or_update(self, resource_group): + response = self.client.workspace_api_operation_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", operation_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -67,16 +79,16 @@ def test_workspace_api_operation_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_operation_policy_create_or_update(self, resource_group): - response = self.client.workspace_api_operation_policy.create_or_update( + def test_workspace_api_operation_policy_delete(self, resource_group): + response = self.client.workspace_api_operation_policy.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", operation_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -84,17 +96,14 @@ def test_workspace_api_operation_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_operation_policy_delete(self, resource_group): - response = self.client.workspace_api_operation_policy.delete( + def test_workspace_api_operation_policy_list_by_operation(self, resource_group): + response = self.client.workspace_api_operation_policy.list_by_operation( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", operation_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations_async.py index f97dbf0206dc..e81a832a18e7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operation_policy_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,16 +21,16 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_operation_policy_list_by_operation(self, resource_group): - response = self.client.workspace_api_operation_policy.list_by_operation( + async def test_workspace_api_operation_policy_get(self, resource_group): + response = await self.client.workspace_api_operation_policy.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", operation_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -44,7 +44,6 @@ async def test_workspace_api_operation_policy_get_entity_tag(self, resource_grou api_id="str", operation_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -52,15 +51,28 @@ async def test_workspace_api_operation_policy_get_entity_tag(self, resource_grou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_operation_policy_get(self, resource_group): - response = await self.client.workspace_api_operation_policy.get( + async def test_workspace_api_operation_policy_create_or_update(self, resource_group): + response = await self.client.workspace_api_operation_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", operation_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -68,16 +80,16 @@ async def test_workspace_api_operation_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_operation_policy_create_or_update(self, resource_group): - response = await self.client.workspace_api_operation_policy.create_or_update( + async def test_workspace_api_operation_policy_delete(self, resource_group): + response = await self.client.workspace_api_operation_policy.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", operation_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -85,17 +97,14 @@ async def test_workspace_api_operation_policy_create_or_update(self, resource_gr @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_operation_policy_delete(self, resource_group): - response = await self.client.workspace_api_operation_policy.delete( + async def test_workspace_api_operation_policy_list_by_operation(self, resource_group): + response = self.client.workspace_api_operation_policy.list_by_operation( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", operation_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations.py index 3147253ac8f7..6fdac48637f8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_list_by_service(self, resource_group): - response = self.client.workspace_api.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_api_get_entity_tag(self, resource_group): - response = self.client.workspace_api.get_entity_tag( + def test_workspace_api_get(self, resource_group): + response = self.client.workspace_api.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_workspace_api_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_get(self, resource_group): - response = self.client.workspace_api.get( + def test_workspace_api_get_entity_tag(self, resource_group): + response = self.client.workspace_api.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,47 +53,50 @@ def test_workspace_api_begin_create_or_update(self, resource_group): workspace_id="str", api_id="str", parameters={ - "apiRevision": "str", - "apiRevisionDescription": "str", - "apiType": "str", - "apiVersion": "str", - "apiVersionDescription": "str", - "apiVersionSet": { + "properties": { + "path": "str", + "apiRevision": "str", + "apiRevisionDescription": "str", + "apiType": "str", + "apiVersion": "str", + "apiVersionDescription": "str", + "apiVersionSet": { + "description": "str", + "id": "str", + "name": "str", + "versionHeaderName": "str", + "versionQueryName": "str", + "versioningScheme": "str", + }, + "apiVersionSetId": "str", + "authenticationSettings": { + "oAuth2": {"authorizationServerId": "str", "scope": "str"}, + "oAuth2AuthenticationSettings": [{"authorizationServerId": "str", "scope": "str"}], + "openid": {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}, + "openidAuthenticationSettings": [ + {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"} + ], + }, + "contact": {"email": "str", "name": "str", "url": "str"}, "description": "str", - "id": "str", - "name": "str", - "versionHeaderName": "str", - "versionQueryName": "str", - "versioningScheme": "str", - }, - "apiVersionSetId": "str", - "authenticationSettings": { - "oAuth2": {"authorizationServerId": "str", "scope": "str"}, - "oAuth2AuthenticationSettings": [{"authorizationServerId": "str", "scope": "str"}], - "openid": {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}, - "openidAuthenticationSettings": [{"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}], - }, - "contact": {"email": "str", "name": "str", "url": "str"}, - "description": "str", - "displayName": "str", - "format": "str", - "isCurrent": bool, - "isOnline": bool, - "license": {"name": "str", "url": "str"}, - "path": "str", - "protocols": ["str"], - "provisioningState": "str", - "serviceUrl": "str", - "sourceApiId": "str", - "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, - "subscriptionRequired": bool, - "termsOfServiceUrl": "str", - "translateRequiredQueryParameters": "str", - "type": "str", - "value": "str", - "wsdlSelector": {"wsdlEndpointName": "str", "wsdlServiceName": "str"}, + "displayName": "str", + "format": "str", + "isCurrent": bool, + "isOnline": bool, + "license": {"name": "str", "url": "str"}, + "protocols": ["str"], + "provisioningState": "str", + "serviceUrl": "str", + "sourceApiId": "str", + "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, + "subscriptionRequired": bool, + "termsOfServiceUrl": "str", + "translateRequiredQueryParameters": "str", + "type": "str", + "value": "str", + "wsdlSelector": {"wsdlEndpointName": "str", "wsdlServiceName": "str"}, + } }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -122,34 +110,38 @@ def test_workspace_api_update(self, resource_group): service_name="str", workspace_id="str", api_id="str", - if_match="str", parameters={ - "apiRevision": "str", - "apiRevisionDescription": "str", - "apiVersion": "str", - "apiVersionDescription": "str", - "apiVersionSetId": "str", - "authenticationSettings": { - "oAuth2": {"authorizationServerId": "str", "scope": "str"}, - "oAuth2AuthenticationSettings": [{"authorizationServerId": "str", "scope": "str"}], - "openid": {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}, - "openidAuthenticationSettings": [{"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}], - }, - "contact": {"email": "str", "name": "str", "url": "str"}, - "description": "str", - "displayName": "str", - "isCurrent": bool, - "isOnline": bool, - "license": {"name": "str", "url": "str"}, - "path": "str", - "protocols": ["str"], - "serviceUrl": "str", - "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, - "subscriptionRequired": bool, - "termsOfServiceUrl": "str", - "type": "str", + "properties": { + "apiRevision": "str", + "apiRevisionDescription": "str", + "apiVersion": "str", + "apiVersionDescription": "str", + "apiVersionSetId": "str", + "authenticationSettings": { + "oAuth2": {"authorizationServerId": "str", "scope": "str"}, + "oAuth2AuthenticationSettings": [{"authorizationServerId": "str", "scope": "str"}], + "openid": {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}, + "openidAuthenticationSettings": [ + {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"} + ], + }, + "contact": {"email": "str", "name": "str", "url": "str"}, + "description": "str", + "displayName": "str", + "isCurrent": bool, + "isOnline": bool, + "license": {"name": "str", "url": "str"}, + "path": "str", + "protocols": ["str"], + "serviceUrl": "str", + "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, + "subscriptionRequired": bool, + "termsOfServiceUrl": "str", + "type": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -163,9 +155,21 @@ def test_workspace_api_delete(self, resource_group): service_name="str", workspace_id="str", api_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_api_list_by_service(self, resource_group): + response = self.client.workspace_api.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations_async.py index 2262faeac0a2..d979f9962328 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_list_by_service(self, resource_group): - response = self.client.workspace_api.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_api_get_entity_tag(self, resource_group): - response = await self.client.workspace_api.get_entity_tag( + async def test_workspace_api_get(self, resource_group): + response = await self.client.workspace_api.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_workspace_api_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_get(self, resource_group): - response = await self.client.workspace_api.get( + async def test_workspace_api_get_entity_tag(self, resource_group): + response = await self.client.workspace_api.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -70,19 +55,70 @@ async def test_workspace_api_begin_create_or_update(self, resource_group): workspace_id="str", api_id="str", parameters={ + "properties": { + "path": "str", + "apiRevision": "str", + "apiRevisionDescription": "str", + "apiType": "str", + "apiVersion": "str", + "apiVersionDescription": "str", + "apiVersionSet": { + "description": "str", + "id": "str", + "name": "str", + "versionHeaderName": "str", + "versionQueryName": "str", + "versioningScheme": "str", + }, + "apiVersionSetId": "str", + "authenticationSettings": { + "oAuth2": {"authorizationServerId": "str", "scope": "str"}, + "oAuth2AuthenticationSettings": [{"authorizationServerId": "str", "scope": "str"}], + "openid": {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}, + "openidAuthenticationSettings": [ + {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"} + ], + }, + "contact": {"email": "str", "name": "str", "url": "str"}, + "description": "str", + "displayName": "str", + "format": "str", + "isCurrent": bool, + "isOnline": bool, + "license": {"name": "str", "url": "str"}, + "protocols": ["str"], + "provisioningState": "str", + "serviceUrl": "str", + "sourceApiId": "str", + "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, + "subscriptionRequired": bool, + "termsOfServiceUrl": "str", + "translateRequiredQueryParameters": "str", + "type": "str", + "value": "str", + "wsdlSelector": {"wsdlEndpointName": "str", "wsdlServiceName": "str"}, + } + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_api_update(self, resource_group): + response = await self.client.workspace_api.update( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + api_id="str", + parameters={ + "properties": { "apiRevision": "str", "apiRevisionDescription": "str", - "apiType": "str", "apiVersion": "str", "apiVersionDescription": "str", - "apiVersionSet": { - "description": "str", - "id": "str", - "name": "str", - "versionHeaderName": "str", - "versionQueryName": "str", - "versioningScheme": "str", - }, "apiVersionSetId": "str", "authenticationSettings": { "oAuth2": {"authorizationServerId": "str", "scope": "str"}, @@ -95,66 +131,35 @@ async def test_workspace_api_begin_create_or_update(self, resource_group): "contact": {"email": "str", "name": "str", "url": "str"}, "description": "str", "displayName": "str", - "format": "str", "isCurrent": bool, "isOnline": bool, "license": {"name": "str", "url": "str"}, "path": "str", "protocols": ["str"], - "provisioningState": "str", "serviceUrl": "str", - "sourceApiId": "str", "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, "subscriptionRequired": bool, "termsOfServiceUrl": "str", - "translateRequiredQueryParameters": "str", "type": "str", - "value": "str", - "wsdlSelector": {"wsdlEndpointName": "str", "wsdlServiceName": "str"}, - }, - api_version="2025-03-01-preview", - ) - ).result() # call '.result()' to poll until service return final result + } + }, + etag="str", + match_condition=~azure.core.MatchConditions, + ) # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_update(self, resource_group): - response = await self.client.workspace_api.update( + async def test_workspace_api_delete(self, resource_group): + response = await self.client.workspace_api.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", - if_match="str", - parameters={ - "apiRevision": "str", - "apiRevisionDescription": "str", - "apiVersion": "str", - "apiVersionDescription": "str", - "apiVersionSetId": "str", - "authenticationSettings": { - "oAuth2": {"authorizationServerId": "str", "scope": "str"}, - "oAuth2AuthenticationSettings": [{"authorizationServerId": "str", "scope": "str"}], - "openid": {"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}, - "openidAuthenticationSettings": [{"bearerTokenSendingMethods": ["str"], "openidProviderId": "str"}], - }, - "contact": {"email": "str", "name": "str", "url": "str"}, - "description": "str", - "displayName": "str", - "isCurrent": bool, - "isOnline": bool, - "license": {"name": "str", "url": "str"}, - "path": "str", - "protocols": ["str"], - "serviceUrl": "str", - "subscriptionKeyParameterNames": {"header": "str", "query": "str"}, - "subscriptionRequired": bool, - "termsOfServiceUrl": "str", - "type": "str", - }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -162,15 +167,12 @@ async def test_workspace_api_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_delete(self, resource_group): - response = await self.client.workspace_api.delete( + async def test_workspace_api_list_by_service(self, resource_group): + response = self.client.workspace_api.list_by_service( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations.py index 9f6927ca70a8..83b91844ac3e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,15 +20,15 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_policy_list_by_api(self, resource_group): - response = self.client.workspace_api_policy.list_by_api( + def test_workspace_api_policy_get(self, resource_group): + response = self.client.workspace_api_policy.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -41,7 +41,6 @@ def test_workspace_api_policy_get_entity_tag(self, resource_group): workspace_id="str", api_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -49,14 +48,27 @@ def test_workspace_api_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_policy_get(self, resource_group): - response = self.client.workspace_api_policy.get( + def test_workspace_api_policy_create_or_update(self, resource_group): + response = self.client.workspace_api_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -64,15 +76,15 @@ def test_workspace_api_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_policy_create_or_update(self, resource_group): - response = self.client.workspace_api_policy.create_or_update( + def test_workspace_api_policy_delete(self, resource_group): + response = self.client.workspace_api_policy.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -80,16 +92,13 @@ def test_workspace_api_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_policy_delete(self, resource_group): - response = self.client.workspace_api_policy.delete( + def test_workspace_api_policy_list_by_api(self, resource_group): + response = self.client.workspace_api_policy.list_by_api( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations_async.py index 191995fe1959..a6ec2e5d0651 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_policy_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,15 +21,15 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_policy_list_by_api(self, resource_group): - response = self.client.workspace_api_policy.list_by_api( + async def test_workspace_api_policy_get(self, resource_group): + response = await self.client.workspace_api_policy.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -42,7 +42,6 @@ async def test_workspace_api_policy_get_entity_tag(self, resource_group): workspace_id="str", api_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,14 +49,27 @@ async def test_workspace_api_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_policy_get(self, resource_group): - response = await self.client.workspace_api_policy.get( + async def test_workspace_api_policy_create_or_update(self, resource_group): + response = await self.client.workspace_api_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -65,15 +77,15 @@ async def test_workspace_api_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_policy_create_or_update(self, resource_group): - response = await self.client.workspace_api_policy.create_or_update( + async def test_workspace_api_policy_delete(self, resource_group): + response = await self.client.workspace_api_policy.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -81,16 +93,13 @@ async def test_workspace_api_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_policy_delete(self, resource_group): - response = await self.client.workspace_api_policy.delete( + async def test_workspace_api_policy_list_by_api(self, resource_group): + response = self.client.workspace_api_policy.list_by_api( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations.py index 1ce249fa5f99..15a6897e5c54 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,28 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_release_list_by_service(self, resource_group): - response = self.client.workspace_api_release.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_api_release_get_entity_tag(self, resource_group): - response = self.client.workspace_api_release.get_entity_tag( + def test_workspace_api_release_get(self, resource_group): + response = self.client.workspace_api_release.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", release_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -49,14 +34,13 @@ def test_workspace_api_release_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_release_get(self, resource_group): - response = self.client.workspace_api_release.get( + def test_workspace_api_release_get_entity_tag(self, resource_group): + response = self.client.workspace_api_release.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", release_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,15 +56,24 @@ def test_workspace_api_release_create_or_update(self, resource_group): api_id="str", release_id="str", parameters={ - "apiId": "str", - "createdDateTime": "2020-02-20 00:00:00", "id": "str", "name": "str", - "notes": "str", + "properties": { + "apiId": "str", + "createdDateTime": "2020-02-20 00:00:00", + "notes": "str", + "updatedDateTime": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -95,17 +88,27 @@ def test_workspace_api_release_update(self, resource_group): workspace_id="str", api_id="str", release_id="str", - if_match="str", parameters={ - "apiId": "str", - "createdDateTime": "2020-02-20 00:00:00", "id": "str", "name": "str", - "notes": "str", + "properties": { + "apiId": "str", + "createdDateTime": "2020-02-20 00:00:00", + "notes": "str", + "updatedDateTime": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -120,9 +123,22 @@ def test_workspace_api_release_delete(self, resource_group): workspace_id="str", api_id="str", release_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_api_release_list_by_service(self, resource_group): + response = self.client.workspace_api_release.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + api_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations_async.py index 36fd5ce4c61e..fac0ebda9a30 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_release_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,28 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_release_list_by_service(self, resource_group): - response = self.client.workspace_api_release.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_api_release_get_entity_tag(self, resource_group): - response = await self.client.workspace_api_release.get_entity_tag( + async def test_workspace_api_release_get(self, resource_group): + response = await self.client.workspace_api_release.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", release_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,14 +35,13 @@ async def test_workspace_api_release_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_release_get(self, resource_group): - response = await self.client.workspace_api_release.get( + async def test_workspace_api_release_get_entity_tag(self, resource_group): + response = await self.client.workspace_api_release.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", release_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -73,15 +57,24 @@ async def test_workspace_api_release_create_or_update(self, resource_group): api_id="str", release_id="str", parameters={ - "apiId": "str", - "createdDateTime": "2020-02-20 00:00:00", "id": "str", "name": "str", - "notes": "str", + "properties": { + "apiId": "str", + "createdDateTime": "2020-02-20 00:00:00", + "notes": "str", + "updatedDateTime": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -96,17 +89,27 @@ async def test_workspace_api_release_update(self, resource_group): workspace_id="str", api_id="str", release_id="str", - if_match="str", parameters={ - "apiId": "str", - "createdDateTime": "2020-02-20 00:00:00", "id": "str", "name": "str", - "notes": "str", + "properties": { + "apiId": "str", + "createdDateTime": "2020-02-20 00:00:00", + "notes": "str", + "updatedDateTime": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "updatedDateTime": "2020-02-20 00:00:00", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -121,9 +124,22 @@ async def test_workspace_api_release_delete(self, resource_group): workspace_id="str", api_id="str", release_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_api_release_list_by_service(self, resource_group): + response = self.client.workspace_api_release.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + api_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations.py index cd1c3ad63d36..20ee219614da 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ def test_workspace_api_revision_list_by_service(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations_async.py index b93c01e7c03e..da267514810a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_revision_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -27,7 +27,6 @@ async def test_workspace_api_revision_list_by_service(self, resource_group): service_name="str", workspace_id="str", api_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations.py index 23ad9a300dfb..ab7b48ee0744 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,28 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_schema_list_by_api(self, resource_group): - response = self.client.workspace_api_schema.list_by_api( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_api_schema_get_entity_tag(self, resource_group): - response = self.client.workspace_api_schema.get_entity_tag( + def test_workspace_api_schema_get(self, resource_group): + response = self.client.workspace_api_schema.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -49,14 +34,13 @@ def test_workspace_api_schema_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_schema_get(self, resource_group): - response = self.client.workspace_api_schema.get( + def test_workspace_api_schema_get_entity_tag(self, resource_group): + response = self.client.workspace_api_schema.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,16 +56,23 @@ def test_workspace_api_schema_begin_create_or_update(self, resource_group): api_id="str", schema_id="str", parameters={ - "components": {}, - "contentType": "str", - "definitions": {}, "id": "str", "name": "str", - "provisioningState": "str", + "properties": { + "contentType": "str", + "document": {"components": {}, "definitions": {}, "value": "str"}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": "str", }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -96,9 +87,22 @@ def test_workspace_api_schema_delete(self, resource_group): workspace_id="str", api_id="str", schema_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_api_schema_list_by_api(self, resource_group): + response = self.client.workspace_api_schema.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + api_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations_async.py index d4ecf51251d6..71cb714eea83 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_schema_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,28 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_schema_list_by_api(self, resource_group): - response = self.client.workspace_api_schema.list_by_api( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_api_schema_get_entity_tag(self, resource_group): - response = await self.client.workspace_api_schema.get_entity_tag( + async def test_workspace_api_schema_get(self, resource_group): + response = await self.client.workspace_api_schema.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,14 +35,13 @@ async def test_workspace_api_schema_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_schema_get(self, resource_group): - response = await self.client.workspace_api_schema.get( + async def test_workspace_api_schema_get_entity_tag(self, resource_group): + response = await self.client.workspace_api_schema.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", api_id="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -74,16 +58,23 @@ async def test_workspace_api_schema_begin_create_or_update(self, resource_group) api_id="str", schema_id="str", parameters={ - "components": {}, - "contentType": "str", - "definitions": {}, "id": "str", "name": "str", - "provisioningState": "str", + "properties": { + "contentType": "str", + "document": {"components": {}, "definitions": {}, "value": "str"}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": "str", }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -99,9 +90,22 @@ async def test_workspace_api_schema_delete(self, resource_group): workspace_id="str", api_id="str", schema_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_api_schema_list_by_api(self, resource_group): + response = self.client.workspace_api_schema.list_by_api( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + api_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations.py index 0b514d7929f5..01ae34ce8a88 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_version_set_list_by_service(self, resource_group): - response = self.client.workspace_api_version_set.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_api_version_set_get_entity_tag(self, resource_group): - response = self.client.workspace_api_version_set.get_entity_tag( + def test_workspace_api_version_set_get(self, resource_group): + response = self.client.workspace_api_version_set.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", version_set_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_workspace_api_version_set_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_api_version_set_get(self, resource_group): - response = self.client.workspace_api_version_set.get( + def test_workspace_api_version_set_get_entity_tag(self, resource_group): + response = self.client.workspace_api_version_set.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", version_set_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,16 +53,25 @@ def test_workspace_api_version_set_create_or_update(self, resource_group): workspace_id="str", version_set_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", "name": "str", + "properties": { + "displayName": "str", + "versioningScheme": "str", + "description": "str", + "versionHeaderName": "str", + "versionQueryName": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "versionHeaderName": "str", - "versionQueryName": "str", - "versioningScheme": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -91,15 +85,17 @@ def test_workspace_api_version_set_update(self, resource_group): service_name="str", workspace_id="str", version_set_id="str", - if_match="str", parameters={ - "description": "str", - "displayName": "str", - "versionHeaderName": "str", - "versionQueryName": "str", - "versioningScheme": "str", + "properties": { + "description": "str", + "displayName": "str", + "versionHeaderName": "str", + "versionQueryName": "str", + "versioningScheme": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -113,9 +109,21 @@ def test_workspace_api_version_set_delete(self, resource_group): service_name="str", workspace_id="str", version_set_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_api_version_set_list_by_service(self, resource_group): + response = self.client.workspace_api_version_set.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations_async.py index 03dd981515cd..8b84035f21d1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_api_version_set_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_version_set_list_by_service(self, resource_group): - response = self.client.workspace_api_version_set.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_api_version_set_get_entity_tag(self, resource_group): - response = await self.client.workspace_api_version_set.get_entity_tag( + async def test_workspace_api_version_set_get(self, resource_group): + response = await self.client.workspace_api_version_set.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", version_set_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_workspace_api_version_set_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_api_version_set_get(self, resource_group): - response = await self.client.workspace_api_version_set.get( + async def test_workspace_api_version_set_get_entity_tag(self, resource_group): + response = await self.client.workspace_api_version_set.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", version_set_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,16 +54,25 @@ async def test_workspace_api_version_set_create_or_update(self, resource_group): workspace_id="str", version_set_id="str", parameters={ - "description": "str", - "displayName": "str", "id": "str", "name": "str", + "properties": { + "displayName": "str", + "versioningScheme": "str", + "description": "str", + "versionHeaderName": "str", + "versionQueryName": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "versionHeaderName": "str", - "versionQueryName": "str", - "versioningScheme": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -92,15 +86,17 @@ async def test_workspace_api_version_set_update(self, resource_group): service_name="str", workspace_id="str", version_set_id="str", - if_match="str", parameters={ - "description": "str", - "displayName": "str", - "versionHeaderName": "str", - "versionQueryName": "str", - "versioningScheme": "str", + "properties": { + "description": "str", + "displayName": "str", + "versionHeaderName": "str", + "versionQueryName": "str", + "versioningScheme": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -114,9 +110,21 @@ async def test_workspace_api_version_set_delete(self, resource_group): service_name="str", workspace_id="str", version_set_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_api_version_set_list_by_service(self, resource_group): + response = self.client.workspace_api_version_set.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations.py index 46c0227ade91..5a653910eff1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_backend_list_by_workspace(self, resource_group): - response = self.client.workspace_backend.list_by_workspace( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_backend_get_entity_tag(self, resource_group): - response = self.client.workspace_backend.get_entity_tag( + def test_workspace_backend_get(self, resource_group): + response = self.client.workspace_backend.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", backend_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_workspace_backend_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_backend_get(self, resource_group): - response = self.client.workspace_backend.get( + def test_workspace_backend_get_entity_tag(self, resource_group): + response = self.client.workspace_backend.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", backend_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,63 +53,73 @@ def test_workspace_backend_create_or_update(self, resource_group): workspace_id="str", backend_id="str", parameters={ - "azureRegion": "str", - "circuitBreaker": { - "rules": [ - { - "acceptRetryAfter": bool, - "failureCondition": { - "count": 0, - "errorReasons": ["str"], - "interval": "1 day, 0:00:00", - "percentage": 0, - "statusCodeRanges": [{"max": 0, "min": 0}], - }, - "failureResponse": {"statusCode": 0}, - "name": "str", - "tripDuration": "1 day, 0:00:00", - } - ] - }, - "credentials": { - "authorization": {"parameter": "str", "scheme": "str"}, - "certificate": ["str"], - "certificateIds": ["str"], - "header": {"str": ["str"]}, - "query": {"str": ["str"]}, - }, - "description": "str", "id": "str", "name": "str", - "pool": { - "failureResponse": {"statusCode": 0}, - "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], - "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, - }, "properties": { - "serviceFabricCluster": { - "managementEndpoints": ["str"], - "clientCertificateId": "str", - "clientCertificatethumbprint": "str", - "maxPartitionResolutionRetries": 0, + "azureRegion": "str", + "circuitBreaker": { + "rules": [ + { + "acceptRetryAfter": bool, + "failureCondition": { + "count": 0, + "errorReasons": ["str"], + "interval": "1 day, 0:00:00", + "percentage": 0, + "statusCodeRanges": [{"max": 0, "min": 0}], + }, + "failureResponse": {"statusCode": 0}, + "name": "str", + "tripDuration": "1 day, 0:00:00", + } + ] + }, + "credentials": { + "authorization": {"parameter": "str", "scheme": "str"}, + "certificate": ["str"], + "certificateIds": ["str"], + "header": {"str": ["str"]}, + "query": {"str": ["str"]}, + }, + "description": "str", + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, + "properties": { + "serviceFabricCluster": { + "managementEndpoints": ["str"], + "clientCertificateId": "str", + "clientCertificatethumbprint": "str", + "maxPartitionResolutionRetries": 0, + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + } + }, + "protocol": "str", + "proxy": {"url": "str", "password": "str", "username": "str"}, + "resourceId": "str", + "title": "str", + "tls": { "serverCertificateThumbprints": ["str"], "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - } + "validateCertificateChain": bool, + "validateCertificateName": bool, + }, + "type": "str", + "url": "str", }, - "protocol": "str", - "proxy": {"url": "str", "password": "str", "username": "str"}, - "resourceId": "str", - "title": "str", - "tls": { - "serverCertificateThumbprints": ["str"], - "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - "validateCertificateChain": True, - "validateCertificateName": True, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", - "url": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -138,63 +133,65 @@ def test_workspace_backend_update(self, resource_group): service_name="str", workspace_id="str", backend_id="str", - if_match="str", parameters={ - "azureRegion": "str", - "circuitBreaker": { - "rules": [ - { - "acceptRetryAfter": bool, - "failureCondition": { - "count": 0, - "errorReasons": ["str"], - "interval": "1 day, 0:00:00", - "percentage": 0, - "statusCodeRanges": [{"max": 0, "min": 0}], - }, - "failureResponse": {"statusCode": 0}, - "name": "str", - "tripDuration": "1 day, 0:00:00", - } - ] - }, - "credentials": { - "authorization": {"parameter": "str", "scheme": "str"}, - "certificate": ["str"], - "certificateIds": ["str"], - "header": {"str": ["str"]}, - "query": {"str": ["str"]}, - }, - "description": "str", - "pool": { - "failureResponse": {"statusCode": 0}, - "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], - "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, - }, "properties": { - "serviceFabricCluster": { - "managementEndpoints": ["str"], - "clientCertificateId": "str", - "clientCertificatethumbprint": "str", - "maxPartitionResolutionRetries": 0, + "azureRegion": "str", + "circuitBreaker": { + "rules": [ + { + "acceptRetryAfter": bool, + "failureCondition": { + "count": 0, + "errorReasons": ["str"], + "interval": "1 day, 0:00:00", + "percentage": 0, + "statusCodeRanges": [{"max": 0, "min": 0}], + }, + "failureResponse": {"statusCode": 0}, + "name": "str", + "tripDuration": "1 day, 0:00:00", + } + ] + }, + "credentials": { + "authorization": {"parameter": "str", "scheme": "str"}, + "certificate": ["str"], + "certificateIds": ["str"], + "header": {"str": ["str"]}, + "query": {"str": ["str"]}, + }, + "description": "str", + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, + "properties": { + "serviceFabricCluster": { + "managementEndpoints": ["str"], + "clientCertificateId": "str", + "clientCertificatethumbprint": "str", + "maxPartitionResolutionRetries": 0, + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + } + }, + "protocol": "str", + "proxy": {"url": "str", "password": "str", "username": "str"}, + "resourceId": "str", + "title": "str", + "tls": { "serverCertificateThumbprints": ["str"], "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - } - }, - "protocol": "str", - "proxy": {"url": "str", "password": "str", "username": "str"}, - "resourceId": "str", - "title": "str", - "tls": { - "serverCertificateThumbprints": ["str"], - "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - "validateCertificateChain": True, - "validateCertificateName": True, - }, - "type": "str", - "url": "str", + "validateCertificateChain": bool, + "validateCertificateName": bool, + }, + "type": "str", + "url": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -208,9 +205,21 @@ def test_workspace_backend_delete(self, resource_group): service_name="str", workspace_id="str", backend_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_backend_list_by_workspace(self, resource_group): + response = self.client.workspace_backend.list_by_workspace( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations_async.py index c307058cd0fc..c783889bfd02 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_backend_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_backend_list_by_workspace(self, resource_group): - response = self.client.workspace_backend.list_by_workspace( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_backend_get_entity_tag(self, resource_group): - response = await self.client.workspace_backend.get_entity_tag( + async def test_workspace_backend_get(self, resource_group): + response = await self.client.workspace_backend.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", backend_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_workspace_backend_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_backend_get(self, resource_group): - response = await self.client.workspace_backend.get( + async def test_workspace_backend_get_entity_tag(self, resource_group): + response = await self.client.workspace_backend.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", backend_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,63 +54,73 @@ async def test_workspace_backend_create_or_update(self, resource_group): workspace_id="str", backend_id="str", parameters={ - "azureRegion": "str", - "circuitBreaker": { - "rules": [ - { - "acceptRetryAfter": bool, - "failureCondition": { - "count": 0, - "errorReasons": ["str"], - "interval": "1 day, 0:00:00", - "percentage": 0, - "statusCodeRanges": [{"max": 0, "min": 0}], - }, - "failureResponse": {"statusCode": 0}, - "name": "str", - "tripDuration": "1 day, 0:00:00", - } - ] - }, - "credentials": { - "authorization": {"parameter": "str", "scheme": "str"}, - "certificate": ["str"], - "certificateIds": ["str"], - "header": {"str": ["str"]}, - "query": {"str": ["str"]}, - }, - "description": "str", "id": "str", "name": "str", - "pool": { - "failureResponse": {"statusCode": 0}, - "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], - "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, - }, "properties": { - "serviceFabricCluster": { - "managementEndpoints": ["str"], - "clientCertificateId": "str", - "clientCertificatethumbprint": "str", - "maxPartitionResolutionRetries": 0, + "azureRegion": "str", + "circuitBreaker": { + "rules": [ + { + "acceptRetryAfter": bool, + "failureCondition": { + "count": 0, + "errorReasons": ["str"], + "interval": "1 day, 0:00:00", + "percentage": 0, + "statusCodeRanges": [{"max": 0, "min": 0}], + }, + "failureResponse": {"statusCode": 0}, + "name": "str", + "tripDuration": "1 day, 0:00:00", + } + ] + }, + "credentials": { + "authorization": {"parameter": "str", "scheme": "str"}, + "certificate": ["str"], + "certificateIds": ["str"], + "header": {"str": ["str"]}, + "query": {"str": ["str"]}, + }, + "description": "str", + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, + "properties": { + "serviceFabricCluster": { + "managementEndpoints": ["str"], + "clientCertificateId": "str", + "clientCertificatethumbprint": "str", + "maxPartitionResolutionRetries": 0, + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + } + }, + "protocol": "str", + "proxy": {"url": "str", "password": "str", "username": "str"}, + "resourceId": "str", + "title": "str", + "tls": { "serverCertificateThumbprints": ["str"], "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - } + "validateCertificateChain": bool, + "validateCertificateName": bool, + }, + "type": "str", + "url": "str", }, - "protocol": "str", - "proxy": {"url": "str", "password": "str", "username": "str"}, - "resourceId": "str", - "title": "str", - "tls": { - "serverCertificateThumbprints": ["str"], - "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - "validateCertificateChain": True, - "validateCertificateName": True, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", - "url": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -139,63 +134,65 @@ async def test_workspace_backend_update(self, resource_group): service_name="str", workspace_id="str", backend_id="str", - if_match="str", parameters={ - "azureRegion": "str", - "circuitBreaker": { - "rules": [ - { - "acceptRetryAfter": bool, - "failureCondition": { - "count": 0, - "errorReasons": ["str"], - "interval": "1 day, 0:00:00", - "percentage": 0, - "statusCodeRanges": [{"max": 0, "min": 0}], - }, - "failureResponse": {"statusCode": 0}, - "name": "str", - "tripDuration": "1 day, 0:00:00", - } - ] - }, - "credentials": { - "authorization": {"parameter": "str", "scheme": "str"}, - "certificate": ["str"], - "certificateIds": ["str"], - "header": {"str": ["str"]}, - "query": {"str": ["str"]}, - }, - "description": "str", - "pool": { - "failureResponse": {"statusCode": 0}, - "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], - "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, - }, "properties": { - "serviceFabricCluster": { - "managementEndpoints": ["str"], - "clientCertificateId": "str", - "clientCertificatethumbprint": "str", - "maxPartitionResolutionRetries": 0, + "azureRegion": "str", + "circuitBreaker": { + "rules": [ + { + "acceptRetryAfter": bool, + "failureCondition": { + "count": 0, + "errorReasons": ["str"], + "interval": "1 day, 0:00:00", + "percentage": 0, + "statusCodeRanges": [{"max": 0, "min": 0}], + }, + "failureResponse": {"statusCode": 0}, + "name": "str", + "tripDuration": "1 day, 0:00:00", + } + ] + }, + "credentials": { + "authorization": {"parameter": "str", "scheme": "str"}, + "certificate": ["str"], + "certificateIds": ["str"], + "header": {"str": ["str"]}, + "query": {"str": ["str"]}, + }, + "description": "str", + "pool": { + "failureResponse": {"statusCode": 0}, + "services": [{"id": "str", "preferredCarbonEmission": "str", "priority": 0, "weight": 0}], + "sessionAffinity": {"sessionId": {"name": "str", "source": "str"}}, + }, + "properties": { + "serviceFabricCluster": { + "managementEndpoints": ["str"], + "clientCertificateId": "str", + "clientCertificatethumbprint": "str", + "maxPartitionResolutionRetries": 0, + "serverCertificateThumbprints": ["str"], + "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], + } + }, + "protocol": "str", + "proxy": {"url": "str", "password": "str", "username": "str"}, + "resourceId": "str", + "title": "str", + "tls": { "serverCertificateThumbprints": ["str"], "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - } - }, - "protocol": "str", - "proxy": {"url": "str", "password": "str", "username": "str"}, - "resourceId": "str", - "title": "str", - "tls": { - "serverCertificateThumbprints": ["str"], - "serverX509Names": [{"issuerCertificateThumbprint": "str", "name": "str"}], - "validateCertificateChain": True, - "validateCertificateName": True, - }, - "type": "str", - "url": "str", + "validateCertificateChain": bool, + "validateCertificateName": bool, + }, + "type": "str", + "url": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -209,9 +206,21 @@ async def test_workspace_backend_delete(self, resource_group): service_name="str", workspace_id="str", backend_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_backend_list_by_workspace(self, resource_group): + response = self.client.workspace_backend.list_by_workspace( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations.py index 5f9953553046..e8011d8dbc67 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,14 +20,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_certificate_list_by_workspace(self, resource_group): - response = self.client.workspace_certificate.list_by_workspace( + def test_workspace_certificate_get(self, resource_group): + response = self.client.workspace_certificate.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + certificate_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -39,7 +39,6 @@ def test_workspace_certificate_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", certificate_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +46,19 @@ def test_workspace_certificate_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_certificate_get(self, resource_group): - response = self.client.workspace_certificate.get( + def test_workspace_certificate_create_or_update(self, resource_group): + response = self.client.workspace_certificate.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", certificate_id="str", - api_version="2025-03-01-preview", + parameters={ + "properties": { + "data": "str", + "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, + "password": "str", + } + }, ) # please add some check logic here by yourself @@ -61,18 +66,14 @@ def test_workspace_certificate_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_certificate_create_or_update(self, resource_group): - response = self.client.workspace_certificate.create_or_update( + def test_workspace_certificate_delete(self, resource_group): + response = self.client.workspace_certificate.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", certificate_id="str", - parameters={ - "data": "str", - "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, - "password": "str", - }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -80,16 +81,13 @@ def test_workspace_certificate_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_certificate_delete(self, resource_group): - response = self.client.workspace_certificate.delete( + def test_workspace_certificate_list_by_workspace(self, resource_group): + response = self.client.workspace_certificate.list_by_workspace( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - certificate_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... @@ -101,7 +99,6 @@ def test_workspace_certificate_refresh_secret(self, resource_group): service_name="str", workspace_id="str", certificate_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations_async.py index 8c7019f4eaf4..380849c1c876 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_certificate_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,14 +21,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_certificate_list_by_workspace(self, resource_group): - response = self.client.workspace_certificate.list_by_workspace( + async def test_workspace_certificate_get(self, resource_group): + response = await self.client.workspace_certificate.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + certificate_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -40,7 +40,6 @@ async def test_workspace_certificate_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", certificate_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +47,19 @@ async def test_workspace_certificate_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_certificate_get(self, resource_group): - response = await self.client.workspace_certificate.get( + async def test_workspace_certificate_create_or_update(self, resource_group): + response = await self.client.workspace_certificate.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", certificate_id="str", - api_version="2025-03-01-preview", + parameters={ + "properties": { + "data": "str", + "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, + "password": "str", + } + }, ) # please add some check logic here by yourself @@ -62,18 +67,14 @@ async def test_workspace_certificate_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_certificate_create_or_update(self, resource_group): - response = await self.client.workspace_certificate.create_or_update( + async def test_workspace_certificate_delete(self, resource_group): + response = await self.client.workspace_certificate.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", certificate_id="str", - parameters={ - "data": "str", - "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, - "password": "str", - }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -81,16 +82,13 @@ async def test_workspace_certificate_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_certificate_delete(self, resource_group): - response = await self.client.workspace_certificate.delete( + async def test_workspace_certificate_list_by_workspace(self, resource_group): + response = self.client.workspace_certificate.list_by_workspace( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - certificate_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... @@ -102,7 +100,6 @@ async def test_workspace_certificate_refresh_secret(self, resource_group): service_name="str", workspace_id="str", certificate_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations.py index 34e6de5aff27..f8ed25cc1bfd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_diagnostic_list_by_workspace(self, resource_group): - response = self.client.workspace_diagnostic.list_by_workspace( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_diagnostic_get_entity_tag(self, resource_group): - response = self.client.workspace_diagnostic.get_entity_tag( + def test_workspace_diagnostic_get(self, resource_group): + response = self.client.workspace_diagnostic.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_workspace_diagnostic_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_diagnostic_get(self, resource_group): - response = self.client.workspace_diagnostic.get( + def test_workspace_diagnostic_get_entity_tag(self, resource_group): + response = self.client.workspace_diagnostic.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,60 +53,69 @@ def test_workspace_diagnostic_create_or_update(self, resource_group): workspace_id="str", diagnostic_id="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "loggerId": "str", + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, + "logClientIp": bool, + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "largeLanguageModel": { - "logs": "str", - "requests": {"maxSizeInBytes": 0, "messages": "str"}, - "responses": {"maxSizeInBytes": 0, "messages": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -135,57 +129,67 @@ def test_workspace_diagnostic_update(self, resource_group): service_name="str", workspace_id="str", diagnostic_id="str", - if_match="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "logClientIp": bool, + "loggerId": "str", + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -199,9 +203,21 @@ def test_workspace_diagnostic_delete(self, resource_group): service_name="str", workspace_id="str", diagnostic_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_diagnostic_list_by_workspace(self, resource_group): + response = self.client.workspace_diagnostic.list_by_workspace( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations_async.py index 712eec09f6ec..142f8c344e82 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_diagnostic_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_diagnostic_list_by_workspace(self, resource_group): - response = self.client.workspace_diagnostic.list_by_workspace( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_diagnostic_get_entity_tag(self, resource_group): - response = await self.client.workspace_diagnostic.get_entity_tag( + async def test_workspace_diagnostic_get(self, resource_group): + response = await self.client.workspace_diagnostic.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_workspace_diagnostic_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_diagnostic_get(self, resource_group): - response = await self.client.workspace_diagnostic.get( + async def test_workspace_diagnostic_get_entity_tag(self, resource_group): + response = await self.client.workspace_diagnostic.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", diagnostic_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,60 +54,69 @@ async def test_workspace_diagnostic_create_or_update(self, resource_group): workspace_id="str", diagnostic_id="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "loggerId": "str", + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "largeLanguageModel": { + "logs": "str", + "requests": {"maxSizeInBytes": 0, "messages": "str"}, + "responses": {"maxSizeInBytes": 0, "messages": "str"}, + }, + "logClientIp": bool, + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "largeLanguageModel": { - "logs": "str", - "requests": {"maxSizeInBytes": 0, "messages": "str"}, - "responses": {"maxSizeInBytes": 0, "messages": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -136,57 +130,67 @@ async def test_workspace_diagnostic_update(self, resource_group): service_name="str", workspace_id="str", diagnostic_id="str", - if_match="str", parameters={ - "alwaysLog": "str", - "backend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "id": "str", + "name": "str", + "properties": { + "alwaysLog": "str", + "backend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, - }, - "frontend": { - "request": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "frontend": { + "request": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], - }, - "response": { - "body": {"bytes": 0}, - "dataMasking": { - "headers": [{"mode": "str", "value": "str"}], - "queryParams": [{"mode": "str", "value": "str"}], + "response": { + "body": {"bytes": 0}, + "dataMasking": { + "headers": [{"mode": "str", "value": "str"}], + "queryParams": [{"mode": "str", "value": "str"}], + }, + "headers": ["str"], }, - "headers": ["str"], }, + "httpCorrelationProtocol": "str", + "logClientIp": bool, + "loggerId": "str", + "metrics": bool, + "operationNameFormat": "str", + "sampling": {"percentage": 0.0, "samplingType": "str"}, + "verbosity": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "httpCorrelationProtocol": "str", - "id": "str", - "logClientIp": bool, - "loggerId": "str", - "metrics": bool, - "name": "str", - "operationNameFormat": "str", - "sampling": {"percentage": 0.0, "samplingType": "str"}, "type": "str", - "verbosity": "str", }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -200,9 +204,21 @@ async def test_workspace_diagnostic_delete(self, resource_group): service_name="str", workspace_id="str", diagnostic_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_diagnostic_list_by_workspace(self, resource_group): + response = self.client.workspace_diagnostic.list_by_workspace( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations.py index a36de0526c70..ae09fcafa244 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_global_schema_list_by_service(self, resource_group): - response = self.client.workspace_global_schema.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_global_schema_get_entity_tag(self, resource_group): - response = self.client.workspace_global_schema.get_entity_tag( + def test_workspace_global_schema_get(self, resource_group): + response = self.client.workspace_global_schema.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_workspace_global_schema_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_global_schema_get(self, resource_group): - response = self.client.workspace_global_schema.get( + def test_workspace_global_schema_get_entity_tag(self, resource_group): + response = self.client.workspace_global_schema.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,16 +53,25 @@ def test_workspace_global_schema_begin_create_or_update(self, resource_group): workspace_id="str", schema_id="str", parameters={ - "description": "str", - "document": {}, "id": "str", "name": "str", - "provisioningState": "str", - "schemaType": "str", + "properties": { + "schemaType": "str", + "description": "str", + "document": {}, + "provisioningState": "str", + "value": {}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": {}, }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -91,9 +85,21 @@ def test_workspace_global_schema_delete(self, resource_group): service_name="str", workspace_id="str", schema_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_global_schema_list_by_service(self, resource_group): + response = self.client.workspace_global_schema.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations_async.py index 2f408dd3f917..52723fe3d953 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_global_schema_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_global_schema_list_by_service(self, resource_group): - response = self.client.workspace_global_schema.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_global_schema_get_entity_tag(self, resource_group): - response = await self.client.workspace_global_schema.get_entity_tag( + async def test_workspace_global_schema_get(self, resource_group): + response = await self.client.workspace_global_schema.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_workspace_global_schema_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_global_schema_get(self, resource_group): - response = await self.client.workspace_global_schema.get( + async def test_workspace_global_schema_get_entity_tag(self, resource_group): + response = await self.client.workspace_global_schema.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", schema_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -70,16 +55,25 @@ async def test_workspace_global_schema_begin_create_or_update(self, resource_gro workspace_id="str", schema_id="str", parameters={ - "description": "str", - "document": {}, "id": "str", "name": "str", - "provisioningState": "str", - "schemaType": "str", + "properties": { + "schemaType": "str", + "description": "str", + "document": {}, + "provisioningState": "str", + "value": {}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": {}, }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -94,9 +88,21 @@ async def test_workspace_global_schema_delete(self, resource_group): service_name="str", workspace_id="str", schema_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_global_schema_list_by_service(self, resource_group): + response = self.client.workspace_global_schema.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations.py index 2887e1d658fd..b20b63553075 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,14 +20,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_group_list_by_service(self, resource_group): - response = self.client.workspace_group.list_by_service( + def test_workspace_group_get(self, resource_group): + response = self.client.workspace_group.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + group_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -39,7 +39,6 @@ def test_workspace_group_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", group_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +46,13 @@ def test_workspace_group_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_group_get(self, resource_group): - response = self.client.workspace_group.get( + def test_workspace_group_create_or_update(self, resource_group): + response = self.client.workspace_group.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", group_id="str", - api_version="2025-03-01-preview", + parameters={"properties": {"displayName": "str", "description": "str", "externalId": "str", "type": "str"}}, ) # please add some check logic here by yourself @@ -61,14 +60,15 @@ def test_workspace_group_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_group_create_or_update(self, resource_group): - response = self.client.workspace_group.create_or_update( + def test_workspace_group_update(self, resource_group): + response = self.client.workspace_group.update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", group_id="str", - parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"description": "str", "displayName": "str", "externalId": "str", "type": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -76,15 +76,14 @@ def test_workspace_group_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_group_update(self, resource_group): - response = self.client.workspace_group.update( + def test_workspace_group_delete(self, resource_group): + response = self.client.workspace_group.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", group_id="str", - if_match="str", - parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -92,15 +91,12 @@ def test_workspace_group_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_group_delete(self, resource_group): - response = self.client.workspace_group.delete( + def test_workspace_group_list_by_service(self, resource_group): + response = self.client.workspace_group.list_by_service( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - group_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations_async.py index 1e522e7fc677..1108f376a576 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,14 +21,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_group_list_by_service(self, resource_group): - response = self.client.workspace_group.list_by_service( + async def test_workspace_group_get(self, resource_group): + response = await self.client.workspace_group.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + group_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -40,7 +40,6 @@ async def test_workspace_group_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", group_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +47,13 @@ async def test_workspace_group_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_group_get(self, resource_group): - response = await self.client.workspace_group.get( + async def test_workspace_group_create_or_update(self, resource_group): + response = await self.client.workspace_group.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", group_id="str", - api_version="2025-03-01-preview", + parameters={"properties": {"displayName": "str", "description": "str", "externalId": "str", "type": "str"}}, ) # please add some check logic here by yourself @@ -62,14 +61,15 @@ async def test_workspace_group_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_group_create_or_update(self, resource_group): - response = await self.client.workspace_group.create_or_update( + async def test_workspace_group_update(self, resource_group): + response = await self.client.workspace_group.update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", group_id="str", - parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"description": "str", "displayName": "str", "externalId": "str", "type": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -77,15 +77,14 @@ async def test_workspace_group_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_group_update(self, resource_group): - response = await self.client.workspace_group.update( + async def test_workspace_group_delete(self, resource_group): + response = await self.client.workspace_group.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", group_id="str", - if_match="str", - parameters={"description": "str", "displayName": "str", "externalId": "str", "type": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -93,15 +92,12 @@ async def test_workspace_group_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_group_delete(self, resource_group): - response = await self.client.workspace_group.delete( + async def test_workspace_group_list_by_service(self, resource_group): + response = self.client.workspace_group.list_by_service( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - group_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations.py index fd2c9f3d5558..b3058754a7bd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ def test_workspace_group_user_list(self, resource_group): service_name="str", workspace_id="str", group_id="str", - api_version="2025-03-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +40,6 @@ def test_workspace_group_user_check_entity_exists(self, resource_group): workspace_id="str", group_id="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +54,6 @@ def test_workspace_group_user_create(self, resource_group): workspace_id="str", group_id="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -71,7 +68,6 @@ def test_workspace_group_user_delete(self, resource_group): workspace_id="str", group_id="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations_async.py index 9654ed23c087..4e1793bc21bc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_group_user_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -27,7 +27,6 @@ async def test_workspace_group_user_list(self, resource_group): service_name="str", workspace_id="str", group_id="str", - api_version="2025-03-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +41,6 @@ async def test_workspace_group_user_check_entity_exists(self, resource_group): workspace_id="str", group_id="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +55,6 @@ async def test_workspace_group_user_create(self, resource_group): workspace_id="str", group_id="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +69,6 @@ async def test_workspace_group_user_delete(self, resource_group): workspace_id="str", group_id="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations.py index a1c014e65935..3e3051a42aac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_logger_list_by_workspace(self, resource_group): - response = self.client.workspace_logger.list_by_workspace( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_logger_get_entity_tag(self, resource_group): - response = self.client.workspace_logger.get_entity_tag( + def test_workspace_logger_get(self, resource_group): + response = self.client.workspace_logger.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", logger_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_workspace_logger_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_logger_get(self, resource_group): - response = self.client.workspace_logger.get( + def test_workspace_logger_get_entity_tag(self, resource_group): + response = self.client.workspace_logger.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", logger_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,16 +53,25 @@ def test_workspace_logger_create_or_update(self, resource_group): workspace_id="str", logger_id="str", parameters={ - "credentials": {"str": "str"}, - "description": "str", "id": "str", - "isBuffered": bool, - "loggerType": "str", "name": "str", - "resourceId": "str", + "properties": { + "loggerType": "str", + "credentials": {"str": "str"}, + "description": "str", + "isBuffered": bool, + "resourceId": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -91,9 +85,16 @@ def test_workspace_logger_update(self, resource_group): service_name="str", workspace_id="str", logger_id="str", - if_match="str", - parameters={"credentials": {"str": "str"}, "description": "str", "isBuffered": bool, "loggerType": "str"}, - api_version="2025-03-01-preview", + parameters={ + "properties": { + "credentials": {"str": "str"}, + "description": "str", + "isBuffered": bool, + "loggerType": "str", + } + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -107,9 +108,21 @@ def test_workspace_logger_delete(self, resource_group): service_name="str", workspace_id="str", logger_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_logger_list_by_workspace(self, resource_group): + response = self.client.workspace_logger.list_by_workspace( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations_async.py index cc47cef76e79..709b387aee7f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_logger_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_logger_list_by_workspace(self, resource_group): - response = self.client.workspace_logger.list_by_workspace( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_logger_get_entity_tag(self, resource_group): - response = await self.client.workspace_logger.get_entity_tag( + async def test_workspace_logger_get(self, resource_group): + response = await self.client.workspace_logger.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", logger_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_workspace_logger_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_logger_get(self, resource_group): - response = await self.client.workspace_logger.get( + async def test_workspace_logger_get_entity_tag(self, resource_group): + response = await self.client.workspace_logger.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", logger_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,16 +54,25 @@ async def test_workspace_logger_create_or_update(self, resource_group): workspace_id="str", logger_id="str", parameters={ - "credentials": {"str": "str"}, - "description": "str", "id": "str", - "isBuffered": bool, - "loggerType": "str", "name": "str", - "resourceId": "str", + "properties": { + "loggerType": "str", + "credentials": {"str": "str"}, + "description": "str", + "isBuffered": bool, + "resourceId": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -92,9 +86,16 @@ async def test_workspace_logger_update(self, resource_group): service_name="str", workspace_id="str", logger_id="str", - if_match="str", - parameters={"credentials": {"str": "str"}, "description": "str", "isBuffered": bool, "loggerType": "str"}, - api_version="2025-03-01-preview", + parameters={ + "properties": { + "credentials": {"str": "str"}, + "description": "str", + "isBuffered": bool, + "loggerType": "str", + } + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -108,9 +109,21 @@ async def test_workspace_logger_delete(self, resource_group): service_name="str", workspace_id="str", logger_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_logger_list_by_workspace(self, resource_group): + response = self.client.workspace_logger.list_by_workspace( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations.py index d9723ec0b570..4f61803cce42 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_named_value_list_by_service(self, resource_group): - response = self.client.workspace_named_value.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_named_value_get_entity_tag(self, resource_group): - response = self.client.workspace_named_value.get_entity_tag( + def test_workspace_named_value_get(self, resource_group): + response = self.client.workspace_named_value.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", named_value_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_workspace_named_value_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_named_value_get(self, resource_group): - response = self.client.workspace_named_value.get( + def test_workspace_named_value_get_entity_tag(self, resource_group): + response = self.client.workspace_named_value.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", named_value_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,16 +53,25 @@ def test_workspace_named_value_begin_create_or_update(self, resource_group): workspace_id="str", named_value_id="str", parameters={ - "displayName": "str", "id": "str", - "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, "name": "str", - "secret": bool, - "tags": ["str"], + "properties": { + "displayName": "str", + "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, + "secret": bool, + "tags": ["str"], + "value": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": "str", }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -91,15 +85,17 @@ def test_workspace_named_value_begin_update(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - if_match="str", parameters={ - "displayName": "str", - "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, - "secret": bool, - "tags": ["str"], - "value": "str", + "properties": { + "displayName": "str", + "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, + "secret": bool, + "tags": ["str"], + "value": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -113,13 +109,25 @@ def test_workspace_named_value_delete(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_named_value_list_by_service(self, resource_group): + response = self.client.workspace_named_value.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_workspace_named_value_list_value(self, resource_group): @@ -128,7 +136,6 @@ def test_workspace_named_value_list_value(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -142,7 +149,6 @@ def test_workspace_named_value_begin_refresh_secret(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations_async.py index 3c64816784df..8d8fdff3b9a5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_named_value_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_named_value_list_by_service(self, resource_group): - response = self.client.workspace_named_value.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_named_value_get_entity_tag(self, resource_group): - response = await self.client.workspace_named_value.get_entity_tag( + async def test_workspace_named_value_get(self, resource_group): + response = await self.client.workspace_named_value.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", named_value_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_workspace_named_value_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_named_value_get(self, resource_group): - response = await self.client.workspace_named_value.get( + async def test_workspace_named_value_get_entity_tag(self, resource_group): + response = await self.client.workspace_named_value.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", named_value_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -70,16 +55,25 @@ async def test_workspace_named_value_begin_create_or_update(self, resource_group workspace_id="str", named_value_id="str", parameters={ - "displayName": "str", "id": "str", - "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, "name": "str", - "secret": bool, - "tags": ["str"], + "properties": { + "displayName": "str", + "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, + "secret": bool, + "tags": ["str"], + "value": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": "str", }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -95,15 +89,17 @@ async def test_workspace_named_value_begin_update(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - if_match="str", parameters={ - "displayName": "str", - "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, - "secret": bool, - "tags": ["str"], - "value": "str", + "properties": { + "displayName": "str", + "keyVault": {"identityClientId": "str", "secretIdentifier": "str"}, + "secret": bool, + "tags": ["str"], + "value": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) ).result() # call '.result()' to poll until service return final result @@ -118,13 +114,25 @@ async def test_workspace_named_value_delete(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_named_value_list_by_service(self, resource_group): + response = self.client.workspace_named_value.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_workspace_named_value_list_value(self, resource_group): @@ -133,7 +141,6 @@ async def test_workspace_named_value_list_value(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -148,7 +155,6 @@ async def test_workspace_named_value_begin_refresh_secret(self, resource_group): service_name="str", workspace_id="str", named_value_id="str", - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations.py index cb59e3f66477..74fa4569d033 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,25 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_notification_list_by_service(self, resource_group): - response = self.client.workspace_notification.list_by_service( + def test_workspace_notification_get(self, resource_group): + response = self.client.workspace_notification.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + notification_name="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_notification_get(self, resource_group): - response = self.client.workspace_notification.get( + def test_workspace_notification_create_or_update(self, resource_group): + response = self.client.workspace_notification.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", notification_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,14 +46,12 @@ def test_workspace_notification_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_notification_create_or_update(self, resource_group): - response = self.client.workspace_notification.create_or_update( + def test_workspace_notification_list_by_service(self, resource_group): + response = self.client.workspace_notification.list_by_service( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - notification_name="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations_async.py index bca895516d42..e29fcc83cc65 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,25 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_notification_list_by_service(self, resource_group): - response = self.client.workspace_notification.list_by_service( + async def test_workspace_notification_get(self, resource_group): + response = await self.client.workspace_notification.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + notification_name="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_notification_get(self, resource_group): - response = await self.client.workspace_notification.get( + async def test_workspace_notification_create_or_update(self, resource_group): + response = await self.client.workspace_notification.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", notification_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,14 +47,12 @@ async def test_workspace_notification_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_notification_create_or_update(self, resource_group): - response = await self.client.workspace_notification.create_or_update( + async def test_workspace_notification_list_by_service(self, resource_group): + response = self.client.workspace_notification.list_by_service( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - notification_name="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations.py index 4b0bac2b9b83..39fe6f5e150c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ def test_workspace_notification_recipient_email_list_by_notification(self, resou service_name="str", workspace_id="str", notification_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -41,7 +40,6 @@ def test_workspace_notification_recipient_email_check_entity_exists(self, resour workspace_id="str", notification_name="str", email="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +54,6 @@ def test_workspace_notification_recipient_email_create_or_update(self, resource_ workspace_id="str", notification_name="str", email="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -71,7 +68,6 @@ def test_workspace_notification_recipient_email_delete(self, resource_group): workspace_id="str", notification_name="str", email="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations_async.py index 6946743204bb..c5e9a1953d11 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_email_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -27,7 +27,6 @@ async def test_workspace_notification_recipient_email_list_by_notification(self, service_name="str", workspace_id="str", notification_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -42,7 +41,6 @@ async def test_workspace_notification_recipient_email_check_entity_exists(self, workspace_id="str", notification_name="str", email="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +55,6 @@ async def test_workspace_notification_recipient_email_create_or_update(self, res workspace_id="str", notification_name="str", email="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +69,6 @@ async def test_workspace_notification_recipient_email_delete(self, resource_grou workspace_id="str", notification_name="str", email="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations.py index 963c3668a478..a65ce4707181 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ def test_workspace_notification_recipient_user_list_by_notification(self, resour service_name="str", workspace_id="str", notification_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -41,7 +40,6 @@ def test_workspace_notification_recipient_user_check_entity_exists(self, resourc workspace_id="str", notification_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -56,7 +54,6 @@ def test_workspace_notification_recipient_user_create_or_update(self, resource_g workspace_id="str", notification_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -71,7 +68,6 @@ def test_workspace_notification_recipient_user_delete(self, resource_group): workspace_id="str", notification_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations_async.py index e66aed2245fd..b6f0c7ca6cda 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_notification_recipient_user_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -27,7 +27,6 @@ async def test_workspace_notification_recipient_user_list_by_notification(self, service_name="str", workspace_id="str", notification_name="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -42,7 +41,6 @@ async def test_workspace_notification_recipient_user_check_entity_exists(self, r workspace_id="str", notification_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -57,7 +55,6 @@ async def test_workspace_notification_recipient_user_create_or_update(self, reso workspace_id="str", notification_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -72,7 +69,6 @@ async def test_workspace_notification_recipient_user_delete(self, resource_group workspace_id="str", notification_name="str", user_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations.py index e853634f014c..dc5f2c70f6a1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_list_by_service(self, resource_group): - response = self.client.workspace.list_by_service( + def test_workspace_get(self, resource_group): + response = self.client.workspace.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + workspace_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -37,7 +37,6 @@ def test_workspace_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -45,12 +44,25 @@ def test_workspace_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_get(self, resource_group): - response = self.client.workspace.get( + def test_workspace_create_or_update(self, resource_group): + response = self.client.workspace.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"displayName": "str", "description": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -58,13 +70,27 @@ def test_workspace_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_create_or_update(self, resource_group): - response = self.client.workspace.create_or_update( + def test_workspace_update(self, resource_group): + response = self.client.workspace.update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - parameters={"description": "str", "displayName": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"displayName": "str", "description": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -72,14 +98,13 @@ def test_workspace_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_update(self, resource_group): - response = self.client.workspace.update( + def test_workspace_delete(self, resource_group): + response = self.client.workspace.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - if_match="str", - parameters={"description": "str", "displayName": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -87,14 +112,11 @@ def test_workspace_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_delete(self, resource_group): - response = self.client.workspace.delete( + def test_workspace_list_by_service(self, resource_group): + response = self.client.workspace.list_by_service( resource_group_name=resource_group.name, service_name="str", - workspace_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations_async.py index 4a26a98b98af..5d570477206b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_list_by_service(self, resource_group): - response = self.client.workspace.list_by_service( + async def test_workspace_get(self, resource_group): + response = await self.client.workspace.get( resource_group_name=resource_group.name, service_name="str", - api_version="2025-03-01-preview", + workspace_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -38,7 +38,6 @@ async def test_workspace_get_entity_tag(self, resource_group): resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -46,12 +45,25 @@ async def test_workspace_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_get(self, resource_group): - response = await self.client.workspace.get( + async def test_workspace_create_or_update(self, resource_group): + response = await self.client.workspace.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"displayName": "str", "description": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -59,13 +71,27 @@ async def test_workspace_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_create_or_update(self, resource_group): - response = await self.client.workspace.create_or_update( + async def test_workspace_update(self, resource_group): + response = await self.client.workspace.update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - parameters={"description": "str", "displayName": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"displayName": "str", "description": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -73,14 +99,13 @@ async def test_workspace_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_update(self, resource_group): - response = await self.client.workspace.update( + async def test_workspace_delete(self, resource_group): + response = await self.client.workspace.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - if_match="str", - parameters={"description": "str", "displayName": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -88,14 +113,11 @@ async def test_workspace_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_delete(self, resource_group): - response = await self.client.workspace.delete( + async def test_workspace_list_by_service(self, resource_group): + response = self.client.workspace.list_by_service( resource_group_name=resource_group.name, service_name="str", - workspace_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations.py index ebf53dcaf9f7..83c880521700 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_policy_fragment_list_by_service(self, resource_group): - response = self.client.workspace_policy_fragment.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_policy_fragment_get_entity_tag(self, resource_group): - response = self.client.workspace_policy_fragment.get_entity_tag( + def test_workspace_policy_fragment_get(self, resource_group): + response = self.client.workspace_policy_fragment.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_workspace_policy_fragment_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_policy_fragment_get(self, resource_group): - response = self.client.workspace_policy_fragment.get( + def test_workspace_policy_fragment_get_entity_tag(self, resource_group): + response = self.client.workspace_policy_fragment.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,15 +53,19 @@ def test_workspace_policy_fragment_begin_create_or_update(self, resource_group): workspace_id="str", id="str", parameters={ - "description": "str", - "format": "str", "id": "str", "name": "str", - "provisioningState": "str", + "properties": {"value": "str", "description": "str", "format": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": "str", }, - api_version="2025-03-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -90,13 +79,25 @@ def test_workspace_policy_fragment_delete(self, resource_group): service_name="str", workspace_id="str", id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_policy_fragment_list_by_service(self, resource_group): + response = self.client.workspace_policy_fragment.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_workspace_policy_fragment_list_references(self, resource_group): @@ -105,7 +106,6 @@ def test_workspace_policy_fragment_list_references(self, resource_group): service_name="str", workspace_id="str", id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations_async.py index f1e4a7bcc8cb..039ff6a4632e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_fragment_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_policy_fragment_list_by_service(self, resource_group): - response = self.client.workspace_policy_fragment.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_policy_fragment_get_entity_tag(self, resource_group): - response = await self.client.workspace_policy_fragment.get_entity_tag( + async def test_workspace_policy_fragment_get(self, resource_group): + response = await self.client.workspace_policy_fragment.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_workspace_policy_fragment_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_policy_fragment_get(self, resource_group): - response = await self.client.workspace_policy_fragment.get( + async def test_workspace_policy_fragment_get_entity_tag(self, resource_group): + response = await self.client.workspace_policy_fragment.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -70,15 +55,19 @@ async def test_workspace_policy_fragment_begin_create_or_update(self, resource_g workspace_id="str", id="str", parameters={ - "description": "str", - "format": "str", "id": "str", "name": "str", - "provisioningState": "str", + "properties": {"value": "str", "description": "str", "format": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", - "value": "str", }, - api_version="2025-03-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -93,13 +82,25 @@ async def test_workspace_policy_fragment_delete(self, resource_group): service_name="str", workspace_id="str", id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_policy_fragment_list_by_service(self, resource_group): + response = self.client.workspace_policy_fragment.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_workspace_policy_fragment_list_references(self, resource_group): @@ -108,7 +109,6 @@ async def test_workspace_policy_fragment_list_references(self, resource_group): service_name="str", workspace_id="str", id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations.py index cf27da9bde8f..d5949cecaa8e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,14 +20,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_policy_list_by_api(self, resource_group): - response = self.client.workspace_policy.list_by_api( + def test_workspace_policy_get(self, resource_group): + response = self.client.workspace_policy.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -39,7 +39,6 @@ def test_workspace_policy_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +46,26 @@ def test_workspace_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_policy_get(self, resource_group): - response = self.client.workspace_policy.get( + def test_workspace_policy_create_or_update(self, resource_group): + response = self.client.workspace_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -61,14 +73,14 @@ def test_workspace_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_policy_create_or_update(self, resource_group): - response = self.client.workspace_policy.create_or_update( + def test_workspace_policy_delete(self, resource_group): + response = self.client.workspace_policy.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -76,15 +88,12 @@ def test_workspace_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_policy_delete(self, resource_group): - response = self.client.workspace_policy.delete( + def test_workspace_policy_list_by_api(self, resource_group): + response = self.client.workspace_policy.list_by_api( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations_async.py index 11f280283e4c..f18d1e1f17ca 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_policy_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,14 +21,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_policy_list_by_api(self, resource_group): - response = self.client.workspace_policy.list_by_api( + async def test_workspace_policy_get(self, resource_group): + response = await self.client.workspace_policy.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -40,7 +40,6 @@ async def test_workspace_policy_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +47,26 @@ async def test_workspace_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_policy_get(self, resource_group): - response = await self.client.workspace_policy.get( + async def test_workspace_policy_create_or_update(self, resource_group): + response = await self.client.workspace_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -62,14 +74,14 @@ async def test_workspace_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_policy_create_or_update(self, resource_group): - response = await self.client.workspace_policy.create_or_update( + async def test_workspace_policy_delete(self, resource_group): + response = await self.client.workspace_policy.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -77,15 +89,12 @@ async def test_workspace_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_policy_delete(self, resource_group): - response = await self.client.workspace_policy.delete( + async def test_workspace_policy_list_by_api(self, resource_group): + response = self.client.workspace_policy.list_by_api( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations.py index eb745be7cb3c..145e4b15eb7e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,28 +20,41 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_api_link_list_by_product(self, resource_group): - response = self.client.workspace_product_api_link.list_by_product( + def test_workspace_product_api_link_get(self, resource_group): + response = self.client.workspace_product_api_link.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - api_version="2025-03-01-preview", + api_link_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_api_link_get(self, resource_group): - response = self.client.workspace_product_api_link.get( + def test_workspace_product_api_link_create_or_update(self, resource_group): + response = self.client.workspace_product_api_link.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", api_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"apiId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -49,15 +62,13 @@ def test_workspace_product_api_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_api_link_create_or_update(self, resource_group): - response = self.client.workspace_product_api_link.create_or_update( + def test_workspace_product_api_link_delete(self, resource_group): + response = self.client.workspace_product_api_link.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", api_link_id="str", - parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,15 +76,13 @@ def test_workspace_product_api_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_api_link_delete(self, resource_group): - response = self.client.workspace_product_api_link.delete( + def test_workspace_product_api_link_list_by_product(self, resource_group): + response = self.client.workspace_product_api_link.list_by_product( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - api_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations_async.py index 1f3ac4a91c6a..9afac8e1e479 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_api_link_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,28 +21,41 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_api_link_list_by_product(self, resource_group): - response = self.client.workspace_product_api_link.list_by_product( + async def test_workspace_product_api_link_get(self, resource_group): + response = await self.client.workspace_product_api_link.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - api_version="2025-03-01-preview", + api_link_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_api_link_get(self, resource_group): - response = await self.client.workspace_product_api_link.get( + async def test_workspace_product_api_link_create_or_update(self, resource_group): + response = await self.client.workspace_product_api_link.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", api_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"apiId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -50,15 +63,13 @@ async def test_workspace_product_api_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_api_link_create_or_update(self, resource_group): - response = await self.client.workspace_product_api_link.create_or_update( + async def test_workspace_product_api_link_delete(self, resource_group): + response = await self.client.workspace_product_api_link.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", api_link_id="str", - parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,15 +77,13 @@ async def test_workspace_product_api_link_create_or_update(self, resource_group) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_api_link_delete(self, resource_group): - response = await self.client.workspace_product_api_link.delete( + async def test_workspace_product_api_link_list_by_product(self, resource_group): + response = self.client.workspace_product_api_link.list_by_product( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - api_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations.py index 6e2f4e07f2b6..63d5c6b57cf3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,28 +20,41 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_group_link_list_by_product(self, resource_group): - response = self.client.workspace_product_group_link.list_by_product( + def test_workspace_product_group_link_get(self, resource_group): + response = self.client.workspace_product_group_link.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - api_version="2025-03-01-preview", + group_link_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_group_link_get(self, resource_group): - response = self.client.workspace_product_group_link.get( + def test_workspace_product_group_link_create_or_update(self, resource_group): + response = self.client.workspace_product_group_link.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", group_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"groupId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -49,15 +62,13 @@ def test_workspace_product_group_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_group_link_create_or_update(self, resource_group): - response = self.client.workspace_product_group_link.create_or_update( + def test_workspace_product_group_link_delete(self, resource_group): + response = self.client.workspace_product_group_link.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", group_link_id="str", - parameters={"groupId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,15 +76,13 @@ def test_workspace_product_group_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_group_link_delete(self, resource_group): - response = self.client.workspace_product_group_link.delete( + def test_workspace_product_group_link_list_by_product(self, resource_group): + response = self.client.workspace_product_group_link.list_by_product( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - group_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations_async.py index 0b07d65953d2..5880b94d2553 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_group_link_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,28 +21,41 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_group_link_list_by_product(self, resource_group): - response = self.client.workspace_product_group_link.list_by_product( + async def test_workspace_product_group_link_get(self, resource_group): + response = await self.client.workspace_product_group_link.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - api_version="2025-03-01-preview", + group_link_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_group_link_get(self, resource_group): - response = await self.client.workspace_product_group_link.get( + async def test_workspace_product_group_link_create_or_update(self, resource_group): + response = await self.client.workspace_product_group_link.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", group_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"groupId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -50,15 +63,13 @@ async def test_workspace_product_group_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_group_link_create_or_update(self, resource_group): - response = await self.client.workspace_product_group_link.create_or_update( + async def test_workspace_product_group_link_delete(self, resource_group): + response = await self.client.workspace_product_group_link.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", group_link_id="str", - parameters={"groupId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,15 +77,13 @@ async def test_workspace_product_group_link_create_or_update(self, resource_grou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_group_link_delete(self, resource_group): - response = await self.client.workspace_product_group_link.delete( + async def test_workspace_product_group_link_list_by_product(self, resource_group): + response = self.client.workspace_product_group_link.list_by_product( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - group_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations.py index f9d311c165e6..1b2ad9016bbf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,26 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_list_by_service(self, resource_group): - response = self.client.workspace_product.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_workspace_product_get_entity_tag(self, resource_group): - response = self.client.workspace_product.get_entity_tag( + def test_workspace_product_get(self, resource_group): + response = self.client.workspace_product.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +33,12 @@ def test_workspace_product_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_get(self, resource_group): - response = self.client.workspace_product.get( + def test_workspace_product_get_entity_tag(self, resource_group): + response = self.client.workspace_product.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -68,20 +53,29 @@ def test_workspace_product_create_or_update(self, resource_group): workspace_id="str", product_id="str", parameters={ - "application": {"entra": {"applicationId": "str", "audience": "str"}}, - "approvalRequired": bool, - "authenticationType": ["str"], - "description": "str", - "displayName": "str", "id": "str", "name": "str", - "state": "str", - "subscriptionRequired": bool, - "subscriptionsLimit": 0, - "terms": "str", + "properties": { + "displayName": "str", + "application": {"entra": {"applicationId": "str", "audience": "str"}}, + "approvalRequired": bool, + "authenticationType": ["str"], + "description": "str", + "state": "str", + "subscriptionRequired": bool, + "subscriptionsLimit": 0, + "terms": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -95,19 +89,21 @@ def test_workspace_product_update(self, resource_group): service_name="str", workspace_id="str", product_id="str", - if_match="str", parameters={ - "application": {"entra": {"applicationId": "str", "audience": "str"}}, - "approvalRequired": bool, - "authenticationType": ["str"], - "description": "str", - "displayName": "str", - "state": "str", - "subscriptionRequired": bool, - "subscriptionsLimit": 0, - "terms": "str", + "properties": { + "application": {"entra": {"applicationId": "str", "audience": "str"}}, + "approvalRequired": bool, + "authenticationType": ["str"], + "description": "str", + "displayName": "str", + "state": "str", + "subscriptionRequired": bool, + "subscriptionsLimit": 0, + "terms": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -121,9 +117,21 @@ def test_workspace_product_delete(self, resource_group): service_name="str", workspace_id="str", product_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_workspace_product_list_by_service(self, resource_group): + response = self.client.workspace_product.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations_async.py index ef5d158327f5..7cb5c74a5544 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,26 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_list_by_service(self, resource_group): - response = self.client.workspace_product.list_by_service( - resource_group_name=resource_group.name, - service_name="str", - workspace_id="str", - api_version="2025-03-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_workspace_product_get_entity_tag(self, resource_group): - response = await self.client.workspace_product.get_entity_tag( + async def test_workspace_product_get(self, resource_group): + response = await self.client.workspace_product.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +34,12 @@ async def test_workspace_product_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_get(self, resource_group): - response = await self.client.workspace_product.get( + async def test_workspace_product_get_entity_tag(self, resource_group): + response = await self.client.workspace_product.get_entity_tag( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -69,20 +54,29 @@ async def test_workspace_product_create_or_update(self, resource_group): workspace_id="str", product_id="str", parameters={ - "application": {"entra": {"applicationId": "str", "audience": "str"}}, - "approvalRequired": bool, - "authenticationType": ["str"], - "description": "str", - "displayName": "str", "id": "str", "name": "str", - "state": "str", - "subscriptionRequired": bool, - "subscriptionsLimit": 0, - "terms": "str", + "properties": { + "displayName": "str", + "application": {"entra": {"applicationId": "str", "audience": "str"}}, + "approvalRequired": bool, + "authenticationType": ["str"], + "description": "str", + "state": "str", + "subscriptionRequired": bool, + "subscriptionsLimit": 0, + "terms": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -96,19 +90,21 @@ async def test_workspace_product_update(self, resource_group): service_name="str", workspace_id="str", product_id="str", - if_match="str", parameters={ - "application": {"entra": {"applicationId": "str", "audience": "str"}}, - "approvalRequired": bool, - "authenticationType": ["str"], - "description": "str", - "displayName": "str", - "state": "str", - "subscriptionRequired": bool, - "subscriptionsLimit": 0, - "terms": "str", + "properties": { + "application": {"entra": {"applicationId": "str", "audience": "str"}}, + "approvalRequired": bool, + "authenticationType": ["str"], + "description": "str", + "displayName": "str", + "state": "str", + "subscriptionRequired": bool, + "subscriptionsLimit": 0, + "terms": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -122,9 +118,21 @@ async def test_workspace_product_delete(self, resource_group): service_name="str", workspace_id="str", product_id="str", - if_match="str", - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_workspace_product_list_by_service(self, resource_group): + response = self.client.workspace_product.list_by_service( + resource_group_name=resource_group.name, + service_name="str", + workspace_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations.py index 829b3375c82b..5c7b100fdaf9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,13 +20,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_policy_list_by_product(self, resource_group): - response = self.client.workspace_product_policy.list_by_product( + def test_workspace_product_policy_get(self, resource_group): + response = self.client.workspace_product_policy.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) # please add some check logic here by yourself @@ -41,7 +41,6 @@ def test_workspace_product_policy_get_entity_tag(self, resource_group): workspace_id="str", product_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -49,14 +48,27 @@ def test_workspace_product_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_policy_get(self, resource_group): - response = self.client.workspace_product_policy.get( + def test_workspace_product_policy_create_or_update(self, resource_group): + response = self.client.workspace_product_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -64,15 +76,15 @@ def test_workspace_product_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_policy_create_or_update(self, resource_group): - response = self.client.workspace_product_policy.create_or_update( + def test_workspace_product_policy_delete(self, resource_group): + response = self.client.workspace_product_policy.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -80,15 +92,12 @@ def test_workspace_product_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_product_policy_delete(self, resource_group): - response = self.client.workspace_product_policy.delete( + def test_workspace_product_policy_list_by_product(self, resource_group): + response = self.client.workspace_product_policy.list_by_product( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations_async.py index efa168aa6cf2..a02f1bd6782b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_product_policy_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,13 +21,13 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_policy_list_by_product(self, resource_group): - response = await self.client.workspace_product_policy.list_by_product( + async def test_workspace_product_policy_get(self, resource_group): + response = await self.client.workspace_product_policy.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - api_version="2025-03-01-preview", + policy_id="str", ) # please add some check logic here by yourself @@ -42,7 +42,6 @@ async def test_workspace_product_policy_get_entity_tag(self, resource_group): workspace_id="str", product_id="str", policy_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -50,14 +49,27 @@ async def test_workspace_product_policy_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_policy_get(self, resource_group): - response = await self.client.workspace_product_policy.get( + async def test_workspace_product_policy_create_or_update(self, resource_group): + response = await self.client.workspace_product_policy.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", policy_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"value": "str", "format": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -65,15 +77,15 @@ async def test_workspace_product_policy_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_policy_create_or_update(self, resource_group): - response = await self.client.workspace_product_policy.create_or_update( + async def test_workspace_product_policy_delete(self, resource_group): + response = await self.client.workspace_product_policy.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", policy_id="str", - parameters={"format": "xml", "id": "str", "name": "str", "type": "str", "value": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -81,15 +93,12 @@ async def test_workspace_product_policy_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_product_policy_delete(self, resource_group): - response = await self.client.workspace_product_policy.delete( + async def test_workspace_product_policy_list_by_product(self, resource_group): + response = await self.client.workspace_product_policy.list_by_product( resource_group_name=resource_group.name, service_name="str", workspace_id="str", product_id="str", - policy_id="str", - if_match="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations.py index eb0062ef2efb..5e34457535e7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,14 +20,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_subscription_list(self, resource_group): - response = self.client.workspace_subscription.list( + def test_workspace_subscription_get(self, resource_group): + response = self.client.workspace_subscription.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + sid="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -39,7 +39,6 @@ def test_workspace_subscription_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +46,23 @@ def test_workspace_subscription_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_subscription_get(self, resource_group): - response = self.client.workspace_subscription.get( + def test_workspace_subscription_create_or_update(self, resource_group): + response = self.client.workspace_subscription.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", sid="str", - api_version="2025-03-01-preview", + parameters={ + "properties": { + "displayName": "str", + "scope": "str", + "allowTracing": bool, + "ownerId": "str", + "primaryKey": "str", + "secondaryKey": "str", + "state": "str", + } + }, ) # please add some check logic here by yourself @@ -61,22 +70,27 @@ def test_workspace_subscription_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_subscription_create_or_update(self, resource_group): - response = self.client.workspace_subscription.create_or_update( + def test_workspace_subscription_update(self, resource_group): + response = self.client.workspace_subscription.update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", sid="str", parameters={ - "allowTracing": bool, - "displayName": "str", - "ownerId": "str", - "primaryKey": "str", - "scope": "str", - "secondaryKey": "str", - "state": "str", + "properties": { + "allowTracing": bool, + "displayName": "str", + "expirationDate": "2020-02-20 00:00:00", + "ownerId": "str", + "primaryKey": "str", + "scope": "str", + "secondaryKey": "str", + "state": "str", + "stateComment": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -84,25 +98,14 @@ def test_workspace_subscription_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_subscription_update(self, resource_group): - response = self.client.workspace_subscription.update( + def test_workspace_subscription_delete(self, resource_group): + response = self.client.workspace_subscription.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", sid="str", - if_match="str", - parameters={ - "allowTracing": bool, - "displayName": "str", - "expirationDate": "2020-02-20 00:00:00", - "ownerId": "str", - "primaryKey": "str", - "scope": "str", - "secondaryKey": "str", - "state": "str", - "stateComment": "str", - }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -110,16 +113,13 @@ def test_workspace_subscription_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_subscription_delete(self, resource_group): - response = self.client.workspace_subscription.delete( + def test_workspace_subscription_list(self, resource_group): + response = self.client.workspace_subscription.list( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - sid="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... @@ -131,7 +131,6 @@ def test_workspace_subscription_regenerate_primary_key(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -145,7 +144,6 @@ def test_workspace_subscription_regenerate_secondary_key(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -159,7 +157,6 @@ def test_workspace_subscription_list_secrets(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations_async.py index 30b181fe40ba..cc5b6a7cce34 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_subscription_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,14 +21,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_subscription_list(self, resource_group): - response = self.client.workspace_subscription.list( + async def test_workspace_subscription_get(self, resource_group): + response = await self.client.workspace_subscription.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + sid="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -40,7 +40,6 @@ async def test_workspace_subscription_get_entity_tag(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +47,23 @@ async def test_workspace_subscription_get_entity_tag(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_subscription_get(self, resource_group): - response = await self.client.workspace_subscription.get( + async def test_workspace_subscription_create_or_update(self, resource_group): + response = await self.client.workspace_subscription.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", sid="str", - api_version="2025-03-01-preview", + parameters={ + "properties": { + "displayName": "str", + "scope": "str", + "allowTracing": bool, + "ownerId": "str", + "primaryKey": "str", + "secondaryKey": "str", + "state": "str", + } + }, ) # please add some check logic here by yourself @@ -62,22 +71,27 @@ async def test_workspace_subscription_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_subscription_create_or_update(self, resource_group): - response = await self.client.workspace_subscription.create_or_update( + async def test_workspace_subscription_update(self, resource_group): + response = await self.client.workspace_subscription.update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", sid="str", parameters={ - "allowTracing": bool, - "displayName": "str", - "ownerId": "str", - "primaryKey": "str", - "scope": "str", - "secondaryKey": "str", - "state": "str", + "properties": { + "allowTracing": bool, + "displayName": "str", + "expirationDate": "2020-02-20 00:00:00", + "ownerId": "str", + "primaryKey": "str", + "scope": "str", + "secondaryKey": "str", + "state": "str", + "stateComment": "str", + } }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -85,25 +99,14 @@ async def test_workspace_subscription_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_subscription_update(self, resource_group): - response = await self.client.workspace_subscription.update( + async def test_workspace_subscription_delete(self, resource_group): + response = await self.client.workspace_subscription.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", sid="str", - if_match="str", - parameters={ - "allowTracing": bool, - "displayName": "str", - "expirationDate": "2020-02-20 00:00:00", - "ownerId": "str", - "primaryKey": "str", - "scope": "str", - "secondaryKey": "str", - "state": "str", - "stateComment": "str", - }, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -111,16 +114,13 @@ async def test_workspace_subscription_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_subscription_delete(self, resource_group): - response = await self.client.workspace_subscription.delete( + async def test_workspace_subscription_list(self, resource_group): + response = self.client.workspace_subscription.list( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - sid="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... @@ -132,7 +132,6 @@ async def test_workspace_subscription_regenerate_primary_key(self, resource_grou service_name="str", workspace_id="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -146,7 +145,6 @@ async def test_workspace_subscription_regenerate_secondary_key(self, resource_gr service_name="str", workspace_id="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -160,7 +158,6 @@ async def test_workspace_subscription_list_secrets(self, resource_group): service_name="str", workspace_id="str", sid="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations.py index 2ed2f8169be1..331acdb753fd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,28 +20,41 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_api_link_list_by_product(self, resource_group): - response = self.client.workspace_tag_api_link.list_by_product( + def test_workspace_tag_api_link_get(self, resource_group): + response = self.client.workspace_tag_api_link.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - api_version="2025-03-01-preview", + api_link_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_api_link_get(self, resource_group): - response = self.client.workspace_tag_api_link.get( + def test_workspace_tag_api_link_create_or_update(self, resource_group): + response = self.client.workspace_tag_api_link.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", api_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"apiId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -49,15 +62,13 @@ def test_workspace_tag_api_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_api_link_create_or_update(self, resource_group): - response = self.client.workspace_tag_api_link.create_or_update( + def test_workspace_tag_api_link_delete(self, resource_group): + response = self.client.workspace_tag_api_link.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", api_link_id="str", - parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,15 +76,13 @@ def test_workspace_tag_api_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_api_link_delete(self, resource_group): - response = self.client.workspace_tag_api_link.delete( + def test_workspace_tag_api_link_list_by_product(self, resource_group): + response = self.client.workspace_tag_api_link.list_by_product( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - api_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations_async.py index 4f2061de3b2e..a073ed73b88b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_api_link_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,28 +21,41 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_api_link_list_by_product(self, resource_group): - response = self.client.workspace_tag_api_link.list_by_product( + async def test_workspace_tag_api_link_get(self, resource_group): + response = await self.client.workspace_tag_api_link.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - api_version="2025-03-01-preview", + api_link_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_api_link_get(self, resource_group): - response = await self.client.workspace_tag_api_link.get( + async def test_workspace_tag_api_link_create_or_update(self, resource_group): + response = await self.client.workspace_tag_api_link.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", api_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"apiId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -50,15 +63,13 @@ async def test_workspace_tag_api_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_api_link_create_or_update(self, resource_group): - response = await self.client.workspace_tag_api_link.create_or_update( + async def test_workspace_tag_api_link_delete(self, resource_group): + response = await self.client.workspace_tag_api_link.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", api_link_id="str", - parameters={"apiId": "str", "id": "str", "name": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,15 +77,13 @@ async def test_workspace_tag_api_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_api_link_delete(self, resource_group): - response = await self.client.workspace_tag_api_link.delete( + async def test_workspace_tag_api_link_list_by_product(self, resource_group): + response = self.client.workspace_tag_api_link.list_by_product( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - api_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations.py index e1a028787b1d..75d2272455e6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,28 +20,41 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_operation_link_list_by_product(self, resource_group): - response = self.client.workspace_tag_operation_link.list_by_product( + def test_workspace_tag_operation_link_get(self, resource_group): + response = self.client.workspace_tag_operation_link.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - api_version="2025-03-01-preview", + operation_link_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_operation_link_get(self, resource_group): - response = self.client.workspace_tag_operation_link.get( + def test_workspace_tag_operation_link_create_or_update(self, resource_group): + response = self.client.workspace_tag_operation_link.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", operation_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"operationId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -49,15 +62,13 @@ def test_workspace_tag_operation_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_operation_link_create_or_update(self, resource_group): - response = self.client.workspace_tag_operation_link.create_or_update( + def test_workspace_tag_operation_link_delete(self, resource_group): + response = self.client.workspace_tag_operation_link.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", operation_link_id="str", - parameters={"id": "str", "name": "str", "operationId": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,15 +76,13 @@ def test_workspace_tag_operation_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_operation_link_delete(self, resource_group): - response = self.client.workspace_tag_operation_link.delete( + def test_workspace_tag_operation_link_list_by_product(self, resource_group): + response = self.client.workspace_tag_operation_link.list_by_product( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - operation_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations_async.py index 4dedb2bd81f1..929886a3adb9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operation_link_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,28 +21,41 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_operation_link_list_by_product(self, resource_group): - response = self.client.workspace_tag_operation_link.list_by_product( + async def test_workspace_tag_operation_link_get(self, resource_group): + response = await self.client.workspace_tag_operation_link.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - api_version="2025-03-01-preview", + operation_link_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_operation_link_get(self, resource_group): - response = await self.client.workspace_tag_operation_link.get( + async def test_workspace_tag_operation_link_create_or_update(self, resource_group): + response = await self.client.workspace_tag_operation_link.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", operation_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"operationId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -50,15 +63,13 @@ async def test_workspace_tag_operation_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_operation_link_create_or_update(self, resource_group): - response = await self.client.workspace_tag_operation_link.create_or_update( + async def test_workspace_tag_operation_link_delete(self, resource_group): + response = await self.client.workspace_tag_operation_link.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", operation_link_id="str", - parameters={"id": "str", "name": "str", "operationId": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,15 +77,13 @@ async def test_workspace_tag_operation_link_create_or_update(self, resource_grou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_operation_link_delete(self, resource_group): - response = await self.client.workspace_tag_operation_link.delete( + async def test_workspace_tag_operation_link_list_by_product(self, resource_group): + response = self.client.workspace_tag_operation_link.list_by_product( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - operation_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations.py index c435159d78a7..46bb8537eed9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,14 +20,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_list_by_service(self, resource_group): - response = self.client.workspace_tag.list_by_service( + def test_workspace_tag_get(self, resource_group): + response = self.client.workspace_tag.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + tag_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -39,7 +39,6 @@ def test_workspace_tag_get_entity_state(self, resource_group): service_name="str", workspace_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -47,13 +46,13 @@ def test_workspace_tag_get_entity_state(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_get(self, resource_group): - response = self.client.workspace_tag.get( + def test_workspace_tag_create_or_update(self, resource_group): + response = self.client.workspace_tag.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - api_version="2025-03-01-preview", + parameters={"properties": {"displayName": "str"}}, ) # please add some check logic here by yourself @@ -61,14 +60,15 @@ def test_workspace_tag_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_create_or_update(self, resource_group): - response = self.client.workspace_tag.create_or_update( + def test_workspace_tag_update(self, resource_group): + response = self.client.workspace_tag.update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - parameters={"displayName": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"displayName": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -76,15 +76,14 @@ def test_workspace_tag_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_update(self, resource_group): - response = self.client.workspace_tag.update( + def test_workspace_tag_delete(self, resource_group): + response = self.client.workspace_tag.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - if_match="str", - parameters={"displayName": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -92,15 +91,12 @@ def test_workspace_tag_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_delete(self, resource_group): - response = self.client.workspace_tag.delete( + def test_workspace_tag_list_by_service(self, resource_group): + response = self.client.workspace_tag.list_by_service( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - tag_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations_async.py index 2d4b5b4fa5ad..171b7a00493d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,14 +21,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_list_by_service(self, resource_group): - response = self.client.workspace_tag.list_by_service( + async def test_workspace_tag_get(self, resource_group): + response = await self.client.workspace_tag.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - api_version="2025-03-01-preview", + tag_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -40,7 +40,6 @@ async def test_workspace_tag_get_entity_state(self, resource_group): service_name="str", workspace_id="str", tag_id="str", - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -48,13 +47,13 @@ async def test_workspace_tag_get_entity_state(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_get(self, resource_group): - response = await self.client.workspace_tag.get( + async def test_workspace_tag_create_or_update(self, resource_group): + response = await self.client.workspace_tag.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - api_version="2025-03-01-preview", + parameters={"properties": {"displayName": "str"}}, ) # please add some check logic here by yourself @@ -62,14 +61,15 @@ async def test_workspace_tag_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_create_or_update(self, resource_group): - response = await self.client.workspace_tag.create_or_update( + async def test_workspace_tag_update(self, resource_group): + response = await self.client.workspace_tag.update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - parameters={"displayName": "str"}, - api_version="2025-03-01-preview", + parameters={"properties": {"displayName": "str"}}, + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -77,15 +77,14 @@ async def test_workspace_tag_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_update(self, resource_group): - response = await self.client.workspace_tag.update( + async def test_workspace_tag_delete(self, resource_group): + response = await self.client.workspace_tag.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - if_match="str", - parameters={"displayName": "str"}, - api_version="2025-03-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -93,15 +92,12 @@ async def test_workspace_tag_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_delete(self, resource_group): - response = await self.client.workspace_tag.delete( + async def test_workspace_tag_list_by_service(self, resource_group): + response = self.client.workspace_tag.list_by_service( resource_group_name=resource_group.name, service_name="str", workspace_id="str", - tag_id="str", - if_match="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations.py index 4c5e23a0aea6..ecb2eb903891 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,28 +20,41 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_product_link_list_by_product(self, resource_group): - response = self.client.workspace_tag_product_link.list_by_product( + def test_workspace_tag_product_link_get(self, resource_group): + response = self.client.workspace_tag_product_link.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - api_version="2025-03-01-preview", + product_link_id="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_product_link_get(self, resource_group): - response = self.client.workspace_tag_product_link.get( + def test_workspace_tag_product_link_create_or_update(self, resource_group): + response = self.client.workspace_tag_product_link.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", product_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"productId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -49,15 +62,13 @@ def test_workspace_tag_product_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_product_link_create_or_update(self, resource_group): - response = self.client.workspace_tag_product_link.create_or_update( + def test_workspace_tag_product_link_delete(self, resource_group): + response = self.client.workspace_tag_product_link.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", product_link_id="str", - parameters={"id": "str", "name": "str", "productId": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -65,15 +76,13 @@ def test_workspace_tag_product_link_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_workspace_tag_product_link_delete(self, resource_group): - response = self.client.workspace_tag_product_link.delete( + def test_workspace_tag_product_link_list_by_product(self, resource_group): + response = self.client.workspace_tag_product_link.list_by_product( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - product_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations_async.py b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations_async.py index 0720f925f10a..bfc2536ca52e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations_async.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/generated_tests/test_api_management_workspace_tag_product_link_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,28 +21,41 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_product_link_list_by_product(self, resource_group): - response = self.client.workspace_tag_product_link.list_by_product( + async def test_workspace_tag_product_link_get(self, resource_group): + response = await self.client.workspace_tag_product_link.get( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - api_version="2025-03-01-preview", + product_link_id="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_product_link_get(self, resource_group): - response = await self.client.workspace_tag_product_link.get( + async def test_workspace_tag_product_link_create_or_update(self, resource_group): + response = await self.client.workspace_tag_product_link.create_or_update( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", product_link_id="str", - api_version="2025-03-01-preview", + parameters={ + "id": "str", + "name": "str", + "properties": {"productId": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, ) # please add some check logic here by yourself @@ -50,15 +63,13 @@ async def test_workspace_tag_product_link_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_product_link_create_or_update(self, resource_group): - response = await self.client.workspace_tag_product_link.create_or_update( + async def test_workspace_tag_product_link_delete(self, resource_group): + response = await self.client.workspace_tag_product_link.delete( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", product_link_id="str", - parameters={"id": "str", "name": "str", "productId": "str", "type": "str"}, - api_version="2025-03-01-preview", ) # please add some check logic here by yourself @@ -66,15 +77,13 @@ async def test_workspace_tag_product_link_create_or_update(self, resource_group) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_workspace_tag_product_link_delete(self, resource_group): - response = await self.client.workspace_tag_product_link.delete( + async def test_workspace_tag_product_link_list_by_product(self, resource_group): + response = self.client.workspace_tag_product_link.list_by_product( resource_group_name=resource_group.name, service_name="str", workspace_id="str", tag_id="str", - product_link_id="str", - api_version="2025-03-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/tsp-location.yaml b/sdk/apimanagement/azure-mgmt-apimanagement/tsp-location.yaml new file mode 100644 index 000000000000..5ab8c777549f --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement +commit: bee1dd3e0ddbd975c77f38a3e66f762981c35429 +repo: Azure/azure-rest-api-specs +additionalDirectories: From 48007f80fe7604c1cdf68c9c79c2822c99fa3d9b Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Wed, 25 Mar 2026 21:04:05 +0800 Subject: [PATCH 3/3] changelog from report comparison --- .../azure-mgmt-apimanagement/CHANGELOG.md | 1327 ++++++++++++++++- 1 file changed, 1326 insertions(+), 1 deletion(-) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/CHANGELOG.md b/sdk/apimanagement/azure-mgmt-apimanagement/CHANGELOG.md index f1ac343f059b..8983d2359ebc 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/CHANGELOG.md +++ b/sdk/apimanagement/azure-mgmt-apimanagement/CHANGELOG.md @@ -2,7 +2,1332 @@ ## 5.1.0b1 (2026-03-25) -skip changelog generation +### Features Added + + - Client `ApiManagementClient` added method `send_request` + - Model `AccessInformationContract` added property `system_data` + - Model `AllPoliciesContract` added property `system_data` + - Model `ApiContract` added property `properties` + - Model `ApiContract` added property `system_data` + - Model `ApiManagementGatewayConfigConnectionResource` added property `properties` + - Model `ApiManagementGatewayConfigConnectionResource` added property `system_data` + - Model `ApiManagementGatewayResource` added property `properties` + - Model `ApiManagementGatewayUpdateParameters` added property `properties` + - Model `ApiManagementServiceResource` added property `properties` + - Model `ApiManagementServiceUpdateParameters` added property `properties` + - Model `ApiManagementSkuRestrictions` added property `values_property` + - Model `ApiManagementWorkspaceLinksResource` added property `properties` + - Model `ApiManagementWorkspaceLinksResource` added property `system_data` + - Model `ApiReleaseContract` added property `system_data` + - Model `ApiVersionSetContract` added property `properties` + - Model `ApiVersionSetContract` added property `system_data` + - Model `AssociationContract` added property `system_data` + - Model `AuthorizationAccessPolicyContract` added property `system_data` + - Model `AuthorizationContract` added property `system_data` + - Model `AuthorizationProviderContract` added property `system_data` + - Model `AuthorizationServerContract` added property `properties` + - Model `AuthorizationServerContract` added property `system_data` + - Model `AuthorizationServerUpdateContract` added property `properties` + - Model `AuthorizationServerUpdateContract` added property `system_data` + - Model `BackendContract` added property `system_data` + - Model `BackendReconnectContract` added property `properties` + - Model `BackendReconnectContract` added property `system_data` + - Model `CacheContract` added property `system_data` + - Model `CertificateContract` added property `system_data` + - Model `ClientApplicationContract` added property `system_data` + - Model `ClientApplicationProductLinkContract` added property `system_data` + - Model `ContentItemContract` added property `system_data` + - Model `ContentTypeContract` added property `system_data` + - Model `DeletedServiceContract` added property `system_data` + - Model `DiagnosticContract` added property `system_data` + - Model `DiagnosticUpdateContract` added property `properties` + - Model `DiagnosticUpdateContract` added property `system_data` + - Model `DocumentationContract` added property `system_data` + - Model `EmailTemplateContract` added property `system_data` + - Model `GatewayCertificateAuthorityContract` added property `system_data` + - Model `GatewayContract` added property `system_data` + - Model `GatewayHostnameBindingResource` added property `properties` + - Model `GatewayHostnameBindingResource` added property `e_tag` + - Model `GatewayHostnameBindingResource` added property `system_data` + - Model `GatewayHostnameConfigurationContract` added property `system_data` + - Model `GlobalSchemaContract` added property `system_data` + - Model `GroupContract` added property `properties` + - Model `GroupContract` added property `system_data` + - Model `IdentityProviderContract` added property `properties` + - Model `IdentityProviderContract` added property `system_data` + - Model `IdentityProviderCreateContract` added property `properties` + - Model `IdentityProviderCreateContract` added property `system_data` + - Model `IssueAttachmentContract` added property `system_data` + - Model `IssueCommentContract` added property `system_data` + - Model `IssueContract` added property `properties` + - Model `IssueContract` added property `system_data` + - Model `LoggerContract` added property `system_data` + - Model `NamedValueContract` added property `properties` + - Model `NamedValueContract` added property `system_data` + - Model `NamedValueCreateContract` added property `properties` + - Model `NamedValueCreateContract` added property `system_data` + - Model `NotificationContract` added property `system_data` + - Model `OpenidConnectProviderContract` added property `system_data` + - Model `OperationContract` added property `properties` + - Model `OperationContract` added property `system_data` + - Model `OperationResultContract` added property `system_data` + - Model `ParameterContract` added property `values_property` + - Model `PolicyContract` added property `system_data` + - Model `PolicyDescriptionContract` added property `system_data` + - Model `PolicyFragmentContract` added property `system_data` + - Model `PolicyRestrictionContract` added property `system_data` + - Model `PortalConfigContract` added property `properties` + - Model `PortalConfigContract` added property `system_data` + - Model `PortalDelegationSettings` added property `system_data` + - Model `PortalRevisionContract` added property `system_data` + - Model `PortalSettingsContract` added property `system_data` + - Model `PortalSigninSettings` added property `properties` + - Model `PortalSigninSettings` added property `system_data` + - Model `PortalSignupSettings` added property `system_data` + - Model `PrivateEndpointConnection` added property `system_data` + - Model `PrivateLinkResource` added property `system_data` + - Model `PrivateLinkResourceListResult` added property `next_link` + - Model `ProductApiLinkContract` added property `system_data` + - Model `ProductContract` added property `properties` + - Model `ProductContract` added property `system_data` + - Model `ProductGroupLinkContract` added property `system_data` + - Model `ProxyResource` added property `system_data` + - Model `RecipientEmailContract` added property `system_data` + - Model `RecipientUserContract` added property `properties` + - Model `RecipientUserContract` added property `system_data` + - Model `RemotePrivateEndpointConnectionWrapper` added property `properties` + - Model `ResolverContract` added property `properties` + - Model `ResolverContract` added property `system_data` + - Model `Resource` added property `system_data` + - Model `ResourceCollectionValueItem` added property `system_data` + - Model `SchemaContract` added property `system_data` + - Model `SubscriptionContract` added property `system_data` + - Model `TagApiLinkContract` added property `system_data` + - Model `TagContract` added property `system_data` + - Model `TagDescriptionContract` added property `properties` + - Model `TagDescriptionContract` added property `system_data` + - Model `TagOperationLinkContract` added property `system_data` + - Model `TagProductLinkContract` added property `system_data` + - Model `TenantConfigurationSyncStateContract` added property `system_data` + - Model `TenantSettingsContract` added property `system_data` + - Model `ToolContract` added property `system_data` + - Model `UserContract` added property `properties` + - Model `UserContract` added property `system_data` + - Model `WikiContract` added property `system_data` + - Model `WorkspaceContract` added property `system_data` + - Added model `AccessInformationCreateParameterProperties` + - Added model `AccessInformationUpdateParameterProperties` + - Added model `BackendReconnectProperties` + - Added model `CacheUpdateProperties` + - Added model `CertificateCreateOrUpdateProperties` + - Added model `ConnectivityCheckRequestProtocolConfigurationHttpConfiguration` + - Added model `DeployConfigurationParameterProperties` + - Added model `DiagnosticContractUpdateProperties` + - Added model `EmailTemplateUpdateParameterProperties` + - Added model `GatewayConfigConnectionBaseProperties` + - Added model `GatewayHostnameBindingBaseProperties` + - Added model `GroupCreateParametersProperties` + - Added model `GroupUpdateParametersProperties` + - Added model `LoggerUpdateParameters` + - Added model `OpenidConnectProviderUpdateContractProperties` + - Added model `PortalConfigProperties` + - Added model `PortalSigninSettingProperties` + - Added model `PrivateEndpointConnectionWrapperProperties` + - Added model `RecipientUsersContractProperties` + - Added model `ResolverEntityBaseContract` + - Added model `ResolverUpdateContractProperties` + - Added model `SaveConfigurationParameterProperties` + - Added model `SchemaDocumentProperties` + - Added model `SubscriptionCreateParameterProperties` + - Added model `SubscriptionUpdateParameterProperties` + - Added model `TrackedResource` + - Added model `UserTokenParameterProperties` + - Model `ApiDiagnosticOperations` added parameter `etag` in method `create_or_update` + - Model `ApiDiagnosticOperations` added parameter `match_condition` in method `create_or_update` + - Model `ApiDiagnosticOperations` added parameter `etag` in method `delete` + - Model `ApiDiagnosticOperations` added parameter `match_condition` in method `delete` + - Model `ApiDiagnosticOperations` added parameter `etag` in method `update` + - Model `ApiDiagnosticOperations` added parameter `match_condition` in method `update` + - Model `ApiGatewayConfigConnectionOperations` added parameter `etag` in method `begin_delete` + - Model `ApiGatewayConfigConnectionOperations` added parameter `match_condition` in method `begin_delete` + - Model `ApiGatewayHostnameBindingOperations` added parameter `etag` in method `begin_create_or_update` + - Model `ApiGatewayHostnameBindingOperations` added parameter `match_condition` in method `begin_create_or_update` + - Model `ApiGatewayHostnameBindingOperations` added parameter `etag` in method `begin_delete` + - Model `ApiGatewayHostnameBindingOperations` added parameter `match_condition` in method `begin_delete` + - Model `ApiIssueAttachmentOperations` added parameter `etag` in method `create_or_update` + - Model `ApiIssueAttachmentOperations` added parameter `match_condition` in method `create_or_update` + - Model `ApiIssueAttachmentOperations` added parameter `etag` in method `delete` + - Model `ApiIssueAttachmentOperations` added parameter `match_condition` in method `delete` + - Model `ApiIssueCommentOperations` added parameter `etag` in method `create_or_update` + - Model `ApiIssueCommentOperations` added parameter `match_condition` in method `create_or_update` + - Model `ApiIssueCommentOperations` added parameter `etag` in method `delete` + - Model `ApiIssueCommentOperations` added parameter `match_condition` in method `delete` + - Model `ApiIssueOperations` added parameter `etag` in method `create_or_update` + - Model `ApiIssueOperations` added parameter `match_condition` in method `create_or_update` + - Model `ApiIssueOperations` added parameter `etag` in method `delete` + - Model `ApiIssueOperations` added parameter `match_condition` in method `delete` + - Model `ApiIssueOperations` added parameter `etag` in method `update` + - Model `ApiIssueOperations` added parameter `match_condition` in method `update` + - Model `ApiOperationOperations` added parameter `etag` in method `create_or_update` + - Model `ApiOperationOperations` added parameter `match_condition` in method `create_or_update` + - Model `ApiOperationOperations` added parameter `etag` in method `delete` + - Model `ApiOperationOperations` added parameter `match_condition` in method `delete` + - Model `ApiOperationOperations` added parameter `etag` in method `update` + - Model `ApiOperationOperations` added parameter `match_condition` in method `update` + - Model `ApiOperationPolicyOperations` added parameter `etag` in method `create_or_update` + - Model `ApiOperationPolicyOperations` added parameter `match_condition` in method `create_or_update` + - Model `ApiOperationPolicyOperations` added parameter `etag` in method `delete` + - Model `ApiOperationPolicyOperations` added parameter `match_condition` in method `delete` + - Model `ApiOperations` added parameter `etag` in method `begin_create_or_update` + - Model `ApiOperations` added parameter `match_condition` in method `begin_create_or_update` + - Model `ApiOperations` added parameter `etag` in method `begin_delete` + - Model `ApiOperations` added parameter `match_condition` in method `begin_delete` + - Model `ApiOperations` added parameter `etag` in method `update` + - Model `ApiOperations` added parameter `match_condition` in method `update` + - Model `ApiPolicyOperations` added parameter `etag` in method `create_or_update` + - Model `ApiPolicyOperations` added parameter `match_condition` in method `create_or_update` + - Model `ApiPolicyOperations` added parameter `etag` in method `delete` + - Model `ApiPolicyOperations` added parameter `match_condition` in method `delete` + - Model `ApiReleaseOperations` added parameter `etag` in method `create_or_update` + - Model `ApiReleaseOperations` added parameter `match_condition` in method `create_or_update` + - Model `ApiReleaseOperations` added parameter `etag` in method `delete` + - Model `ApiReleaseOperations` added parameter `match_condition` in method `delete` + - Model `ApiReleaseOperations` added parameter `etag` in method `update` + - Model `ApiReleaseOperations` added parameter `match_condition` in method `update` + - Model `ApiSchemaOperations` added parameter `etag` in method `begin_create_or_update` + - Model `ApiSchemaOperations` added parameter `match_condition` in method `begin_create_or_update` + - Model `ApiSchemaOperations` added parameter `etag` in method `delete` + - Model `ApiSchemaOperations` added parameter `match_condition` in method `delete` + - Model `ApiTagDescriptionOperations` added parameter `etag` in method `create_or_update` + - Model `ApiTagDescriptionOperations` added parameter `match_condition` in method `create_or_update` + - Model `ApiTagDescriptionOperations` added parameter `etag` in method `delete` + - Model `ApiTagDescriptionOperations` added parameter `match_condition` in method `delete` + - Model `ApiVersionSetOperations` added parameter `etag` in method `create_or_update` + - Model `ApiVersionSetOperations` added parameter `match_condition` in method `create_or_update` + - Model `ApiVersionSetOperations` added parameter `etag` in method `delete` + - Model `ApiVersionSetOperations` added parameter `match_condition` in method `delete` + - Model `ApiVersionSetOperations` added parameter `etag` in method `update` + - Model `ApiVersionSetOperations` added parameter `match_condition` in method `update` + - Model `ApiWikiOperations` added parameter `etag` in method `create_or_update` + - Model `ApiWikiOperations` added parameter `match_condition` in method `create_or_update` + - Model `ApiWikiOperations` added parameter `etag` in method `delete` + - Model `ApiWikiOperations` added parameter `match_condition` in method `delete` + - Model `ApiWikiOperations` added parameter `etag` in method `update` + - Model `ApiWikiOperations` added parameter `match_condition` in method `update` + - Model `AuthorizationAccessPolicyOperations` added parameter `etag` in method `create_or_update` + - Model `AuthorizationAccessPolicyOperations` added parameter `match_condition` in method `create_or_update` + - Model `AuthorizationAccessPolicyOperations` added parameter `etag` in method `delete` + - Model `AuthorizationAccessPolicyOperations` added parameter `match_condition` in method `delete` + - Model `AuthorizationOperations` added parameter `etag` in method `create_or_update` + - Model `AuthorizationOperations` added parameter `match_condition` in method `create_or_update` + - Model `AuthorizationOperations` added parameter `etag` in method `delete` + - Model `AuthorizationOperations` added parameter `match_condition` in method `delete` + - Model `AuthorizationProviderOperations` added parameter `etag` in method `create_or_update` + - Model `AuthorizationProviderOperations` added parameter `match_condition` in method `create_or_update` + - Model `AuthorizationProviderOperations` added parameter `etag` in method `delete` + - Model `AuthorizationProviderOperations` added parameter `match_condition` in method `delete` + - Model `AuthorizationServerOperations` added parameter `etag` in method `create_or_update` + - Model `AuthorizationServerOperations` added parameter `match_condition` in method `create_or_update` + - Model `AuthorizationServerOperations` added parameter `etag` in method `delete` + - Model `AuthorizationServerOperations` added parameter `match_condition` in method `delete` + - Model `AuthorizationServerOperations` added parameter `etag` in method `update` + - Model `AuthorizationServerOperations` added parameter `match_condition` in method `update` + - Model `BackendOperations` added parameter `etag` in method `create_or_update` + - Model `BackendOperations` added parameter `match_condition` in method `create_or_update` + - Model `BackendOperations` added parameter `etag` in method `delete` + - Model `BackendOperations` added parameter `match_condition` in method `delete` + - Model `BackendOperations` added parameter `etag` in method `update` + - Model `BackendOperations` added parameter `match_condition` in method `update` + - Model `CacheOperations` added parameter `etag` in method `create_or_update` + - Model `CacheOperations` added parameter `match_condition` in method `create_or_update` + - Model `CacheOperations` added parameter `etag` in method `delete` + - Model `CacheOperations` added parameter `match_condition` in method `delete` + - Model `CacheOperations` added parameter `etag` in method `update` + - Model `CacheOperations` added parameter `match_condition` in method `update` + - Model `CertificateOperations` added parameter `etag` in method `create_or_update` + - Model `CertificateOperations` added parameter `match_condition` in method `create_or_update` + - Model `CertificateOperations` added parameter `etag` in method `delete` + - Model `CertificateOperations` added parameter `match_condition` in method `delete` + - Model `ContentItemOperations` added parameter `etag` in method `create_or_update` + - Model `ContentItemOperations` added parameter `match_condition` in method `create_or_update` + - Model `ContentItemOperations` added parameter `etag` in method `delete` + - Model `ContentItemOperations` added parameter `match_condition` in method `delete` + - Model `ContentTypeOperations` added parameter `etag` in method `create_or_update` + - Model `ContentTypeOperations` added parameter `match_condition` in method `create_or_update` + - Model `ContentTypeOperations` added parameter `etag` in method `delete` + - Model `ContentTypeOperations` added parameter `match_condition` in method `delete` + - Model `DelegationSettingsOperations` added parameter `etag` in method `create_or_update` + - Model `DelegationSettingsOperations` added parameter `match_condition` in method `create_or_update` + - Model `DelegationSettingsOperations` added parameter `etag` in method `update` + - Model `DelegationSettingsOperations` added parameter `match_condition` in method `update` + - Model `DiagnosticOperations` added parameter `etag` in method `create_or_update` + - Model `DiagnosticOperations` added parameter `match_condition` in method `create_or_update` + - Model `DiagnosticOperations` added parameter `etag` in method `delete` + - Model `DiagnosticOperations` added parameter `match_condition` in method `delete` + - Model `DiagnosticOperations` added parameter `etag` in method `update` + - Model `DiagnosticOperations` added parameter `match_condition` in method `update` + - Model `DocumentationOperations` added parameter `etag` in method `create_or_update` + - Model `DocumentationOperations` added parameter `match_condition` in method `create_or_update` + - Model `DocumentationOperations` added parameter `etag` in method `delete` + - Model `DocumentationOperations` added parameter `match_condition` in method `delete` + - Model `DocumentationOperations` added parameter `etag` in method `update` + - Model `DocumentationOperations` added parameter `match_condition` in method `update` + - Model `EmailTemplateOperations` added parameter `etag` in method `create_or_update` + - Model `EmailTemplateOperations` added parameter `match_condition` in method `create_or_update` + - Model `EmailTemplateOperations` added parameter `etag` in method `delete` + - Model `EmailTemplateOperations` added parameter `match_condition` in method `delete` + - Model `EmailTemplateOperations` added parameter `etag` in method `update` + - Model `EmailTemplateOperations` added parameter `match_condition` in method `update` + - Model `GatewayCertificateAuthorityOperations` added parameter `etag` in method `create_or_update` + - Model `GatewayCertificateAuthorityOperations` added parameter `match_condition` in method `create_or_update` + - Model `GatewayCertificateAuthorityOperations` added parameter `etag` in method `delete` + - Model `GatewayCertificateAuthorityOperations` added parameter `match_condition` in method `delete` + - Model `GatewayHostnameConfigurationOperations` added parameter `etag` in method `create_or_update` + - Model `GatewayHostnameConfigurationOperations` added parameter `match_condition` in method `create_or_update` + - Model `GatewayHostnameConfigurationOperations` added parameter `etag` in method `delete` + - Model `GatewayHostnameConfigurationOperations` added parameter `match_condition` in method `delete` + - Model `GatewayOperations` added parameter `etag` in method `create_or_update` + - Model `GatewayOperations` added parameter `match_condition` in method `create_or_update` + - Model `GatewayOperations` added parameter `etag` in method `delete` + - Model `GatewayOperations` added parameter `match_condition` in method `delete` + - Model `GatewayOperations` added parameter `etag` in method `update` + - Model `GatewayOperations` added parameter `match_condition` in method `update` + - Model `GlobalSchemaOperations` added parameter `etag` in method `begin_create_or_update` + - Model `GlobalSchemaOperations` added parameter `match_condition` in method `begin_create_or_update` + - Model `GlobalSchemaOperations` added parameter `etag` in method `delete` + - Model `GlobalSchemaOperations` added parameter `match_condition` in method `delete` + - Model `GraphQLApiResolverOperations` added parameter `etag` in method `create_or_update` + - Model `GraphQLApiResolverOperations` added parameter `match_condition` in method `create_or_update` + - Model `GraphQLApiResolverOperations` added parameter `etag` in method `delete` + - Model `GraphQLApiResolverOperations` added parameter `match_condition` in method `delete` + - Model `GraphQLApiResolverOperations` added parameter `etag` in method `update` + - Model `GraphQLApiResolverOperations` added parameter `match_condition` in method `update` + - Model `GraphQLApiResolverPolicyOperations` added parameter `etag` in method `create_or_update` + - Model `GraphQLApiResolverPolicyOperations` added parameter `match_condition` in method `create_or_update` + - Model `GraphQLApiResolverPolicyOperations` added parameter `etag` in method `delete` + - Model `GraphQLApiResolverPolicyOperations` added parameter `match_condition` in method `delete` + - Model `GroupOperations` added parameter `etag` in method `create_or_update` + - Model `GroupOperations` added parameter `match_condition` in method `create_or_update` + - Model `GroupOperations` added parameter `etag` in method `delete` + - Model `GroupOperations` added parameter `match_condition` in method `delete` + - Model `GroupOperations` added parameter `etag` in method `update` + - Model `GroupOperations` added parameter `match_condition` in method `update` + - Model `IdentityProviderOperations` added parameter `etag` in method `create_or_update` + - Model `IdentityProviderOperations` added parameter `match_condition` in method `create_or_update` + - Model `IdentityProviderOperations` added parameter `etag` in method `delete` + - Model `IdentityProviderOperations` added parameter `match_condition` in method `delete` + - Model `IdentityProviderOperations` added parameter `etag` in method `update` + - Model `IdentityProviderOperations` added parameter `match_condition` in method `update` + - Model `LoggerOperations` added parameter `etag` in method `create_or_update` + - Model `LoggerOperations` added parameter `match_condition` in method `create_or_update` + - Model `LoggerOperations` added parameter `etag` in method `delete` + - Model `LoggerOperations` added parameter `match_condition` in method `delete` + - Model `LoggerOperations` added parameter `etag` in method `update` + - Model `LoggerOperations` added parameter `match_condition` in method `update` + - Model `NamedValueOperations` added parameter `etag` in method `begin_create_or_update` + - Model `NamedValueOperations` added parameter `match_condition` in method `begin_create_or_update` + - Model `NamedValueOperations` added parameter `etag` in method `begin_update` + - Model `NamedValueOperations` added parameter `match_condition` in method `begin_update` + - Model `NamedValueOperations` added parameter `etag` in method `delete` + - Model `NamedValueOperations` added parameter `match_condition` in method `delete` + - Model `NotificationOperations` added parameter `etag` in method `create_or_update` + - Model `NotificationOperations` added parameter `match_condition` in method `create_or_update` + - Model `OpenIdConnectProviderOperations` added parameter `etag` in method `create_or_update` + - Model `OpenIdConnectProviderOperations` added parameter `match_condition` in method `create_or_update` + - Model `OpenIdConnectProviderOperations` added parameter `etag` in method `delete` + - Model `OpenIdConnectProviderOperations` added parameter `match_condition` in method `delete` + - Model `OpenIdConnectProviderOperations` added parameter `etag` in method `update` + - Model `OpenIdConnectProviderOperations` added parameter `match_condition` in method `update` + - Model `PolicyFragmentOperations` added parameter `etag` in method `begin_create_or_update` + - Model `PolicyFragmentOperations` added parameter `match_condition` in method `begin_create_or_update` + - Model `PolicyFragmentOperations` added parameter `etag` in method `delete` + - Model `PolicyFragmentOperations` added parameter `match_condition` in method `delete` + - Model `PolicyOperations` added parameter `etag` in method `create_or_update` + - Model `PolicyOperations` added parameter `match_condition` in method `create_or_update` + - Model `PolicyOperations` added parameter `etag` in method `delete` + - Model `PolicyOperations` added parameter `match_condition` in method `delete` + - Model `PolicyRestrictionOperations` added parameter `etag` in method `create_or_update` + - Model `PolicyRestrictionOperations` added parameter `match_condition` in method `create_or_update` + - Model `PolicyRestrictionOperations` added parameter `etag` in method `delete` + - Model `PolicyRestrictionOperations` added parameter `match_condition` in method `delete` + - Model `PolicyRestrictionOperations` added parameter `etag` in method `update` + - Model `PolicyRestrictionOperations` added parameter `match_condition` in method `update` + - Model `PortalConfigOperations` added parameter `etag` in method `create_or_update` + - Model `PortalConfigOperations` added parameter `match_condition` in method `create_or_update` + - Model `PortalConfigOperations` added parameter `etag` in method `update` + - Model `PortalConfigOperations` added parameter `match_condition` in method `update` + - Model `PortalRevisionOperations` added parameter `etag` in method `begin_update` + - Model `PortalRevisionOperations` added parameter `match_condition` in method `begin_update` + - Model `ProductOperations` added parameter `etag` in method `create_or_update` + - Model `ProductOperations` added parameter `match_condition` in method `create_or_update` + - Model `ProductOperations` added parameter `etag` in method `delete` + - Model `ProductOperations` added parameter `match_condition` in method `delete` + - Model `ProductOperations` added parameter `etag` in method `update` + - Model `ProductOperations` added parameter `match_condition` in method `update` + - Model `ProductPolicyOperations` added parameter `etag` in method `create_or_update` + - Model `ProductPolicyOperations` added parameter `match_condition` in method `create_or_update` + - Model `ProductPolicyOperations` added parameter `etag` in method `delete` + - Model `ProductPolicyOperations` added parameter `match_condition` in method `delete` + - Model `ProductWikiOperations` added parameter `etag` in method `create_or_update` + - Model `ProductWikiOperations` added parameter `match_condition` in method `create_or_update` + - Model `ProductWikiOperations` added parameter `etag` in method `delete` + - Model `ProductWikiOperations` added parameter `match_condition` in method `delete` + - Model `ProductWikiOperations` added parameter `etag` in method `update` + - Model `ProductWikiOperations` added parameter `match_condition` in method `update` + - Model `SignInSettingsOperations` added parameter `etag` in method `create_or_update` + - Model `SignInSettingsOperations` added parameter `match_condition` in method `create_or_update` + - Model `SignInSettingsOperations` added parameter `etag` in method `update` + - Model `SignInSettingsOperations` added parameter `match_condition` in method `update` + - Model `SignUpSettingsOperations` added parameter `etag` in method `create_or_update` + - Model `SignUpSettingsOperations` added parameter `match_condition` in method `create_or_update` + - Model `SignUpSettingsOperations` added parameter `etag` in method `update` + - Model `SignUpSettingsOperations` added parameter `match_condition` in method `update` + - Model `SubscriptionOperations` added parameter `etag` in method `create_or_update` + - Model `SubscriptionOperations` added parameter `match_condition` in method `create_or_update` + - Model `SubscriptionOperations` added parameter `etag` in method `delete` + - Model `SubscriptionOperations` added parameter `match_condition` in method `delete` + - Model `SubscriptionOperations` added parameter `etag` in method `update` + - Model `SubscriptionOperations` added parameter `match_condition` in method `update` + - Model `TagOperations` added parameter `etag` in method `create_or_update` + - Model `TagOperations` added parameter `match_condition` in method `create_or_update` + - Model `TagOperations` added parameter `etag` in method `delete` + - Model `TagOperations` added parameter `match_condition` in method `delete` + - Model `TagOperations` added parameter `etag` in method `update` + - Model `TagOperations` added parameter `match_condition` in method `update` + - Model `TenantAccessOperations` added parameter `etag` in method `create` + - Model `TenantAccessOperations` added parameter `match_condition` in method `create` + - Model `TenantAccessOperations` added parameter `etag` in method `update` + - Model `TenantAccessOperations` added parameter `match_condition` in method `update` + - Model `UserOperations` added parameter `etag` in method `begin_delete` + - Model `UserOperations` added parameter `match_condition` in method `begin_delete` + - Model `UserOperations` added parameter `etag` in method `create_or_update` + - Model `UserOperations` added parameter `match_condition` in method `create_or_update` + - Model `UserOperations` added parameter `etag` in method `update` + - Model `UserOperations` added parameter `match_condition` in method `update` + - Model `WorkspaceApiDiagnosticOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceApiDiagnosticOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceApiDiagnosticOperations` added parameter `etag` in method `delete` + - Model `WorkspaceApiDiagnosticOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceApiDiagnosticOperations` added parameter `etag` in method `update` + - Model `WorkspaceApiDiagnosticOperations` added parameter `match_condition` in method `update` + - Model `WorkspaceApiOperationOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceApiOperationOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceApiOperationOperations` added parameter `etag` in method `delete` + - Model `WorkspaceApiOperationOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceApiOperationOperations` added parameter `etag` in method `update` + - Model `WorkspaceApiOperationOperations` added parameter `match_condition` in method `update` + - Model `WorkspaceApiOperationPolicyOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceApiOperationPolicyOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceApiOperationPolicyOperations` added parameter `etag` in method `delete` + - Model `WorkspaceApiOperationPolicyOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceApiOperations` added parameter `etag` in method `begin_create_or_update` + - Model `WorkspaceApiOperations` added parameter `match_condition` in method `begin_create_or_update` + - Model `WorkspaceApiOperations` added parameter `etag` in method `delete` + - Model `WorkspaceApiOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceApiOperations` added parameter `etag` in method `update` + - Model `WorkspaceApiOperations` added parameter `match_condition` in method `update` + - Model `WorkspaceApiPolicyOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceApiPolicyOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceApiPolicyOperations` added parameter `etag` in method `delete` + - Model `WorkspaceApiPolicyOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceApiReleaseOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceApiReleaseOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceApiReleaseOperations` added parameter `etag` in method `delete` + - Model `WorkspaceApiReleaseOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceApiReleaseOperations` added parameter `etag` in method `update` + - Model `WorkspaceApiReleaseOperations` added parameter `match_condition` in method `update` + - Model `WorkspaceApiSchemaOperations` added parameter `etag` in method `begin_create_or_update` + - Model `WorkspaceApiSchemaOperations` added parameter `match_condition` in method `begin_create_or_update` + - Model `WorkspaceApiSchemaOperations` added parameter `etag` in method `delete` + - Model `WorkspaceApiSchemaOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceApiVersionSetOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceApiVersionSetOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceApiVersionSetOperations` added parameter `etag` in method `delete` + - Model `WorkspaceApiVersionSetOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceApiVersionSetOperations` added parameter `etag` in method `update` + - Model `WorkspaceApiVersionSetOperations` added parameter `match_condition` in method `update` + - Model `WorkspaceBackendOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceBackendOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceBackendOperations` added parameter `etag` in method `delete` + - Model `WorkspaceBackendOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceBackendOperations` added parameter `etag` in method `update` + - Model `WorkspaceBackendOperations` added parameter `match_condition` in method `update` + - Model `WorkspaceCertificateOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceCertificateOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceCertificateOperations` added parameter `etag` in method `delete` + - Model `WorkspaceCertificateOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceDiagnosticOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceDiagnosticOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceDiagnosticOperations` added parameter `etag` in method `delete` + - Model `WorkspaceDiagnosticOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceDiagnosticOperations` added parameter `etag` in method `update` + - Model `WorkspaceDiagnosticOperations` added parameter `match_condition` in method `update` + - Model `WorkspaceGlobalSchemaOperations` added parameter `etag` in method `begin_create_or_update` + - Model `WorkspaceGlobalSchemaOperations` added parameter `match_condition` in method `begin_create_or_update` + - Model `WorkspaceGlobalSchemaOperations` added parameter `etag` in method `delete` + - Model `WorkspaceGlobalSchemaOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceGroupOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceGroupOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceGroupOperations` added parameter `etag` in method `delete` + - Model `WorkspaceGroupOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceGroupOperations` added parameter `etag` in method `update` + - Model `WorkspaceGroupOperations` added parameter `match_condition` in method `update` + - Model `WorkspaceLoggerOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceLoggerOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceLoggerOperations` added parameter `etag` in method `delete` + - Model `WorkspaceLoggerOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceLoggerOperations` added parameter `etag` in method `update` + - Model `WorkspaceLoggerOperations` added parameter `match_condition` in method `update` + - Model `WorkspaceNamedValueOperations` added parameter `etag` in method `begin_create_or_update` + - Model `WorkspaceNamedValueOperations` added parameter `match_condition` in method `begin_create_or_update` + - Model `WorkspaceNamedValueOperations` added parameter `etag` in method `begin_update` + - Model `WorkspaceNamedValueOperations` added parameter `match_condition` in method `begin_update` + - Model `WorkspaceNamedValueOperations` added parameter `etag` in method `delete` + - Model `WorkspaceNamedValueOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceNotificationOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceNotificationOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceOperations` added parameter `etag` in method `delete` + - Model `WorkspaceOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceOperations` added parameter `etag` in method `update` + - Model `WorkspaceOperations` added parameter `match_condition` in method `update` + - Model `WorkspacePolicyFragmentOperations` added parameter `etag` in method `begin_create_or_update` + - Model `WorkspacePolicyFragmentOperations` added parameter `match_condition` in method `begin_create_or_update` + - Model `WorkspacePolicyFragmentOperations` added parameter `etag` in method `delete` + - Model `WorkspacePolicyFragmentOperations` added parameter `match_condition` in method `delete` + - Model `WorkspacePolicyOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspacePolicyOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspacePolicyOperations` added parameter `etag` in method `delete` + - Model `WorkspacePolicyOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceProductOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceProductOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceProductOperations` added parameter `etag` in method `delete` + - Model `WorkspaceProductOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceProductOperations` added parameter `etag` in method `update` + - Model `WorkspaceProductOperations` added parameter `match_condition` in method `update` + - Model `WorkspaceProductPolicyOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceProductPolicyOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceProductPolicyOperations` added parameter `etag` in method `delete` + - Model `WorkspaceProductPolicyOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceSubscriptionOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceSubscriptionOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceSubscriptionOperations` added parameter `etag` in method `delete` + - Model `WorkspaceSubscriptionOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceSubscriptionOperations` added parameter `etag` in method `update` + - Model `WorkspaceSubscriptionOperations` added parameter `match_condition` in method `update` + - Model `WorkspaceTagOperations` added parameter `etag` in method `create_or_update` + - Model `WorkspaceTagOperations` added parameter `match_condition` in method `create_or_update` + - Model `WorkspaceTagOperations` added parameter `etag` in method `delete` + - Model `WorkspaceTagOperations` added parameter `match_condition` in method `delete` + - Model `WorkspaceTagOperations` added parameter `etag` in method `update` + - Model `WorkspaceTagOperations` added parameter `match_condition` in method `update` + +### Breaking Changes + + - Model `AccessInformationCreateParameters` deleted or renamed its instance variable `principal_id` + - Model `AccessInformationCreateParameters` deleted or renamed its instance variable `primary_key` + - Model `AccessInformationCreateParameters` deleted or renamed its instance variable `secondary_key` + - Model `AccessInformationCreateParameters` deleted or renamed its instance variable `enabled` + - Model `AccessInformationUpdateParameters` deleted or renamed its instance variable `enabled` + - Model `ApiContract` deleted or renamed its instance variable `description` + - Model `ApiContract` deleted or renamed its instance variable `authentication_settings` + - Model `ApiContract` deleted or renamed its instance variable `subscription_key_parameter_names` + - Model `ApiContract` deleted or renamed its instance variable `api_type` + - Model `ApiContract` deleted or renamed its instance variable `api_revision` + - Model `ApiContract` deleted or renamed its instance variable `api_version` + - Model `ApiContract` deleted or renamed its instance variable `is_current` + - Model `ApiContract` deleted or renamed its instance variable `is_online` + - Model `ApiContract` deleted or renamed its instance variable `api_revision_description` + - Model `ApiContract` deleted or renamed its instance variable `api_version_description` + - Model `ApiContract` deleted or renamed its instance variable `api_version_set_id` + - Model `ApiContract` deleted or renamed its instance variable `subscription_required` + - Model `ApiContract` deleted or renamed its instance variable `terms_of_service_url` + - Model `ApiContract` deleted or renamed its instance variable `contact` + - Model `ApiContract` deleted or renamed its instance variable `license` + - Model `ApiContract` deleted or renamed its instance variable `source_api_id` + - Model `ApiContract` deleted or renamed its instance variable `display_name` + - Model `ApiContract` deleted or renamed its instance variable `service_url` + - Model `ApiContract` deleted or renamed its instance variable `path` + - Model `ApiContract` deleted or renamed its instance variable `protocols` + - Model `ApiContract` deleted or renamed its instance variable `api_version_set` + - Model `ApiContract` deleted or renamed its instance variable `provisioning_state` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `description` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `authentication_settings` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `subscription_key_parameter_names` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `api_type` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `api_revision` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `api_version` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `is_current` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `is_online` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `api_revision_description` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `api_version_description` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `api_version_set_id` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `subscription_required` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `terms_of_service_url` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `contact` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `license` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `source_api_id` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `display_name` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `service_url` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `path` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `protocols` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `api_version_set` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `provisioning_state` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `value` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `format` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `wsdl_selector` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `soap_api_type` + - Model `ApiCreateOrUpdateParameter` deleted or renamed its instance variable `translate_required_query_parameters_conduct` + - Model `ApiManagementGatewayConfigConnectionResource` deleted or renamed its instance variable `provisioning_state` + - Model `ApiManagementGatewayConfigConnectionResource` deleted or renamed its instance variable `source_id` + - Model `ApiManagementGatewayConfigConnectionResource` deleted or renamed its instance variable `default_hostname` + - Model `ApiManagementGatewayConfigConnectionResource` deleted or renamed its instance variable `hostnames` + - Model `ApiManagementGatewayResource` deleted or renamed its instance variable `provisioning_state` + - Model `ApiManagementGatewayResource` deleted or renamed its instance variable `target_provisioning_state` + - Model `ApiManagementGatewayResource` deleted or renamed its instance variable `created_at_utc` + - Model `ApiManagementGatewayResource` deleted or renamed its instance variable `frontend` + - Model `ApiManagementGatewayResource` deleted or renamed its instance variable `backend` + - Model `ApiManagementGatewayResource` deleted or renamed its instance variable `configuration_api` + - Model `ApiManagementGatewayResource` deleted or renamed its instance variable `virtual_network_type` + - Model `ApiManagementGatewayUpdateParameters` deleted or renamed its instance variable `provisioning_state` + - Model `ApiManagementGatewayUpdateParameters` deleted or renamed its instance variable `target_provisioning_state` + - Model `ApiManagementGatewayUpdateParameters` deleted or renamed its instance variable `created_at_utc` + - Model `ApiManagementGatewayUpdateParameters` deleted or renamed its instance variable `frontend` + - Model `ApiManagementGatewayUpdateParameters` deleted or renamed its instance variable `backend` + - Model `ApiManagementGatewayUpdateParameters` deleted or renamed its instance variable `configuration_api` + - Model `ApiManagementGatewayUpdateParameters` deleted or renamed its instance variable `virtual_network_type` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `notification_sender_email` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `provisioning_state` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `target_provisioning_state` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `created_at_utc` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `gateway_url` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `gateway_regional_url` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `portal_url` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `management_api_url` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `scm_url` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `developer_portal_url` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `hostname_configurations` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `public_ip_addresses` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `private_ip_addresses` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `public_ip_address_id` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `public_network_access` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `configuration_api` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `virtual_network_configuration` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `additional_locations` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `custom_properties` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `certificates` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `enable_client_certificate` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `nat_gateway_state` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `outbound_public_ip_addresses` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `disable_gateway` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `virtual_network_type` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `api_version_constraint` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `restore` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `private_endpoint_connections` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `platform_version` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `legacy_portal_status` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `developer_portal_status` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `release_channel` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `zone_redundant` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `publisher_email` + - Model `ApiManagementServiceResource` deleted or renamed its instance variable `publisher_name` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `notification_sender_email` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `provisioning_state` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `target_provisioning_state` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `created_at_utc` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `gateway_url` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `gateway_regional_url` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `portal_url` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `management_api_url` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `scm_url` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `developer_portal_url` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `hostname_configurations` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `public_ip_addresses` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `private_ip_addresses` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `public_ip_address_id` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `public_network_access` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `configuration_api` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `virtual_network_configuration` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `additional_locations` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `custom_properties` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `certificates` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `enable_client_certificate` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `nat_gateway_state` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `outbound_public_ip_addresses` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `disable_gateway` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `virtual_network_type` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `api_version_constraint` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `restore` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `private_endpoint_connections` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `platform_version` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `legacy_portal_status` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `developer_portal_status` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `release_channel` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `zone_redundant` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `publisher_email` + - Model `ApiManagementServiceUpdateParameters` deleted or renamed its instance variable `publisher_name` + - Model `ApiManagementSkuRestrictions` deleted or renamed its instance variable `values` + - Model `ApiManagementWorkspaceLinksResource` deleted or renamed its instance variable `workspace_id` + - Model `ApiManagementWorkspaceLinksResource` deleted or renamed its instance variable `gateways` + - Model `ApiUpdateContract` deleted or renamed its instance variable `description` + - Model `ApiUpdateContract` deleted or renamed its instance variable `authentication_settings` + - Model `ApiUpdateContract` deleted or renamed its instance variable `subscription_key_parameter_names` + - Model `ApiUpdateContract` deleted or renamed its instance variable `api_type` + - Model `ApiUpdateContract` deleted or renamed its instance variable `api_revision` + - Model `ApiUpdateContract` deleted or renamed its instance variable `api_version` + - Model `ApiUpdateContract` deleted or renamed its instance variable `is_current` + - Model `ApiUpdateContract` deleted or renamed its instance variable `is_online` + - Model `ApiUpdateContract` deleted or renamed its instance variable `api_revision_description` + - Model `ApiUpdateContract` deleted or renamed its instance variable `api_version_description` + - Model `ApiUpdateContract` deleted or renamed its instance variable `api_version_set_id` + - Model `ApiUpdateContract` deleted or renamed its instance variable `subscription_required` + - Model `ApiUpdateContract` deleted or renamed its instance variable `terms_of_service_url` + - Model `ApiUpdateContract` deleted or renamed its instance variable `contact` + - Model `ApiUpdateContract` deleted or renamed its instance variable `license` + - Model `ApiUpdateContract` deleted or renamed its instance variable `display_name` + - Model `ApiUpdateContract` deleted or renamed its instance variable `service_url` + - Model `ApiUpdateContract` deleted or renamed its instance variable `path` + - Model `ApiUpdateContract` deleted or renamed its instance variable `protocols` + - Model `ApiVersionSetContract` deleted or renamed its instance variable `description` + - Model `ApiVersionSetContract` deleted or renamed its instance variable `version_query_name` + - Model `ApiVersionSetContract` deleted or renamed its instance variable `version_header_name` + - Model `ApiVersionSetContract` deleted or renamed its instance variable `display_name` + - Model `ApiVersionSetContract` deleted or renamed its instance variable `versioning_scheme` + - Model `ApiVersionSetUpdateParameters` deleted or renamed its instance variable `description` + - Model `ApiVersionSetUpdateParameters` deleted or renamed its instance variable `version_query_name` + - Model `ApiVersionSetUpdateParameters` deleted or renamed its instance variable `version_header_name` + - Model `ApiVersionSetUpdateParameters` deleted or renamed its instance variable `display_name` + - Model `ApiVersionSetUpdateParameters` deleted or renamed its instance variable `versioning_scheme` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `description` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `authorization_methods` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `client_authentication_method` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `token_body_parameters` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `token_endpoint` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `support_state` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `default_scope` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `bearer_token_sending_methods` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `resource_owner_username` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `resource_owner_password` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `display_name` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `use_in_test_console` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `use_in_api_documentation` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `client_registration_endpoint` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `authorization_endpoint` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `grant_types` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `client_id` + - Model `AuthorizationServerContract` deleted or renamed its instance variable `client_secret` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `description` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `authorization_methods` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `client_authentication_method` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `token_body_parameters` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `token_endpoint` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `support_state` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `default_scope` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `bearer_token_sending_methods` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `resource_owner_username` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `resource_owner_password` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `display_name` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `use_in_test_console` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `use_in_api_documentation` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `client_registration_endpoint` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `authorization_endpoint` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `grant_types` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `client_id` + - Model `AuthorizationServerUpdateContract` deleted or renamed its instance variable `client_secret` + - Model `BackendContract` deleted or renamed its instance variable `title` + - Model `BackendContract` deleted or renamed its instance variable `description` + - Model `BackendContract` deleted or renamed its instance variable `resource_id` + - Model `BackendContract` deleted or renamed its instance variable `credentials` + - Model `BackendContract` deleted or renamed its instance variable `proxy` + - Model `BackendContract` deleted or renamed its instance variable `tls` + - Model `BackendContract` deleted or renamed its instance variable `circuit_breaker` + - Model `BackendContract` deleted or renamed its instance variable `azure_region` + - Model `BackendContract` deleted or renamed its instance variable `pool` + - Model `BackendContract` deleted or renamed its instance variable `type_properties_type` + - Model `BackendContract` deleted or renamed its instance variable `url` + - Model `BackendContract` deleted or renamed its instance variable `protocol` + - Model `BackendReconnectContract` deleted or renamed its instance variable `after` + - Model `BackendUpdateParameters` deleted or renamed its instance variable `title` + - Model `BackendUpdateParameters` deleted or renamed its instance variable `description` + - Model `BackendUpdateParameters` deleted or renamed its instance variable `resource_id` + - Model `BackendUpdateParameters` deleted or renamed its instance variable `credentials` + - Model `BackendUpdateParameters` deleted or renamed its instance variable `proxy` + - Model `BackendUpdateParameters` deleted or renamed its instance variable `tls` + - Model `BackendUpdateParameters` deleted or renamed its instance variable `circuit_breaker` + - Model `BackendUpdateParameters` deleted or renamed its instance variable `azure_region` + - Model `BackendUpdateParameters` deleted or renamed its instance variable `pool` + - Model `BackendUpdateParameters` deleted or renamed its instance variable `type` + - Model `BackendUpdateParameters` deleted or renamed its instance variable `url` + - Model `BackendUpdateParameters` deleted or renamed its instance variable `protocol` + - Model `CacheUpdateParameters` deleted or renamed its instance variable `description` + - Model `CacheUpdateParameters` deleted or renamed its instance variable `connection_string` + - Model `CacheUpdateParameters` deleted or renamed its instance variable `use_from_location` + - Model `CacheUpdateParameters` deleted or renamed its instance variable `resource_id` + - Model `CertificateCreateOrUpdateParameters` deleted or renamed its instance variable `data` + - Model `CertificateCreateOrUpdateParameters` deleted or renamed its instance variable `password` + - Model `CertificateCreateOrUpdateParameters` deleted or renamed its instance variable `key_vault` + - Model `DeployConfigurationParameters` deleted or renamed its instance variable `branch` + - Model `DeployConfigurationParameters` deleted or renamed its instance variable `force` + - Model `DiagnosticUpdateContract` deleted or renamed its instance variable `always_log` + - Model `DiagnosticUpdateContract` deleted or renamed its instance variable `logger_id` + - Model `DiagnosticUpdateContract` deleted or renamed its instance variable `sampling` + - Model `DiagnosticUpdateContract` deleted or renamed its instance variable `frontend` + - Model `DiagnosticUpdateContract` deleted or renamed its instance variable `backend` + - Model `DiagnosticUpdateContract` deleted or renamed its instance variable `log_client_ip` + - Model `DiagnosticUpdateContract` deleted or renamed its instance variable `http_correlation_protocol` + - Model `DiagnosticUpdateContract` deleted or renamed its instance variable `verbosity` + - Model `DiagnosticUpdateContract` deleted or renamed its instance variable `operation_name_format` + - Model `DiagnosticUpdateContract` deleted or renamed its instance variable `metrics` + - Model `DocumentationUpdateContract` deleted or renamed its instance variable `title` + - Model `DocumentationUpdateContract` deleted or renamed its instance variable `content` + - Model `EmailTemplateUpdateParameters` deleted or renamed its instance variable `subject` + - Model `EmailTemplateUpdateParameters` deleted or renamed its instance variable `title` + - Model `EmailTemplateUpdateParameters` deleted or renamed its instance variable `description` + - Model `EmailTemplateUpdateParameters` deleted or renamed its instance variable `body` + - Model `EmailTemplateUpdateParameters` deleted or renamed its instance variable `parameters` + - Model `GatewayHostnameBindingResource` deleted or renamed its instance variable `etag` + - Model `GatewayHostnameBindingResource` deleted or renamed its instance variable `provisioning_state` + - Model `GatewayHostnameBindingResource` deleted or renamed its instance variable `hostname` + - Model `GatewayHostnameBindingResource` deleted or renamed its instance variable `key_vault` + - Model `GatewayHostnameBindingResource` deleted or renamed its instance variable `certificate` + - Model `GroupContract` deleted or renamed its instance variable `display_name` + - Model `GroupContract` deleted or renamed its instance variable `description` + - Model `GroupContract` deleted or renamed its instance variable `built_in` + - Model `GroupContract` deleted or renamed its instance variable `type_properties_type` + - Model `GroupContract` deleted or renamed its instance variable `external_id` + - Model `GroupCreateParameters` deleted or renamed its instance variable `display_name` + - Model `GroupCreateParameters` deleted or renamed its instance variable `description` + - Model `GroupCreateParameters` deleted or renamed its instance variable `type` + - Model `GroupCreateParameters` deleted or renamed its instance variable `external_id` + - Model `GroupUpdateParameters` deleted or renamed its instance variable `display_name` + - Model `GroupUpdateParameters` deleted or renamed its instance variable `description` + - Model `GroupUpdateParameters` deleted or renamed its instance variable `type` + - Model `GroupUpdateParameters` deleted or renamed its instance variable `external_id` + - Model `IdentityProviderContract` deleted or renamed its instance variable `type_properties_type` + - Model `IdentityProviderContract` deleted or renamed its instance variable `signin_tenant` + - Model `IdentityProviderContract` deleted or renamed its instance variable `allowed_tenants` + - Model `IdentityProviderContract` deleted or renamed its instance variable `authority` + - Model `IdentityProviderContract` deleted or renamed its instance variable `signup_policy_name` + - Model `IdentityProviderContract` deleted or renamed its instance variable `signin_policy_name` + - Model `IdentityProviderContract` deleted or renamed its instance variable `profile_editing_policy_name` + - Model `IdentityProviderContract` deleted or renamed its instance variable `password_reset_policy_name` + - Model `IdentityProviderContract` deleted or renamed its instance variable `client_library` + - Model `IdentityProviderContract` deleted or renamed its instance variable `client_id` + - Model `IdentityProviderContract` deleted or renamed its instance variable `client_secret` + - Model `IdentityProviderContract` deleted or renamed its instance variable `certificate_id` + - Model `IdentityProviderCreateContract` deleted or renamed its instance variable `type_properties_type` + - Model `IdentityProviderCreateContract` deleted or renamed its instance variable `signin_tenant` + - Model `IdentityProviderCreateContract` deleted or renamed its instance variable `allowed_tenants` + - Model `IdentityProviderCreateContract` deleted or renamed its instance variable `authority` + - Model `IdentityProviderCreateContract` deleted or renamed its instance variable `signup_policy_name` + - Model `IdentityProviderCreateContract` deleted or renamed its instance variable `signin_policy_name` + - Model `IdentityProviderCreateContract` deleted or renamed its instance variable `profile_editing_policy_name` + - Model `IdentityProviderCreateContract` deleted or renamed its instance variable `password_reset_policy_name` + - Model `IdentityProviderCreateContract` deleted or renamed its instance variable `client_library` + - Model `IdentityProviderCreateContract` deleted or renamed its instance variable `client_id` + - Model `IdentityProviderCreateContract` deleted or renamed its instance variable `client_secret` + - Model `IdentityProviderCreateContract` deleted or renamed its instance variable `certificate_id` + - Model `IdentityProviderUpdateParameters` deleted or renamed its instance variable `type` + - Model `IdentityProviderUpdateParameters` deleted or renamed its instance variable `signin_tenant` + - Model `IdentityProviderUpdateParameters` deleted or renamed its instance variable `allowed_tenants` + - Model `IdentityProviderUpdateParameters` deleted or renamed its instance variable `authority` + - Model `IdentityProviderUpdateParameters` deleted or renamed its instance variable `signup_policy_name` + - Model `IdentityProviderUpdateParameters` deleted or renamed its instance variable `signin_policy_name` + - Model `IdentityProviderUpdateParameters` deleted or renamed its instance variable `profile_editing_policy_name` + - Model `IdentityProviderUpdateParameters` deleted or renamed its instance variable `password_reset_policy_name` + - Model `IdentityProviderUpdateParameters` deleted or renamed its instance variable `client_library` + - Model `IdentityProviderUpdateParameters` deleted or renamed its instance variable `client_id` + - Model `IdentityProviderUpdateParameters` deleted or renamed its instance variable `client_secret` + - Model `IdentityProviderUpdateParameters` deleted or renamed its instance variable `certificate_id` + - Model `IssueContract` deleted or renamed its instance variable `created_date` + - Model `IssueContract` deleted or renamed its instance variable `state` + - Model `IssueContract` deleted or renamed its instance variable `api_id` + - Model `IssueContract` deleted or renamed its instance variable `title` + - Model `IssueContract` deleted or renamed its instance variable `description` + - Model `IssueContract` deleted or renamed its instance variable `user_id` + - Model `IssueUpdateContract` deleted or renamed its instance variable `created_date` + - Model `IssueUpdateContract` deleted or renamed its instance variable `state` + - Model `IssueUpdateContract` deleted or renamed its instance variable `api_id` + - Model `IssueUpdateContract` deleted or renamed its instance variable `title` + - Model `IssueUpdateContract` deleted or renamed its instance variable `description` + - Model `IssueUpdateContract` deleted or renamed its instance variable `user_id` + - Model `LoggerUpdateContract` deleted or renamed its instance variable `logger_type` + - Model `LoggerUpdateContract` deleted or renamed its instance variable `description` + - Model `LoggerUpdateContract` deleted or renamed its instance variable `credentials` + - Model `LoggerUpdateContract` deleted or renamed its instance variable `is_buffered` + - Model `NamedValueContract` deleted or renamed its instance variable `tags` + - Model `NamedValueContract` deleted or renamed its instance variable `secret` + - Model `NamedValueContract` deleted or renamed its instance variable `display_name` + - Model `NamedValueContract` deleted or renamed its instance variable `value` + - Model `NamedValueContract` deleted or renamed its instance variable `key_vault` + - Model `NamedValueContract` deleted or renamed its instance variable `provisioning_state` + - Model `NamedValueCreateContract` deleted or renamed its instance variable `tags` + - Model `NamedValueCreateContract` deleted or renamed its instance variable `secret` + - Model `NamedValueCreateContract` deleted or renamed its instance variable `display_name` + - Model `NamedValueCreateContract` deleted or renamed its instance variable `value` + - Model `NamedValueCreateContract` deleted or renamed its instance variable `key_vault` + - Model `NamedValueUpdateParameters` deleted or renamed its instance variable `tags` + - Model `NamedValueUpdateParameters` deleted or renamed its instance variable `secret` + - Model `NamedValueUpdateParameters` deleted or renamed its instance variable `display_name` + - Model `NamedValueUpdateParameters` deleted or renamed its instance variable `value` + - Model `NamedValueUpdateParameters` deleted or renamed its instance variable `key_vault` + - Model `OpenidConnectProviderUpdateContract` deleted or renamed its instance variable `display_name` + - Model `OpenidConnectProviderUpdateContract` deleted or renamed its instance variable `description` + - Model `OpenidConnectProviderUpdateContract` deleted or renamed its instance variable `metadata_endpoint` + - Model `OpenidConnectProviderUpdateContract` deleted or renamed its instance variable `client_id` + - Model `OpenidConnectProviderUpdateContract` deleted or renamed its instance variable `client_secret` + - Model `OpenidConnectProviderUpdateContract` deleted or renamed its instance variable `use_in_test_console` + - Model `OpenidConnectProviderUpdateContract` deleted or renamed its instance variable `use_in_api_documentation` + - Model `OperationContract` deleted or renamed its instance variable `template_parameters` + - Model `OperationContract` deleted or renamed its instance variable `description` + - Model `OperationContract` deleted or renamed its instance variable `request` + - Model `OperationContract` deleted or renamed its instance variable `responses` + - Model `OperationContract` deleted or renamed its instance variable `policies` + - Model `OperationContract` deleted or renamed its instance variable `display_name` + - Model `OperationContract` deleted or renamed its instance variable `method` + - Model `OperationContract` deleted or renamed its instance variable `url_template` + - Model `OperationStatusResult` deleted or renamed its instance variable `resource_id` + - Model `OperationUpdateContract` deleted or renamed its instance variable `template_parameters` + - Model `OperationUpdateContract` deleted or renamed its instance variable `description` + - Model `OperationUpdateContract` deleted or renamed its instance variable `request` + - Model `OperationUpdateContract` deleted or renamed its instance variable `responses` + - Model `OperationUpdateContract` deleted or renamed its instance variable `policies` + - Model `OperationUpdateContract` deleted or renamed its instance variable `display_name` + - Model `OperationUpdateContract` deleted or renamed its instance variable `method` + - Model `OperationUpdateContract` deleted or renamed its instance variable `url_template` + - Model `ParameterContract` deleted or renamed its instance variable `values` + - Model `PolicyRestrictionUpdateContract` deleted or renamed its instance variable `scope` + - Model `PolicyRestrictionUpdateContract` deleted or renamed its instance variable `require_base` + - Model `PortalConfigContract` deleted or renamed its instance variable `enable_basic_auth` + - Model `PortalConfigContract` deleted or renamed its instance variable `signin` + - Model `PortalConfigContract` deleted or renamed its instance variable `signup` + - Model `PortalConfigContract` deleted or renamed its instance variable `delegation` + - Model `PortalConfigContract` deleted or renamed its instance variable `cors` + - Model `PortalConfigContract` deleted or renamed its instance variable `csp` + - Model `PortalSigninSettings` deleted or renamed its instance variable `enabled` + - Model `ProductContract` deleted or renamed its instance variable `description` + - Model `ProductContract` deleted or renamed its instance variable `terms` + - Model `ProductContract` deleted or renamed its instance variable `subscription_required` + - Model `ProductContract` deleted or renamed its instance variable `approval_required` + - Model `ProductContract` deleted or renamed its instance variable `subscriptions_limit` + - Model `ProductContract` deleted or renamed its instance variable `authentication_type` + - Model `ProductContract` deleted or renamed its instance variable `application` + - Model `ProductContract` deleted or renamed its instance variable `state` + - Model `ProductContract` deleted or renamed its instance variable `display_name` + - Model `ProductUpdateParameters` deleted or renamed its instance variable `description` + - Model `ProductUpdateParameters` deleted or renamed its instance variable `terms` + - Model `ProductUpdateParameters` deleted or renamed its instance variable `subscription_required` + - Model `ProductUpdateParameters` deleted or renamed its instance variable `approval_required` + - Model `ProductUpdateParameters` deleted or renamed its instance variable `subscriptions_limit` + - Model `ProductUpdateParameters` deleted or renamed its instance variable `authentication_type` + - Model `ProductUpdateParameters` deleted or renamed its instance variable `application` + - Model `ProductUpdateParameters` deleted or renamed its instance variable `state` + - Model `ProductUpdateParameters` deleted or renamed its instance variable `display_name` + - Model `QuotaCounterValueUpdateContract` deleted or renamed its instance variable `calls_count` + - Model `QuotaCounterValueUpdateContract` deleted or renamed its instance variable `kb_transferred` + - Model `RecipientUserContract` deleted or renamed its instance variable `user_id` + - Model `RemotePrivateEndpointConnectionWrapper` deleted or renamed its instance variable `private_endpoint` + - Model `RemotePrivateEndpointConnectionWrapper` deleted or renamed its instance variable `private_link_service_connection_state` + - Model `RemotePrivateEndpointConnectionWrapper` deleted or renamed its instance variable `provisioning_state` + - Model `RemotePrivateEndpointConnectionWrapper` deleted or renamed its instance variable `group_ids` + - Model `ResolverContract` deleted or renamed its instance variable `display_name` + - Model `ResolverContract` deleted or renamed its instance variable `path` + - Model `ResolverContract` deleted or renamed its instance variable `description` + - Model `ResolverUpdateContract` deleted or renamed its instance variable `display_name` + - Model `ResolverUpdateContract` deleted or renamed its instance variable `path` + - Model `ResolverUpdateContract` deleted or renamed its instance variable `description` + - Model `SaveConfigurationParameter` deleted or renamed its instance variable `branch` + - Model `SaveConfigurationParameter` deleted or renamed its instance variable `force` + - Model `SubscriptionCreateParameters` deleted or renamed its instance variable `owner_id` + - Model `SubscriptionCreateParameters` deleted or renamed its instance variable `scope` + - Model `SubscriptionCreateParameters` deleted or renamed its instance variable `display_name` + - Model `SubscriptionCreateParameters` deleted or renamed its instance variable `primary_key` + - Model `SubscriptionCreateParameters` deleted or renamed its instance variable `secondary_key` + - Model `SubscriptionCreateParameters` deleted or renamed its instance variable `state` + - Model `SubscriptionCreateParameters` deleted or renamed its instance variable `allow_tracing` + - Model `SubscriptionUpdateParameters` deleted or renamed its instance variable `owner_id` + - Model `SubscriptionUpdateParameters` deleted or renamed its instance variable `scope` + - Model `SubscriptionUpdateParameters` deleted or renamed its instance variable `expiration_date` + - Model `SubscriptionUpdateParameters` deleted or renamed its instance variable `display_name` + - Model `SubscriptionUpdateParameters` deleted or renamed its instance variable `primary_key` + - Model `SubscriptionUpdateParameters` deleted or renamed its instance variable `secondary_key` + - Model `SubscriptionUpdateParameters` deleted or renamed its instance variable `state` + - Model `SubscriptionUpdateParameters` deleted or renamed its instance variable `state_comment` + - Model `SubscriptionUpdateParameters` deleted or renamed its instance variable `allow_tracing` + - Model `TagCreateUpdateParameters` deleted or renamed its instance variable `display_name` + - Model `TagDescriptionContract` deleted or renamed its instance variable `description` + - Model `TagDescriptionContract` deleted or renamed its instance variable `external_docs_url` + - Model `TagDescriptionContract` deleted or renamed its instance variable `external_docs_description` + - Model `TagDescriptionContract` deleted or renamed its instance variable `tag_id` + - Model `TagDescriptionContract` deleted or renamed its instance variable `display_name` + - Model `TagDescriptionCreateParameters` deleted or renamed its instance variable `description` + - Model `TagDescriptionCreateParameters` deleted or renamed its instance variable `external_docs_url` + - Model `TagDescriptionCreateParameters` deleted or renamed its instance variable `external_docs_description` + - Model `UserContract` deleted or renamed its instance variable `state` + - Model `UserContract` deleted or renamed its instance variable `note` + - Model `UserContract` deleted or renamed its instance variable `identities` + - Model `UserContract` deleted or renamed its instance variable `first_name` + - Model `UserContract` deleted or renamed its instance variable `last_name` + - Model `UserContract` deleted or renamed its instance variable `email` + - Model `UserContract` deleted or renamed its instance variable `registration_date` + - Model `UserContract` deleted or renamed its instance variable `groups` + - Model `UserCreateParameters` deleted or renamed its instance variable `state` + - Model `UserCreateParameters` deleted or renamed its instance variable `note` + - Model `UserCreateParameters` deleted or renamed its instance variable `identities` + - Model `UserCreateParameters` deleted or renamed its instance variable `email` + - Model `UserCreateParameters` deleted or renamed its instance variable `first_name` + - Model `UserCreateParameters` deleted or renamed its instance variable `last_name` + - Model `UserCreateParameters` deleted or renamed its instance variable `password` + - Model `UserCreateParameters` deleted or renamed its instance variable `app_type` + - Model `UserCreateParameters` deleted or renamed its instance variable `confirmation` + - Model `UserTokenParameters` deleted or renamed its instance variable `key_type` + - Model `UserTokenParameters` deleted or renamed its instance variable `expiry` + - Model `UserUpdateParameters` deleted or renamed its instance variable `state` + - Model `UserUpdateParameters` deleted or renamed its instance variable `note` + - Model `UserUpdateParameters` deleted or renamed its instance variable `identities` + - Model `UserUpdateParameters` deleted or renamed its instance variable `email` + - Model `UserUpdateParameters` deleted or renamed its instance variable `password` + - Model `UserUpdateParameters` deleted or renamed its instance variable `first_name` + - Model `UserUpdateParameters` deleted or renamed its instance variable `last_name` + - Model `WikiUpdateContract` deleted or renamed its instance variable `documents` + - Deleted or renamed model `AccessInformationCollection` + - Deleted or renamed model `AllPoliciesCollection` + - Deleted or renamed model `ApiCollection` + - Deleted or renamed model `ApiManagementSkusResult` + - Deleted or renamed model `ApiReleaseCollection` + - Deleted or renamed model `ApiRevisionCollection` + - Deleted or renamed model `ApiRevisionInfoContract` + - Deleted or renamed model `ApiVersionSetCollection` + - Deleted or renamed model `AsyncResolverStatus` + - Deleted or renamed model `AuthorizationAccessPolicyCollection` + - Deleted or renamed model `AuthorizationCollection` + - Deleted or renamed model `AuthorizationProviderCollection` + - Deleted or renamed model `AuthorizationServerCollection` + - Deleted or renamed model `BackendCollection` + - Deleted or renamed model `CacheCollection` + - Deleted or renamed model `CertificateCollection` + - Deleted or renamed model `ClientApplicationCollection` + - Deleted or renamed model `ClientApplicationProductLinkCollection` + - Deleted or renamed model `ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration` + - Deleted or renamed model `ContentItemCollection` + - Deleted or renamed model `ContentTypeCollection` + - Deleted or renamed model `DeletedServicesCollection` + - Deleted or renamed model `DiagnosticCollection` + - Deleted or renamed model `DocumentationCollection` + - Deleted or renamed model `EmailTemplateCollection` + - Deleted or renamed model `GatewayCertificateAuthorityCollection` + - Deleted or renamed model `GatewayCollection` + - Deleted or renamed model `GatewayHostnameConfigurationCollection` + - Deleted or renamed model `GatewayResourceSkuResults` + - Deleted or renamed model `GlobalSchemaCollection` + - Deleted or renamed model `GroupCollection` + - Deleted or renamed model `IdentityProviderList` + - Deleted or renamed model `IssueAttachmentCollection` + - Deleted or renamed model `IssueCollection` + - Deleted or renamed model `IssueCommentCollection` + - Deleted or renamed model `LoggerCollection` + - Deleted or renamed model `NamedValueCollection` + - Deleted or renamed model `NotificationCollection` + - Deleted or renamed model `OpenIdConnectProviderCollection` + - Deleted or renamed model `OperationCollection` + - Deleted or renamed model `PolicyFragmentCollection` + - Deleted or renamed model `PolicyRestrictionCollection` + - Deleted or renamed model `PolicyWithComplianceCollection` + - Deleted or renamed model `PolicyWithComplianceContract` + - Deleted or renamed model `PortalConfigCollection` + - Deleted or renamed model `PortalRevisionCollection` + - Deleted or renamed model `ProductApiLinkCollection` + - Deleted or renamed model `ProductCollection` + - Deleted or renamed model `ProductGroupLinkCollection` + - Deleted or renamed model `QuotaCounterValueContract` + - Deleted or renamed model `ReportCollection` + - Deleted or renamed model `RequestReportCollection` + - Deleted or renamed model `ResolverCollection` + - Deleted or renamed model `ResolverResultContract` + - Deleted or renamed model `ResolverResultLogItemContract` + - Deleted or renamed model `ResourceSkuResults` + - Deleted or renamed model `SchemaCollection` + - Deleted or renamed model `SubscriptionCollection` + - Deleted or renamed model `TagApiLinkCollection` + - Deleted or renamed model `TagCollection` + - Deleted or renamed model `TagDescriptionCollection` + - Deleted or renamed model `TagOperationLinkCollection` + - Deleted or renamed model `TagProductLinkCollection` + - Deleted or renamed model `TagResourceCollection` + - Deleted or renamed model `TenantSettingsCollection` + - Deleted or renamed model `ToolCollection` + - Deleted or renamed model `UserCollection` + - Deleted or renamed model `UserIdentityCollection` + - Deleted or renamed model `WikiCollection` + - Deleted or renamed model `WorkspaceCollection` + - Method `ApiDiagnosticOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiDiagnosticOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiDiagnosticOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiExportOperations.get` changed its parameter `format` from `positional_or_keyword` to `keyword_only` + - Method `ApiExportOperations.get` changed its parameter `export` from `positional_or_keyword` to `keyword_only` + - Method `ApiGatewayConfigConnectionOperations.begin_delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiGatewayHostnameBindingOperations.begin_create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiGatewayHostnameBindingOperations.begin_delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiIssueAttachmentOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiIssueAttachmentOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiIssueCommentOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiIssueCommentOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiIssueOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiIssueOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiIssueOperations.get` changed its parameter `expand_comments_attachments` from `positional_or_keyword` to `keyword_only` + - Method `ApiIssueOperations.list_by_service` changed its parameter `expand_comments_attachments` from `positional_or_keyword` to `keyword_only` + - Method `ApiIssueOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiOperationOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiOperationOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiOperationOperations.list_by_api` changed its parameter `tags` from `positional_or_keyword` to `keyword_only` + - Method `ApiOperationOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiOperationPolicyOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiOperationPolicyOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiOperationPolicyOperations.get` parameter `format` changed default value from `str` to `none` + - Method `ApiOperationPolicyOperations.get` changed its parameter `format` from `positional_or_keyword` to `keyword_only` + - Method `ApiOperations.begin_create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiOperations.begin_delete` changed its parameter `delete_revisions` from `positional_or_keyword` to `keyword_only` + - Method `ApiOperations.begin_delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiOperations.list_by_service` changed its parameter `tags` from `positional_or_keyword` to `keyword_only` + - Method `ApiOperations.list_by_service` changed its parameter `expand_api_version_set` from `positional_or_keyword` to `keyword_only` + - Method `ApiOperations.list_by_tags` changed its parameter `include_not_tagged_apis` from `positional_or_keyword` to `keyword_only` + - Method `ApiOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiPolicyOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiPolicyOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiPolicyOperations.get` parameter `format` changed default value from `str` to `none` + - Method `ApiPolicyOperations.get` changed its parameter `format` from `positional_or_keyword` to `keyword_only` + - Method `ApiReleaseOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiReleaseOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiReleaseOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiSchemaOperations.begin_create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiSchemaOperations.delete` changed its parameter `force` from `positional_or_keyword` to `keyword_only` + - Method `ApiSchemaOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiTagDescriptionOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiTagDescriptionOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiVersionSetOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiVersionSetOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiVersionSetOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiWikiOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiWikiOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ApiWikiOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `AuthorizationAccessPolicyOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `AuthorizationAccessPolicyOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `AuthorizationOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `AuthorizationOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `AuthorizationProviderOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `AuthorizationProviderOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `AuthorizationServerOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `AuthorizationServerOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `AuthorizationServerOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `BackendOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `BackendOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `BackendOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `CacheOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `CacheOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `CacheOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `CertificateOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `CertificateOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `CertificateOperations.list_by_service` changed its parameter `is_key_vault_refresh_failed` from `positional_or_keyword` to `keyword_only` + - Method `ContentItemOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ContentItemOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ContentTypeOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ContentTypeOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `DelegationSettingsOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `DelegationSettingsOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `DiagnosticOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `DiagnosticOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `DiagnosticOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `DocumentationOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `DocumentationOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `DocumentationOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `EmailTemplateOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `EmailTemplateOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `EmailTemplateOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GatewayCertificateAuthorityOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GatewayCertificateAuthorityOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GatewayHostnameConfigurationOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GatewayHostnameConfigurationOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GatewayOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GatewayOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GatewayOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GlobalSchemaOperations.begin_create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GlobalSchemaOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GraphQLApiResolverOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GraphQLApiResolverOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GraphQLApiResolverOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GraphQLApiResolverPolicyOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GraphQLApiResolverPolicyOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GraphQLApiResolverPolicyOperations.get` parameter `format` changed default value from `str` to `none` + - Method `GraphQLApiResolverPolicyOperations.get` changed its parameter `format` from `positional_or_keyword` to `keyword_only` + - Method `GroupOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GroupOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GroupOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `IdentityProviderOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `IdentityProviderOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `IdentityProviderOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `LoggerOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `LoggerOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `LoggerOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `NamedValueOperations.begin_create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `NamedValueOperations.begin_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `NamedValueOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `NamedValueOperations.list_by_service` changed its parameter `is_key_vault_refresh_failed` from `positional_or_keyword` to `keyword_only` + - Method `NotificationOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `OpenIdConnectProviderOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `OpenIdConnectProviderOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `OpenIdConnectProviderOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `OperationOperations.list_by_tags` changed its parameter `include_not_tagged_operations` from `positional_or_keyword` to `keyword_only` + - Method `PolicyDescriptionOperations.list_by_service` changed its parameter `scope` from `positional_or_keyword` to `keyword_only` + - Method `PolicyFragmentOperations.begin_create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `PolicyFragmentOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `PolicyFragmentOperations.get` changed its parameter `format` from `positional_or_keyword` to `keyword_only` + - Method `PolicyFragmentOperations.list_by_service` changed its parameter `orderby` from `positional_or_keyword` to `keyword_only` + - Method `PolicyOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `PolicyOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `PolicyOperations.get` parameter `format` changed default value from `str` to `none` + - Method `PolicyOperations.get` changed its parameter `format` from `positional_or_keyword` to `keyword_only` + - Method `PolicyRestrictionOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `PolicyRestrictionOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `PolicyRestrictionOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `PortalConfigOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `PortalConfigOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `PortalRevisionOperations.begin_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ProductOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ProductOperations.delete` changed its parameter `delete_subscriptions` from `positional_or_keyword` to `keyword_only` + - Method `ProductOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ProductOperations.list_by_service` changed its parameter `expand_groups` from `positional_or_keyword` to `keyword_only` + - Method `ProductOperations.list_by_service` changed its parameter `tags` from `positional_or_keyword` to `keyword_only` + - Method `ProductOperations.list_by_tags` changed its parameter `include_not_tagged_products` from `positional_or_keyword` to `keyword_only` + - Method `ProductOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ProductPolicyOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ProductPolicyOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ProductPolicyOperations.get` parameter `format` changed default value from `str` to `none` + - Method `ProductPolicyOperations.get` changed its parameter `format` from `positional_or_keyword` to `keyword_only` + - Method `ProductWikiOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ProductWikiOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ProductWikiOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ReportsOperations.list_by_api` changed its parameter `orderby` from `positional_or_keyword` to `keyword_only` + - Method `ReportsOperations.list_by_operation` changed its parameter `orderby` from `positional_or_keyword` to `keyword_only` + - Method `ReportsOperations.list_by_product` changed its parameter `orderby` from `positional_or_keyword` to `keyword_only` + - Method `ReportsOperations.list_by_subscription` changed its parameter `orderby` from `positional_or_keyword` to `keyword_only` + - Method `ReportsOperations.list_by_time` changed its parameter `interval` from `positional_or_keyword` to `keyword_only` + - Method `ReportsOperations.list_by_time` changed its parameter `orderby` from `positional_or_keyword` to `keyword_only` + - Method `ReportsOperations.list_by_user` changed its parameter `orderby` from `positional_or_keyword` to `keyword_only` + - Method `SignInSettingsOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `SignInSettingsOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `SignUpSettingsOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `SignUpSettingsOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `SubscriptionOperations.create_or_update` changed its parameter `notify` from `positional_or_keyword` to `keyword_only` + - Method `SubscriptionOperations.create_or_update` changed its parameter `app_type` from `positional_or_keyword` to `keyword_only` + - Method `SubscriptionOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `SubscriptionOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `SubscriptionOperations.update` changed its parameter `notify` from `positional_or_keyword` to `keyword_only` + - Method `SubscriptionOperations.update` changed its parameter `app_type` from `positional_or_keyword` to `keyword_only` + - Method `SubscriptionOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `TagOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `TagOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `TagOperations.list_by_service` changed its parameter `scope` from `positional_or_keyword` to `keyword_only` + - Method `TagOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `TenantAccessOperations.create` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `TenantAccessOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `UserConfirmationPasswordOperations.send` changed its parameter `app_type` from `positional_or_keyword` to `keyword_only` + - Method `UserOperations.begin_delete` changed its parameter `delete_subscriptions` from `positional_or_keyword` to `keyword_only` + - Method `UserOperations.begin_delete` changed its parameter `notify` from `positional_or_keyword` to `keyword_only` + - Method `UserOperations.begin_delete` changed its parameter `app_type` from `positional_or_keyword` to `keyword_only` + - Method `UserOperations.begin_delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `UserOperations.create_or_update` changed its parameter `notify` from `positional_or_keyword` to `keyword_only` + - Method `UserOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `UserOperations.list_by_service` changed its parameter `expand_groups` from `positional_or_keyword` to `keyword_only` + - Method `UserOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiDiagnosticOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiDiagnosticOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiDiagnosticOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiExportOperations.get` changed its parameter `format` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceApiExportOperations.get` changed its parameter `export` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceApiOperationOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiOperationOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiOperationOperations.list_by_api` changed its parameter `tags` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceApiOperationOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiOperationPolicyOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiOperationPolicyOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiOperationPolicyOperations.get` parameter `format` changed default value from `str` to `none` + - Method `WorkspaceApiOperationPolicyOperations.get` changed its parameter `format` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceApiOperations.begin_create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiOperations.delete` changed its parameter `delete_revisions` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceApiOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiOperations.list_by_service` changed its parameter `tags` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceApiOperations.list_by_service` changed its parameter `expand_api_version_set` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceApiOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiPolicyOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiPolicyOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiPolicyOperations.get` parameter `format` changed default value from `str` to `none` + - Method `WorkspaceApiPolicyOperations.get` changed its parameter `format` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceApiReleaseOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiReleaseOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiReleaseOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiSchemaOperations.begin_create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiSchemaOperations.delete` changed its parameter `force` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceApiSchemaOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiVersionSetOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiVersionSetOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceApiVersionSetOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceBackendOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceBackendOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceBackendOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceCertificateOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceCertificateOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceCertificateOperations.list_by_workspace` changed its parameter `is_key_vault_refresh_failed` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceDiagnosticOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceDiagnosticOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceDiagnosticOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceGlobalSchemaOperations.begin_create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceGlobalSchemaOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceGroupOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceGroupOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceGroupOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceLoggerOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceLoggerOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceLoggerOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceNamedValueOperations.begin_create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceNamedValueOperations.begin_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceNamedValueOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceNamedValueOperations.list_by_service` changed its parameter `is_key_vault_refresh_failed` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceNotificationOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspacePolicyFragmentOperations.begin_create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspacePolicyFragmentOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspacePolicyFragmentOperations.get` changed its parameter `format` from `positional_or_keyword` to `keyword_only` + - Method `WorkspacePolicyFragmentOperations.list_by_service` changed its parameter `orderby` from `positional_or_keyword` to `keyword_only` + - Method `WorkspacePolicyOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspacePolicyOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspacePolicyOperations.get` parameter `format` changed default value from `str` to `none` + - Method `WorkspacePolicyOperations.get` changed its parameter `format` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceProductOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceProductOperations.delete` changed its parameter `delete_subscriptions` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceProductOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceProductOperations.list_by_service` changed its parameter `expand_groups` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceProductOperations.list_by_service` changed its parameter `tags` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceProductOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceProductPolicyOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceProductPolicyOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceProductPolicyOperations.get` parameter `format` changed default value from `str` to `none` + - Method `WorkspaceProductPolicyOperations.get` changed its parameter `format` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceSubscriptionOperations.create_or_update` changed its parameter `notify` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceSubscriptionOperations.create_or_update` changed its parameter `app_type` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceSubscriptionOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceSubscriptionOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceSubscriptionOperations.update` changed its parameter `notify` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceSubscriptionOperations.update` changed its parameter `app_type` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceSubscriptionOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceTagOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceTagOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `WorkspaceTagOperations.list_by_service` changed its parameter `scope` from `positional_or_keyword` to `keyword_only` + - Method `WorkspaceTagOperations.update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `DeletedServicesOperations.get_by_name` re-ordered its parameters from `['self', 'service_name', 'location', 'kwargs']` to `['self', 'location', 'service_name', 'kwargs']` + - Method `DeletedServicesOperations.begin_purge` re-ordered its parameters from `['self', 'service_name', 'location', 'kwargs']` to `['self', 'location', 'service_name', 'kwargs']` ## 5.0.0 (2025-04-21)